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

Commit d9eed7e

Browse files
bluwyematipiconickrttn
authored
fix(vercel): add support for Node 22 (v8) (#472)
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> Co-authored-by: Nick Rutten <2504906+nickrttn@users.noreply.github.com>
1 parent 1d4e6fc commit d9eed7e

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.changeset/clever-goats-bake.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@astrojs/vercel': patch
3+
---
4+
5+
Add back support for Node 22 on Vercel serverless that was fixed in v7 but lost in v8

packages/vercel/src/index.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,14 @@ const ISR_PATH = `/_isr?${ASTRO_PATH_PARAM}=$0`;
5757
const SUPPORTED_NODE_VERSIONS: Record<
5858
string,
5959
| { status: 'default' }
60+
| { status: 'available' }
6061
| { status: 'beta' }
6162
| { status: 'retiring'; removal: Date | string; warnDate: Date }
6263
| { status: 'deprecated'; removal: Date }
6364
> = {
6465
18: { status: 'retiring', removal: 'Early 2025', warnDate: new Date('October 1 2024') },
65-
20: { status: 'default' },
66+
20: { status: 'available' },
67+
22: { status: 'default' },
6668
};
6769

6870
function getAdapter({
@@ -589,7 +591,7 @@ function getRuntime(process: NodeJS.Process, logger: AstroIntegrationLogger): Ru
589591
);
590592
return 'nodejs18.x';
591593
}
592-
if (support.status === 'default') {
594+
if (support.status === 'default' || support.status === 'available') {
593595
return `nodejs${major}.x`;
594596
}
595597
if (support.status === 'retiring') {

0 commit comments

Comments
 (0)