Skip to content

chore!: drop EOL node 20, require node >= 22 - #4

Merged
agalwood merged 2 commits into
mainfrom
chore/drop-node-20
Aug 2, 2026
Merged

chore!: drop EOL node 20, require node >= 22#4
agalwood merged 2 commits into
mainfrom
chore/drop-node-20

Conversation

@agalwood

@agalwood agalwood commented Aug 2, 2026

Copy link
Copy Markdown
Member

Node 20 reached end-of-life on 2026-04-30 (nodejs/Release schedule.json), so this drops it everywhere and realigns the declared support surface with what CI actually verifies.

CI

  • Matrix [20, 22, 24][22, 24] — the two still-supported LTS lines (22 maintenance until 2027-04-30, 24 active until 2028-04-30).
  • Removes the 34-line standalone-pnpm workaround. It only existed because pnpm 11 needs node >= 22.13 and the node 20 jobs could not run it (pnpm/action-setup standalone mode and @pnpm/exe were both broken for 11.13.0 — see Error after installing in standalone mode when trying to install packages with a CLI globally - This: not found pnpm/action-setup#277). Every remaining matrix entry satisfies that floor, so pnpm/action-setup@v6 handles it. It still runs before setup-node so cache: 'pnpm' resolves, and picks up the version from packageManager.
  • actions/checkout and actions/setup-node → v7.

Side benefit: the deleted step was the workflow's only hand-rolled run: block doing a network fetch — less surface to audit.

Support surface

before after
engines.node >=20 >=22
tsup target node20 node22
README / README.zh-CN Node.js ≥ 20 Node.js ≥ 22
version 0.3.0 0.4.0

@types/node intentionally stays on ^24 to match the dev and runtime environment. The node 22 CI job — which runs the full suite, not just typecheck — is what guards the floor.

Verification

Run locally on node 24.18.0 / pnpm 11.13.0:

step result
pnpm lint 53 files, 0 errors
pnpm typecheck exit 0, no diagnostics
pnpm test 217 passed (22 files)
pnpm build success, Target: node22
node dist/bin/motrix.js --version 0.4.0

pnpm-lock.yaml is unchanged.

Follow-up (not in this PR)

Node 26 becomes Active LTS on 2026-10-20. Worth adding to the matrix before then for early warning.

Node 20 reached end-of-life on 2026-04-30, so the matrix keeps only the
still-supported LTS lines: 22 (maintenance, EOL 2027-04-30) and 24
(active, EOL 2028-04-30).

Dropping it also removes the reason the standalone-pnpm workaround
existed. pnpm 11 requires node >= 22.13, which every remaining matrix
entry satisfies, so the hand-rolled GitHub-release download is replaced
by pnpm/action-setup@v6 — which reads the version from packageManager
and still runs before setup-node so `cache: 'pnpm'` resolves.

Bump checkout and setup-node to v7.
Align the declared support surface with what CI actually verifies:
engines, the tsup compile target, and the requirements section of both
READMEs all said node 20, which is EOL as of 2026-04-30.

@types/node deliberately stays on ^24 to match the development and
runtime environment; the node 22 CI job is what guards the floor.

BREAKING CHANGE: node 20 is no longer supported. Install now requires
node >= 22.
@agalwood
agalwood merged commit 00e9d2e into main Aug 2, 2026
6 checks passed
@agalwood
agalwood deleted the chore/drop-node-20 branch August 2, 2026 07:17
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.

1 participant