Repository navigation
chore: adopt the release standard - #31
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 standard's canonical scripts byte for byte (release.mjs, build-info.mjs, test-package.sh, prep-release.sh, check-changelog.sh) and keep them out of prettier so format:check cannot rewrite them. The published npm package is now the repository root (packages/cli becomes the private @flashlink/cli build package), which is what the standard's release.mjs needs: it publishes the root package after release-it has committed, tagged and pushed, so the published build is stamped with the release commit. The tarball ships packages/cli/dist, dist/build-info.json, the README and the LICENSE, and prepublishOnly still refuses anything but the tagged, synced, not-yet-published commit before running verify. Project-specific release steps move to scripts/release-local.mjs (preflight, check-version, sync-version, notes, publish-check) and are wired into the release-it hooks, the release workflow and npm's prepublishOnly; nothing from the old flow is dropped. Adds test:package (with project checks in scripts/test-package.local.sh) and prepack, so a release packs and installs the tarball after the bump. Co-authored-by: Christian Catalan <crcatala@gmail.com>
`fl --version` (and -V) now prints `fl X.Y.Z (sha7 YYYY-MM-DD)` everywhere: a build stamps dist/build-info.json (scripts/build-info.mjs) and reports it, a run from source in a checkout reads git instead, and `-dirty` marks a build from uncommitted changes. Standalone (Bun) binaries embed the commit and its date at compile time. The macOS installer and Finder menu strip the new name prefix, so their "fl X.Y.Z (sha date)" labels are unchanged. `fl update` updates the way fl was installed: a clone is pulled and rebuilt (refusing a dirty tree or another branch), a global npm/pnpm/bun install is reinstalled from npm, mise uses `mise upgrade --bump`, npx explains itself, and anything else prints the manual steps and exits 1. `--check` only reports (0 up to date, 1 update available, 2 unknown) and `--force` updates anyway. The version/update module lives at src/cli-meta.ts in the published package root and is bundled into packages/cli/dist. Co-authored-by: Christian Catalan <crcatala@gmail.com>
Rewrite RELEASING.md for the wrapped release-it flow (preflight, changelog check, verify, bump, smoke test, tag, publish from the tag) and the recovery steps, note which files are canonical copies, and add the README's Install section with From source and Updating. Update the CLI reference, DEVELOPMENT and ARCHITECTURE for the new version line, `fl update` and the one published package. 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 flashlink: the canonical release scripts, a commit-stamped
fl --version, a newfl update [--check] [--force], a publish-last release flow, and the standard README Install section. The version stays0.0.3; nothing is released.Audit:
0 failing, 0 warnings, 27 checks.The standard's
scripts/release.mjs(canonical, byte-identical) publishes the root package. In flashlink, the published package used to bepackages/cli. To keep the canonical script unmodified, this PR:package.jsonfrom the privateflashlink-monorepoto the publicflashlinkpackage. It takes over the metadata,bin(fl,flashlink→./packages/cli/dist/index.js),files,publishConfig,repositoryand the runtimedependencies(commander,mime);packages/cliinto the private@flashlink/clibuild-only package (sources and tests stay where they are; it is no longer published, and its LICENSE/README copies are removed in favour of the root ones);build=pnpm --filter @flashlink/cli build && node scripts/build-info.mjs, so the tarball shipspackages/cli/dist/index.jsplusdist/build-info.json.What it means:
npm install -g flashlinkinstalls the samefl/flashlinkcommands. Only the internal file path in the tarball changes (dist/index.js→packages/cli/dist/index.js).pnpm release), not frompackages/cli. The macOS binary scripts,install.sh, the release workflow and the docs were updated for the new paths.packages/clias the published package and accept a non-canonicalrelease.mjs(the audit would flag it). This was not done because it breaks the standard's byte-identical contract.What changed
scripts/prep-release.sh,scripts/check-changelog.sh,scripts/release.mjs,scripts/build-info.mjs,scripts/test-package.sh. They are listed in.prettierignoreso formatting cannot change them.scripts/release.mjsmoved toscripts/release-local.mjs(preflight,check-version,sync-version,notes,publish-check), wired into the release-it hooks andprepublishOnly. No safeguard was dropped..release-it.json:before:init= local preflight, changelog check,pnpm run verify;after:bumpaddspnpm run test:package;npm.publishstaysfalseandgithub.releasestaysfalse(CI's release workflow still creates the GitHub Release with the macOS binaries).package.jsonscripts:test:package,prepack(build),prepublishOnly(publish-check + verify).packages/cli/src/index.ts,src/cli-meta.ts):fl --versionprintsfl 0.0.3 (sha7 YYYY-MM-DD)(-dirtyfor uncommitted builds); newfl update [--check] [--force]. A standalone macOS binary prints the manual update steps and exits 1.scripts/test-package.local.sh: tarball contents and both bins.## Installgains From source and Updating;RELEASING.mdrewritten from the template for pnpm and the root package;docs/CLI.md,docs/DEVELOPMENT.md,docs/ARCHITECTURE.mdupdated;CHANGELOG.mdhas Unreleased entries only.cli-meta.test.ts;release.test.ts,engines.test.tsandprocess.test.tsupdated for the new layout. Timeouts were raised only on the two real-gitrelease.test.tstests.Verification
pnpm format:check/pnpm typecheckpnpm testmaincheckout.pnpm builddist/build-info.jsonstamped with this commit,dirty: falsewrangler deploy --dry-runpnpm test:packagePackage smoke test passed.(LICENSE, README, package.json,dist/build-info.json,packages/cli/dist/index.js)sh scripts/package-release.sh+sha256sum -cfl --version(local build)fl 0.0.3 (4f2910b 2026-10-27)fl update --checkpnpm release:drynpx release-it --dry-run --ci --no-npm --no-github --git.requireBranch=chore/release-standardchore: release v0.0.4and annotated tagv0.0.4; tree left clean, no tag createdcheck,binaries, GitGuardian, Socket: all passNo release, tag, publish or GitHub Release was created.
🤖 Generated with Claude Code