Basically a WIP implementation of a procedural approach to getting a dep-graph from a lock-file, it skips the dep-tree entirely. And IMO is much easier to read and reason about as well as easier to add logic to.
Caveats (...so far):
Cycles handled differently - instead of nodes such as debug@2.0.0|1 and debug@2.0.0|2 these are now debug@2.0.0 and debug@2.0.0|1. I believe these should behave correctly across the system as labels and other data is identical. Done because it allows us to not worry about cycles upfront and move the logic into the depgraph generation loop.
Loads of behaviour not implemented the the buildDepTree does but I think but they should all be simple enough to add to this procedural approach.
Better description coming in future
Basically a WIP implementation of a procedural approach to getting a dep-graph from a lock-file, it skips the dep-tree entirely. And IMO is much easier to read and reason about as well as easier to add logic to.
Caveats (...so far):
debug@2.0.0|1
anddebug@2.0.0|2
these are nowdebug@2.0.0
anddebug@2.0.0|1
. I believe these should behave correctly across the system as labels and other data is identical. Done because it allows us to not worry about cycles upfront and move the logic into the depgraph generation loop.