Skip to content

feat: require Node.js >=22.21.0 and drop EOL Node.js 20#6090

Merged
qw-in merged 2 commits into
mainfrom
quinn/node-22-min-26-support
Jun 18, 2026
Merged

feat: require Node.js >=22.21.0 and drop EOL Node.js 20#6090
qw-in merged 2 commits into
mainfrom
quinn/node-22-min-26-support

Conversation

@qw-in

@qw-in qw-in commented Jun 18, 2026

Copy link
Copy Markdown
Member

Summary

Drops support for the now end-of-life Node.js 20 and raises the minimum supported Node.js to >=22.21.0 <23 || >=24.5.0 across all packages. This lands ahead of the proxy-support change (#6089) and deliberately pulls in the exact engine range that work requires, so the engines don't have to change twice.

The exact range is driven by @arcjet/transport: its proxy support relies on the built-in proxy support of the Node.js HTTP agent, which is only available on Node.js >=22.21.0 and, on the 24 line, >=24.5.0. Node.js 23 is not supported. Because every package depends (directly or transitively) on @arcjet/transport, the requirement is applied to all of them rather than only those that import it directly. Anyone tracking an active LTS release is unaffected.

This is intentionally just the Node-version policy slice — no proxy/transport implementation (that's #6089).

Changes

  • Engines>=22.21.0 <23 || >=24.5.0 on every workspace package (incl. @arcjet/guard). Marked feat: so release-please surfaces the new requirement in the SDK release notes.
  • CI matrices now run Node.js 22, 24, 26 (dropping 20); standalone Deno/examples setup steps bumped 20 → 22.
  • @types/node pinned to the latest 22.x (22.19.21) so type checking reflects the minimum supported runtime; renovate keeps it on the 22.x line via a dedicated <23 rule while the node/actions group tracks up to <27.
  • Coverage thresholds enabled now that the required --test-coverage-* flags are available on supported Node.js versions (@arcjet/ip at 100%; others ratcheted to current).
  • Docs: @arcjet/guard README runtime table + footnote and CONTRIBUTING, a @arcjet/transport README section, the v22 process.version doc link, example README cleanups (removed the obsolete --env-file caveats), and examples/remix-express engines → >=22.0.0.

The framework adapters (@arcjet/astro, bun, deno, nuxt, remix, react-router) carry no engines/@types/node fields, matching existing repo convention.

Verification

  • npm run build (33 packages) ✅
  • npm run lint (35 packages) ✅
  • @arcjet/guard: oxlint ✅, tsgo typecheck against 22.x types ✅
  • Coverage gates verified passing on Node 22

🤖 Generated with Claude Code

qw-in and others added 2 commits June 18, 2026 15:39
Node.js 20 is end-of-life, so raise the minimum supported Node.js across
all packages. The exact requirement is `>=22.21.0 <23 || >=24.5.0`:
@arcjet/transport's proxy support relies on the built-in proxy support of
the Node.js HTTP agent, which is only available on Node.js >=22.21.0 and,
on the 24 line, >=24.5.0. Node.js 23 is not supported. Anyone tracking an
active LTS release is unaffected.

Because every package depends, directly or transitively, on
@arcjet/transport, the same requirement is applied to all of them rather
than only those that import it directly. (Pulling the range in now avoids
changing the engines again in the upcoming proxy-support change.)

Also in this change:
- test matrices now run Node.js 22, 24 and 26 (dropping 20)
- @types/node is pinned to the 22.x line so type checking reflects the
  minimum supported runtime, and renovate keeps it on that line
- coverage thresholds are enabled now that the required flags are
  available on the supported Node.js versions

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- @arcjet/guard README runtime table and CONTRIBUTING note the new
  minimum with a footnote explaining the `>=22.21.0 <23 || >=24.5.0`
  range and why proxy support drives it
- @arcjet/transport README documents the requirement and reason at its
  source
- example READMEs: drop the obsolete `--env-file` / Node version caveat
  now that every supported Node.js release includes `--env-file`
- examples/remix-express engines move to >=22.0.0
- @arcjet/guard runtime-detection comment links to the v22 process docs

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@qw-in qw-in requested a review from a team as a code owner June 18, 2026 15:53

@arcjet-review arcjet-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Arcjet Review — 🔴 High Risk

Decision: Reviewers Assigned

Rationale: This PR changes the supported Node.js runtime range across many published packages, updates CI runtime matrices, and changes pinned @types/node versions. That is broad-impact release and CI behavior, and it fires multiple escalation triggers. No direct security vulnerabilities, secrets, auth changes, injection risks, or cryptographic concerns were identified in the diff. Human review is required; no specific escalation reviewers are configured.

Summary of Changes

Raises the minimum supported Node.js version from Node 20/22.18 to >=22.21.0 <23 || >=24.5.0 across packages, updates CI from Node 20/25 to 22/26, pins @types/node to the Node 22 line, adjusts coverage scripts, and updates related documentation.

Escalation Triggers

  • Dependency Changes: Multiple package.json files changed engines.node and several devDependency pins for @types/node.
  • CI/CD Pipeline: GitHub Actions workflow files under .github/workflows were modified to change Node.js versions used in CI.

Review Focus Areas

Notes

Security checklist applied: no auth/authorization, input handling, injection, secrets, or cryptography changes were identified. Dependency audit found no new third-party packages, but the @types/node pin changes and missing visible lockfile update should be verified by humans.

Path filtering: 3 files excluded by ignore paths. 48 of 51 files included in review.

Review: 4367e755 | Model: openai/gpt-5.5 | Powered by Arcjet Review

@socket-security

Copy link
Copy Markdown

@arcjet-rei arcjet-rei 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.

This makes more sense than bundling an unrelated semver-minor change into the proxy support, and it sets us up for 26 to go LTS in the fall. Nice! After this merges, I'll update #6089 once this merges to main.

@qw-in qw-in added this pull request to the merge queue Jun 18, 2026
Merged via the queue into main with commit d002118 Jun 18, 2026
53 checks passed
@qw-in qw-in deleted the quinn/node-22-min-26-support branch June 18, 2026 16:18
arcjet-rei added a commit that referenced this pull request Jun 18, 2026
`@arcjet/transport` passes the `proxyEnv` option to Node's HTTP agent, whose
type only exists in `@types/node` 24.x. The proxy packages therefore pin
24.x rather than the 22.x line that #6090 standardized on for the rest of
the monorepo (the rebase onto main reverted transport to 22.x, which fails
to type-check). Refresh the lockfile to match.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
arcjet-rei added a commit that referenced this pull request Jun 18, 2026
…22.x

#6090 standardized the monorepo on `@types/node` 22.x (to type-check against
the minimum supported Node). The Node proxy path passes `proxyEnv` to the
HTTP agent, an option only declared in `@types/node` 24.x — and transport's
source is re-type-checked by every package that bundles it (e.g.
@arcjet/sveltekit, @arcjet/next), so pinning the proxy packages to 24.x both
diverges from the standard and breaks those consumers' builds under 22.x.

Instead, keep `@types/node` at 22.x everywhere and add `proxyEnv` through an
intersection type (`AgentOptions & { proxyEnv: ... }`) so it type-checks on
both lines. Misspelled keys are still caught via the precise key type.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

3 participants