New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

check-node-version

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

check-node-version - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

20

bin.js

@@ -61,2 +61,22 @@ #!/usr/bin/env node

};
if (argv.package) {
try {
var packageJson = require(path.join(process.cwd(), 'package.json'));
} catch (e) {
console.log('Error: When running with --package, a package.json file is expected in the current working directory');
console.log('Current working directory is: ' + process.cwd());
process.exit(1);
}
if (!packageJson.engines) {
console.log('Error: When running with --package, your package.json is expected to contain the "engines" key');
console.log('See https://docs.npmjs.com/files/package.json#engines for the supported syntax');
process.exit(1);
}
options = {
node: packageJson.engines.node,
npm: packageJson.engines.npm,
};
}
check(options, function(err, result) {

@@ -63,0 +83,0 @@ if (err) {

2

package.json
{
"name": "check-node-version",
"version": "1.0.1",
"version": "1.1.0",
"description": "Check installed versions of node and npm",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -13,2 +13,6 @@ Usage: check-node-version [OPTIONS]

--package
Use the "engines" key in the current package.json for the
semver version ranges.
-q, --quiet

@@ -15,0 +19,0 @@ Don't output anything. Exit with an error code if the node

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc