Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKat Marchán <kzm@zkat.tech>2018-05-16 11:19:38 +0300
committerGitHub <noreply@github.com>2018-05-16 11:19:38 +0300
commit212266529ae72056bf0876e2cff4b8ba01d09d0f (patch)
treed01e4cc1d295b9d9f7f5123892c65868141a216f /bin/npm-cli.js
parent421eccaf6f2b8c22a94523464ec55d8ad0551243 (diff)
update-notifier: remove colon + support canary (#20536)
PR-URL: https://github.com/npm/npm/pull/20536 Credit: @zkat Reviewed-By: @iarna
Diffstat (limited to 'bin/npm-cli.js')
-rwxr-xr-xbin/npm-cli.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/npm-cli.js b/bin/npm-cli.js
index f8fd106d2..d7c14bc4b 100755
--- a/bin/npm-cli.js
+++ b/bin/npm-cli.js
@@ -102,7 +102,7 @@
}
const changelog = `https://github.com/npm/npm/releases/tag/v${latest}`
notifier.notify({
- message: `New ${type} version of npm available! ${
+ message: `New ${type} version of ${pkg.name} available! ${
useColor ? color.red(old) : old
} ${useUnicode ? '→' : '->'} ${
useColor ? color.green(latest) : latest
@@ -110,10 +110,12 @@
`${
useColor ? color.yellow('Changelog:') : 'Changelog:'
} ${
- useColor ? color.cyan(changelog + ':') : changelog + ':'
+ useColor ? color.cyan(changelog) : changelog
}\n` +
`Run ${
- useColor ? color.green('npm install -g npm') : 'npm i -g npm'
+ useColor
+ ? color.green(`npm install -g ${pkg.name}`)
+ : `npm i -g ${pkg.name}`
} to update!`
})
}