Skip to content

Use engines.node as the single Node version source - #4069

Merged
rossnelson merged 1 commit into
mainfrom
rossnelson/node-from-engines
Oct 22, 2026
Merged

rossnelson merged 1 commit into
mainfrom
rossnelson/node-from-engines

Conversation

@rossnelson

Copy link
Copy Markdown
Collaborator

What

  • engines.node: >=22.23.4 → ^22.23.4.
  • CI reads Node from package.json (node-version-file: package.json) in setup-node and in the weekly dependency security review, instead of a hardcoded '22.23.4'.
  • Delete .node-version and the nodejs line in .tool-versions. The pnpm and golang lines stay.

Why

Node was pinned in five places: .node-version, .tool-versions, engines.node, and two workflow files. CI read none of the files, so they could drift without anything failing. They have drifted before (.tool-versions at 22.14.0 while .node-version was at 22.18.0).

With one source:

  • CI, and downstream builds that read this repo's package.json, use the same Node.
  • The ^ cap keeps hosts that pick Node from engines (for example, Vercel) on 22, the same major as CI and the Docker images. With >=, they pick the newest major.
  • engine-strict=true still rejects any Node below 22.23.4.

actions/setup-node resolves ^22.23.4 to the newest 22.x, so CI picks up 22 patch releases on its own.

Merge order

temporalio/ui-server#344 reads Node from this file. Merge it first, then this PR, so the ui-server sync never looks for the deleted .node-version.

Local setup

If your version manager read .node-version or .tool-versions, install any Node 22 ≥ 22.23.4. fnm (--resolve-engines) and mise can read engines.node.

Cap engines.node at the 22 major (^22.23.4) and have CI read it from package.json. Remove .node-version and the nodejs line in .tool-versions, which duplicated it.
@rossnelson
rossnelson requested a review from a team as a code owner October 22, 2026 18:34
@vercel

vercel Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
holocene Ready Ready Preview Oct 22, 2026 6:36pm UTC

Request Review

@rossnelson
rossnelson merged commit a30dbcb into main Oct 22, 2026
26 checks passed
@rossnelson
rossnelson deleted the rossnelson/node-from-engines branch October 22, 2026 19:23

This branch was successfully deployed

1 active deployment
Preview — 041c5da6 Deployed Oct 22, 2026 by vercel[bot]
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