diff --git a/package-lock.json b/package-lock.json index bfbd316f269d..f00cbb0a912e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -128,7 +128,7 @@ "yargs": "^15.3.1" }, "engines": { - "vscode": "^1.78.0-20230421" + "vscode": "^1.78.0" } }, "node_modules/@azure/abort-controller": { diff --git a/package.json b/package.json index fd6ddcea84ca..4805463928ed 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "theme": "dark" }, "engines": { - "vscode": "^1.78.0-20230421" + "vscode": "^1.78.0" }, "keywords": [ "python", diff --git a/src/test/debuggerTest.ts b/src/test/debuggerTest.ts index 949f14caee3d..36a0060b9303 100644 --- a/src/test/debuggerTest.ts +++ b/src/test/debuggerTest.ts @@ -4,7 +4,7 @@ import * as path from 'path'; import { runTests } from '@vscode/test-electron'; import { EXTENSION_ROOT_DIR_FOR_TESTS } from './constants'; -import { getChannel } from './utils/vscode'; +import { getVersion } from './utils/vscode'; const workspacePath = path.join(__dirname, '..', '..', 'src', 'testMultiRootWkspc', 'multi.code-workspace'); process.env.IS_CI_SERVER_TEST_DEBUGGER = '1'; @@ -17,7 +17,7 @@ function start() { extensionDevelopmentPath: EXTENSION_ROOT_DIR_FOR_TESTS, extensionTestsPath: path.join(EXTENSION_ROOT_DIR_FOR_TESTS, 'out', 'test', 'index'), launchArgs: [workspacePath], - version: getChannel(), + version: getVersion(), extensionTestsEnv: { ...process.env, UITEST_DISABLE_INSIDERS: '1' }, }).catch((ex) => { console.error('End Debugger tests (with errors)', ex); diff --git a/src/test/multiRootTest.ts b/src/test/multiRootTest.ts index c8c63b6dabe5..9a6d7cd1b904 100644 --- a/src/test/multiRootTest.ts +++ b/src/test/multiRootTest.ts @@ -2,7 +2,7 @@ import * as path from 'path'; import { runTests } from '@vscode/test-electron'; import { EXTENSION_ROOT_DIR_FOR_TESTS } from './constants'; import { initializeLogger } from './testLogger'; -import { getChannel } from './utils/vscode'; +import { getVersion } from './utils/vscode'; const workspacePath = path.join(__dirname, '..', '..', 'src', 'testMultiRootWkspc', 'multi.code-workspace'); process.env.IS_CI_SERVER_TEST_DEBUGGER = ''; @@ -17,7 +17,7 @@ function start() { extensionDevelopmentPath: EXTENSION_ROOT_DIR_FOR_TESTS, extensionTestsPath: path.join(EXTENSION_ROOT_DIR_FOR_TESTS, 'out', 'test', 'index'), launchArgs: [workspacePath], - version: getChannel(), + version: getVersion(), extensionTestsEnv: { ...process.env, UITEST_DISABLE_INSIDERS: '1' }, }).catch((ex) => { console.error('End Multiroot tests (with errors)', ex); diff --git a/src/test/standardTest.ts b/src/test/standardTest.ts index 0562d1adf431..c8416ebf1d7d 100644 --- a/src/test/standardTest.ts +++ b/src/test/standardTest.ts @@ -5,7 +5,7 @@ import * as path from 'path'; import { downloadAndUnzipVSCode, resolveCliPathFromVSCodeExecutablePath, runTests } from '@vscode/test-electron'; import { JUPYTER_EXTENSION_ID, PYLANCE_EXTENSION_ID } from '../client/common/constants'; import { EXTENSION_ROOT_DIR_FOR_TESTS } from './constants'; -import { getChannel } from './utils/vscode'; +import { getVersion } from './utils/vscode'; // If running smoke tests, we don't have access to this. if (process.env.TEST_FILES_SUFFIX !== 'smoke.test') { @@ -76,7 +76,7 @@ async function installPylanceExtension(vscodeExecutablePath: string) { async function start() { console.log('*'.repeat(100)); console.log('Start Standard tests'); - const channel = getChannel(); + const channel = getVersion(); console.log(`Using ${channel} build of VS Code.`); const vscodeExecutablePath = await downloadAndUnzipVSCode(channel); const baseLaunchArgs = diff --git a/src/test/utils/vscode.ts b/src/test/utils/vscode.ts index a10ceb2e8881..44f745dbaf90 100644 --- a/src/test/utils/vscode.ts +++ b/src/test/utils/vscode.ts @@ -2,22 +2,14 @@ import * as path from 'path'; import * as fs from 'fs-extra'; import { EXTENSION_ROOT_DIR } from '../../client/common/constants'; -const insidersVersion = /^\^(\d+\.\d+\.\d+)-(insider|\d{8})$/; - -export function getChannel(): string { +export function getVersion(): string { if (process.env.VSC_PYTHON_CI_TEST_VSC_CHANNEL) { return process.env.VSC_PYTHON_CI_TEST_VSC_CHANNEL; } const packageJsonPath = path.join(EXTENSION_ROOT_DIR, 'package.json'); if (fs.pathExistsSync(packageJsonPath)) { const packageJson = fs.readJSONSync(packageJsonPath); - const engineVersion = packageJson.engines.vscode; - if (insidersVersion.test(engineVersion)) { - // Can't pass in the version number for an insiders build; - // https://github.com/microsoft/vscode-test/issues/176 - return 'insiders'; - } - return engineVersion.replace('^', ''); + return packageJson.engines.vscode.replace('^', ''); } return 'stable'; }