Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions docs/generated/cli/affected.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions docs/generated/cli/exec.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions docs/generated/cli/run-many.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions docs/generated/packages/nx/documents/affected.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions docs/generated/packages/nx/documents/exec.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions docs/generated/packages/nx/documents/run-many.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions packages/nx/src/command-line/yargs-utils/shared-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down