Skip to content

Commit

Permalink
Refactoring node engine version enforcement
Browse files Browse the repository at this point in the history
  • Loading branch information
lonekorean committed Feb 27, 2024
1 parent 7c2be32 commit 5efb8b8
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 15 deletions.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
8 changes: 0 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env node

const compareVersions = require('compare-versions');
const path = require('path');
const process = require('process');

Expand All @@ -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);

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

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

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 5efb8b8

Please sign in to comment.