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

[Feature] Adding filters to yarn explain peer-requirements #6597

Open
1 of 2 tasks
aqeelat opened this issue Nov 13, 2024 · 0 comments
Open
1 of 2 tasks

[Feature] Adding filters to yarn explain peer-requirements #6597

aqeelat opened this issue Nov 13, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@aqeelat
Copy link
Contributor

aqeelat commented Nov 13, 2024

  • I'd be willing to implement this feature (contributing guide)
  • This feature is important to have in this repository; a contrib plugin wouldn't do

Describe the user story

As a developer, running yarn explain peer-requirements generates a lot of output that makes it hard to investigate missing dependencies. For example, it says a package I'm importing does not provide type stubs to another package it is importing, which does not add value to me.

Describe the solution you'd like

A way to filter out the results with flags such as:

  • -t, --include-types: This includes the types packages (p05130 → ✓ socks-proxy-agent@npm:8.0.3 doesn't provide @types/supports-color to debug@npm:4.3.6 [3374e]). It should be disabled by default.
  • -m, --only-missing: This filters out any line with a green check mark.
  • '-p, --include-optional`: This includes optional peer dependencies that are not provided by third party libraries to their dependencies.
  • '-l, --level $level': This controls how much nesting should be analyzed. (mypackage -> x -> y -> z -> a -> b) I think we rarely need to go beyond 2 levels.

We should add telemetry on these flags to analyze how users are using them and then we can decide if we need to make them disabled/enabled by default, or if we can remove the flag and bake-in the filters.

Describe the drawbacks of your solution

Describe alternatives you've considered

@aqeelat aqeelat added the enhancement New feature or request label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant