fix(linux): fix build with node-v20

This commit is contained in:
Suyun114 2024-07-07 09:21:31 +08:00
parent f1bf0000b4
commit 3636e6e389
5 changed files with 2 additions and 102 deletions

View file

@ -86,7 +86,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: '18.17'
node-version: '20.12'
if: env.SHOULD_BUILD == 'yes'
- name: Install Yarn

View file

@ -266,7 +266,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: '18.17'
node-version: '20.12'
- name: Setup Python 3
uses: actions/setup-python@v5

View file

@ -38,8 +38,6 @@ elif [[ "${VSCODE_ARCH}" == "riscv64" ]]; then
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME="vscodium/vscodium-linux-build-agent:focal-devtoolset-riscv64"
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
# Unofficial RISC-V nodejs builds doesn't provide v16.x
sed -i '/target/s/"16.*"/"18.18.1"/' remote/.yarnrc
fi
export VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME

View file

@ -1,70 +0,0 @@
diff --git a/build/gulpfile.reh.js b/build/gulpfile.reh.js
index c2b81d0..2e94d99 100644
--- a/build/gulpfile.reh.js
+++ b/build/gulpfile.reh.js
@@ -375,16 +375,2 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
- if (platform === 'linux' && process.env['VSCODE_NODE_GLIBC'] === '-glibc-2.17') {
- result = es.merge(result,
- gulp.src(`resources/server/bin/helpers/check-requirements-linux-legacy.sh`, { base: '.' })
- .pipe(rename(`bin/helpers/check-requirements.sh`))
- .pipe(util.setExecutableBit())
- );
- } else if (platform === 'linux' || platform === 'alpine') {
- result = es.merge(result,
- gulp.src(`resources/server/bin/helpers/check-requirements-linux.sh`, { base: '.' })
- .pipe(rename(`bin/helpers/check-requirements.sh`))
- .pipe(util.setExecutableBit())
- );
- }
-
return result.pipe(vfs.dest(destination));
diff --git a/remote/.yarnrc b/remote/.yarnrc
index 4c99388..71a7164 100644
--- a/remote/.yarnrc
+++ b/remote/.yarnrc
@@ -1,3 +1,3 @@
disturl "https://nodejs.org/dist"
-target "20.11.1"
+target "16.20.2"
ms_build_id "275039"
diff --git a/remote/package.json b/remote/package.json
index b84f513..42d8e41 100644
--- a/remote/package.json
+++ b/remote/package.json
@@ -31,3 +31,3 @@
"native-watchdog": "^1.4.1",
- "node-pty": "1.1.0-beta11",
+ "node-pty": "1.1.0-beta4",
"tas-client-umd": "0.2.0",
diff --git a/remote/yarn.lock b/remote/yarn.lock
index 4241bf0..5ce4431 100644
--- a/remote/yarn.lock
+++ b/remote/yarn.lock
@@ -412,2 +412,7 @@ ms@2.1.2:
+nan@^2.17.0:
+ version "2.18.0"
+ resolved "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz#26a6faae7ffbeb293a39660e88a76b82e30b7554"
+ integrity sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==
+
napi-build-utils@^1.0.1:
@@ -429,3 +434,3 @@ node-abi@^3.3.0:
-node-addon-api@7.1.0, node-addon-api@^7.1.0:
+node-addon-api@7.1.0:
version "7.1.0"
@@ -454,8 +459,8 @@ node-gyp-build@4.8.1, node-gyp-build@^4.3.0:
-node-pty@1.1.0-beta11:
- version "1.1.0-beta11"
- resolved "https://registry.yarnpkg.com/node-pty/-/node-pty-1.1.0-beta11.tgz#909d5dd8f9aa2a7857e7b632fd4d2d4768bdf69f"
- integrity sha512-vTjF+VrvSCfPDILUkIT+YrG1Fdn06/eBRS2fc9a3JzYAvknMB1Ip8aoJhxl8hNpjWAbprmCEiV91mlfNpCD+GQ==
+node-pty@1.1.0-beta4:
+ version "1.1.0-beta4"
+ resolved "https://registry.npmjs.org/node-pty/-/node-pty-1.1.0-beta4.tgz#ee74d909c9f422ffc7f675e1092529673f8906ec"
+ integrity sha512-CgffN9AxVtH4g7vDxtanm2qaR7jw3oet9r+ArzziGiFvmds9SdR3gXkZF0fqZWSxhTHZusJWvsuKvRv+5O2K8A==
dependencies:
- node-addon-api "^7.1.0"
+ nan "^2.17.0"

View file

@ -1,28 +0,0 @@
diff --git a/build/lib/fetch.js b/build/lib/fetch.js
index 2fed63b..9a9f013 100644
--- a/build/lib/fetch.js
+++ b/build/lib/fetch.js
@@ -15,2 +15,3 @@ const crypto = require("crypto");
const through2 = require("through2");
+const fetch = require("node-fetch");
function fetchUrls(urls, options) {
diff --git a/build/linux/debian/install-sysroot.js b/build/linux/debian/install-sysroot.js
index feca7d3..b4f6540 100644
--- a/build/linux/debian/install-sysroot.js
+++ b/build/linux/debian/install-sysroot.js
@@ -15,2 +15,3 @@ const crypto_1 = require("crypto");
const ansiColors = require("ansi-colors");
+const fetch = require("node-fetch");
// Based on https://source.chromium.org/chromium/chromium/src/+/main:build/linux/sysroot_scripts/install-sysroot.py.
diff --git a/yarn.lock b/yarn.lock
index 2f4c572..6b65370 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -6458,2 +6458,7 @@ liftoff@^3.1.0:
+lilconfig@^2.0.5:
+ version "2.1.0"
+ resolved "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz#78e23ac89ebb7e1bfbf25b18043de756548e7f52"
+ integrity sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==
+
lilconfig@^3.0.0: