Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit 7d9835f

Browse files
authored
fix(vercel): add support for Node 22 (#447)
1 parent 0d76496 commit 7d9835f

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.changeset/odd-kiwis-clap.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@astrojs/vercel': minor
3+
---
4+
5+
Add support for Node 22 on Vercel serverless

packages/vercel/src/serverless/adapter.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,14 @@ const ISR_PATH = `/_isr?${ASTRO_PATH_PARAM}=$0`;
6060
const SUPPORTED_NODE_VERSIONS: Record<
6161
string,
6262
| { status: 'default' }
63+
| { status: 'available' }
6364
| { status: 'beta' }
6465
| { status: 'retiring'; removal: Date | string; warnDate: Date }
6566
| { status: 'deprecated'; removal: Date }
6667
> = {
6768
18: { status: 'retiring', removal: 'Early 2025', warnDate: new Date('October 1 2024') },
68-
20: { status: 'default' },
69+
20: { status: 'available' },
70+
22: { status: 'default' },
6971
};
7072

7173
function getAdapter({
@@ -572,7 +574,7 @@ function getRuntime(process: NodeJS.Process, logger: AstroIntegrationLogger): Ru
572574
);
573575
return 'nodejs18.x';
574576
}
575-
if (support.status === 'default') {
577+
if (support.status === 'default' || support.status === 'available') {
576578
return `nodejs${major}.x`;
577579
}
578580
if (support.status === 'retiring') {

0 commit comments

Comments
 (0)