Skip to content

Conversation

Rich-Harris
Copy link
Member

Vercel supports Node 20 and 22. These versions expose File and crypto to the global scope, which therefore no longer need to be polyfilled.

Marked as a major version because it's technically a breaking change, but not really since you already can't use Node 18 on Vercel.


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.

Copy link

changeset-bot bot commented Oct 15, 2025

🦋 Changeset detected

Latest commit: 47f9561

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 Major

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

@teemingc teemingc added pkg:adapter-vercel Pertaining to the Vercel adapter breaking change labels Oct 15, 2025
@teemingc
Copy link
Member

We should probably remove references to Node.js 18 too:

  1. if (major < 18 || major > 22) {
  2. `Building locally with unsupported Node.js version: ${process.version}. Please use Node 18, 20 or 22 to build your project, or explicitly specify a runtime in your adapter configuration.`
  3. if (runtime !== 'edge' && (!node_runtime || parseInt(node_runtime[1]) < 18)) {
  4. `Invalid runtime '${runtime}' for route ${route.id}. Valid runtimes are 'edge' and 'nodejs18.x' or higher ` +
  5. - `runtime`: `'edge'`, `'nodejs18.x'`, `'nodejs20.x'` or `'nodejs22.x'`. By default, the adapter will select the `'nodejs<version>.x'` corresponding to the Node version your project is configured to use on the Vercel dashboard

@Rich-Harris
Copy link
Member Author

good catch, done

@svelte-docs-bot
Copy link

@teemingc
Copy link
Member

teemingc commented Oct 15, 2025

Thanks! Note that we need to update the Vercel adapter major in adapter-auto before we create a new release so that it installs the new major

@teemingc teemingc merged commit 1d64898 into main Oct 15, 2025
22 checks passed
@teemingc teemingc deleted the remove-vercel-polyfills branch October 15, 2025 15:10
@github-actions github-actions bot mentioned this pull request Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change pkg:adapter-vercel Pertaining to the Vercel adapter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants