ci(setup-node): set check-latest so .nvmrc majors pick up latest patch#48
Merged
Conversation
With node-version-file: .nvmrc pinned to a major ('24') and the default
check-latest: false, setup-node uses whatever 24.x is baked into the
runner tool cache rather than resolving the latest patch. That leaves
CI on a stale patch (e.g. 24.17) even after a fix ships in 24.18,
regressing consumers until the runner image is rebuilt.
Set check-latest: true on every setup-node step that reads .nvmrc so
the major range resolves to the latest published patch.
Ref: nodejs/node#64004
|
shan8851
approved these changes
Jul 1, 2026
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
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 consumer's CI reads its Node version from
.nvmrc, which is pinned to a major (24). With setup-node's defaultcheck-latest: false, the24.xrange resolves to whatever patch is baked into the runner tool cache — not the latest published patch. So CI stays on a stale patch (e.g. 24.17) even after a fix ships in 24.18, until GitHub rebuilds its runner images.This bit us via nodejs/node#64004 (premature socket close), fixed in 24.18 but not picked up because runners still cached 24.17.
Fix
Set
check-latest: trueon every setup-node step that reads.nvmrc, so the major range resolves to the latest published patch and downloads it when the cached one is behind. This matches the intent of a major-only.nvmrc("latest 24") and fixes all consuming repos at once.Covers:
actions/ci,actions/docker-test,apps-ci,apps-changeset-check,apps-codegen-drift-check,apps-build-actions,apps-npm-release.apps-e2eis not onmainyet (infeat/apps-e2e-shared-workflow) — it'll need the same one-liner there.