Skip to content

[OP-182] Fix dependency pinning errors: package-lock.json / npm ci#3

Open
clackwork wants to merge 1 commit intomasterfrom
feat/OP-182-npm-package-lock
Open

[OP-182] Fix dependency pinning errors: package-lock.json / npm ci#3
clackwork wants to merge 1 commit intomasterfrom
feat/OP-182-npm-package-lock

Conversation

@clackwork
Copy link
Copy Markdown

@clackwork clackwork commented Apr 3, 2026

Summary

  • Remove package-lock.json from .gitignore so lock file is tracked in source control
  • Add package-lock.json (generated with npm install --package-lock-only)
  • Update Dockerfile: replace npm install with npm ci

Why

Dependency pinning thwarts dependency supply chain attacks and ensures build reproducibility. Without a lock file, dependencies can silently change between builds.

Test plan

  • npm test — 97/97 tests pass

🤖 Generated with Claude Code

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes lock files from the .gitignore and updates the Dockerfile to use npm ci instead of npm install. A critical issue was identified where npm ci will fail because package.json is modified by a sed command prior to the installation, leading to a mismatch with the lock file.

WHAT?

Using package.json? Then package-lock.json or similar lock file must
exist. Must prefer `npm ci` over `npm install` both in CI/CD
_and_ in standard developer build.

WHY?

Dependency pinning thwarts dependency supply chain attacks and ensures
build reproducibility.

HOW?

Tested using `npm test`.
@clackwork clackwork force-pushed the feat/OP-182-npm-package-lock branch from 56911fb to cd50141 Compare April 3, 2026 02:38
@clackwork clackwork marked this pull request as ready for review April 3, 2026 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants