Skip to content

chore(renovate): pin Renovate's npm to CI's and guard the pin - #1050

Merged
castrojo merged 1 commit into
mainfrom
renovate-npm-pin
Nov 20, 2026
Merged

castrojo merged 1 commit into
mainfrom
renovate-npm-pin

Conversation

@Danathar

Copy link
Copy Markdown
Contributor

Summary: The update bot uses a newer npm (12) than the site's own tests (npm 11, which comes with Node 26). npm 12 refuses a download npm 11 allows, so the bot can't finish updates like the Tailwind one in #1009. This makes the bot use the same npm as the tests, stops it proposing npm upgrades on its own, and adds a test that fails if the two ever disagree, so the setting can't be forgotten when the site moves to a newer Node.

What I need from you: a review and approval from a maintainer other than Danathar (this repo needs one approval).


Cause

Renovate's lock-file step on #1009:

npm error code EALLOWREMOTE
npm error Fetching packages of type "remote" have been disabled
npm error Refusing to fetch "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.3.5.tgz"

Checked locally with npm 11.20.0 (CI's version): #1009's package.json resolves cleanly with npm install --package-lock-only --ignore-scripts, and the lock gets tailwindcss 4.3.5.

Changes

  • renovate.json:
    • constraints.npm: ^11.20.0, so Renovate writes lock files with CI's npm.
    • No more offers to update that pin (renovate-config manager, depType tool-constraint; renovatebot/renovate lib/modules/manager/renovate-config/extract.ts:93).
    • A "Before merging" note in every Node major PR: raise the pin in that same PR.
  • scripts/tests/npm-constraint.test.ts: fails when the npm running the tests (npm_config_user_agent) differs from the pin's major, with the exact value to set. It skips when the tests aren't run through npm. It runs in the required test job (npm run test:run).
  • docs/skills/validation/SKILL.md: point 11 explains the pin and the test, so the fix is to raise the pin, not to edit the test.

After merge

Tick the rebase box on #1009; its renovate/artifacts should go green.

Not covered: #1024 (ESLint 10) fails for a different reason. @antfu/eslint-config doesn't accept ESLint 10 yet (ERESOLVE), and it's a major that waits for a person anyway.

Same change as projectbluefin/documentation#1729 and projectbluefin/testsuite#1278.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WcWm7qptoi6WwWFaNJymyz

Renovate runs npm 12, but CI runs npm 11 (Node 26 bundles it). npm 12
refuses some downloads npm 11 allows, so Renovate can't write the lock
file for the Tailwind 4.3.5 update (#1009):

  npm error code EALLOWREMOTE
  npm error Fetching packages of type "remote" have been disabled

- renovate.json: constraints.npm ^11.20.0, so Renovate's lock-file runs
  use CI's npm. Stop offering updates to that pin, and put a reminder in
  every Node major PR to raise it in the same PR.
- scripts/tests/npm-constraint.test.ts: fails when the npm running the
  tests differs from the pin's major, with the exact value to set.
- docs/skills/validation/SKILL.md: explain the pin and the test.

Same change as projectbluefin/documentation#1729 and
projectbluefin/testsuite#1278 (testsuite's pin dates from #1255).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WcWm7qptoi6WwWFaNJymyz
Signed-off-by: Danathar <6772335+Danathar@users.noreply.github.com>
@hivecommons-hive hivecommons-hive Bot added author/clanker A contributor's own hive authored this PR under their login dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 20, 2026
@castrojo
castrojo added this pull request to the merge queue Nov 20, 2026
Merged via the queue into main with commit aa2c40b Nov 20, 2026
4 checks passed
@castrojo
castrojo deleted the renovate-npm-pin branch November 20, 2026 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/clanker A contributor's own hive authored this PR under their login dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants