Skip to content

Commit

Permalink
Migrate extension to node 18 (microsoft#22135)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartik Raj authored and anthonykim1 committed Oct 2, 2023
1 parent 55aa53a commit a99740e
Show file tree
Hide file tree
Showing 14 changed files with 228 additions and 281 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/devcontainers/typescript-node:16-bookworm
FROM mcr.microsoft.com/devcontainers/typescript-node:18-bookworm

RUN apt-get install -y wget bzip2

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- 'release-*'

env:
NODE_VERSION: 16.17.1
NODE_VERSION: 18.17.1
PYTHON_VERSION: '3.10' # YML treats 3.10 the number as 3.1, so quotes around 3.10
# Force a path with spaces and to test extension works in these scenarios
# Unicode characters are causing 2.7 failures so skip that for now.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- release*

env:
NODE_VERSION: 16.17.1
NODE_VERSION: 18.17.1
PYTHON_VERSION: '3.10' # YML treats 3.10 the number as 3.1, so quotes around 3.10
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.
ARTIFACT_NAME_VSIX: ms-python-insiders-vsix
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.17.1
v18.17.1
2 changes: 1 addition & 1 deletion build/azure-pipeline.pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ extends:
buildSteps:
- task: NodeTool@0
inputs:
versionSpec: '16.17.1'
versionSpec: '18.17.1'
displayName: Select Node version

- task: UsePythonVersion@0
Expand Down
2 changes: 1 addition & 1 deletion build/azure-pipeline.stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ extends:
buildSteps:
- task: NodeTool@0
inputs:
versionSpec: '16.17.1'
versionSpec: '18.17.1'
displayName: Select Node version

- task: UsePythonVersion@0
Expand Down
6 changes: 3 additions & 3 deletions build/azure-pipelines/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ extends:
testPlatforms:
- name: Linux
nodeVersions:
- 16.17.1
- 18.17.1
- name: MacOS
nodeVersions:
- 16.17.1
- 18.17.1
- name: Windows
nodeVersions:
- 16.17.1
- 18.17.1
testSteps:
- template: /build/azure-pipelines/templates/test-steps.yml@self
parameters:
Expand Down
21 changes: 11 additions & 10 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,19 @@ gulp.task('compileCore', (done) => {
.on('finish', () => (failed ? done(new Error('TypeScript compilation errors')) : done()));
});

const apiTsProject = ts.createProject('./pythonExtensionApi/tsconfig.json', { typescript });

gulp.task('compileApi', (done) => {
let failed = false;
apiTsProject
.src()
.pipe(apiTsProject())
.on('error', () => {
failed = true;
spawnAsync('npm', ['run', 'compileApi'], undefined, true)
.then((stdout) => {
if (stdout.includes('error')) {
done(new Error(stdout));
} else {
done();
}
})
.js.pipe(gulp.dest('./pythonExtensionApi/out'))
.on('finish', () => (failed ? done(new Error('TypeScript compilation errors')) : done()));
.catch((ex) => {
console.log(ex);
done(new Error('TypeScript compilation errors', ex));
});
});

gulp.task('compile', gulp.series('compileCore', 'compileApi'));
Expand Down
Loading

0 comments on commit a99740e

Please sign in to comment.