Repository navigation
chore: adopt the release standard - #71
Open
crcatala-vps wants to merge 3 commits into
Open
crcatala-vps wants to merge 3 commits into
crcatala-vps wants to merge 3 commits into
Conversation
Copy the canonical release scripts byte for byte from the release standard (prep-release.sh, check-changelog.sh, release.mjs, build-info.mjs, test-package.sh) and keep the project-specific package checks in scripts/test-package.local.sh, which the canonical smoke test sources: the single-shebang check, the version-equals-package.json check, and the Axios deprecation-warning check. - release-it no longer publishes; scripts/release.mjs publishes after the tag so the published build carries the release commit - add release:publish and point release/release:dry/release:prep at the wrapped scripts - build stamps dist/build-info.json, shipped through package.json "files" - ggshield stays in prepublishOnly: CI runs `npm pack` (prepack) but has no ggshield installed, so moving the scan into prepack would break CI The prep-release.sh wording changed with the canonical copy, so the release prep test now asserts the new line. Co-authored-by: Christian Catalan <crcatala@gmail.com>
- --version / -V now print `rd X.Y.Z (sha7[-dirty] YYYY-MM-DD)`: the build stamp when running from dist/, git when running from src/ - `rd update` with no bookmark ID updates rd the way it was installed (source checkout, npm/pnpm/bun global, mise, npx); `--check` reports only (exit 0 up to date, 1 update available, 2 unknown) and `--force` reinstalls when current - `rd update <id> [options]` and `rd update --help` still reach `rd bookmarks update`, so the existing bookmark shortcut is unchanged - tests cover the version line format, the update --check exit codes, the bookmark delegation, and the path helpers used by the update command Co-authored-by: Christian Catalan <crcatala@gmail.com>
- README Install: registry install, a From source section (clone, bun install, build, link, verify the commit on PATH) and an Updating section; the Node requirement now matches package.json (22+) - the README Releasing section points at the new RELEASING.md, which keeps the maintainer prerequisites (npm login, GITHUB_TOKEN, ggshield), the changelog workflow and the recovery steps per failed release step - CHANGELOG: Unreleased entries for the new `rd update` command and the new --version format Co-authored-by: Christian Catalan <crcatala@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Applies the shared release standard to
raindrop-cli: canonical release scripts byte for byte,vX.Y.Ztags released by hand from a cleanmainwith publishing last from the tag, therd X.Y.Z (sha7[-dirty] YYYY-MM-DD)version line, a realrd updatecommand, an install-from-source section, andRELEASING.md. No version bump, no release, no publish.What changed
Canonical copies (byte for byte,
scripts/)scripts/prep-release.sh,scripts/check-changelog.sh(replaced the repo's own versions)scripts/release.mjs(wraps release-it: preflight → bump/changelog/commit/tag/push/GitHub Release → publish from the tag)scripts/build-info.mjs(stampsdist/build-info.jsonat the end ofbuild)scripts/test-package.sh(packs, installs the tarball as a user would, checks everybinanswers--helpand prints the standard--versionline)Project-specific checks moved to
scripts/test-package.local.sh(sourced by the canonical smoke test, nothing dropped):dist/cli.jsrd --versionreports this package'spackage.jsonversionDeprecationWarningpackage.jsonfilesshipsdist/build-info.json;buildends withnode scripts/build-info.mjsrelease/release:dry/release:preppoint at the wrapped scripts; newrelease:publishbun(prepack,verify, hooks).release-it.jsonnpm.publish: false(release.mjs publishes after the tag, so the published build carries the release commit and a clean tree); schema bumped to release-it 21; hooks keepbun run verify/bun run test:packageCLI (
src/cli-meta.ts,src/cli/program.ts)--version/-Vprintrd X.Y.Z (sha7[-dirty] YYYY-MM-DD);dist/reports the build stamp,src/reads gitrd update(no ID) updates the way it was installed: checkout (git pull --ff-only, install, build; refuses when dirty or not onmain), npm/pnpm/bun global, mise, npx;--checkreports only (0 up to date / 1 available / 2 unknown),--forcereinstalls when currentrd update <id> …andrd update --helpstill reachrd bookmarks update, so the existing bookmark shortcut is unchangedDocs
## Installation: registry install, new From source (clone,bun install,bun run build,bun link,rd --version) and Updating sections; the Node requirement now matchesengines(22+)## Releasingnow points at the newRELEASING.md, which carries the maintainer prerequisites (npm login,GITHUB_TOKEN,ggshield), the changelog workflow and per-step recovery## [Unreleased]gained entries for the newrd updatecommand and the new--versionformat (no release sections added)Tests
--versiontests assert the new format (subprocess and in-process)src/cli-meta.test.tscoversformatVersion,versionLine,compareVersions, and the git URL helpersrd update --checkexits 0/1/2,rd update <id>still delegates,rd update --helpshows the bookmark formsrc/release-prep.test.tsfollows the canonical prep-release wordingKept non-standard, and why
ggshieldscans stay inprepublishOnly, notprepack. The standard puts build-output scans inprepackso they see a freshdist/. Here CI runs the package smoke test, and the canonical smoke test runsnpm pack, which firesprepack— CI has noggshieldinstalled, so moving the scan there would fail CI.prepublishOnlyalready builds and then scans both the source tree and that freshdist/in one command, andprepackrebuilds the same tree for the tarball, so the publish gate still scans the published content. Both original scans are preserved.release:dryneedsnpm whoami. The canonicalrelease.mjspreflight refuses to plan a release without an npm login (correct — the publish step needs it); this machine has no npm login, sobun run release:drystops withnot logged in to npm. The wrappedrelease-it --dry-run …was run directly instead (see Verification).src/cli-meta.tsis reformatted with Prettier (it is an adapted, non-canonical template) to satisfyprettier --check src/**/*.ts; only line wrapping changed.verify(tests, lint, typecheck, format, package smoke test, all in parallel viascripts/verify.ts) and itsbunpackage manager are unchanged.Verification
Run locally on
chore/release-standard(clean tree, HEADc2e90d9):bun run verifybun run test:verbose -- --coverage(CI test command)bun run lint:verbose/typecheck:verbose/format:check:verbosebun run builddist/build-info.json={version: 0.3.1, commit: c2e90d9…, date: 2026-10-27, dirty: false}bun run test:packagePackage smoke test passed.(3 bins:--help+ standard--version, plus the local checks)./dist/cli.js --versionand-Vrd 0.3.1 (c2e90d9 2026-10-27)— this commit./dist/cli.js update --checkrd is up to date (c2e90d9)., exit 0./dist/cli.js update not-a-number --title xInvalid bookmark ID…, exit 2 (bookmark shortcut intact, no API call)./dist/cli.js update --helpUsage: rd bookmarks update …, exit 0bun run release:drynot logged in to npm (run npm login)— expected here, no login exists andrelease.mjswas not modifiednpx release-it --dry-run --ci --no-npm --no-github --git.requireBranch=chore/release-standard0.3.1…0.3.2, changelog from Unreleased,git commit --message chore: release v0.3.2,git tag --annotate --message Release 0.3.2 v0.3.2,git push --follow-tags;🏁 Done; working tree left clean, no tags createdpython3 …/audit.py .