diff --git a/bin/next-update.js b/bin/next-update.js index 9a65402..723351e 100755 --- a/bin/next-update.js +++ b/bin/next-update.js @@ -14,17 +14,21 @@ var report = require('../src/report').report var revert = require('../src/revert') if (program.available) { - nextUpdate.available(program.module, { - color: program.color - }).done() + nextUpdate + .available(program.module, { + color: program.color + }) + .done() } else if (program.revert) { debug('reverting %s', program.module ? program.module : 'all modules') - revert(program.module) - .then(function () { + revert(program.module).then( + function () { console.log('done reverting') - }, function (error) { + }, + function (error) { console.error('error while reverting\n', error) - }) + } + ) } else { if (!program.tldr) { console.log(info) @@ -39,8 +43,12 @@ if (program.available) { const allow = program.allowed || program.allow const latest = program.allowWasSpecified ? false : program.latest - debug('allow was specified %j option "%s" latest %j', - program.allowWasSpecified, allow, latest) + debug( + 'allow was specified %j option "%s" latest %j', + program.allowWasSpecified, + allow, + latest + ) var opts = { names: program.module, diff --git a/package.json b/package.json index bcdccfe..2671569 100644 --- a/package.json +++ b/package.json @@ -128,7 +128,7 @@ "prebuild": "npm run lint", "prelint": "npm run pretty", "pretest": "npm run build", - "pretty": "prettier-standard '*.js' 'test/*.js'", + "pretty": "prettier-standard 'bin/*.js' '*.js' 'test/*.js'", "self-update": "node bin/next-update.js -k true", "semantic-release": "semantic-release pre && npm publish && semantic-release post", "size": "t=\"$(npm pack .)\"; wc -c \"${t}\"; tar tvf \"${t}\"; rm \"${t}\";",