From 1f3ea53dc4466a03213b0fd84ee81bcdeac12ec5 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Wed, 10 Apr 2024 18:38:44 +0900 Subject: [PATCH] ci: use latest v20 LTS for missing node-gyp Refs https://github.com/npm/cli/commit/eacec5f49060d3dfcdc3c7043115619e4bb22864 --- .nvmrc | 2 +- build/azure-pipelines/darwin/product-build-darwin.yml | 3 +-- build/azure-pipelines/win32/product-build-win32.yml | 10 ++-------- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/.nvmrc b/.nvmrc index f3f52b42d3d..bc78e9f2695 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -20.9.0 +20.12.1 diff --git a/build/azure-pipelines/darwin/product-build-darwin.yml b/build/azure-pipelines/darwin/product-build-darwin.yml index 11aa7605f63..8b4bda1c6a2 100644 --- a/build/azure-pipelines/darwin/product-build-darwin.yml +++ b/build/azure-pipelines/darwin/product-build-darwin.yml @@ -78,8 +78,6 @@ steps: - script: | set -e - export npm_config_arch=$(VSCODE_ARCH) - npm i -g node-gyp@9.4.0 python3 -m pip install setuptools for i in {1..5}; do # try 5 times @@ -91,6 +89,7 @@ steps: echo "Yarn failed $i, trying again..." done env: + npm_config_arch: $(VSCODE_ARCH) ELECTRON_SKIP_BINARY_DOWNLOAD: 1 PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 GITHUB_TOKEN: "$(github-distro-mixin-password)" diff --git a/build/azure-pipelines/win32/product-build-win32.yml b/build/azure-pipelines/win32/product-build-win32.yml index 3c92499b2a6..d3827b930f8 100644 --- a/build/azure-pipelines/win32/product-build-win32.yml +++ b/build/azure-pipelines/win32/product-build-win32.yml @@ -93,16 +93,10 @@ steps: . build/azure-pipelines/win32/exec.ps1 . build/azure-pipelines/win32/retry.ps1 $ErrorActionPreference = "Stop" - # TODO: remove custom node-gyp when updating to Node v20, - # refs https://github.com/npm/cli/releases/tag/v10.2.3 which is available with Node >= 20.10.0 - $nodeGypDir = "$(Agent.TempDirectory)/custom-packages" - mkdir "$nodeGypDir" - npm install node-gyp@10.0.1 -g --prefix "$nodeGypDir" - $env:npm_config_node_gyp = "${nodeGypDir}/node_modules/node-gyp/bin/node-gyp.js" - $env:npm_config_arch = "$(VSCODE_ARCH)" - $env:CHILD_CONCURRENCY="1" retry { exec { yarn --frozen-lockfile --check-files } } env: + npm_config_arch: $(VSCODE_ARCH) + CHILD_CONCURRENCY: 1 ELECTRON_SKIP_BINARY_DOWNLOAD: 1 PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 GITHUB_TOKEN: "$(github-distro-mixin-password)"