Skip to content

chore: drop Node 20 from template engines - #925

Merged
l2ysho merged 3 commits into
masterfrom
claude/drop-node20-support
Sep 9, 2026
Merged

chore: drop Node 20 from template engines#925
l2ysho merged 3 commits into
masterfrom
claude/drop-node20-support

Conversation

@l2ysho

@l2ysho l2ysho commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Note

TL;DR Drop node 20 as we discussed.

Changes

  • 21 templates: >=18.0.0 (14) / >=20.0.0 (7) → >=22
  • 3 templates that had no engines block at all — js-crawlee-playwright-chrome, js-crawlee-puppeteer-chrome, ts-playwright-test-runner — now declare the same floor

Why >=22

It 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:24 in 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:114 skips any template whose engines.node excludes the running Node.

Not in this PR

  • Dockerfiles, CI matrices, .nvmrc, manifest.json — already 20-free
  • dist/templates/*.zipbuild_archives.yaml regenerates and commits these on push to master
  • ts-start-bun — Bun-only, no engines.node by design

Companion

apify/apify-cli#1403 drops Node 20 from the CLI itself.

🤖 Generated with Claude Code

@github-actions github-actions Bot added this to the 149th sprint - Tooling team milestone Sep 8, 2026
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Sep 8, 2026
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
l2ysho force-pushed the claude/drop-node20-support branch from 99b7bb1 to 7cd0d18 Compare September 8, 2026 19:47
@l2ysho
l2ysho marked this pull request as ready for review September 9, 2026 06:51
@l2ysho
l2ysho requested a review from DaveHanns as a code owner September 9, 2026 06:51
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>
@l2ysho
l2ysho enabled auto-merge (squash) September 9, 2026 14:25
@l2ysho
l2ysho merged commit 1956675 into master Sep 9, 2026
59 checks passed
@l2ysho
l2ysho deleted the claude/drop-node20-support branch September 9, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants