From 72ea22b08065eea530b57cd7d04a513c8aaf969c Mon Sep 17 00:00:00 2001 From: Jikun Date: Mon, 26 Jan 2026 16:17:48 +0800 Subject: [PATCH 1/3] 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/3] 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/3] 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: ".", }); });