cli-check-node
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -32,2 +32,18 @@ # CHANGELOG | ||
### RELEASE: [1.3.0](https://github.com/ahmadawais/cli-check-node/compare/1.2.0...1.3.0) | ||
![📦 NEW:](https://img.shields.io/badge/-NEW-gray.svg?colorB=3778FF) | ||
> 📦 tesnt [`0a954f4`](https://github.com/ahmadawais/cli-check-node/commit/0a954f454060648755a8d0a65e8ff5a09ef42756) <br> | ||
![✅ TEST:](https://img.shields.io/badge/-TESTS-gray.svg?colorB=2BBA00) | ||
> 🤖 Node version [`00cf089`](https://github.com/ahmadawais/cli-check-node/commit/00cf089abc37cc5e86eb3e0d1943157972ed4962) <br> | ||
<br> | ||
[![hr](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/hr.png)](/) | ||
<br> | ||
### RELEASE: [1.2.0](https://github.com/ahmadawais/cli-check-node/compare/1.1.0...1.2.0) | ||
@@ -39,2 +55,6 @@ | ||
![📖 DOC:](https://img.shields.io/badge/-DOCS-gray.svg?colorB=978CD4) | ||
> 📖 Changelog [`83b8bf6`](https://github.com/ahmadawais/cli-check-node/commit/83b8bf6a8a062c3ba2d686f7ab892a939b3904dd) <br> | ||
<br> | ||
@@ -41,0 +61,0 @@ |
12
index.js
@@ -11,2 +11,3 @@ const currentNodeVersion = process.versions.node; | ||
* @param {String} requiredNodeVersion | ||
* @param {Object} options | ||
*/ | ||
@@ -17,5 +18,3 @@ module.exports = (requiredNodeVersion, options) => { | ||
if (major < requiredNodeVersion) { | ||
console.error( | ||
` | ||
const fail = ` | ||
${sym.error} ${chalk.red(`Node version issue!`)} | ||
@@ -27,6 +26,9 @@ | ||
${sym.info} Please update your version of Node.js to run this program. | ||
${sym.info} https://nodejs.org/en/download \n` | ||
); | ||
${sym.info} https://nodejs.org/en/download \n`; | ||
if (major < Math.abs(requiredNodeVersion)) { | ||
console.error(fail); | ||
finalOptions.fail && process.exit(1); | ||
return fail; | ||
} | ||
}; |
{ | ||
"name": "cli-check-node", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "Check the installed Node.js version and exit as per the required Node.js version.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15571
26