summaryrefslogtreecommitdiff
path: root/deps/npm/lib/utils/explain-dep.js
diff options
context:
space:
mode:
authorRuy Adorno <ruyadorno@hotmail.com>2021-03-01 11:38:43 -0500
committerMichaël Zasso <targos@protonmail.com>2021-03-02 09:31:29 +0100
commit993963e2ee1c24dee0f39dbdbb3283272c30679c (patch)
tree7ad138c8a4b240f948e322eb2bc5c6d7acca32e6 /deps/npm/lib/utils/explain-dep.js
parentb3f35e2c70c7d1e3ee7b4c3fd74672adceb16c52 (diff)
downloadnode-new-993963e2ee1c24dee0f39dbdbb3283272c30679c.tar.gz
deps: upgrade npm to 7.6.0
PR-URL: https://github.com/nodejs/node/pull/37559 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
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}`) : '')
}