Repository navigation
fix(release): stamp and check bun.lock workspace versions in the release bump #2247 - #2248
Merged
Merged
Conversation
…ase bump #2247 Signed-off-by: Nik Cubrilovic <[email protected]>
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
Release bumps moved
apps/cli/package.jsonandnpm/package.jsonbut left theapps/cliworkspace entry inbun.lockbehind (0.0.190-beta.1whilepackage.jsonsays0.0.190).bun install --frozen-lockfiledoes not compare workspace versions, so the drift surfaced as a stray hunk in an unrelated PR.scripts/lockfile-versions.ts: readsbun.lockworkspace versions (Bun.JSONC), reports every workspace whosepackage.jsonversion disagrees (package plus both versions), and stamps a workspace's version with a one-line text edit that keeps bun's format.scripts/sync-plugin-manifests.ts(whichmake releasealready runs in the bump PR, and which CI and release.yml run with--check) now stamps driftedbun.lockworkspace versions in write mode and fails--checkon drift. An entry that gains or loses a version line is not text-stamped: it fails with "Run: bun install".scripts/release.ts: after the sync it asserts that the lock matches (fails the bump, naming each package and both versions) and stagesbun.lockin the same commit as the manifests.bun.lock:apps/clicorrected to0.0.190, so the new CI check passes on main.Closes #2247
Acceptance criteria
bun.lockworkspace version in the same commit as thepackage.jsonchanges:release.tsrunssync-plugin-manifests.ts, which stamps the lock, then runsgit add apps/cli/package.json npm/package.json bun.lockbefore the singlegit commit -s. Ranbun run scripts/sync-plugin-manifests.tson main:Synced to version 0.0.190: apps/cli: package.json 0.0.190, bun.lock 0.0.190-beta.1, with a one-linebun.lockdiff.sync-plugin-manifests.ts --checkon main before the fix printsapps/cli: package.json 0.0.190, bun.lock 0.0.190-beta.1and exits 1;assertLockMatchesin release.ts does the same during the bump. Tests inscripts/lockfile-versions.test.ts: "a disagreeing pair is reported with the package and both versions" and "an agreeing pair reports no drift", plus a guard on the real tree ("this repo's bun.lock agrees with every workspace package.json"), which fails when the oldbun.lockis restored.bun.lockon main listsapps/cliat the released version: this can only be ticked after the next bump. For now, this PR corrects the lock to0.0.190, and a plainbun installon this branch leavesbun.lockunchanged (cmpagainst a copy taken before the install: identical, "no changes").Gates
bun test scripts/lockfile-versions.test.ts scripts/release-version.test.ts: 26 pass, 0 failscripts/*.test.tsfiles, run by explicit path in batches of 5 with--timeout 30000: 417 pass, 0 failbun run scripts/sync-plugin-manifests.ts --check: in syncbun run scripts/test-suites.ts --check: covered (the new test lands inrest);bash scripts/test-ci-classify.sh: 42 cases passrelease.tsalso show up on base)bun scripts/changelog.ts check: OK. No changelog entry because this only changes contributor release tooling.Agent skill: no change needed.
Hold-list (release tooling): draft for Opus review.