Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"theme": "dark"
},
"engines": {
"vscode": "^1.78.0-20230421"
"vscode": "^1.78.0"
},
"keywords": [
"python",
Expand Down
10 changes: 1 addition & 9 deletions src/test/utils/vscode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this would be better named just version as it could return channel (aka quality which is essentially a dynamic version) as well as the actual version.

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';
}