(node)
| 149 | }, |
| 150 | // visit each `node` of the `tree`, returning an `item` - these are the elements that will be used to build the final output |
| 151 | visit (node) { |
| 152 | node[_problems] = getProblems(node, { global }) |
| 153 | |
| 154 | const item = json |
| 155 | ? getJsonOutputItem(node, { global, long }) |
| 156 | : parseable |
| 157 | ? null |
| 158 | : getHumanOutputItem(node, { args, chalk, global, long }) |
| 159 | |
| 160 | // loop through list of node problems to add them to global list |
| 161 | if (node[_include]) { |
| 162 | for (const problem of node[_problems]) { |
| 163 | problems.add(problem) |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | seenItems.add(item) |
| 168 | |
| 169 | // return a promise so we don't blow the stack |
| 170 | return Promise.resolve(item) |
| 171 | }, |
| 172 | }) |
| 173 | |
| 174 | // handle the special case of a broken package.json in the root folder |
nothing calls this directly
no test coverage detected