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

Use latest 18.x #1144

Merged
merged 1 commit into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/insiders.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18.15.x
node-version: 18.x
cache: npm

- name: Run Tests (macOS, windows)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/template-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18.15.x
node-version: 18.x
cache: npm

- name: Run Tests (macOS, windows)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

|NodeJS|Visual Studio Code|Operating System|
|--|--|--|
|<table style="text-align:center;"> <tr><th>16.x.x</th><th>18.x.x</th></tr><tr><td>✅</td><td>⚠️ <=18.15.x</td></tr> </table>| <table style="text-align:center;"> <tr><th>min</th><th>-</th><th>max</th></tr><tr><td>1.84.2</td><td>1.85.2</td><td>1.86.2</td></tr> </table>| <table style="text-align:center;"> <tr><th>Linux</th><th>Windows</th><th>macOS</th></tr><tr><td>✅</td><td>✅</td><td>⚠️ [Known Issues](KNOWN_ISSUES.md#macos-known-limitations-of-native-objects)</td></tr> </table>|
|<table style="text-align:center;"> <tr><th>16.x.x</th><th>18.x.x</th></tr><tr><td>✅</td><td></td></tr> </table>| <table style="text-align:center;"> <tr><th>min</th><th>-</th><th>max</th></tr><tr><td>1.84.2</td><td>1.85.2</td><td>1.86.2</td></tr> </table>| <table style="text-align:center;"> <tr><th>Linux</th><th>Windows</th><th>macOS</th></tr><tr><td>✅</td><td>✅</td><td>⚠️ [Known Issues](KNOWN_ISSUES.md#macos-known-limitations-of-native-objects)</td></tr> </table>|
Copy link
Member Author

Choose a reason for hiding this comment

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

note for the future: I think we can remove the 16.x which is EOL and we habe no automated tests. Maybe we could add 20 and 21 and marking them as (no automated test), like best-effort and no known issue


### Usage

Expand Down
140 changes: 0 additions & 140 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
"@types/js-yaml": "^4.0.9",
"@types/mocha": "^10.0.6",
"@types/node": "^18.17.15",
"@types/unzipper": "^0.10.9",
"mocha": "^10.3.0",
"rimraf": "^5.0.5",
"typescript": "*"
Expand All @@ -68,7 +67,6 @@
"sanitize-filename": "^1.6.3",
"selenium-webdriver": "^4.18.1",
"targz": "^1.0.1",
"unzipper": "^0.10.14",
"vscode-extension-tester-locators": "^3.11.0"
},
"peerDependencies": {
Expand Down
7 changes: 3 additions & 4 deletions src/extester.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@ export const VSCODE_VERSION_MIN = '1.84.2';
export const VSCODE_VERSION_MAX = '1.86.2';

/**
* 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)
* The latest version with automated tests
*/
export const NODEJS_VERSION_MAX = '18.15.0';
export const NODEJS_VERSION_MAX = '19.0.0';

/**
* ExTester
Expand All @@ -52,7 +51,7 @@ export class ExTester {
if (process.versions.node > NODEJS_VERSION_MAX) {
djelinek marked this conversation as resolved.
Show resolved Hide resolved
console.log(
'\x1b[31m%s\x1b[0m',
`\nERROR:\tYou are using the unsupported NodeJS version '${process.versions.node}'. The latest supported version is '${NODEJS_VERSION_MAX}'.\n\tWe recommend to use supported version to have ExTester working properly.\n\tMore info at https://github.com/redhat-developer/vscode-extension-tester/issues/975\n\n`
`\nWarning:\tYou are using the untested NodeJS version '${process.versions.node}'. The latest supported version is '${NODEJS_VERSION_MAX}'-.\n\tWe recommend to use tested version to have ExTester working properly.\n\n`
);
}
}
Expand Down
19 changes: 11 additions & 8 deletions src/util/unpack.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as fs from 'fs-extra';
import { exec } from 'child_process';
import targz from 'targz';
import * as unzipper from 'unzipper';

export class Unpack {
static unpack(input: fs.PathLike, target: fs.PathLike): Promise<void> {
Expand All @@ -15,20 +14,24 @@ export class Unpack {
});
}
else if (input.toString().endsWith('.zip')) {
if (process.platform === 'darwin') {
fs.mkdirpSync(target.toString());
fs.mkdirpSync(target.toString());
if(process.platform === 'darwin' || process.platform === 'linux') {
exec(`cd ${target} && unzip -qo ${input.toString()}`, (err) => {
if (err) {
reject(err);
} else {
resolve();
}
});
} else {
fs.createReadStream(input)
.pipe(unzipper.Extract({ path: target.toString() }))
.on('error', reject)
.on('close', resolve);
}
else {
exec(`cd ${target} && tar -xvf ${input.toString()}`, (err) => {
djelinek marked this conversation as resolved.
Show resolved Hide resolved
if (err) {
reject(err);
} else {
resolve();
}
});
}
}
else {
Expand Down