(node)
| 5 | // Ranks competing representations of the same physical package so the most logical one is reported. |
| 6 | // A top-level placement (e.g. node_modules/<pkg>) beats the canonical store node, which beats an internal store symlink. |
| 7 | const locationRank = (node) => { |
| 8 | if (!node.location.includes('node_modules/.store/')) { |
| 9 | return 2 |
| 10 | } |
| 11 | return node.isLink ? 0 : 1 |
| 12 | } |
| 13 | |
| 14 | class QuerySelectorItem { |
| 15 | constructor (node) { |