Skip to content

Commit 7a499b9

Browse files
committed
fix(workspaces-tools): promote --no-private in foreach usage
1 parent 96165a7 commit 7a499b9

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

.yarn/versions/935843d5.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
releases:
2+
"@yarnpkg/cli": patch
3+
"@yarnpkg/plugin-workspace-tools": patch
4+
5+
declined:
6+
- "@yarnpkg/plugin-compat"
7+
- "@yarnpkg/plugin-constraints"
8+
- "@yarnpkg/plugin-dlx"
9+
- "@yarnpkg/plugin-essentials"
10+
- "@yarnpkg/plugin-init"
11+
- "@yarnpkg/plugin-interactive-tools"
12+
- "@yarnpkg/plugin-nm"
13+
- "@yarnpkg/plugin-npm-cli"
14+
- "@yarnpkg/plugin-pack"
15+
- "@yarnpkg/plugin-patch"
16+
- "@yarnpkg/plugin-pnp"
17+
- "@yarnpkg/plugin-pnpm"
18+
- "@yarnpkg/plugin-stage"
19+
- "@yarnpkg/plugin-typescript"
20+
- "@yarnpkg/plugin-version"
21+
- "@yarnpkg/builder"
22+
- "@yarnpkg/core"
23+
- "@yarnpkg/doctor"

packages/plugin-workspace-tools/sources/commands/foreach.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ export default class WorkspacesForeachCommand extends BaseCommand {
4040
4141
- If \`--dry-run\` is set, Yarn will explain what it would do without actually doing anything.
4242
43-
- The command may apply to only some workspaces through the use of \`--include\` which acts as a whitelist. The \`--exclude\` flag will do the opposite and will be a list of packages that mustn't execute the script. Both flags accept glob patterns (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.
43+
- The command may apply to only some workspaces through the use of \`--include\` which acts as a whitelist. The \`--exclude\` flag will do the opposite and will be a list of packages that mustn't execute the script. Both flags accept glob patterns (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them. You can also use the \`--no-private\` flag to avoid running the command in private workspaces.
4444
4545
The \`-v,--verbose\` flag can be passed up to twice: once to prefix output lines with the originating workspace's name, and again to include start/finish/timing log lines. Maximum verbosity is enabled by default in terminal environments.
4646
4747
If the command is \`run\` and the script being run does not exist the child workspace will be skipped without error.
4848
`,
4949
examples: [[
5050
`Publish all packages`,
51-
`yarn workspaces foreach -A npm publish --tolerate-republish`,
51+
`yarn workspaces foreach -A --no-private npm publish --tolerate-republish`,
5252
], [
5353
`Run the build script on all descendant packages`,
5454
`yarn workspaces foreach -A run build`,

0 commit comments

Comments
 (0)