fix(install): provision Node 26 so managed npm satisfies engines (#80769) - #86688
Merged
Merged
Conversation
Node 22 ships npm 11.16.0, which engines.npm rejects (11.10–11.16 ignore min-release-age-exclude). Fresh Hermes-managed installs then fail npm ci with EBADENGINE. Node 26 ships 11.17.0.
13 tasks
Contributor
૮ >ﻌ< ა ci reviewran on 441bbed — fix(install): provision Node 26 so managed npm satisfies eng
|
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 does this PR do?
Salvages Christopher-Schulze's PR #85299 with authorship preserved:
scripts/install.shstill provisioned Hermes-managed Node 22, but rootengines.nodeis>=22.22.0withengines.npm <11.10.0 || >=11.17.0, and the script itself already warns "Hermes requires Node >=26". Node 26 ships npm ≥11.17.0, satisfying the floor.Premise verified against live data before salvaging (the Aug 1 engines churn burned us once — per the ship-provisioning-before-pin rule, the runtime must actually ship before/with any pin):
nodejs.org/dist/index.jsontoday: v26.7.0 bundles npm 11.19.0, v26.5.1 was the first to bundle 11.17.0 — the provisionedlatest-v26.xtarball satisfiesengines.npmwith margin.<11.10.0arm) — so this is a hardening against the trap where a user's or a future Node 22.x's npm lands in the fatal 11.10–11.16 band (npm there ignores.npmrcmin-release-age-exclude;engine-strict=truemakes it fatal), and aligns the managed runtime with the "requires Node >=26" warninginstall.shalready prints._STOCK_NPM_BY_NODE_MAJORin the test maps 26 → 11.17.0, matching the real first-26.x-bundle.The new test locks the invariant for good: the Node major
install.shfetches must ship a stock npm that clearsengines.npm, so a future engines bump without a matchingNODE_VERSIONbump fails CI instead of bricking fresh installs (#80769's failure shape).Related Issues
Fixes #80769. Supersedes #85299 (cherry-picked with authorship preserved).
Verification (Linux)
scripts/run_tests.sh tests/test_engines_satisfiable.py— 11 passed, 0 failed.bash -n scripts/install.sh— syntax OK.curl https://nodejs.org/dist/latest-v26.x/resolves node-v26.7.0 tarballs for linux-x64 (the exact URL pattern install.sh uses).python3 scripts/audit_pr_attribution.py— contributor mapped (GitHub-noreply email, auto-resolved).Infographic