Skip to content

Commit c6e4516

Browse files
deps(ci node): update node in ci to 18.x [WIP] (#5810)
## Problem There's no real reason we need to use node 16 in CI, and it's preventing us from using some features. Our tests run against vscode's own version of node, which is unrelated to the node we use to run scripts, etc. (See also: #5761 ) ## Solution update CI runners to node 18 instead of 16. We need to pass ` { shell: true } ` to avoid error on windows. see more here: https://nodejs.org/en/blog/vulnerability/april-2024-security-releases-2 --- <!--- REMINDER: Ensure that your PR meets the guidelines in CONTRIBUTING.md --> License: I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Co-authored-by: Justin M. Keyes <[email protected]>
1 parent 16d19c1 commit c6e4516

File tree

6 files changed

+11
-8
lines changed

6 files changed

+11
-8
lines changed

.github/workflows/node.js.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
runs-on: ubuntu-latest
4242
strategy:
4343
matrix:
44-
node-version: [16.x]
44+
node-version: [18.x]
4545
vscode-version: [stable]
4646
env:
4747
NODE_OPTIONS: '--max-old-space-size=8192'
@@ -62,7 +62,7 @@ jobs:
6262
strategy:
6363
fail-fast: false
6464
matrix:
65-
node-version: [16.x]
65+
node-version: [18.x]
6666
vscode-version: [minimum, stable, insiders]
6767
env:
6868
VSCODE_TEST_VERSION: ${{ matrix.vscode-version }}
@@ -110,7 +110,7 @@ jobs:
110110
strategy:
111111
fail-fast: true
112112
matrix:
113-
node-version: [16.x]
113+
node-version: [18.x]
114114
vscode-version: [stable, insiders]
115115
env:
116116
VSCODE_TEST_VERSION: ${{ matrix.vscode-version }}
@@ -136,7 +136,7 @@ jobs:
136136
strategy:
137137
fail-fast: false
138138
matrix:
139-
node-version: [16.x]
139+
node-version: [18.x]
140140
vscode-version: [stable, insiders]
141141
env:
142142
VSCODE_TEST_VERSION: ${{ matrix.vscode-version }}

buildspec/linuxIntegrationTests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ phases:
2121
install:
2222
run-as: root
2323
runtime-versions:
24-
nodejs: 16
24+
nodejs: 18
2525
dotnet: 6.0
2626
java: latest
2727

buildspec/linuxTests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ phases:
1818
install:
1919
run-as: root
2020
runtime-versions:
21-
nodejs: 16
21+
nodejs: 18
2222
commands:
2323
- bash buildspec/shared/linux-install.sh
2424

buildspec/packageTestVsix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ phases:
1313
install:
1414
run-as: root
1515
runtime-versions:
16-
nodejs: 16
16+
nodejs: 18
1717
commands:
1818
- bash buildspec/shared/linux-install.sh
1919

buildspec/windowsTests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ env:
55
phases:
66
install:
77
runtime-versions:
8-
nodejs: 16
8+
nodejs: 18
99
commands:
1010
- |
1111
if(-Not($Env:CODECOV_TOKEN -eq $null)) {

packages/core/scripts/test/launchTestUtilities.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,16 @@ async function invokeVSCodeCli(vsCodeExecutablePath: string, args: string[]): Pr
182182
}
183183

184184
console.log(`Invoking vscode CLI command:\n "${cli}" ${JSON.stringify(cmdArgs)}`)
185+
// Shell option must be true on windows to avoid security error: https://nodejs.org/en/blog/vulnerability/april-2024-security-releases-2
185186
const spawnResult = proc.spawnSync(cli, cmdArgs, {
186187
encoding: 'utf-8',
187188
stdio: 'pipe',
189+
shell: process.platform === 'win32',
188190
})
189191

190192
if (spawnResult.status !== 0) {
191193
console.log('output: %s', spawnResult.output)
194+
console.log('error: %O', spawnResult.error)
192195
throw new Error(`VS Code CLI command failed (exit-code: ${spawnResult.status}): ${cli} ${cmdArgs}`)
193196
}
194197

0 commit comments

Comments
 (0)