Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuy Adorno <ruyadorno@hotmail.com>2021-03-01 19:38:43 +0300
committerMichaël Zasso <targos@protonmail.com>2021-03-02 16:08:55 +0300
commitf3d67000a0a6bdce5cbb9ad506a008e5d709bb71 (patch)
tree650f0737f1d7676f374b523f27bf9b26bb70bb00 /deps/npm/lib/utils/explain-dep.js
parent725d48ae777ec23e915370019a60a835a2569711 (diff)
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 ed69a02c143..213493c654b 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}`) : '')
}