MCPcopy Create free account
hub / github.com/nodejs/node / getProblems

Function getProblems

deps/npm/lib/commands/ls.js:245–261  ·  view source on GitHub ↗
(node, { global })

Source from the content-addressed store, hash-verified

243 node.extraneous && !global
244
245const getProblems = (node, { global }) => {
246 const problems = new Set()
247
248 if (node[_missing] && !isOptional(node)) {
249 problems.add(`missing: ${node.pkgid}, required by ${node[_missing]}`)
250 }
251
252 if (node[_invalid]) {
253 problems.add(`invalid: ${node.pkgid} ${node.path}`)
254 }
255
256 if (isExtraneous(node, { global })) {
257 problems.add(`extraneous: ${node.pkgid} ${node.path}`)
258 }
259
260 return problems
261}
262
263// annotates _parent and _include metadata into the resulting item obj allowing for filtering out results during output
264const augmentItemWithIncludeMetadata = (node, item) => {

Callers 1

visitMethod · 0.85

Calls 3

isOptionalFunction · 0.85
isExtraneousFunction · 0.85
addMethod · 0.65

Tested by

no test coverage detected