Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add 'meteor list --tree' to show a tree of package dependencies. #8936
Add 'meteor list --tree' to show a tree of package dependencies.
See feature request: meteor/meteor-feature-requests#143
With the basic
At the top level are the constraints from the .meteor/packages, and then for each of those it outputs the (strong) dependencies of each, expanding recursively.
Note that the version included in each line is version selected NOT the constraint. When expanding one level down the constraint would be better, but when you have cross references, and deeper nesting it seemed better to display the actual version selected by the constraint solver.
Here's a truncated example with --weak specified:
Thoughts for improvements:
Finally, unlike the regular
Oh, finally-finally, I used the new meteor coding style and Set/Map rather than sticking to the style of the surrounding file as it seemed separate enough, and Set/Map/Array.[map|filter|sort|every] seemed a better choice than underscore equivalents.
This is really great @sdarnell!
Maybe something like this (where the legend is included in the
Thanks @hwillson. Your suggestions for the characters seem reasonable so long as they're explained in the output. I'd tend to avoid having two filled triangles as it's not immediately clear which is which - maybe it's just me that has triangle-dyslexia? :) But given so many unicode characters to choose from (e.g. arrows http://xahlee.info/comp/unicode_arrows.html) there's clearly plenty of options. Maybe even regular characters such as * (asterisk), ^ (hat), † (dagger), ‡ (double dagger), and § (section).
Note that as weak dependencies are not displayed by default, it may be simpler to have this explicit?
Anyway, I'm happy with any of the options. Feel free to make the changes, or let me know and I'll do it.