npm-check-webpack-plugin
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -67,3 +67,3 @@ 'use strict'; | ||
debug('CAUGHT ' + reason);; | ||
if (reason != 'NEEDS_INSTALL') { | ||
if (reason !== 'NEEDS_INSTALL') { | ||
throw reason; | ||
@@ -83,2 +83,5 @@ } | ||
} | ||
})['catch'](function (error) { | ||
console.error('Error installing dependencies:'); | ||
console.error(error); | ||
}); | ||
@@ -91,4 +94,7 @@ } | ||
this.performCheck().then(callback)['catch'](callback); | ||
; | ||
this.performCheck().then(function () { | ||
return callback(); | ||
})['catch'](function () { | ||
return callback(); | ||
}); | ||
} | ||
@@ -95,0 +101,0 @@ }]); |
@@ -16,6 +16,2 @@ 'use strict'; | ||
var _npm = require('npm'); | ||
var _npm2 = _interopRequireDefault(_npm); | ||
var _findupSync = require('findup-sync'); | ||
@@ -29,6 +25,15 @@ | ||
var _child_process = require('child_process'); | ||
function npmInstall() { | ||
return new Promise(function (resolve) { | ||
_npm2['default'].load(function () { | ||
return _npm2['default'].commands.install(resolve); | ||
return new Promise(function (resolve, reject) { | ||
(0, _child_process.exec)('npm install', function (error, stdout) { | ||
console.log('error: ', error); | ||
if (error) { | ||
reject(error); | ||
return; | ||
} | ||
console.log('stdout:', stdout); | ||
resolve(stdout); | ||
}); | ||
@@ -35,0 +40,0 @@ }); |
{ | ||
"name": "npm-check-webpack-plugin", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "", | ||
@@ -30,4 +30,4 @@ "main": "dist/index.js", | ||
"npm": "^3.3.3", | ||
"npm-check": "^4.0.1" | ||
"npm-check": "^4.1.2" | ||
} | ||
} |
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
9289
182
1
Updatednpm-check@^4.1.2