Repository navigation
fix(deploy-cloudflare): set up Node 24 below 22.12, which wrangler 4.162.0 needs - #341
Merged
Merged
Conversation
…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
Contributor
There was a problem hiding this comment.
🟢 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-minimumharness 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.
This was referenced Nov 17, 2026
Merged
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.
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
enginesfield, and theMIN_NODE_VERSIONthatbin/wrangler.jschecks 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 (v0pins wrangler 4.158.0), and the QuantEcon images carry Node 24, so no QuantEcon build is affected today.Changes
deploy-cloudflare/action.ymlnode, or with a version it can't read, the next step sets up Node 24.github/workflows/test-actions.ymldc-node-minimum, added toharness-summary'sneeds. Thedc-*section's opening comment covers it, anddc-wrangler-config's comment gives the new minimumdocs/user/actions/deploy-cloudflare.md,preview-cloudflare.md,preview-workers.md,preview-netlify.mddocs/dev/TESTING.mddeploy-cloudflare's row covers the new job.github/dependabot.ymldc-node-minimumamong the jobs that test a wrangler bumpCHANGELOG.md### Fixedentry under[Unreleased]The harness job
dc-node-minimumruns the whole action againstdc-refuses-mismatch's stand-in for a public Worker, on a real Node set up withactions/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 afterwrangler --versionhas passed, so it shows that wrangler ran.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), withmain'sdeploy-cloudflare/action.ymlrestored.dc-node-minimumwas the only job that failed, apart from the all-checks summary that waits on it, and it failed for the expected reason:wrangler --versionstopped with "Wrangler requires at least Node.js v22.12.0. You are using v22.11.0.";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.actionlintandscripts/lint-shell.py: clean.shellcheckon the step's script: clean.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 nonode, 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--versionends the step with nookwritten.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