Repository navigation
bump-version: also update the member's version in bun.lock - #39
Merged
Merged
Conversation
…un.lock In a Bun workspace bun.lock lives at the workspace root and records each member's version under "workspaces" → "<member path>". The bump changed apps/web/package.json but left bun.lock at the old version: --frozen-lockfile still accepts it, but the next bun install rewrites the line (found by the TDD review of firsttris/snapraid-ui#82). For a package.json version file the bump now finds bun.lock in its folder or the nearest one above it up to the repository root and replaces the version in exactly that member's entry, in place, so the rest of the file stays as Bun wrote it. Also when the entry is still at an older version from an earlier bump. The root package has no version in bun.lock; there the lock is left alone. The package-lock.json and Cargo.lock handling is unchanged. tests/bump-version/test.sh runs the step's Python on fixtures (member, stale lock, root package, package-lock.json, Cargo.lock) and checks that bun install --frozen-lockfile and bun install leave the bumped lock unchanged; the Lint workflow runs it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y3rdfbWb1xDUdPRng7TX9Z
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.
In a Bun workspace,
bun.lockat the workspace root records each member's version under"workspaces"→"<member path>". The bump changed e.g.apps/web/package.jsonbut leftbun.lockat the old version:--frozen-lockfilestill accepts it, but the nextbun installrewrites the line. Found by the TDD review of firsttris/snapraid-ui#82.package.jsonversion file, the bump findsbun.lockin its folder or the nearest one above it (up to the repository root) and replaces the version in exactly that member's entry, in place (no reformatting). It also does this when the entry still has an older version from an earlier bump.package-lock.jsonandCargo.lockwork as before.tests/bump-version/test.shruns the step's Python, taken from the YAML, on fixtures, and the Lint workflow runs it (newbump-versionjob, Bun 1.4.4). Cases: workspace member (lock updated,bun install --frozen-lockfileandbun installleave it unchanged), stale lock, root package (lock untouched), package-lock.json, Cargo.lock.Red on the old workflow: 5 failures in the two Bun member cases. Green with the fix. Also checked by hand on a copy of snapraid-ui's manifests: bump
apps/web/package.json1.3.3 → 1.3.4, thenbun install --lockfile-onlyleavesbun.lockunchanged.After merging, run Move major tag so callers on
@v1get the fix.Generated by Claude Code