Skip to content

Commit d3c7de9

Browse files
feat: drop node 20 support (#15864)
1 parent c723574 commit d3c7de9

File tree

14 files changed

+28
-21
lines changed

14 files changed

+28
-21
lines changed

.changeset/proud-apples-eat.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@astrojs/markdoc': patch
3+
'@astrojs/preact': patch
4+
'@astrojs/svelte': patch
5+
'@astrojs/react': patch
6+
'@astrojs/solid-js': patch
7+
'@astrojs/mdx': patch
8+
'create-astro': patch
9+
'@astrojs/prism': patch
10+
'@astrojs/upgrade': patch
11+
'astro': patch
12+
---
13+
14+
Removes temporary support for Node >=20.19.1 because Stackblitz now uses Node 22 by default

packages/astro-prism/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@
3939
"astro-scripts": "workspace:*"
4040
},
4141
"engines": {
42-
"node": "^20.19.1 || >=22.12.0"
42+
"node": ">=22.12.0"
4343
}
4444
}

packages/astro/bin/astro.mjs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,9 @@ const CI_INSTRUCTIONS = {
88
VERCEL: 'https://vercel.com/docs/runtimes#official-runtimes/node-js/node-js-version',
99
};
1010

11-
// TODO: remove once Stackblitz supports Node 22
12-
const IS_STACKBLITZ = !!process.versions.webcontainer;
13-
1411
// Hardcode supported Node.js version so we don't have to read differently in CJS & ESM.
15-
const engines = IS_STACKBLITZ ? '>=20.19.1' : '>=22.12.0';
16-
const skipSemverCheckIfAbove = IS_STACKBLITZ ? 21 : 23;
12+
const engines = '>=22.12.0';
13+
const skipSemverCheckIfAbove = 23;
1714

1815
/** `astro *` */
1916
async function main() {

packages/astro/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@
210210
"vitest": "^3.2.4"
211211
},
212212
"engines": {
213-
"node": "^20.19.1 || >=22.12.0",
213+
"node": ">=22.12.0",
214214
"npm": ">=9.6.5",
215215
"pnpm": ">=7.1.0"
216216
},

packages/create-astro/create-astro.mjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44

55
const currentVersion = process.versions.node;
66
const requiredMajorVersion = Number.parseInt(currentVersion.split('.')[0], 10);
7-
// TODO: remove once Stackblitz supports Node 22
8-
const IS_STACKBLITZ = !!process.versions.webcontainer;
9-
const minimumMajorVersion = IS_STACKBLITZ ? 20 : 22;
7+
const minimumMajorVersion = 22;
108

119
if (requiredMajorVersion < minimumMajorVersion) {
1210
console.error(`Node.js v${currentVersion} is out-of-date and unsupported!`);

packages/create-astro/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"astro-scripts": "workspace:*"
4141
},
4242
"engines": {
43-
"node": "^20.19.1 || >=22.12.0"
43+
"node": ">=22.12.0"
4444
},
4545
"publishConfig": {
4646
"provenance": true

packages/integrations/markdoc/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"vite": "^7.3.1"
8383
},
8484
"engines": {
85-
"node": "^20.19.1 || >=22.12.0"
85+
"node": ">=22.12.0"
8686
},
8787
"publishConfig": {
8888
"provenance": true

packages/integrations/mdx/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"vite": "^7.3.1"
7474
},
7575
"engines": {
76-
"node": "^20.19.1 || >=22.12.0"
76+
"node": ">=22.12.0"
7777
},
7878
"publishConfig": {
7979
"provenance": true

packages/integrations/preact/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"preact": "^10.6.5"
5252
},
5353
"engines": {
54-
"node": "^20.19.1 || >=22.12.0"
54+
"node": ">=22.12.0"
5555
},
5656
"publishConfig": {
5757
"provenance": true

packages/integrations/react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"react-dom": "^17.0.2 || ^18.0.0 || ^19.0.0"
6262
},
6363
"engines": {
64-
"node": "^20.19.1 || >=22.12.0"
64+
"node": ">=22.12.0"
6565
},
6666
"publishConfig": {
6767
"provenance": true

0 commit comments

Comments
 (0)