diff options
author | Rebecca Turner <me@re-becca.org> | 2016-05-18 06:00:16 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2017-08-13 03:01:10 +0300 |
commit | 7a7710ba72e6f82414653c2e7e91fea9a1aba7e2 (patch) | |
tree | 4a356f55112e488cc2040f6eed45c5afbd94a6c1 /lib | |
parent | 597cc0e4b5e6ee719014e3171d4e966df42a275c (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.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 } |