diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ca75f6ef7727..16f398f5a166 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ on: permissions: {} env: - NODE_VERSION: 20.18.1 + NODE_VERSION: 22.17.0 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. diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 65e80e1f6280..368d9d0dbb73 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -10,7 +10,7 @@ on: permissions: {} env: - NODE_VERSION: 20.18.1 + NODE_VERSION: 22.17.0 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 diff --git a/build/azure-pipeline.pre-release.yml b/build/azure-pipeline.pre-release.yml index ab087673f1e7..e7159618d3ae 100644 --- a/build/azure-pipeline.pre-release.yml +++ b/build/azure-pipeline.pre-release.yml @@ -66,7 +66,7 @@ extends: buildSteps: - task: NodeTool@0 inputs: - versionSpec: '20.18.1' + versionSpec: '22.17.0' displayName: Select Node version - task: UsePythonVersion@0 diff --git a/build/azure-pipeline.stable.yml b/build/azure-pipeline.stable.yml index c68dacc7db80..ce67c69a3df4 100644 --- a/build/azure-pipeline.stable.yml +++ b/build/azure-pipeline.stable.yml @@ -60,7 +60,7 @@ extends: buildSteps: - task: NodeTool@0 inputs: - versionSpec: '20.18.1' + versionSpec: '22.17.0' displayName: Select Node version - task: UsePythonVersion@0 diff --git a/build/azure-pipelines/pipeline.yml b/build/azure-pipelines/pipeline.yml index ebb8a141d9d3..46302aa6ff90 100644 --- a/build/azure-pipelines/pipeline.yml +++ b/build/azure-pipelines/pipeline.yml @@ -37,13 +37,13 @@ extends: testPlatforms: - name: Linux nodeVersions: - - 20.18.1 + - 22.17.0 - name: MacOS nodeVersions: - - 20.18.1 + - 22.17.0 - name: Windows nodeVersions: - - 20.18.1 + - 22.17.0 testSteps: - template: /build/azure-pipelines/templates/test-steps.yml@self parameters: diff --git a/pythonExtensionApi/package-lock.json b/pythonExtensionApi/package-lock.json index ec175f1aaa5d..e462fc1c888a 100644 --- a/pythonExtensionApi/package-lock.json +++ b/pythonExtensionApi/package-lock.json @@ -14,7 +14,7 @@ "typescript": "~5.2" }, "engines": { - "node": ">=20.18.1", + "node": ">=22.17.0", "vscode": "^1.93.0" } }, diff --git a/pythonExtensionApi/package.json b/pythonExtensionApi/package.json index 9a27e5a09b0a..e4e956ff6065 100644 --- a/pythonExtensionApi/package.json +++ b/pythonExtensionApi/package.json @@ -13,7 +13,7 @@ "main": "./out/main.js", "types": "./out/main.d.ts", "engines": { - "node": ">=20.18.1", + "node": ">=22.17.0", "vscode": "^1.93.0" }, "license": "MIT", @@ -27,7 +27,7 @@ }, "devDependencies": { "typescript": "~5.2", - "@types/vscode": "^1.93.0", + "@types/vscode": "^1.102.0", "source-map": "^0.8.0-beta.0" }, "scripts": { diff --git a/src/test/common/process/logger.unit.test.ts b/src/test/common/process/logger.unit.test.ts index f1421ea58b85..1bfe94b43e95 100644 --- a/src/test/common/process/logger.unit.test.ts +++ b/src/test/common/process/logger.unit.test.ts @@ -111,7 +111,7 @@ suite('ProcessLogger suite', () => { const options = { cwd: path.join('debug', 'path') }; logger.logProcess(path.join('net', untildify('~'), 'test'), ['--foo', '--bar'], options); - sinon.assert.calledWithExactly(traceLogStub, `> ${path.join('net', '~', 'test')} --foo --bar`); + sinon.assert.calledWithExactly(traceLogStub, `> ${path.join('.', 'net', '~', 'test')} --foo --bar`); sinon.assert.calledWithExactly(traceLogStub, `cwd: ${options.cwd}`); }); @@ -125,7 +125,7 @@ suite('ProcessLogger suite', () => { sinon.assert.calledWithExactly( traceLogStub, - `> ${path.join('net', '~', 'test')} --foo ${path.join('~', 'boo')}`, + `> ${path.join('.', 'net', '~', 'test')} --foo ${path.join('~', 'boo')}`, ); sinon.assert.calledWithExactly(traceLogStub, `cwd: ${options.cwd}`); }); @@ -134,7 +134,7 @@ suite('ProcessLogger suite', () => { const options = { cwd: path.join('debug', 'path') }; logger.logProcess(`"${path.join('net', untildify('~'), 'test')}" "--foo" "--bar"`, undefined, options); - sinon.assert.calledWithExactly(traceLogStub, `> "${path.join('net', '~', 'test')}" "--foo" "--bar"`); + sinon.assert.calledWithExactly(traceLogStub, `> "${path.join('.', 'net', '~', 'test')}" "--foo" "--bar"`); sinon.assert.calledWithExactly(traceLogStub, `cwd: ${options.cwd}`); }); @@ -146,15 +146,18 @@ suite('ProcessLogger suite', () => { sinon.assert.calledWithExactly(traceLogStub, `cwd: ${options.cwd}`); }); - test('Logger replaces the path to workspace with . if exactly one workspace folder is opened', async () => { + test('Logger only replaces the workspace path with . in the working directory', async () => { const options = { cwd: path.join('path', 'to', 'workspace', 'debug', 'path') }; logger.logProcess(`"${path.join('path', 'to', 'workspace', 'test')}" "--foo" "--bar"`, undefined, options); - sinon.assert.calledWithExactly(traceLogStub, `> ".${path.sep}test" "--foo" "--bar"`); + sinon.assert.calledWithExactly( + traceLogStub, + `> "${path.join('path', 'to', 'workspace', 'test')}" "--foo" "--bar"`, + ); sinon.assert.calledWithExactly(traceLogStub, `cwd: .${path.sep + path.join('debug', 'path')}`); }); - test('On Windows, logger replaces both backwards and forward slash version of path to workspace with . if exactly one workspace folder is opened', async function () { + test('On Windows, logger handles both forward and backward slashes in workspace paths for cwd', async function () { if (getOSType() !== OSType.Windows) { return this.skip(); } @@ -162,14 +165,20 @@ suite('ProcessLogger suite', () => { logger.logProcess(`"${path.join('path', 'to', 'workspace', 'test')}" "--foo" "--bar"`, undefined, options); - sinon.assert.calledWithExactly(traceLogStub, `> ".${path.sep}test" "--foo" "--bar"`); + sinon.assert.calledWithExactly( + traceLogStub, + `> "${path.join('path', 'to', 'workspace', 'test')}" "--foo" "--bar"`, + ); sinon.assert.calledWithExactly(traceLogStub, `cwd: .${path.sep + path.join('debug', 'path')}`); traceLogStub.resetHistory(); options = { cwd: path.join('path\\to\\workspace', 'debug', 'path') }; logger.logProcess(`"${path.join('path', 'to', 'workspace', 'test')}" "--foo" "--bar"`, undefined, options); - sinon.assert.calledWithExactly(traceLogStub, `> ".${path.sep}test" "--foo" "--bar"`); + sinon.assert.calledWithExactly( + traceLogStub, + `> "${path.join('path', 'to', 'workspace', 'test')}" "--foo" "--bar"`, + ); sinon.assert.calledWithExactly(traceLogStub, `cwd: .${path.sep + path.join('debug', 'path')}`); });