diff --git a/.github/workflows/azuresdkdrop.yml b/.github/workflows/azuresdkdrop.yml index bcf6094ac..5e7551c72 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 6574311ee..6b3451b50 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 828f970e8..21b06fca5 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 54d518304..2f91807ae 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 af629b053..3603619cc 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 diff --git a/schema/staticwebapp.config.json b/schema/staticwebapp.config.json index 819195272..3d36c64fb 100644 --- a/schema/staticwebapp.config.json +++ b/schema/staticwebapp.config.json @@ -585,19 +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", - "python:3.8", + "node:22", "python:3.9", "python:3.10", "python:3.11" 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", }, }, ];