chore: drop Node 20 from template engines - #925
Merged
Conversation
Node 20 has been EOL since 2026-04-30. Every template Dockerfile already targets apify/actor-node:24 and the CI matrices are [22, 24], so the engines.node floors were the only place still claiming Node 20 support. Set every Node template to >=22, matching the Node major line the base images and CI already track. Also add the field to the three templates that had no engines block at all. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
l2ysho
force-pushed
the
claude/drop-node20-support
branch
from
September 8, 2026 19:47
99b7bb1 to
7cd0d18
Compare
l2ysho
marked this pull request as ready for review
September 9, 2026 06:51
DaveHanns
approved these changes
Sep 9, 2026
l2ysho
added a commit
to apify/apify-cli
that referenced
this pull request
Sep 9, 2026
## Changes
- `engines.node`: `>=20` → `>=22`
- `devEngines.runtime.node`: drop the `^20.19.0` arm, leaving
`>=22.12.0`
- `Local Tests` matrix: `[20, 22, 24]` → `[22, 24]`
No source or docs changes needed. `SUPPORTED_NODEJS_VERSION` reads
`pkg.engines.node` (`src/lib/consts.ts:69`), so the runtime guard and
all user-facing messages follow automatically. README and the
installation docs already said 22+.
## Why `>=22` and not a patch-level floor
The strictest transitive runtime constraints are `which@7` (`^22.22.2 ||
...`) and `@inquirer/core` (`^22.13.0`), so no single patch version is
"the" true floor for long — it moves with every dependency bump.
`engines.node` is also enforced by a hard exit here
(`processVersionCheck`, `src/entrypoints/_shared.ts:58`), not just an
npm warning, so an over-strict floor blocks users who would otherwise be
fine. A transitive engine mismatch is only a warning.
`devEngines` keeps the stricter `>=22.12.0` that the build tooling
needs. That is the contributor requirement; `engines.node` is the
support claim made to users, and it tracks the Node major line — the
same one the CI matrix and base images track.
## Checked
- Branch protection requires only `Local Tests (…, 22)` contexts — no
`…, 20)` context is left permanently pending
- Standalone bundle users are unaffected: `processVersionCheck`
early-returns for `installMethod === 'bundle'`
- `pnpm run lint && format && build` pass. `test:local` has 8
pre-existing failures in `run.test.ts` ("input tests") that reproduce
identically on unmodified `master` — unrelated to this change
## Follow-ups
- `src/commands/run.ts:193,204` and `src/entrypoints/_shared.ts:60`
interpolate the raw semver range into prose ("install Node.js >=22 (or
higher)"). Sibling call sites already use `minVersion(...)`.
Pre-existing; not touched here
- Companion PR: apify/actor-templates#925
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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.
Note
TL;DR Drop node 20 as we discussed.
Changes
>=18.0.0(14) />=20.0.0(7) →>=22enginesblock at all —js-crawlee-playwright-chrome,js-crawlee-puppeteer-chrome,ts-playwright-test-runner— now declare the same floorWhy
>=22It matches the Node major line the base images and CI already track, and it is a support claim about the Actor, which runs on
apify/actor-node:24in the image. A patch-level floor would drift with every devDependency bump without telling a user anything more.Kept at 22, not 24, so the Node 22 CI leg keeps exercising the templates —
test/templates.test.js:114skips any template whoseengines.nodeexcludes the running Node.Not in this PR
.nvmrc,manifest.json— already 20-freedist/templates/*.zip—build_archives.yamlregenerates and commits these on push to masterts-start-bun— Bun-only, noengines.nodeby designCompanion
apify/apify-cli#1403 drops Node 20 from the CLI itself.
🤖 Generated with Claude Code