Skip to content
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

Refactors yarn workspaces foreach #5644

Merged
merged 4 commits into from
Aug 6, 2023
Merged

Refactors yarn workspaces foreach #5644

merged 4 commits into from
Aug 6, 2023

Conversation

arcanis
Copy link
Member

@arcanis arcanis commented Aug 6, 2023

What's the problem this PR addresses?

The command default's behavior was "worktree" (ie to only run on the current workspace and whatever it listed in its own workspaces field), but it was rarely what users expected (since very few people use nested workspace setups).

How did you fix it?

The main functional change is that one of --all, --worktree, --since, or --recursive is now required. The --since flag doesn't automatically imply --worktree anymore.

Using --all with one of --worktree, --from, --since, or --recursive doesn't work anymore, since they have incompatible meanings (it still accept --include and --exclude to further refine the list).

Checklist

  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@arcanis arcanis merged commit 0da8122 into master Aug 6, 2023
@arcanis arcanis deleted the mael/foreach-default-all branch August 6, 2023 13:12
@belgattitude
Copy link

@arcanis note sure about --from.

Since rc49, the following is breaking

yarn workspaces foreach -tv --from 'examples/*' run typecheck

With

Usage Error: Invalid option schema: missing at least one property from "all", "recursive", "since", or "worktree"

Is it intended ?

Link: belgattitude/shared-dx#324

@GauBen
Copy link
Contributor

GauBen commented Sep 1, 2023

Hey there, --all is still marked as the default flag in the documentation despite this change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants