Skip to content

Commit fc62bd8

Browse files
author
Kartik Raj
authored
Migrate extension to node 18 (#22135)
1 parent add82a0 commit fc62bd8

File tree

14 files changed

+219
-293
lines changed

14 files changed

+219
-293
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/devcontainers/typescript-node:16-bookworm
1+
FROM mcr.microsoft.com/devcontainers/typescript-node:18-bookworm
22

33
RUN apt-get install -y wget bzip2
44

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- 'release-*'
1010

1111
env:
12-
NODE_VERSION: 16.17.1
12+
NODE_VERSION: 18.17.1
1313
PYTHON_VERSION: '3.10' # YML treats 3.10 the number as 3.1, so quotes around 3.10
1414
# Force a path with spaces and to test extension works in these scenarios
1515
# Unicode characters are causing 2.7 failures so skip that for now.

.github/workflows/pr-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
- release*
99

1010
env:
11-
NODE_VERSION: 16.17.1
11+
NODE_VERSION: 18.17.1
1212
PYTHON_VERSION: '3.10' # YML treats 3.10 the number as 3.1, so quotes around 3.10
1313
MOCHA_REPORTER_JUNIT: true # Use the mocha-multi-reporters and send output to both console (spec) and JUnit (mocha-junit-reporter). Also enables a reporter which exits the process running the tests if it haven't already.
1414
ARTIFACT_NAME_VSIX: ms-python-insiders-vsix

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v16.17.1
1+
v18.17.1

build/azure-pipeline.pre-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ extends:
3333
buildSteps:
3434
- task: NodeTool@0
3535
inputs:
36-
versionSpec: '16.17.1'
36+
versionSpec: '18.17.1'
3737
displayName: Select Node version
3838

3939
- task: UsePythonVersion@0

build/azure-pipeline.stable.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ extends:
2828
buildSteps:
2929
- task: NodeTool@0
3030
inputs:
31-
versionSpec: '16.17.1'
31+
versionSpec: '18.17.1'
3232
displayName: Select Node version
3333

3434
- task: UsePythonVersion@0

build/azure-pipelines/pipeline.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ extends:
3737
testPlatforms:
3838
- name: Linux
3939
nodeVersions:
40-
- 16.17.1
40+
- 18.17.1
4141
- name: MacOS
4242
nodeVersions:
43-
- 16.17.1
43+
- 18.17.1
4444
- name: Windows
4545
nodeVersions:
46-
- 16.17.1
46+
- 18.17.1
4747
testSteps:
4848
- template: /build/azure-pipelines/templates/test-steps.yml@self
4949
parameters:

gulpfile.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,19 @@ gulp.task('compileCore', (done) => {
3939
.on('finish', () => (failed ? done(new Error('TypeScript compilation errors')) : done()));
4040
});
4141

42-
const apiTsProject = ts.createProject('./pythonExtensionApi/tsconfig.json', { typescript });
43-
4442
gulp.task('compileApi', (done) => {
45-
let failed = false;
46-
apiTsProject
47-
.src()
48-
.pipe(apiTsProject())
49-
.on('error', () => {
50-
failed = true;
43+
spawnAsync('npm', ['run', 'compileApi'], undefined, true)
44+
.then((stdout) => {
45+
if (stdout.includes('error')) {
46+
done(new Error(stdout));
47+
} else {
48+
done();
49+
}
5150
})
52-
.js.pipe(gulp.dest('./pythonExtensionApi/out'))
53-
.on('finish', () => (failed ? done(new Error('TypeScript compilation errors')) : done()));
51+
.catch((ex) => {
52+
console.log(ex);
53+
done(new Error('TypeScript compilation errors', ex));
54+
});
5455
});
5556

5657
gulp.task('compile', gulp.series('compileCore', 'compileApi'));

0 commit comments

Comments
 (0)