berry
berry copied to clipboard
[Feature] `yarn why` for individual workspace
- [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
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.