Skip to content

ci(setup-node): set check-latest so .nvmrc majors pick up latest patch#48

Merged
MaximusHaximus merged 1 commit into
mainfrom
fix/setup-node-check-latest
Jul 1, 2026
Merged

ci(setup-node): set check-latest so .nvmrc majors pick up latest patch#48
MaximusHaximus merged 1 commit into
mainfrom
fix/setup-node-check-latest

Conversation

@MaximusHaximus

Copy link
Copy Markdown
Contributor

Problem

Every consumer's CI reads its Node version from .nvmrc, which is pinned to a major (24). With setup-node's default check-latest: false, the 24.x range 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: true on 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-e2e is not on main yet (in feat/apps-e2e-shared-workflow) — it'll need the same one-liner there.

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
@sonarqubecloud

sonarqubecloud Bot commented Jul 1, 2026

Copy link
Copy Markdown

@MaximusHaximus MaximusHaximus marked this pull request as ready for review July 1, 2026 13:42
@claude

claude Bot commented Jul 1, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@MaximusHaximus MaximusHaximus merged commit 395628c into main Jul 1, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants