fix(justfile): refresh package-lock.json during set-version#37
Open
ClaydeCode wants to merge 2 commits into
Open
fix(justfile): refresh package-lock.json during set-version#37ClaydeCode wants to merge 2 commits into
ClaydeCode wants to merge 2 commits into
Conversation
set-version bumped package.json but left package-lock.json untouched, so the lock's recorded project version drifted with every release (0.39.6 vs 0.38.1 on main). Run `npm install --package-lock-only` so the lock tracks the manifest in the same commit, without touching node_modules. Also replace `git add .` with an explicit path list so untracked local state cannot be swept into a version commit.
Repair the drift the old set-version recipe left behind: the lock still recorded 0.38.1 while package.json was at 0.39.6. Generated by running the fixed `just set-version 0.39.6`.
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.
Fixes #35.
just set-versionbumpedpackage.jsonbut never refreshedpackage-lock.json, so the lock's recorded project version drifted with every release —mainhadpackage.jsonat 0.39.6 while the lock still said 0.38.1. The recipe also usedgit add ., which would sweep any untracked local state into a version commit.Changes
justfile— runnpm install --package-lock-onlyafter thepackage.jsonedit so the lock tracks the manifest in the same commit (rewrites the lockfile without touchingnode_modules), and replacegit add .with the explicit path listpackage.json package-lock.json.package-lock.json— repair the existing drift by syncing the recorded version to 0.39.6. Generated by running the fixed recipe, not hand-edited.Same fix pattern as shard_core: FreeshardBase/freeshard#153
Verification
Ran the fixed recipe end-to-end with a stray untracked file present:
package-lock.jsononly (package.jsonwas already at 0.39.6).git add .no longer sweeps local state.lockfileVersionstays at 2 under npm 9 (no v2 → v3 upgrade churn).Snapshot CI runs
npm install, notnpm ci, so the lock change carries no CI risk.Recommended reading order
justfile— the actual fixpackage-lock.json— mechanical output of the fix🤖 Generated with Claude Code