build: pin npm via packageManager to keep lockfile deterministic - #261
Merged
Conversation
Dependabot regenerates the lockfile with npm 11, which omits the nested @commitlint/read/node_modules/conventional-commits-filter@6.0.1 entry that npm 10 keeps. CI installs with the npm bundled in Node 22 (.nvmrc), i.e. npm 10, whose `npm ci` then rejects an npm-11 lockfile with "EUSAGE Missing: conventional-commits-filter@6.0.1 from lock file". Pinning packageManager to npm@10.9.8 makes lockfile generation deterministic across contributors and Dependabot, matching the npm that CI actually runs. No dependency versions change and the committed lockfile is unaffected. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dhensby
marked this pull request as ready for review
July 27, 2026 14:11
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.
What
Pin the package manager to
npm@10.9.8via thepackageManagerfield inpackage.json. No dependency versions change; the committedpackage-lock.jsonis unaffected.Why
The open Dependabot PRs (#258, #259, #260) all fail CI at
npm ciwith:Root cause is an npm 10 vs 11 lockfile skew, not the dependency updates themselves:
@commitlint/read/node_modules/conventional-commits-filter@6.0.1entry..nvmrcbundles npm 10) keeps that nested entry, so itsnpm cirejects an npm‑11‑generated lockfile as out of sync.Verified empirically:
npm cirun bymaster)master)Missing: conventional-commits-filter@6.0.1Pinning
packageManagertonpm@10.9.8makes lockfile generation deterministic across contributors and Dependabot, matching the npm that CI actually runs.Caveat
This relies on Dependabot honouring the
packageManagerfield when it regenerates lockfiles. If it does, rebasing #258/#259/#260 on top of this will produce npm‑10‑shaped lockfiles and CI will pass. If Dependabot does not honour it, those three PRs may still need their lockfiles regenerated with npm 10 directly.Testing
master's lockfile is already npm‑10‑shaped, so this change is pin‑only —npm install --package-lock-onlyunder npm 10.9.8 leaves the lockfile byte‑for‑byte unchanged.npm ciunder npm 10.9.8 passes on this branch.