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:

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

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 <noreply@anthropic.com>
@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
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