diff options
author | isaacs <i@izs.me> | 2021-04-24 03:49:51 +0300 |
---|---|---|
committer | nlf <quitlahok@gmail.com> | 2021-04-29 22:34:42 +0300 |
commit | c371f183ebe833c2439e98b679f14e7a59f22c34 (patch) | |
tree | f81dcb8725c72159e24686ce950303864d3617c9 /lib/ls.js | |
parent | 8f8f71e4dd5ee66b3b17888faad5a7bf6c657eed (diff) |
ls: do not warn on missing optional deps
There was code checking node[_type], but we didn't include that field on
the object that is actually checked when we are looking for problems.
Fix: #3137
PR-URL: https://github.com/npm/cli/pull/3140
Credit: @isaacs
Close: #3140
Reviewed-by: @ruyadorno
Diffstat (limited to 'lib/ls.js')
-rw-r--r-- | lib/ls.js | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -414,9 +414,11 @@ const augmentNodesWithMetadata = ({ path: node.path, isLink: node.isLink, realpath: node.realpath, + [_type]: node[_type], [_invalid]: node[_invalid], [_missing]: node[_missing], - [_dedupe]: true, + // if it's missing, it's not deduped, it's just missing + [_dedupe]: !node[_missing], } } else { // keeps track of already seen nodes in order to check for dedupes |