nodejs-lockfile-parser
nodejs-lockfile-parser copied to clipboard
feat: add "straight to depgraph" fn for yarnlock v1
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):
- Cycles handled differently - instead of nodes such as
[email protected]|1
and[email protected]|2
these are now[email protected]
and[email protected]|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.