Repository navigation
fix(#720): resolve corrupt package-lock.json (9 stash-conflict blocks) - #721
Merged
Merged
Conversation
PR #716 (512840f) committed package-lock.json with 9 unresolved `git stash` conflict blocks (27 marker lines), leaving the lockfile as invalid JSON. `npm ci` from a fresh clone fails. npm consumers were unaffected (the lockfile isn't published) and `npm install`/tsc/vitest tolerate the existing node_modules, so nothing flagged it — only a strict `npm ci` parse does. Regenerated via `npm install --package-lock-only`, which recomputes the dependency tree and drops the spurious `"dev": true` flags on production-reachable transitive deps (cross-spawn, debug, fast-deep-equal, isexe, ms, path-key, shebang-command, +2). Verified: 0 conflict markers, valid JSON, `npm ci --dry-run` parses clean. Entire-Checkpoint: e6beafa2df2c
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.
Closes #720.
Problem
main'spackage-lock.jsonhas been invalid JSON since PR #716 (512840f): agit stash popleft 9 unresolved conflict blocks (27 marker lines) that were committed.npm cifrom a fresh clone fails.Found during
/releaseprep for v2.6.2 — the release's pre-flight "clean working tree" check passes because the corruption is committed, not staged, sogit statuslooks clean and the bad file sits at HEAD.Why it went unnoticed
npm install/tsc/vitesttolerate the existingnode_modules; only a strictnpm ci(fresh clone) parses the lockfile and fails.Fix
Regenerated via
npm install --package-lock-only. npm recomputes the dependency tree deterministically and drops the spurious"dev": trueflags on production-reachable transitive deps (cross-spawn,debug,fast-deep-equal,isexe,ms,path-key,shebang-command, +2). Net change:36 deletions— purely the conflict markers and the stashed-sidedevlines.Verification
grep -cE '^(<<<<<<<|=======|>>>>>>>)' package-lock.json→0node -e "JSON.parse(...)"→ valid JSONnpm ci --dry-run→ parses clean (strict; would fail instantly on markers)npm audit→ 0 vulnerabilitiesFollow-up (not in this PR)
Add an
npm ci-on-fresh-checkout CI gate (or a lockfile-conflict-marker lint) so a corrupt lockfile can't reachmainagain. Noted in #720.