fix(core): cli option --graph should open graph ui by default (#17644)

This commit is contained in:
Craigory Coppola 2023-06-16 16:31:12 -04:00 committed by GitHub
parent 909d973af7
commit f5c6ee5488
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 4 additions and 14 deletions

View File

@ -107,8 +107,6 @@ Change the way Nx is calculating the affected command by providing directly chan
Type: `string`
Default: `false`
Show the task graph of the command. Pass a file path to save the graph data instead of viewing it in the browser.
### head

View File

@ -33,8 +33,6 @@ Exclude certain projects from being processed
Type: `string`
Default: `false`
Show the task graph of the command. Pass a file path to save the graph data instead of viewing it in the browser.
### nx-bail

View File

@ -97,8 +97,6 @@ Exclude certain projects from being processed
Type: `string`
Default: `false`
Show the task graph of the command. Pass a file path to save the graph data instead of viewing it in the browser.
### help

View File

@ -107,8 +107,6 @@ Change the way Nx is calculating the affected command by providing directly chan
Type: `string`
Default: `false`
Show the task graph of the command. Pass a file path to save the graph data instead of viewing it in the browser.
### head

View File

@ -33,8 +33,6 @@ Exclude certain projects from being processed
Type: `string`
Default: `false`
Show the task graph of the command. Pass a file path to save the graph data instead of viewing it in the browser.
### nx-bail

View File

@ -97,8 +97,6 @@ Exclude certain projects from being processed
Type: `string`
Default: `false`
Show the task graph of the command. Pass a file path to save the graph data instead of viewing it in the browser.
### help

View File

@ -32,9 +32,11 @@ export function withRunOptions(yargs: Argv) {
type: 'string',
describe:
'Show the task graph of the command. Pass a file path to save the graph data instead of viewing it in the browser.',
default: false,
coerce: (value) =>
value === 'true' || value === true
// when the type of an opt is "string", passing `--opt` comes through as having an empty string value.
// this coercion allows `--graph` to be passed through as a boolean directly, and also normalizes the
// `--graph=true` to produce the same behaviour as `--graph`.
value === '' || value === 'true' || value === true
? true
: value === 'false' || value === false
? false