Skip to content

Commit

Permalink
chore: update preinstall node version checks
Browse files Browse the repository at this point in the history
  • Loading branch information
deepak1556 committed May 10, 2024
1 parent f12b9ce commit ac10723
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions build/npm/preinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,10 @@ const minorNodeVersion = parseInt(nodeVersion[2]);
const patchNodeVersion = parseInt(nodeVersion[3]);

if (!process.env['VSCODE_SKIP_NODE_VERSION_CHECK']) {
if (majorNodeVersion < 18 || (majorNodeVersion === 18 && minorNodeVersion < 15)) {
console.error('\x1b[1;31m*** Please use node.js versions >=18.15.x and <19.\x1b[0;0m');
if (majorNodeVersion < 20) {
console.error('\x1b[1;31m*** Please use latest Node.js v20 LTS for development.\x1b[0;0m');
err = true;
}
if (majorNodeVersion >= 19) {
console.warn('\x1b[1;31m*** Warning: Versions of node.js >= 19 have not been tested.\x1b[0;0m')
}
}

const path = require('path');
Expand Down

0 comments on commit ac10723

Please sign in to comment.