(node, chalk)
| 18 | } |
| 19 | |
| 20 | const printNode = (node, chalk) => { |
| 21 | const extra = [] |
| 22 | |
| 23 | for (const meta of ['extraneous', 'dev', 'optional', 'peer', 'bundled', 'overridden']) { |
| 24 | if (node[meta]) { |
| 25 | extra.push(` ${colorType(meta, chalk)}`) |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | const pkgid = node.isWorkspace |
| 30 | ? chalk.blueBright(`${node.name}@${node.version}`) |
| 31 | : `${node.name}@${node.version}` |
| 32 | |
| 33 | return `${pkgid}${extra.join('')}` + |
| 34 | (node.location ? chalk.dim(`\n${node.location}`) : '') |
| 35 | } |
| 36 | |
| 37 | const explainLinksIn = ({ linksIn }, depth, chalk, seen) => { |
| 38 | if (!linksIn || !linksIn.length || depth <= 0) { |
no test coverage detected