1// Sometimes we need to actually do a walk from the root, because you can 2// have a cycle of deps that all depend on each other, but no path from root. 3// Also, since the ideal tree is loaded from the shrinkwrap, it had extraneous 4// flags set false that might now be actually extraneous, and dev/optional 5// flags that are also now incorrect. This method sets all flags to true, so 6// we can find the set that is actually extraneous. 7module.exports = tree => { 8 for (const node of tree.inventory.values()) { 9 node.extraneous = true 10 node.dev = true 11 node.devOptional = true 12 node.peer = true 13 node.optional = true 14 } 15} 16