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/ls.js
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2021-04-24 03:49:51 +0300
committernlf <quitlahok@gmail.com>2021-04-29 22:34:42 +0300
commitc371f183ebe833c2439e98b679f14e7a59f22c34 (patch)
treef81dcb8725c72159e24686ce950303864d3617c9 /lib/ls.js
parent8f8f71e4dd5ee66b3b17888faad5a7bf6c657eed (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.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/ls.js b/lib/ls.js
index a6f3fbcd9..ccd8b2ff9 100644
--- a/lib/ls.js
+++ b/lib/ls.js
@@ -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