feat: include module paths in Dependencies
Closes #310
I feel the Dependencies tab is currently quite misleading, and doesn't reflect that only certain modules from a package are actually depended upon.
This PR adds the individual modules paths with links to the whole package and to the individual module docs (for npm the module path is not linked as there is nowhere really for it to link to).
Hey, sorry for the late review.
I don't like the idea that the same package will show up in multiple rows. Can you change this code so that we still only have one row per package + version constraint, but then have a smaller text below the package name that has the list of imported "exports"?
Hey, no problem, glad you had chance to review.
So yeah, I agree, and I was wondering about this. I'd considered grouping paths like versions are, although if one import is for one version and another for a different version then the list of what is import from what version becomes misleading. But I expect that to be quite an unusual situation anyway.
Happy to do some tweaking now I know you are happy with the general idea of showing this additional information.
I tried a few variations, including making the repeated package invisible but retaining the separate rows, and listing the modules under the package name, but these looked odd and confusing. IMHO, this was the best result I came up with:
If a package depends only on the default module then the modules column will be empty, but if it depends on default and other paths then (default) is shown at the top of the modules list. Although I need to find a package that actually does that.
Any thoughts on progressing this?
@jollytoad apologies for the delays on this. I am in favour of this and i like the design (though maybe the version column should be the last one?), though i will pass this through an aditional person in regards of design
I like it. 👍