Skip to content

Commit package-lock.json and install from it in CI - #1

Merged
clarkbw merged 1 commit into
mainfrom
ci/commit-lockfile
Oct 11, 2026
Merged

clarkbw merged 1 commit into
mainfrom
ci/commit-lockfile

Conversation

@clarkbw

@clarkbw clarkbw commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

package-lock.json is committed instead of gitignored, CI installs with npm ci, and a lockfile workflow checks it on every pull request. The org's repository standards ask every JavaScript repository to commit its lockfile. Without one, each install resolves fresh, so nothing records what a passing build installed and npm ci can't verify integrity hashes.

The lockfile is a fresh resolve within the existing ranges, the same versions a clean npm install would get today.

Locally on Node 24.20 / npm 11.19: npm run build and all 94 tests pass.

🤖 Generated with Claude Code

package-lock.json was gitignored, so every CI run and every contributor resolved dependencies fresh with npm install, and nothing recorded what a passing build actually installed. Committing it makes installs reproducible, lets npm ci verify every tarball's integrity hash, and gives Dependabot and the org's lockfile check something to work on. The lockfile workflow fails when the lockfile doesn't regenerate unchanged or resolves anything outside the npm registry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@clarkbw
clarkbw merged commit da162f5 into main Oct 11, 2026
2 checks passed
@clarkbw
clarkbw deleted the ci/commit-lockfile branch October 11, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant