Skip to content

Commit 53cf290

Browse files
committed
feat: use Node 20 by default
1 parent 85b6e71 commit 53cf290

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

.github/workflows/azure-static-web-apps-polite-desert-00b80111e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
- uses: actions/checkout@v3
6060
- uses: actions/setup-node@v2
6161
with:
62-
node-version: '18.x'
62+
node-version: '20.x'
6363
- name: Install dependencies
6464
run: npm ci
6565
- name: Install Playwright

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
- uses: actions/setup-node@v1
2929
with:
30-
node-version: 18
30+
node-version: 20
3131
registry-url: 'https://registry.npmjs.org'
3232
if: ${{ steps.release.outputs.release_created }}
3333

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Setup Node
1616
uses: actions/setup-node@v3
1717
with:
18-
node-version: '18.x'
18+
node-version: '20.x'
1919
- run: npm ci
2020
- run: npm run check-types
2121
- run: npm run check-format

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ If you want to suppress this error, set allowReservedSwaRoutes to true in your a
115115
outfile: join(functionDir, 'index.js'),
116116
bundle: true,
117117
platform: 'node',
118-
target: 'node18',
118+
target: 'node20',
119119
sourcemap: 'linked',
120120
external: esbuildOptions.external,
121121
keepNames: esbuildOptions.keepNames,
@@ -203,7 +203,7 @@ export function generateConfig(customStaticWebAppConfig, appDir) {
203203
rewrite: ssrFunctionRoute
204204
},
205205
platform: {
206-
apiRuntime: 'node:18',
206+
apiRuntime: 'node:20',
207207
...customStaticWebAppConfig.platform
208208
}
209209
};

test/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ describe('generateConfig', () => {
2525
rewrite: '/api/sk_render'
2626
},
2727
platform: {
28-
apiRuntime: 'node:18'
28+
apiRuntime: 'node:20'
2929
},
3030
routes: expect.arrayContaining([
3131
{

0 commit comments

Comments
 (0)