berry icon indicating copy to clipboard operation
berry copied to clipboard

[Feature] `yarn why` for individual workspace

Open BasixKOR opened this issue 1 month ago • 0 comments

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

Describe the user story

SCR-20240514-nosz

We have a huge monorepo consisting of a lot of workspaces, and yarn why result is often too long to be used quickly & easily, especially if the multiple version of same package is used throughout the project.

Describe the solution you'd like

  • Option A: Change yarn why behavior to only look for current workspace's recursive dependencies.
    • Breaking change!
  • Option B: Add a flag to opt into the behavior specified in A.

Describe the drawbacks of your solution

I don't see a particular drawbacks, except option A may cause breaking changes.

Describe alternatives you've considered

Making this into a plugin is certainly possible, but I think looking into specific workspace's dependencies is general enough to be added into Yarn itself.

BasixKOR avatar May 14 '24 06:05 BasixKOR