install-peers-cli
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -5,2 +5,3 @@ #!/usr/bin/env node | ||
, path = require('path') | ||
, program = require('commander') | ||
, installNpm = require('./install-npm.js') | ||
@@ -14,7 +15,15 @@ , installYarn = require('./install-yarn.js') | ||
installPeerDeps(); | ||
program | ||
.option('-f, --force-run', 'Force Run') | ||
.parse(process.argv) | ||
if (program.forceRun) { | ||
installPeerDeps({ forceRun: true }) | ||
} else { | ||
installPeerDeps() | ||
} | ||
// --- Subroutines | ||
function installPeerDeps() { | ||
function installPeerDeps({ forceRun = false }) { | ||
var argv; | ||
@@ -25,3 +34,3 @@ | ||
argv = JSON.parse(process.env['npm_config_argv']); | ||
if (argv && argv['cooked'][0] !== 'install') { | ||
if (argv && argv['cooked'][0] !== 'install' || !forceRun) { | ||
console.log('Only run install-peer-deps after `install` command. Skipping.'); | ||
@@ -28,0 +37,0 @@ return; |
{ | ||
"name": "install-peers-cli", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "CLI to install project's peerDependencies, without side effects.", | ||
@@ -32,4 +32,5 @@ "main": "index.js", | ||
"dependencies": { | ||
"commander": "^2.20.0", | ||
"executioner": "^2.0.1" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
9223
170
0
2
+ Addedcommander@^2.20.0
+ Addedcommander@2.20.3(transitive)