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:
authorRebecca Turner <me@re-becca.org>2016-05-18 06:00:16 +0300
committerRebecca Turner <me@re-becca.org>2017-08-13 03:01:10 +0300
commit7a7710ba72e6f82414653c2e7e91fea9a1aba7e2 (patch)
tree4a356f55112e488cc2040f6eed45c5afbd94a6c1 /lib
parent597cc0e4b5e6ee719014e3171d4e966df42a275c (diff)
ls: Don't exclude modules that are both dev & prod with --production
Previously if a module was in devDependencies then it would never show up with `npm ls --production` even if it was ALSO in dependencies. Credit: @iarna PR-URL: https://github.com/npm/npm/pull/15088
Diffstat (limited to 'lib')
-rw-r--r--lib/ls.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ls.js b/lib/ls.js
index 2e3db79c3..7c0ea71e7 100644
--- a/lib/ls.js
+++ b/lib/ls.js
@@ -135,7 +135,7 @@ function filterByEnv (data) {
var devKeys = Object.keys(data.devDependencies || [])
var prodKeys = Object.keys(data._dependencies || [])
Object.keys(data.dependencies).forEach(function (name) {
- if (!dev && inList(devKeys, name) && data.dependencies[name].missing) {
+ if (!dev && inList(devKeys, name) && !inList(prodKeys, name) && data.dependencies[name].missing) {
return
}