docs(core): remove references to --all for run-many (#18663)
This commit is contained in:
parent
d3b4c700ad
commit
768a0d2b7c
@ -29,12 +29,6 @@ Run tests in parallel:
|
|||||||
nx affected -t test --parallel=5
|
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+:
|
Run lint, test, and build targets for affected projects. Requires Nx v15.4+:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
|||||||
@ -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+:
|
Run lint, test, and build targets for all projects. Requires Nx v15.4+:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
nx run-many --targets=lint,test,build --all
|
nx run-many --targets=lint,test,build
|
||||||
```
|
```
|
||||||
|
|
||||||
## Options
|
## Options
|
||||||
@ -79,7 +79,7 @@ Type: `boolean`
|
|||||||
|
|
||||||
Default: `true`
|
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
|
### configuration
|
||||||
|
|
||||||
|
|||||||
@ -29,12 +29,6 @@ Run tests in parallel:
|
|||||||
nx affected -t test --parallel=5
|
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+:
|
Run lint, test, and build targets for affected projects. Requires Nx v15.4+:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
|||||||
@ -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+:
|
Run lint, test, and build targets for all projects. Requires Nx v15.4+:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
nx run-many --targets=lint,test,build --all
|
nx run-many --targets=lint,test,build
|
||||||
```
|
```
|
||||||
|
|
||||||
## Options
|
## Options
|
||||||
@ -79,7 +79,7 @@ Type: `boolean`
|
|||||||
|
|
||||||
Default: `true`
|
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
|
### configuration
|
||||||
|
|
||||||
|
|||||||
@ -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.
|
By default, Nx Cloud requests will time out after 10 seconds. `NX_CLOUD_NO_TIMEOUTS` disables the timeout.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
NX_CLOUD_NO_TIMEOUTS=true nx run-many -t build --all
|
NX_CLOUD_NO_TIMEOUTS=true nx run-many -t build
|
||||||
```
|
```
|
||||||
|
|
||||||
## Logging
|
## Logging
|
||||||
|
|||||||
@ -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`
|
tasks `app1:test`
|
||||||
and `lib: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
|
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?
|
get the min set of projects that need to be retested. How does it work?
|
||||||
|
|||||||
@ -209,7 +209,7 @@ pass `--buildable=true` when creating new libraries.
|
|||||||
> A task is an invocation of a target.
|
> 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
|
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
|
Tasks runners can accept different options. The following are the options supported
|
||||||
by `"nx/tasks-runners/default"` and `"nx-cloud"`.
|
by `"nx/tasks-runners/default"` and `"nx-cloud"`.
|
||||||
|
|||||||
@ -208,7 +208,7 @@ describe('Nx Running Tests', () => {
|
|||||||
return c;
|
return c;
|
||||||
});
|
});
|
||||||
|
|
||||||
let withoutBail = runCLI(`run-many --target=error --all --parallel=1`, {
|
let withoutBail = runCLI(`run-many --target=error --parallel=1`, {
|
||||||
silenceError: true,
|
silenceError: true,
|
||||||
})
|
})
|
||||||
.split('\n')
|
.split('\n')
|
||||||
@ -219,12 +219,9 @@ describe('Nx Running Tests', () => {
|
|||||||
expect(withoutBail).toContain(`- ${myapp1}:error`);
|
expect(withoutBail).toContain(`- ${myapp1}:error`);
|
||||||
expect(withoutBail).toContain(`- ${myapp2}:error`);
|
expect(withoutBail).toContain(`- ${myapp2}:error`);
|
||||||
|
|
||||||
let withBail = runCLI(
|
let withBail = runCLI(`run-many --target=error --parallel=1 --nx-bail`, {
|
||||||
`run-many --target=error --all --parallel=1 --nx-bail`,
|
|
||||||
{
|
|
||||||
silenceError: true,
|
silenceError: true,
|
||||||
}
|
})
|
||||||
)
|
|
||||||
.split('\n')
|
.split('\n')
|
||||||
.map((r) => r.trim())
|
.map((r) => r.trim())
|
||||||
.filter((r) => r);
|
.filter((r) => r);
|
||||||
|
|||||||
@ -400,7 +400,7 @@ describe('CLI - Environment Variables', () => {
|
|||||||
updateFile(main2, `${newCode2}\n${content2}`);
|
updateFile(main2, `${newCode2}\n${content2}`);
|
||||||
|
|
||||||
runCLI(
|
runCLI(
|
||||||
`run-many --target build --all --outputHashing=none --optimization=false`,
|
`run-many --target build --outputHashing=none --optimization=false`,
|
||||||
{
|
{
|
||||||
env: {
|
env: {
|
||||||
...process.env,
|
...process.env,
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
"homepage": "https://nx.dev",
|
"homepage": "https://nx.dev",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"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",
|
"commit": "czg",
|
||||||
"check-commit": "node ./scripts/commit-lint.js",
|
"check-commit": "node ./scripts/commit-lint.js",
|
||||||
"check-format": "nx format:check --all",
|
"check-format": "nx format:check --all",
|
||||||
|
|||||||
@ -40,10 +40,6 @@ export const examples: Record<string, Example[]> = {
|
|||||||
command: 'affected -t test --parallel=5',
|
command: 'affected -t test --parallel=5',
|
||||||
description: 'Run tests in parallel',
|
description: 'Run tests in parallel',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
command: 'affected -t test --all',
|
|
||||||
description: 'Run the test target for all projects',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
command: 'affected -t lint test build',
|
command: 'affected -t lint test build',
|
||||||
description:
|
description:
|
||||||
@ -78,10 +74,6 @@ export const examples: Record<string, Example[]> = {
|
|||||||
command: 'affected:test --parallel=5',
|
command: 'affected:test --parallel=5',
|
||||||
description: 'Run tests in parallel',
|
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',
|
command: 'affected:test --files=libs/mylib/src/index.ts',
|
||||||
description:
|
description:
|
||||||
@ -103,10 +95,6 @@ export const examples: Record<string, Example[]> = {
|
|||||||
command: 'affected:build --parallel=5',
|
command: 'affected:build --parallel=5',
|
||||||
description: 'Run build in parallel',
|
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',
|
command: 'affected:build --files=libs/mylib/src/index.ts',
|
||||||
description:
|
description:
|
||||||
@ -128,10 +116,6 @@ export const examples: Record<string, Example[]> = {
|
|||||||
command: 'affected:e2e --parallel=5',
|
command: 'affected:e2e --parallel=5',
|
||||||
description: 'Run tests in parallel',
|
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',
|
command: 'affected:e2e --files=libs/mylib/src/index.ts',
|
||||||
description:
|
description:
|
||||||
@ -153,10 +137,6 @@ export const examples: Record<string, Example[]> = {
|
|||||||
command: 'affected:lint --parallel=5',
|
command: 'affected:lint --parallel=5',
|
||||||
description: 'Run lint in parallel',
|
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',
|
command: 'affected:lint --files=libs/mylib/src/index.ts',
|
||||||
description:
|
description:
|
||||||
@ -293,7 +273,7 @@ export const examples: Record<string, Example[]> = {
|
|||||||
description: 'Test all projects with a `type:feature` or `type:ui` tag',
|
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:
|
description:
|
||||||
'Run lint, test, and build targets for all projects. Requires Nx v15.4+',
|
'Run lint, test, and build targets for all projects. Requires Nx v15.4+',
|
||||||
},
|
},
|
||||||
|
|||||||
@ -161,7 +161,8 @@ export function withRunManyOptions(yargs: Argv) {
|
|||||||
'Projects to run. (comma/space delimited project names and/or patterns)',
|
'Projects to run. (comma/space delimited project names and/or patterns)',
|
||||||
})
|
})
|
||||||
.option('all', {
|
.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',
|
type: 'boolean',
|
||||||
default: true,
|
default: true,
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
rm -rf build
|
rm -rf build
|
||||||
nx run-many --target=build --all --parallel
|
nx run-many --target=build --parallel
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user