Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue-973: Provide warning for supported version of NodeJS in console… #974

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Changes from all 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
14 changes: 14 additions & 0 deletions src/extester.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ export const DEFAULT_SETUP_OPTIONS = {
export const VSCODE_VERSION_MIN = '1.81.1';
export const VSCODE_VERSION_MAX = '1.83.1';

/**
* The latest version of NodeJS which is properly working with selenium-webdriver
* (for more details, see https://www.npmjs.com/package/selenium-webdriver?activeTab=readme#node-support-policy)
*/
export const NODEJS_VERSION_MAX = '18.15.0';

/**
* VSCode Extension Tester
*/
Expand All @@ -39,6 +45,14 @@ export class ExTester {
constructor(storageFolder: string = 'test-resources', releaseType: ReleaseQuality = ReleaseQuality.Stable, extensionsDir?: string) {
this.code = new CodeUtil(storageFolder, releaseType, extensionsDir);
this.chrome = new DriverUtil(storageFolder);

if (process.versions.node > NODEJS_VERSION_MAX) {
console.log('\x1b[31m%s\x1b[0m', `
ERROR: You are using the unsupported NodeJS version '${process.versions.node}'. The latest supported version is '${NODEJS_VERSION_MAX}'.
We recommend to use supported version to have vscode-extension-tester working properly.
More info at https://github.com/redhat-developer/vscode-extension-tester/issues/975
`);
}
}

/**
Expand Down