summaryrefslogtreecommitdiff
path: root/deps/npm/lib/utils/explain-dep.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/lib/utils/explain-dep.js')
-rw-r--r--deps/npm/lib/utils/explain-dep.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/deps/npm/lib/utils/explain-dep.js b/deps/npm/lib/utils/explain-dep.js
index ed69a02c14..213493c654 100644
--- a/deps/npm/lib/utils/explain-dep.js
+++ b/deps/npm/lib/utils/explain-dep.js
@@ -6,6 +6,7 @@ const nocolor = {
yellow: s => s,
cyan: s => s,
magenta: s => s,
+ blue: s => s,
}
const explainNode = (node, depth, color) =>
@@ -13,11 +14,12 @@ const explainNode = (node, depth, color) =>
explainDependents(node, depth, color)
const colorType = (type, color) => {
- const { red, yellow, cyan, magenta } = color ? chalk : nocolor
+ const { red, yellow, cyan, magenta, blue } = color ? chalk : nocolor
const style = type === 'extraneous' ? red
: type === 'dev' ? yellow
: type === 'optional' ? cyan
: type === 'peer' ? magenta
+ : type === 'bundled' ? blue
: /* istanbul ignore next */ s => s
return style(type)
}
@@ -31,6 +33,7 @@ const printNode = (node, color) => {
dev,
optional,
peer,
+ bundled,
} = node
const { bold, dim } = color ? chalk : nocolor
const extra = []
@@ -46,6 +49,9 @@ const printNode = (node, color) => {
if (peer)
extra.push(' ' + bold(colorType('peer', color)))
+ if (bundled)
+ extra.push(' ' + bold(colorType('bundled', color)))
+
return `${bold(name)}@${bold(version)}${extra.join('')}` +
(location ? dim(`\n${location}`) : '')
}