Merge pull request #114 from lonekorean/node-engine-strict

Refactoring node engine version enforcement
This commit is contained in:
Will Boyd
2024-02-27 18:18:18 -05:00
committed by GitHub
4 changed files with 1 additions and 15 deletions
+1
View File
@@ -0,0 +1 @@
engine-strict=true
-8
View File
@@ -1,6 +1,5 @@
#!/usr/bin/env node
const compareVersions = require('compare-versions');
const path = require('path');
const process = require('process');
@@ -9,13 +8,6 @@ const parser = require('./src/parser');
const writer = require('./src/writer');
(async () => {
// Node version check
const requiredVersion = '12.14.0';
const currentVersion = process.versions.node;
if (compareVersions(currentVersion, requiredVersion) === -1) {
throw `This script requires Node v${requiredVersion} or higher, but you are using v${currentVersion}.`;
}
// parse any command line arguments and run wizard
const config = await wizard.getConfig(process.argv);
-6
View File
@@ -12,7 +12,6 @@
"camelcase": "^6.0.0",
"chalk": "^4.0.0",
"commander": "^5.0.0",
"compare-versions": "^3.6.0",
"inquirer": "^7.1.0",
"luxon": "^3.4.4",
"request": "^2.88.2",
@@ -451,11 +450,6 @@
"node": ">= 6"
}
},
"node_modules/compare-versions": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.6.0.tgz",
"integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA=="
},
"node_modules/concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
-1
View File
@@ -23,7 +23,6 @@
"camelcase": "^6.0.0",
"chalk": "^4.0.0",
"commander": "^5.0.0",
"compare-versions": "^3.6.0",
"inquirer": "^7.1.0",
"luxon": "^3.4.4",
"request": "^2.88.2",