diff options
author | kumavis <aaron@kumavis.me> | 2021-03-02 05:53:36 +0300 |
---|---|---|
committer | Ruy Adorno <ruyadorno@hotmail.com> | 2021-03-05 00:15:45 +0300 |
commit | 3c9a589b004fa828a304abaf52d1d781710e1143 (patch) | |
tree | 50baa37988427892407be69958a61c467d4c76d6 /lib | |
parent | 2d682e4cab0cf109a16332f3222f1e9a4027db69 (diff) |
feat/explain: show when an edge is a bundled edge
PR-URL: https://github.com/npm/cli/pull/2807
Credit: @kumavis
Close: #2807
Reviewed-by: @ruyadorno
Diffstat (limited to 'lib')
-rw-r--r-- | lib/utils/explain-dep.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/utils/explain-dep.js b/lib/utils/explain-dep.js index 213493c65..c01bc780b 100644 --- a/lib/utils/explain-dep.js +++ b/lib/utils/explain-dep.js @@ -86,9 +86,10 @@ const explainDependents = ({ name, dependents }, depth, color) => { return str.split('\n').join('\n ') } -const explainEdge = ({ name, type, from, spec }, depth, color) => { +const explainEdge = ({ name, type, bundled, from, spec }, depth, color) => { const { bold } = color ? chalk : nocolor return (type === 'prod' ? '' : `${colorType(type, color)} `) + + (bundled ? `${colorType('bundled', color)} ` : '') + `${bold(name)}@"${bold(spec)}" from ` + explainFrom(from, depth, color) } |