From 2b212f5f1b78a0dc44dfbd16dc2762b94422c56d Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Tue, 19 Sep 2023 23:27:10 +0800 Subject: [PATCH] chore: upgrade to node 20 (#2241) --- .devcontainer/docker-compose.yml | 2 +- .github/scripts/deploy.py | 17 +++++++---------- .github/workflows/deploy-preview.yml | 2 +- .github/workflows/deploy.yml | 2 +- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 54da208a6..fe31a12cd 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -3,7 +3,7 @@ version: '3.8' services: app: # Use offical typescript-node devcontainer image - image: mcr.microsoft.com/vscode/devcontainers/typescript-node:0-18 + image: mcr.microsoft.com/vscode/devcontainers/typescript-node:0-20 volumes: - ..:/workspace:cached diff --git a/.github/scripts/deploy.py b/.github/scripts/deploy.py index f57462a55..e4c6b89e6 100644 --- a/.github/scripts/deploy.py +++ b/.github/scripts/deploy.py @@ -1,19 +1,16 @@ # type: ignore +import logging import os +from argparse import ArgumentParser from azure.identity import DefaultAzureCredential -from azure.mgmt.web import WebSiteManagementClient -from azure.mgmt.web.models import ( - StaticSiteUserProvidedFunctionAppARMResource, - Site, - SiteConfig, -) -from azure.mgmt.storage import StorageManagementClient from azure.mgmt.applicationinsights import ApplicationInsightsManagementClient from azure.mgmt.redis import RedisManagementClient -from argparse import ArgumentParser -import logging +from azure.mgmt.storage import StorageManagementClient +from azure.mgmt.web import WebSiteManagementClient +from azure.mgmt.web.models import ( + Site, SiteConfig, StaticSiteUserProvidedFunctionAppARMResource) def main(environment_name: str, verbose: bool = False): @@ -99,7 +96,7 @@ def main(environment_name: str, verbose: bool = False): app_settings=[ {"name": "FUNCTIONS_EXTENSION_VERSION", "value": "~4"}, {"name": "FUNCTIONS_WORKER_RUNTIME", "value": "node"}, - {"name": "WEBSITE_NODE_DEFAULT_VERSION", "value": "~18"}, + {"name": "WEBSITE_NODE_DEFAULT_VERSION", "value": "~20"}, # Better deploy and cold-start performance # https://docs.microsoft.com/en-us/azure/azure-functions/run-functions-from-deployment-package#integration-with-zip-deployment {"name": "WEBSITE_RUN_FROM_PACKAGE", "value": "1"}, diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 10fbc7afc..d309fe006 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -41,7 +41,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3.8.1 with: - node-version: 18 + node-version: 20 cache: 'yarn' - name: Build diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f44466df0..93ce5fe80 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -44,7 +44,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3.8.1 with: - node-version: 18 + node-version: 20 cache: 'yarn' - name: Install dependencies