mirror of
https://github.com/willchen96/mike.git
synced 2026-07-24 23:41:04 +02:00
PR #233's CI failed with "npm ci can only install with an existing package-lock.json" even though the file existed: a "Merge branch 'main'" commit had auto-merged backend/package.json and package-lock.json into invalid JSON with no conflict raised, and npm reports an unparseable lockfile as if it were missing. Two guards: .gitattributes marks package-lock.json/bun.lock merge=binary so concurrent lockfile changes surface as explicit conflicts (resolve by regenerating, never hand-merging), and CI parse-checks package.json and the lockfile before npm ci so any corruption that still lands fails with the real reason. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
8 lines
486 B
Text
8 lines
486 B
Text
# Lockfiles are generated files. Git's line-level text merge can combine
|
|
# both sides' insertions into syntactically invalid JSON *without raising a
|
|
# conflict* (this silently broke backend/package.json + package-lock.json in
|
|
# PR #233). Merge them as binary so any concurrent change surfaces as an
|
|
# explicit conflict; resolve by taking main's copy and regenerating:
|
|
# git checkout origin/main -- package-lock.json && npm install
|
|
package-lock.json merge=binary
|
|
bun.lock merge=binary
|