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
path: root/lib
diff options
context:
space:
mode:
authorRyan Graham <r.m.graham@gmail.com>2017-06-02 08:03:42 +0300
committerKat Marchán <kzm@sykosomatic.org>2017-06-02 08:04:02 +0300
commit362f9fd5bec65301082416b4292b8fe3eb7f824a (patch)
tree6be20eb8080a3b41b9ecfe09ca7dcea621eb992d /lib
parent7fe7f86658798db6667df89afc75588c0e43bc94 (diff)
install: print spec for each requested package (#16899)
For every package that is given as an argument to install, print the name and version that was actually installed. Fixes: #16897 PR-URL: https://github.com/npm/npm/pull/16899 Credit: @rmg Reviewed-By: @zkat
Diffstat (limited to 'lib')
-rw-r--r--lib/install.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/install.js b/lib/install.js
index 5d111b32c..266a92545 100644
--- a/lib/install.js
+++ b/lib/install.js
@@ -741,6 +741,9 @@ Installer.prototype.printInstalledForHuman = function (diffs, cb) {
}
})
var report = ''
+ if (added && this.args.length) {
+ report += this.args.map((p) => p.name + '@' + p.version).join('\n') + '\n'
+ }
var actions = []
if (added) actions.push('added ' + packages(added))
if (removed) actions.push('removed ' + packages(removed))