You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ORPA-pyOpenRPA/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/jupyterlab/node-version-check.js

36 lines
641 B

#!/usr/bin/env node
const pkg = require('./staging/package.json');
function parser(part) {
return parseInt(part, 10);
}
const engine = pkg.engines.node.replace('>=', '');
const eparts = engine.split('.').map(parser);
const version = process.version.replace('v', '');
const vparts = version.split('.').map(parser);
// eslint-disable-next-line
console.log('Node', process.version);
if (vparts[0] > eparts[0]) {
process.exit(0);
}
if (vparts[0] < eparts[0]) {
process.exit(1);
}
if (vparts[1] > eparts[1]) {
process.exit(0);
}
if (vparts[1] < eparts[1]) {
process.exit(1);
}
if (vparts[2] < eparts[1]) {
process.exit(1);
}