From 72ea22b08065eea530b57cd7d04a513c8aaf969c Mon Sep 17 00:00:00 2001 From: Jikun Date: Mon, 26 Jan 2026 16:17:48 +0800 Subject: [PATCH 1/5] support node 22 --- schema/staticwebapp.config.json | 1 + src/core/constants.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/schema/staticwebapp.config.json b/schema/staticwebapp.config.json index 81919527..0b696d1d 100644 --- a/schema/staticwebapp.config.json +++ b/schema/staticwebapp.config.json @@ -597,6 +597,7 @@ "node:16", "node:18", "node:20", + "node:22", "python:3.8", "python:3.9", "python:3.10", diff --git a/src/core/constants.ts b/src/core/constants.ts index 08cb3454..b6c84bca 100644 --- a/src/core/constants.ts +++ b/src/core/constants.ts @@ -305,7 +305,7 @@ export const DEFAULT_VERSION = { }; export const SUPPORTED_VERSIONS = { - Node: ["12", "14", "16", "18", "20"], + Node: ["12", "14", "16", "18", "20", "22"], Dotnet: ["3.1", "6.0", "8.0"], DotnetIsolated: ["6.0", "7.0", "8.0", "9.0"], Python: ["3.8", "3.9", "3.10", "3.11"], From 2bb58e7f7f9198b8ab3b262ddf32206547228a2d Mon Sep 17 00:00:00 2001 From: Jikun Date: Tue, 27 Jan 2026 17:13:28 +0800 Subject: [PATCH 2/5] updated supported api runtime versions --- src/core/constants.ts | 16 ++++++++-------- src/core/frameworks/frameworks.ts | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/core/constants.ts b/src/core/constants.ts index b6c84bca..d29c94eb 100644 --- a/src/core/constants.ts +++ b/src/core/constants.ts @@ -298,17 +298,17 @@ export const SWA_CONFIG_SCHEME_FALLBACK_PATH = path.join(__dirname, "../../schem // Constants related to Api runtime export const DEFAULT_VERSION = { - Node: "16", - Dotnet: "6.0", - DotnetIsolated: "6.0", - Python: "3.8", + Node: "22", + Dotnet: "8.0", + DotnetIsolated: "8.0", + Python: "3.11", }; export const SUPPORTED_VERSIONS = { - Node: ["12", "14", "16", "18", "20", "22"], - Dotnet: ["3.1", "6.0", "8.0"], - DotnetIsolated: ["6.0", "7.0", "8.0", "9.0"], - Python: ["3.8", "3.9", "3.10", "3.11"], + Node: ["18", "20", "22"], + Dotnet: ["8.0"], + DotnetIsolated: ["8.0", "9.0"], + Python: ["3.9", "3.10", "3.11"], }; export const DEFAULT_RUNTIME_LANGUAGE = "node"; diff --git a/src/core/frameworks/frameworks.ts b/src/core/frameworks/frameworks.ts index 8150ce44..adee584c 100644 --- a/src/core/frameworks/frameworks.ts +++ b/src/core/frameworks/frameworks.ts @@ -6,7 +6,7 @@ export const apiFrameworks: FrameworkDefinition[] = [ config: { apiBuildCommand: "npm run build --if-present", apiLanguage: "node", - apiVersion: "16", + apiVersion: "22", }, }, { @@ -27,7 +27,7 @@ export const apiFrameworks: FrameworkDefinition[] = [ config: { apiBuildCommand: "dotnet publish -c Release", apiLanguage: "dotnet", - apiVersion: "6.0", + apiVersion: "8.0", }, }, { @@ -36,7 +36,7 @@ export const apiFrameworks: FrameworkDefinition[] = [ files: ["*.?(csproj|fsproj)", "host.json"], config: { apiLanguage: "dotnetisolated", - apiVersion: "6.0", + apiVersion: "8.0", }, }, { @@ -46,7 +46,7 @@ export const apiFrameworks: FrameworkDefinition[] = [ config: { // Nothing to setup, but we need to know the apiLocation (rootPath) apiLanguage: "python", - apiVersion: "3.8", + apiVersion: "3.11", }, }, ]; From 9a97b6b943c097fee3aad91a7687f778cc2d03cb Mon Sep 17 00:00:00 2001 From: Jikun Date: Tue, 27 Jan 2026 17:17:34 +0800 Subject: [PATCH 3/5] fix unit tests --- src/core/frameworks/detect.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/frameworks/detect.spec.ts b/src/core/frameworks/detect.spec.ts index 5de591ed..05392029 100644 --- a/src/core/frameworks/detect.spec.ts +++ b/src/core/frameworks/detect.spec.ts @@ -31,7 +31,7 @@ describe("framework detection", () => { appLocation: "e2e/fixtures/astro-node/astro preact", appDevserverCommand: "npm run dev", apiLanguage: "node", - apiVersion: "16", + apiVersion: "22", appDevserverUrl: "http://localhost:8080", name: "Astro, with API: Node.js", outputLocation: "_site", @@ -47,7 +47,7 @@ describe("framework detection", () => { appLocation: "e2e/fixtures/static-node-ts", name: "Static HTML, with API: Node.js, TypeScript", apiLanguage: "node", - apiVersion: "16", + apiVersion: "22", outputLocation: ".", }); }); From 88b29f994ee282c2ab1e6e603e35d7fc166598e1 Mon Sep 17 00:00:00 2001 From: Jikun Date: Mon, 2 Feb 2026 15:09:21 +0800 Subject: [PATCH 4/5] fix schema\staticwebapp.config.json --- schema/staticwebapp.config.json | 8 -------- 1 file changed, 8 deletions(-) diff --git a/schema/staticwebapp.config.json b/schema/staticwebapp.config.json index 0b696d1d..3d36c64f 100644 --- a/schema/staticwebapp.config.json +++ b/schema/staticwebapp.config.json @@ -585,20 +585,12 @@ "apiRuntime": { "type": "string", "enum": [ - "dotnet:3.1", - "dotnet:6.0", "dotnet:8.0", - "dotnet-isolated:6.0", - "dotnet-isolated:7.0", "dotnet-isolated:8.0", "dotnet-isolated:9.0", - "node:12", - "node:14", - "node:16", "node:18", "node:20", "node:22", - "python:3.8", "python:3.9", "python:3.10", "python:3.11" From 97d986d5efb669111f932a2bf02ee6f99b8ca48a Mon Sep 17 00:00:00 2001 From: Jikun Date: Mon, 2 Feb 2026 16:38:37 +0800 Subject: [PATCH 5/5] update pipeline yaml --- .github/workflows/azuresdkdrop.yml | 6 +++--- .github/workflows/ci.yml | 16 ++++++++-------- .github/workflows/deploy-docs.yml | 4 ++-- .github/workflows/detection-e2e-tests.yml | 2 +- .github/workflows/e2e.yml | 4 ++-- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/azuresdkdrop.yml b/.github/workflows/azuresdkdrop.yml index bcf6094a..5e7551c7 100644 --- a/.github/workflows/azuresdkdrop.yml +++ b/.github/workflows/azuresdkdrop.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: os: [macos-14, windows-latest, ubuntu-latest] - node-version: [18.x, 20.x] + node-version: [18.x, 20.x, 22.x] steps: - uses: actions/checkout@v4 @@ -35,10 +35,10 @@ jobs: - uses: actions/checkout@v4 with: ref: main - - name: Use Node.js 18.x + - name: Use Node.js 22.x uses: actions/setup-node@v4 with: - node-version: 18.x + node-version: 22.x - run: npm ci - run: npm run build diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6574311e..6b3451b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 18.x + node-version: 22.x - run: npm ci - run: npm run format @@ -28,7 +28,7 @@ jobs: strategy: matrix: os: [macos-14] - node-version: [18.x, 20.x] + node-version: [18.x, 20.x, 22.x] name: "test: use node ${{ matrix.node-version }}" steps: @@ -59,7 +59,7 @@ jobs: strategy: matrix: os: [macos-14] - node-version: [18.x, 20.x] + node-version: [18.x, 20.x, 22.x] name: "deploy: use node ${{ matrix.node-version }}" steps: @@ -92,7 +92,7 @@ jobs: strategy: matrix: os: [windows-latest] - node-version: [18.x, 20.x] + node-version: [18.x, 20.x, 22.x] name: "test: use node ${{ matrix.node-version }}" steps: @@ -123,7 +123,7 @@ jobs: strategy: matrix: os: [windows-latest] - node-version: [18.x, 20.x] + node-version: [18.x, 20.x, 22.x] name: "deploy: use node ${{ matrix.node-version }}" steps: @@ -156,7 +156,7 @@ jobs: strategy: matrix: os: [ubuntu-22.04] - node-version: [18.x, 20.x] + node-version: [18.x, 20.x, 22.x] name: "test: use node ${{ matrix.node-version }}" steps: @@ -187,7 +187,7 @@ jobs: strategy: matrix: os: [ubuntu-22.04] - node-version: [18.x, 20.x] + node-version: [18.x, 20.x, 22.x] name: "deploy: use node ${{ matrix.node-version }}" steps: @@ -222,7 +222,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 18.x + node-version: 22.x - run: npm ci - run: npm version prerelease --preid=ci-$GITHUB_RUN_ID --no-git-tag-version diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 828f970e..21b06fca 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -12,9 +12,9 @@ jobs: - run: git config --global user.email "github@wassim.dev" - run: git config --global user.name "Wassim Chegham" - name: Setup Node.js environment - uses: actions/setup-node@v3.2.0 + uses: actions/setup-node@v4 with: - node-version: '18.x' + node-version: '22.x' - name: "deploy docs" run: | cd docs/www/ diff --git a/.github/workflows/detection-e2e-tests.yml b/.github/workflows/detection-e2e-tests.yml index 54d51830..2f91807a 100644 --- a/.github/workflows/detection-e2e-tests.yml +++ b/.github/workflows/detection-e2e-tests.yml @@ -10,7 +10,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 18.x + node-version: 22.x - name: Test framework detection run: | npm ci diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index af629b05..3603619c 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -15,8 +15,8 @@ jobs: # https://github.com/cypress-io/github-action/issues/48 fail-fast: false matrix: - os: [macos-12, windows-latest, ubuntu-22.04] - node-version: [18.x, 20.x] + os: [macos-14, windows-latest, ubuntu-22.04] + node-version: [18.x, 20.x, 22.x] steps: - name: Checkout