Skip to content

fix(deploy-cloudflare): set up Node 24 below 22.12, which wrangler 4.162.0 needs - #341

Merged
mmcky merged 1 commit into
mainfrom
fix/deploy-cloudflare-node-22.12
Nov 17, 2026
Merged

mmcky merged 1 commit into
mainfrom
fix/deploy-cloudflare-node-22.12

Conversation

@mmcky

@mmcky mmcky commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Raises deploy-cloudflare's Node check to 22.12, which the wrangler pinned in #340 needs, and corrects the Node minimum that the docs give for wrangler. This is the follow-up the maintainer asked for when #340 merged.

Why. wrangler 4.159.0 raised its Node minimum from 22.0.0 to 22.12.0 (its engines field, and the MIN_NODE_VERSION that bin/wrangler.js checks before it runs), and #340 moved the pinned wrangler to 4.162.0. deploy-cloudflare's check read only the major version, so on a runner with Node 22.0 to 22.11 it kept that Node, and the wrangler install failed. #340 is not released yet (v0 pins wrangler 4.158.0), and the QuantEcon images carry Node 24, so no QuantEcon build is affected today.

Changes

File Change
deploy-cloudflare/action.yml The step "Check for Node.js 22.12 or later" compares the major and minor versions. Below 22.12, with no node, or with a version it can't read, the next step sets up Node 24
.github/workflows/test-actions.yml A new job, dc-node-minimum, added to harness-summary's needs. The dc-* section's opening comment covers it, and dc-wrangler-config's comment gives the new minimum
docs/user/actions/deploy-cloudflare.md, preview-cloudflare.md, preview-workers.md, preview-netlify.md wrangler's minimum is Node 22.12: twice in each of the first three chapters, and in preview-netlify's comparison table
docs/dev/TESTING.md deploy-cloudflare's row covers the new job
.github/dependabot.yml The npm section's comment names dc-node-minimum among the jobs that test a wrangler bump
CHANGELOG.md A ### Fixed entry under [Unreleased]

The harness job

dc-node-minimum runs the whole action against dc-refuses-mismatch's stand-in for a public Worker, on a real Node set up with actions/setup-node. The action gets as far as wrangler, and the deploy then fails on the fake token, as expected. The generated config is written only after wrangler --version has passed, so it shows that wrangler ran.

  • On Node 22.11.0, the action must set up Node 24, and wrangler must run.
  • On Node 22.12.0, the action must keep the runner's Node, and wrangler must run on it. So a later wrangler bump that raises its minimum again turns this job red.

It fails on the old check. In run 44030360251, the harness ran on a throwaway branch: this change as first committed (be62a56, which differs from this head only in one error message and one comment), with main's deploy-cloudflare/action.yml restored. dc-node-minimum was the only job that failed, apart from the all-checks summary that waits on it, and it failed for the expected reason:

  • the old check found Node v22.11.0 and kept it;
  • the install step's wrangler --version stopped with "Wrangler requires at least Node.js v22.12.0. You are using v22.11.0.";
  • the job's assertion reported that Node was still v22.11.0, not 24.

The throwaway branch is deleted.

What I checked

  • generate-docs.py --check --check-examples --actionlint (actionlint 1.7.12): the generated docs are current (23 files), and the 18 complete workflows in the docs pass actionlint.
  • actionlint and scripts/lint-shell.py: clean. shellcheck on the step's script: clean.
  • The step's script, old and new, run with a step's shell flags (bash --noprofile --norc -eo pipefail, under macOS bash 3.2) over 27 cases: 18 version strings, from v2.12.0 to v100.0.0, plus no node, empty output, a failing --version, unreadable strings and a second line of output. The new script gets all 27 right. The old one gets 9 wrong: it accepts v22.0 to v22.11.1 and the unreadable v22, v22.x.0 and 22.12.0, and a failing --version ends the step with no ok written.

The comments in both Dockerfiles still say wrangler refuses to start below Node 22. They change with the next image change, since any change under containers/ rebuilds both images.

It ships in the next release, together with #339 and #340.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WT8bMbZoC2dpGt3sPyBjyd

…162.0 needs

wrangler raised its Node minimum to 22.12.0 in 4.159.0, and #340 moved
the pinned version to 4.162.0. The action's Node check read only the
major version, so on a runner with Node 22.0 to 22.11 it kept the
runner's Node, and wrangler refused to run. The check now compares the
major and minor versions, and sets up Node 24 below 22.12, with no node,
or with a version it cannot read.

The new harness job dc-node-minimum runs the action on Node 22.11.0,
where it must set up Node 24, and on 22.12.0, where it must keep the
runner's Node and wrangler must run on it, so a later wrangler bump that
raises its minimum turns the harness red. The chapters of
deploy-cloudflare, preview-cloudflare and preview-workers, and
preview-netlify's comparison table, now give wrangler's minimum as
Node 22.12.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WT8bMbZoC2dpGt3sPyBjyd
Copilot AI balanced review requested due to automatic review settings November 17, 2026 06:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes clearly align the deploy-cloudflare action and documentation with wrangler’s Node.js 22.12+ requirement and add CI harness coverage to validate behavior around the minimum-version boundary, with no unresolved issues noted in the review evidence.

No open issues 🎉

What changed in this PR

Updates the deploy-cloudflare composite action and supporting CI/docs to align with wrangler requiring Node.js 22.12+, ensuring compatible Node selection on runners.

Changes:

  • Refine deploy-cloudflare’s Node version gating to require Node 22.12+ and set up Node 24 when below the minimum (or missing/unreadable).
  • Add a dc-node-minimum harness job to validate behavior on both sides of the 22.12 cutoff.
  • Update user/dev documentation, Dependabot guidance, and the changelog to reflect the corrected Node minimum.
File Description
docs/​user/​actions/​preview-workers.md Updates the documented wrangler Node.js minimum requirement to 22.12+ and aligns related guidance accordingly.
docs/​user/​actions/​preview-netlify.md Adjusts the preview Netlify comparison/table content to reflect wrangler’s Node.js 22.12+ minimum.
docs/​user/​actions/​preview-cloudflare.md Updates the documented wrangler Node.js minimum requirement to 22.12+ and keeps troubleshooting text consistent.
docs/​user/​actions/​deploy-cloudflare.md Corrects the documented Node.js minimum for wrangler to 22.12+ and aligns the action behavior description.
docs/​dev/​TESTING.md Documents the new CI harness coverage that verifies the deploy-cloudflare Node-minimum boundary behavior.
deploy-cloudflare/​action.yml Improves Node version detection to enforce Node 22.12+ for wrangler and falls back to setting up Node 24 when needed.
CHANGELOG.md Adds an Unreleased Fixed entry describing the corrected Node minimum handling for the Cloudflare deploy action.
.github/​workflows/​test-actions.yml Introduces the dc-node-minimum harness job and wires it into the harness summary dependencies.
.github/​dependabot.yml Updates comments to note dc-node-minimum as a CI signal relevant to wrangler dependency bumps.

Review effort: Balanced
Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.

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