Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: include module paths in Dependencies #556

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

jollytoad
Copy link

@jollytoad jollytoad commented May 23, 2024

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).

Screenshot 2024-05-23 at 12 13 42 pm

@CLAassistant
Copy link

CLAassistant commented May 23, 2024

CLA assistant check
All committers have signed the CLA.

@lucacasonato
Copy link
Member

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"?

@jollytoad
Copy link
Author

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.

@jollytoad
Copy link
Author

jollytoad commented Jun 10, 2024

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:

Screenshot 2024-06-10 at 10 35 54 AM

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggestion: Finer grained module dependencies
3 participants