ci: pin npm to 11 so Dependabot lockfiles pass CI - #274
Merged
Merged
Conversation
`npm ci` fails on every Dependabot PR with:
npm error Missing: conventional-commits-filter@6.0.1 from lock file
`@conventional-changelog/git-client` declares `conventional-commits-filter`
as an *optional* peer dependency. npm 10 records it in the lockfile and then
requires it to be present; npm 11 omits it. `.nvmrc` pins Node 22, which
ships npm 10, but Dependabot regenerates lockfiles with npm 11 — so every
regenerated lockfile is rejected by CI even though it is internally
consistent.
Pinning npm to 11 makes CI validate lockfiles with the same major version
that produces them.
`actions/checkout@v3` and `actions/setup-node@v3` were also being forced onto
Node 24 with a deprecation warning, so they move to v7 at the same time.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Drops the nested `conventional-commits-filter@6.0.1` entry, which npm 10 recorded for an optional peer dependency that is not actually installed. Brings the committed lockfile in line with what npm 11 — and therefore Dependabot — generates, so regenerated lockfiles no longer differ from the committed one. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Sep 3, 2026
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.
Problem
Every Dependabot PR in this repo currently fails CI at
npm ci:This is not caused by any of the bumps themselves — the missing package is unrelated to the dependency being updated in each case. It currently blocks #271, #272 and #273, and will block every future Dependabot PR until it is fixed.
Cause
@conventional-changelog/git-client@3.1.0declaresconventional-commits-filteras an optional peer dependency:npm 10 and npm 11 disagree about what to do with that:
conventional-commits-filter@6.0.1under@commitlint/read, then requires it to be present innpm ci.nvmrcpins Node 22, which ships npm 10.9.8. Dependabot regenerates lockfiles with npm 11. So Dependabot produces a lockfile that is internally consistent but that CI's older npm rejects.@dependabot rebasedoesn't help — it correctly reports the branches are already up to date withmaster.@dependabot recreaterebuilds them from scratch and reproduces exactly the same lockfile.Fix
package-lock.jsonwith npm 11, so the committed lockfile matches what Dependabot produces (this is the 12-line deletion).actions/checkout@v3andactions/setup-node@v3were also being force-migrated to Node 24 with a deprecation warning on every run, so they go to v7 here too.Verification
Reproduced and verified locally on Node 22 / npm 11:
npm cithen succeeds (486 packages).npm run lint— clean.npm run test:workflow— 27 passing, 0 failing.The two commits are ordered so each is independently green: the npm pin lands first (npm 11 accepts the existing npm 10 lockfile, since surplus entries are not an error), and the regenerated lockfile follows.
Once this merges, #271, #272 and #273 need a
@dependabot recreateto pick up the new base.