Skip to content

fix(ci): ignore inert nodes during lockfile validation - #9850

Open
vetrovk wants to merge 1 commit into
npm:latestfrom
vetrovk:fix/optional-inert-lockfile-validation
Open

fix(ci): ignore inert nodes during lockfile validation#9850
vetrovk wants to merge 1 commit into
npm:latestfrom
vetrovk:fix/optional-inert-lockfile-validation

Conversation

@vetrovk

@vetrovk vetrovk commented Aug 7, 2026

Copy link
Copy Markdown

Fixes #9846.

When npm ci rebuilt the ideal tree, unavailable optional dependencies remained as inert nodes. These nodes are intentionally omitted from package-lock.json, but lockfile validation still treated them as missing entries.

Ignore inert nodes during lockfile validation. Ordinary missing dependencies continue to produce an error.

Testing

  • node . test -- --no-check-coverage test/lib/utils/validate-lockfile.js test/lib/commands/ci.js
  • node . run eslint -- lib/utils/validate-lockfile.js test/lib/utils/validate-lockfile.js test/lib/commands/ci.js
  • git diff --check

@vetrovk
vetrovk requested review from a team as code owners August 7, 2026 05:42
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.

[BUG] npm ci rejects a lockfile just generated by npm install for an unavailable optional dependency

1 participant