@brigand/assert-node-version
Advanced tools
Comparing version 1.1.0 to 2.0.0
@@ -1,2 +0,2 @@ | ||
require('./')(); | ||
require('./')() | ||
module.exports = function assertNodeVersion (dir) { | ||
var version = require('expected-node-version')(dir) | ||
if (version) { | ||
// Allow naked versions to be matched with a 'compatibility' lens. To prevent this, | ||
// prefix the version with an `=`. For example `1.2` is interpreted as `^1.2.0`, | ||
// but `=1.2` as `>=1.2.0 <1.3.0`. Specifying all three parts with the `=` prefix, e.g. `=1.2.3`, | ||
// will require an exact version match. | ||
if (/^[0-9.\s]$/.test(version)) { | ||
version = '^' + version | ||
} | ||
var satisfied = require('semver').satisfies(process.version, version) | ||
@@ -5,0 +14,0 @@ if (!satisfied) { |
{ | ||
"name": "@brigand/assert-node-version", | ||
"version": "1.1.0", | ||
"version": "2.0.0", | ||
"description": "Asserts the node version against one from the package.json or .nvmrc file", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -24,1 +24,5 @@ # assert-node-version | ||
## Version 2.x | ||
In version 2, if the version is only digits and periods, it will be interpreted as if it began | ||
with a caret (i.e. semver compatible). Prefix the version with an `=` to get the 1.x behavior. |
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
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
28
0
0
2501
4
17