Skip to content

ci: derive workflow Node version from devEngines via node-version-file#184

Merged
nedtwigg merged 1 commit into
mainfrom
chore/node-version-from-devengines
Jun 29, 2026
Merged

ci: derive workflow Node version from devEngines via node-version-file#184
nedtwigg merged 1 commit into
mainfrom
chore/node-version-from-devengines

Conversation

@nedtwigg

Copy link
Copy Markdown
Member

Why

Workflows hardcoded node-version: 22 — a second source of truth that could drift from package.json's devEngines.runtime.version (22.22.3), and the exact thing Renovate kept trying to bump to 24 (see #183, which stops that churn). This makes devEngines.runtime.version the single source of truth for the Node version across every workflow.

How

actions/setup-node@v6.4.0 (the pinned SHA 48b55a0) resolves node-version-file against package.json in the order volta.node → devEngines.runtime → engines.node (docs at that ref). So node-version-file: package.json reads the exact devEngines pin and provisions exactly 22.22.3 — preserving the cargo build.rs exact-match requirement for the standalone build/smoketest jobs.

  • All 7 setup-node steps now use node-version-file: package.json (ci ×2, release ×3, chromatic, security-audit).
  • The two jq node-pin steps (ci smoketest, release build-standalone) are removed as redundant; their build.rs rationale is preserved in the surrounding comments.

Tradeoff

The jq step's explicit MAJOR.MINOR.PATCH validation is gone. If devEngines.runtime.version is ever set to a range instead of an exact version, build.rs (not a pre-check) is the backstop that catches it — a less friendly error, but the project convention is an exact pin.

🤖 Generated with Claude Code

Workflows hardcoded `node-version: 22`, a second source of truth that
could drift from package.json's devEngines.runtime.version (22.22.3) and
that Renovate kept trying to bump to 24. Two jobs already read the pin
via a jq `node-pin` step.

setup-node v6.4.0 (the pinned SHA) resolves node-version-file against
package.json in the order volta.node -> devEngines.runtime -> engines.node,
so `node-version-file: package.json` reads the exact devEngines pin. That
provisions exactly 22.22.3, preserving the cargo build.rs exact-match
requirement for the standalone build/smoketest jobs.

Point all 7 setup-node steps at node-version-file and drop the now-
redundant jq node-pin steps. devEngines.runtime.version is now the single
source of truth for the Node version everywhere (CI, release, chromatic,
security-audit). Tradeoff: the jq step's explicit MAJOR.MINOR.PATCH check
is gone; build.rs remains the backstop if the pin is ever set to a range.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying mouseterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: eacfdaf
Status: ✅  Deploy successful!
Preview URL: https://0a2eddd1.mouseterm.pages.dev
Branch Preview URL: https://chore-node-version-from-deve.mouseterm.pages.dev

View logs

@nedtwigg nedtwigg merged commit 4bcd3c2 into main Jun 29, 2026
6 checks passed
@nedtwigg nedtwigg deleted the chore/node-version-from-devengines branch June 29, 2026 20:55
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