-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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] Workspaces foreach namespace or glob support #828
Comments
I'd tend to say that the current feature set is low-level enough that you can implement the behaviour you're looking for directly within your scripts. This is for example what we do in ours. |
@arcanis I'd agree with you that it's low level enough to implement this with scripts. Given the previous discussions around yarn 1, and given the push towards DX friendly workspaces, I thought it would be a useful addition to the toolset. The glob pattern primarily. I can look into the code and see if I can work on implementation if it is something people other than myself want, otherwise as you said - scripts are fine. 😄 |
It seems an incredibly common workflow? I'd suggest a core implementation would be handy to allot of teams. |
Sorry for bringing this up again but whats the syntax to do something |
yarn workspaces foreach --include "@yarnpkg/plugin-*" run build
|
Describe the user story
Given an application structure such as:
You may want to run a command on all subsets. eg.
yarn workspaces foreach --include services/* run start
. Currently, it appears the include flag only works with direct names eg.yarn workspaces foreach --include api <command>
Describe the solution you'd like
--include/exclude
flag.yarn workspaces foreach --include-workspace services <command>
. Similarly for--exclude-workspace
Command names are of course open to discussion.
Describe the drawbacks of your solution
Not sure. Open to feedback.
Describe alternatives you've considered
lerna run
with filter glob patterns.Additional context
Previously discussed for Yarn 1 here:
The text was updated successfully, but these errors were encountered: