berry icon indicating copy to clipboard operation
berry copied to clipboard

[Feature] `yarn workspaces list --no-private`

Open quisido opened this issue 1 year ago • 0 comments

  • [ ] 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

I want to run a custom, non-Yarn command on all non-private workspaces. Today, I can only run Yarn commands on all non-private workspaces via yarn workspaces foreach --no-private xyz. If the custom command isn't a Yarn command (like ./custom.sh), then I do not have this option. I have to run yarn workspaces list to get a list of all workspaces, which does not tell me if they are private.

Describe the solution you'd like

Like foreach, I think list should have a --no-private flag.

Describe the drawbacks of your solution

None?

Describe alternatives you've considered

yarn workspaces foreach [somehow run a non-Yarn, non-package.json-script], but I feel like the syntax for that may not be intuitive. I currently have to run list, get all packages, and execute the custom script on each package. I don't have the skillset to parse the workspace's package.json in bash to determine if it's private or not. 🙃

quisido avatar Aug 01 '22 17:08 quisido