Skip to content

chore(vercel): change the default node version to 22.#14077

Merged
ascorbic merged 4 commits intowithastro:mainfrom
jat001:patch-1
Jul 21, 2025
Merged

chore(vercel): change the default node version to 22.#14077
ascorbic merged 4 commits intowithastro:mainfrom
jat001:patch-1

Conversation

@jat001
Copy link
Contributor

@jat001 jat001 commented Jul 15, 2025

Changes

Change the default node version of vercel functions to 22. Node.js 18 will be disabled on September 1, 2025.

See https://vercel.com/changelog/node-js-18-is-being-deprecated

Testing

No need

Docs

No need

Copilot AI review requested due to automatic review settings July 15, 2025 09:48
@changeset-bot
Copy link

changeset-bot bot commented Jul 15, 2025

🦋 Changeset detected

Latest commit: efea6e0

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

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

@github-actions github-actions bot added the pkg: integration Related to any renderer integration (scope) label Jul 15, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the default Node.js runtime for Vercel Serverless Functions from version 18 to 22, and adjusts the deprecation schedule for Node.js 18.

  • Update the removal date for Node.js 18 to September 1, 2025
  • Change all fallback and deprecation messages and return values from nodejs18.x to nodejs22.x
Comments suppressed due to low confidence (2)

packages/integrations/vercel/src/index.ts:709

  • Add unit tests for getRuntime to cover the unsupported version fallback, verifying that it returns nodejs22.x and logs the updated warning message when the local Node.js version is not supported.
		return 'nodejs22.x';

packages/integrations/vercel/src/index.ts:73

  • The removal field for Node.js 18 is now a Date object, whereas other entries use string literals. Consider using a string for consistency or converting all removal dates to Date objects for uniformity.
	18: { status: 'retiring', removal: new Date('September 1 2025'), warnDate: new Date('October 1 2024') },

Copy link
Member

@florian-lefebvre florian-lefebvre left a comment

Choose a reason for hiding this comment

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

This is a breaking change. I think this is a change we may need to do as part of Astro 6? (and set it to node 20). cc @ascorbic

@ascorbic
Copy link
Contributor

I think this is a breaking change on Vercel's side, and we're just reporting on it. I think it's fine to go in a patch.

@jat001
Copy link
Contributor Author

jat001 commented Jul 16, 2025

Node 22 is the default version on vercel functions.

https://vercel.com/docs/functions/runtimes/node-js/node-js-versions#default-and-available-versions

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
@ascorbic ascorbic merged commit 42ef004 into withastro:main Jul 21, 2025
23 of 26 checks passed
@astrobot-houston astrobot-houston mentioned this pull request Jul 18, 2025
openscript pushed a commit to openscript/astro that referenced this pull request Sep 12, 2025
* Change the default node version to 22.

https://vercel.com/changelog/node-js-18-is-being-deprecated

* add changeset

* Update .changeset/brave-wombats-jam.md

* Update .changeset/brave-wombats-jam.md

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>

---------

Co-authored-by: Matt Kane <m@mk.gg>
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: integration Related to any renderer integration (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants