diff --git a/schema/staticwebapp.config.json b/schema/staticwebapp.config.json index 819195272..0b696d1de 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 08cb34541..d29c94ebf 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"], - 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/detect.spec.ts b/src/core/frameworks/detect.spec.ts index 5de591ed1..05392029d 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: ".", }); }); diff --git a/src/core/frameworks/frameworks.ts b/src/core/frameworks/frameworks.ts index 8150ce449..adee584c2 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", }, }, ];