Open petervannes opened 1 year ago
It seems the only way to include workspaces is using an explicit package name instead of workspace names;
yarn workspaces foreach --verbose --include @myorg/account-products-cancel --include @myorg/account-products-save run build
Using a array of glob pattern idents or glob pattern idents do not work
This is really unintuitive - I would expect a command that operates on workspaces like workspaces foreach to use the same names as declared in the root package.json workspaces array, not the names in the package.json.
Self-service
Describe the bug
In a Yarn 3 monorepo i have configured the workspaces
["packages/**","configs/**"],
. When executingyarn workspaces list
i do get the expected list of workspaces;I want to run a script for one or more specific workspaces using a specific name or using globs. In the root
package.json
i have several scripts which useyarn workspaces foreach
with the include argument to run only the script for workspace 'configs/list', none of these seem to workconfigs1 completes without processing any workspaces configs2 returns 'No matches found: "[configs/**]"' configs3 returns 'No matches found: "[configs/list]" configs4 completes without processing any workspaces configs5 completes without processing any workspaces configs6 completes without processing any workspaces configs7 completes without processing any workspaces
To reproduce
git clone https://github.com/petervannes/yarn3monorepo yarn install yarn build:configs1
Environment
Additional context
I created a repo to demonstrate the issue https://github.com/petervannes/yarn3monorepo