fix(nx-dev): options of the affected are messed up (#28112)

Closes #27893

## Current Behavior
see #27893

## Expected Behavior
see #27893

## Related Issue(s)
see #27893

Fixes #
- docs for affected

---------

Co-authored-by: Isaac Mann <isaacplmann@gmail.com>
This commit is contained in:
pawel-twardziak 2024-09-26 17:07:41 +02:00 committed by GitHub
parent 621ac786a9
commit 4ed8e1ea36
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 49 additions and 52 deletions

View File

@ -86,11 +86,8 @@ Print the task graph to the console:
## Options ## Options
| Option | Type | Description | | Option | Type | Description |
| ----------- | ------- | ----------------------------------------- | | --------------------------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ~~`--all`~~ | boolean | **Deprecated:** Use `nx run-many` instead | | ~~`--all`~~ | boolean | **Deprecated:** Use `nx run-many` instead |
|
| `--base` | string | Base of the current branch (usually main). | | `--base` | string | Base of the current branch (usually main). |
| `--batch` | boolean | Run task(s) in batches for executors which support batches. (Default: `false`) | | `--batch` | boolean | Run task(s) in batches for executors which support batches. (Default: `false`) |
| `--configuration` | string | This is the configuration to use when performing tasks on projects. | | `--configuration` | string | This is the configuration to use when performing tasks on projects. |

View File

@ -86,11 +86,8 @@ Print the task graph to the console:
## Options ## Options
| Option | Type | Description | | Option | Type | Description |
| ----------- | ------- | ----------------------------------------- | | --------------------------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ~~`--all`~~ | boolean | **Deprecated:** Use `nx run-many` instead | | ~~`--all`~~ | boolean | **Deprecated:** Use `nx run-many` instead |
|
| `--base` | string | Base of the current branch (usually main). | | `--base` | string | Base of the current branch (usually main). |
| `--batch` | boolean | Run task(s) in batches for executors which support batches. (Default: `false`) | | `--batch` | boolean | Run task(s) in batches for executors which support batches. (Default: `false`) |
| `--configuration` | string | This is the configuration to use when performing tasks on projects. | | `--configuration` | string | This is the configuration to use when performing tasks on projects. |

View File

@ -135,6 +135,9 @@ export function formatDescription(
if (!deprecated) { if (!deprecated) {
return description; return description;
} }
if (!description) {
return `${bold('Deprecated:')} ${deprecated}`;
}
return deprecated === true return deprecated === true
? `${bold('Deprecated:')} ${description}` ? `${bold('Deprecated:')} ${description}`
: mdLines(`${bold('Deprecated:')} ${deprecated}`, description); : mdLines(`${bold('Deprecated:')} ${deprecated}`, description);