Skip to content

fix: support Node.js 26 in adapter-vercel (2.x) - #17580

Merged
elliott-with-the-longest-name-on-github merged 1 commit into
sveltejs:version-2from
ali-vercel:adapter-vercel-node-26-v2
Oct 30, 2026
Merged

elliott-with-the-longest-name-on-github merged 1 commit into
sveltejs:version-2from
ali-vercel:adapter-vercel-node-26-v2

Conversation

@ali-vercel

@ali-vercel ali-vercel commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Backport #17570 to version-2 so @sveltejs/adapter-vercel 6.x builds on Node.js 26 and on future even Node.js versions.

Context

#17570 shipped in @sveltejs/adapter-vercel 7.0.2, which requires SvelteKit 3. SvelteKit 2 apps stay on adapter 6.x, and 6.3.4 still hard-codes valid_node_versions = [20, 22, 24]. Vercel made Node.js 26 generally available on 2026-10-29. New projects default to 26.x, and projects with an open engines.node range such as >=22 move to 26 on their next build. So SvelteKit 2 builds now throw Unsupported Node.js version: v26.x, and runtime: 'nodejs26.x' is rejected too. Their only workaround is pinning Node.js 24 with engines.node or runtime: 'nodejs24.x'.

This uses the same regex, error wording, RuntimeKey typedef and changeset as #17570. The version-2 differences are kept: nodejs20.x is still accepted, and edge and bun1.x are unchanged. The tests live in test/utils.spec.js on this branch.

release.yml only runs on pushes to main, so a maintainer would need to cut the 6.x patch release.


Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

Edits

  • Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed.

🤖 Generated with Claude Code

Backport of sveltejs#17570 to version-2. Accept any even Node.js major >= 20 (`/^nodejs[2-9][02468]\.x$/`) instead of a hard-coded list, so Node 26 builds resolve to `nodejs26.x` instead of throwing `Unsupported Node.js version`.

(cherry picked from commit 1120bd6)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@pkg-svelte-dev

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from aacd836:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/aacd836957463498cdd4f8ab7fa11d61bb71664a

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/kit/pr/17580

Note

This PR is from a fork. A maintainer must approve approve each commit before it can be built and installed.

@changeset-bot

changeset-bot Bot commented Oct 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: aacd836

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/adapter-vercel Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@elliott-with-the-longest-name-on-github
elliott-with-the-longest-name-on-github marked this pull request as ready for review October 30, 2026 19:14
@elliott-with-the-longest-name-on-github
elliott-with-the-longest-name-on-github merged commit 77e4fce into sveltejs:version-2 Oct 30, 2026
22 of 23 checks passed
@ali-vercel ali-vercel changed the title fix: support Node.js 26 in adapter-vercel (2.x) fix: support Node.js 26 and later in adapter-vercel (2.x) Oct 30, 2026
@ali-vercel ali-vercel changed the title fix: support Node.js 26 and later in adapter-vercel (2.x) fix: support Node.js 26 in adapter-vercel (2.x) Oct 30, 2026
teemingc pushed a commit that referenced this pull request Nov 5, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to version-2, this PR
will be updated.


# Releases
## @sveltejs/[email protected]

### Patch Changes

- fix: prevent prerendered paths from creating unintended rules in
`_redirects` and `_routes.json`
([#17620](#17620))
- Updated dependencies
[[`0a2e58c`](0a2e58c),
[`0a2e58c`](0a2e58c),
[`0a2e58c`](0a2e58c),
[`0a2e58c`](0a2e58c),
[`0a2e58c`](0a2e58c)]:
  - @sveltejs/[email protected]
## @sveltejs/[email protected]

### Patch Changes

- fix: avoid crashing the server when a `text/event-stream` response has
immutable headers ([#17620](#17620))
- Updated dependencies
[[`0a2e58c`](0a2e58c),
[`0a2e58c`](0a2e58c),
[`0a2e58c`](0a2e58c),
[`0a2e58c`](0a2e58c),
[`0a2e58c`](0a2e58c)]:
  - @sveltejs/[email protected]
## @sveltejs/[email protected]

### Patch Changes

- fix: escape prerendered paths used in Vercel route patterns
([#17620](#17620))
- Updated dependencies
[[`0a2e58c`](0a2e58c),
[`0a2e58c`](0a2e58c),
[`0a2e58c`](0a2e58c),
[`0a2e58c`](0a2e58c),
[`0a2e58c`](0a2e58c)]:
  - @sveltejs/[email protected]
## @sveltejs/[email protected]

### Patch Changes

- fix: accept every Node.js version from 26 (`nodejs27.x`, `nodejs28.x`,
...), not only even ones
([#17585](#17585))

- fix: escape prerendered paths used in Vercel route patterns
([#17620](#17620))

- fix: support Node.js 26 (`nodejs26.x`) and future even Node.js
versions ([#17580](#17580))
- Updated dependencies
[[`0a2e58c`](0a2e58c),
[`0a2e58c`](0a2e58c),
[`0a2e58c`](0a2e58c),
[`0a2e58c`](0a2e58c),
[`0a2e58c`](0a2e58c)]:
  - @sveltejs/[email protected]
## @sveltejs/[email protected]

### Patch Changes

- fix: return a 400 response instead of throwing when `reroute` rewrites
a malformed pathname
([#17620](#17620))

- fix: escape cache-control headers in prerendered HTML
([#17620](#17620))

- fix: prevent path traversal when previewing prerendered pages and data
on Windows ([#17620](#17620))

- fix: prevent server-side route resolution from loading code from
another origin for pathnames starting with `//`
([#17620](#17620))

- fix: prevent server-side self-fetch fallbacks from following redirects
([#17620](#17620))

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.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.

2 participants