diff --git a/docs/generated/cli/affected.md b/docs/generated/cli/affected.md index e97398da1c..3507e64b9a 100644 --- a/docs/generated/cli/affected.md +++ b/docs/generated/cli/affected.md @@ -29,12 +29,6 @@ Run tests in parallel: nx affected -t test --parallel=5 ``` -Run the test target for all projects: - -```shell - nx affected -t test --all -``` - Run lint, test, and build targets for affected projects. Requires Nx v15.4+: ```shell diff --git a/docs/generated/cli/run-many.md b/docs/generated/cli/run-many.md index d525acdadd..291aa6fbab 100644 --- a/docs/generated/cli/run-many.md +++ b/docs/generated/cli/run-many.md @@ -68,7 +68,7 @@ Test all projects with a `type:feature` or `type:ui` tag: Run lint, test, and build targets for all projects. Requires Nx v15.4+: ```shell - nx run-many --targets=lint,test,build --all + nx run-many --targets=lint,test,build ``` ## Options @@ -79,7 +79,7 @@ Type: `boolean` Default: `true` -[deprecated] Run the target on all projects in the workspace +[deprecated] `run-many` runs all targets on all projects in the workspace if no projects are provided. This option is no longer required. ### configuration diff --git a/docs/generated/packages/nx/documents/affected.md b/docs/generated/packages/nx/documents/affected.md index e97398da1c..3507e64b9a 100644 --- a/docs/generated/packages/nx/documents/affected.md +++ b/docs/generated/packages/nx/documents/affected.md @@ -29,12 +29,6 @@ Run tests in parallel: nx affected -t test --parallel=5 ``` -Run the test target for all projects: - -```shell - nx affected -t test --all -``` - Run lint, test, and build targets for affected projects. Requires Nx v15.4+: ```shell diff --git a/docs/generated/packages/nx/documents/run-many.md b/docs/generated/packages/nx/documents/run-many.md index d525acdadd..291aa6fbab 100644 --- a/docs/generated/packages/nx/documents/run-many.md +++ b/docs/generated/packages/nx/documents/run-many.md @@ -68,7 +68,7 @@ Test all projects with a `type:feature` or `type:ui` tag: Run lint, test, and build targets for all projects. Requires Nx v15.4+: ```shell - nx run-many --targets=lint,test,build --all + nx run-many --targets=lint,test,build ``` ## Options @@ -79,7 +79,7 @@ Type: `boolean` Default: `true` -[deprecated] Run the target on all projects in the workspace +[deprecated] `run-many` runs all targets on all projects in the workspace if no projects are provided. This option is no longer required. ### configuration diff --git a/docs/nx-cloud/reference/config.md b/docs/nx-cloud/reference/config.md index a95c287a21..4f07607f20 100644 --- a/docs/nx-cloud/reference/config.md +++ b/docs/nx-cloud/reference/config.md @@ -25,7 +25,7 @@ Only operations listed in `cacheableOperations` can be cached using Nx Cloud and By default, Nx Cloud requests will time out after 10 seconds. `NX_CLOUD_NO_TIMEOUTS` disables the timeout. ```shell -NX_CLOUD_NO_TIMEOUTS=true nx run-many -t build --all +NX_CLOUD_NO_TIMEOUTS=true nx run-many -t build ``` ## Logging diff --git a/docs/shared/mental-model.md b/docs/shared/mental-model.md index b3939b0538..da5e2fa740 100644 --- a/docs/shared/mental-model.md +++ b/docs/shared/mental-model.md @@ -122,7 +122,7 @@ When you run `nx run-many -t test -p app1 lib`, you are telling Nx to do the sam tasks `app1:test` and `lib:test`. -When you run `nx run-many -t test --all`, you are telling Nx to do this for all the projects. +When you run `nx run-many -t test`, you are telling Nx to do this for all the projects. As your workspace grows, retesting all projects becomes too slow. To address this Nx implements code change analysis to get the min set of projects that need to be retested. How does it work? diff --git a/docs/shared/reference/nx-json.md b/docs/shared/reference/nx-json.md index 06946094e8..2a80e37232 100644 --- a/docs/shared/reference/nx-json.md +++ b/docs/shared/reference/nx-json.md @@ -209,7 +209,7 @@ pass `--buildable=true` when creating new libraries. > A task is an invocation of a target. Tasks runners are invoked when you run `nx test`, `nx build`, `nx run-many`, `nx affected`, and so on. The tasks runner -named "default" is used by default. Specify a different one like this `nx run-many -t build --all --runner=another`. +named "default" is used by default. Specify a different one like this `nx run-many -t build --runner=another`. Tasks runners can accept different options. The following are the options supported by `"nx/tasks-runners/default"` and `"nx-cloud"`. diff --git a/e2e/nx-run/src/run.test.ts b/e2e/nx-run/src/run.test.ts index c295791612..d6a5a7f668 100644 --- a/e2e/nx-run/src/run.test.ts +++ b/e2e/nx-run/src/run.test.ts @@ -208,7 +208,7 @@ describe('Nx Running Tests', () => { return c; }); - let withoutBail = runCLI(`run-many --target=error --all --parallel=1`, { + let withoutBail = runCLI(`run-many --target=error --parallel=1`, { silenceError: true, }) .split('\n') @@ -219,12 +219,9 @@ describe('Nx Running Tests', () => { expect(withoutBail).toContain(`- ${myapp1}:error`); expect(withoutBail).toContain(`- ${myapp2}:error`); - let withBail = runCLI( - `run-many --target=error --all --parallel=1 --nx-bail`, - { - silenceError: true, - } - ) + let withBail = runCLI(`run-many --target=error --parallel=1 --nx-bail`, { + silenceError: true, + }) .split('\n') .map((r) => r.trim()) .filter((r) => r); diff --git a/e2e/web/src/web.test.ts b/e2e/web/src/web.test.ts index e82f326c43..5d3f79642e 100644 --- a/e2e/web/src/web.test.ts +++ b/e2e/web/src/web.test.ts @@ -400,7 +400,7 @@ describe('CLI - Environment Variables', () => { updateFile(main2, `${newCode2}\n${content2}`); runCLI( - `run-many --target build --all --outputHashing=none --optimization=false`, + `run-many --target build --outputHashing=none --optimization=false`, { env: { ...process.env, diff --git a/package.json b/package.json index 576d354670..848a4a570e 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "homepage": "https://nx.dev", "private": true, "scripts": { - "build": "nx run-many --target build --all --parallel 8 --exclude nx-dev,typedoc-theme", + "build": "nx run-many --target build --parallel 8 --exclude nx-dev,typedoc-theme", "commit": "czg", "check-commit": "node ./scripts/commit-lint.js", "check-format": "nx format:check --all", diff --git a/packages/nx/src/command-line/examples.ts b/packages/nx/src/command-line/examples.ts index fc76f3e379..75db6b5cd1 100644 --- a/packages/nx/src/command-line/examples.ts +++ b/packages/nx/src/command-line/examples.ts @@ -40,10 +40,6 @@ export const examples: Record = { command: 'affected -t test --parallel=5', description: 'Run tests in parallel', }, - { - command: 'affected -t test --all', - description: 'Run the test target for all projects', - }, { command: 'affected -t lint test build', description: @@ -78,10 +74,6 @@ export const examples: Record = { command: 'affected:test --parallel=5', description: 'Run tests in parallel', }, - { - command: 'affected:test --all', - description: 'Run the test target for all projects', - }, { command: 'affected:test --files=libs/mylib/src/index.ts', description: @@ -103,10 +95,6 @@ export const examples: Record = { command: 'affected:build --parallel=5', description: 'Run build in parallel', }, - { - command: 'affected:build --all', - description: 'Run the build target for all projects', - }, { command: 'affected:build --files=libs/mylib/src/index.ts', description: @@ -128,10 +116,6 @@ export const examples: Record = { command: 'affected:e2e --parallel=5', description: 'Run tests in parallel', }, - { - command: 'affected:e2e --all', - description: 'Run the test target for all projects', - }, { command: 'affected:e2e --files=libs/mylib/src/index.ts', description: @@ -153,10 +137,6 @@ export const examples: Record = { command: 'affected:lint --parallel=5', description: 'Run lint in parallel', }, - { - command: 'affected:lint --all', - description: 'Run the lint target for all projects', - }, { command: 'affected:lint --files=libs/mylib/src/index.ts', description: @@ -293,7 +273,7 @@ export const examples: Record = { description: 'Test all projects with a `type:feature` or `type:ui` tag', }, { - command: 'run-many --targets=lint,test,build --all', + command: 'run-many --targets=lint,test,build', description: 'Run lint, test, and build targets for all projects. Requires Nx v15.4+', }, diff --git a/packages/nx/src/command-line/yargs-utils/shared-options.ts b/packages/nx/src/command-line/yargs-utils/shared-options.ts index 4a2a32443f..9af442d323 100644 --- a/packages/nx/src/command-line/yargs-utils/shared-options.ts +++ b/packages/nx/src/command-line/yargs-utils/shared-options.ts @@ -161,7 +161,8 @@ export function withRunManyOptions(yargs: Argv) { 'Projects to run. (comma/space delimited project names and/or patterns)', }) .option('all', { - describe: '[deprecated] Run the target on all projects in the workspace', + describe: + '[deprecated] `run-many` runs all targets on all projects in the workspace if no projects are provided. This option is no longer required.', type: 'boolean', default: true, }); diff --git a/scripts/build.sh b/scripts/build.sh index ee290611d8..fbe2e3d872 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,3 +1,3 @@ #!/usr/bin/env bash rm -rf build -nx run-many --target=build --all --parallel +nx run-many --target=build --parallel