Comparing version 1.2.0-alpha7 to 1.2.0-alpha8
@@ -16,2 +16,5 @@ var Promise = require('es6-promise').Promise; // jshint ignore:line | ||
'problem persists.', | ||
updatefail: 'Encountered errors while running `npm update`.\nRun ' + | ||
'`npm update` when the wizard completes to ensure updates have been ' + | ||
'applied', | ||
nodeModules: 'This directory looks like a node project, but is missing the ' + | ||
@@ -38,2 +41,3 @@ 'contents of the node_modules directory.\nPlease run `npm install` and ' + | ||
FAIL_PATCH: errors.patchfail, | ||
FAIL_UPDATE: errors.updatefail, | ||
NOT_FOUND_HAS_DEV_DEPS: errors.tryDevDeps, | ||
@@ -40,0 +44,0 @@ }; |
@@ -90,3 +90,6 @@ var protect = module.exports = { | ||
var promise = npm('uninstall', toUninstall, live).then(function () { | ||
return npm('install', findUpgrades(upgrade), live); | ||
return npm('install', findUpgrades(upgrade), live).catch(function (e) { | ||
console.log(chalk.red(errors.message(e))); | ||
return false; | ||
}); | ||
}); | ||
@@ -142,3 +145,6 @@ | ||
if (stderr) { | ||
return reject(new Error(stderr.trim())); | ||
console.error(stderr.trim()); | ||
var e = new Error('npm update errors'); | ||
e.code = 'FAIL_UPDATE'; | ||
return reject(e); | ||
} | ||
@@ -351,3 +357,4 @@ | ||
if (semver.satisfies(fromPkg.version, pkgVersion)) { | ||
if (semver.valid(fromPkg.version) && | ||
semver.satisfies(fromPkg.version, pkgVersion)) { | ||
debugProtect('semver match'); | ||
@@ -436,3 +443,2 @@ return true; | ||
return false; | ||
// return Promise.reject(e); | ||
}).then(function (ok) { | ||
@@ -439,0 +445,0 @@ return ok ? vuln : false; |
@@ -5,3 +5,3 @@ { | ||
"main": "lib/index.js", | ||
"version": "1.2.0-alpha7", | ||
"version": "1.2.0-alpha8", | ||
"directories": { | ||
@@ -8,0 +8,0 @@ "test": "test" |
Sorry, the diff of this file is not supported yet
104574
2689