Skip to content

Commit

Permalink
feat(graph): enable watch mode by default (#23092)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKless authored Apr 30, 2024
1 parent 30a3875 commit 73ab6d3
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/generated/cli/affected-graph.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,6 @@ Choose whether to view the projects or task graph

Type: `boolean`

Default: `false`
Default: `true`

Watch for changes to project graph and update in-browser
2 changes: 1 addition & 1 deletion docs/generated/cli/graph.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,6 @@ Choose whether to view the projects or task graph

Type: `boolean`

Default: `false`
Default: `true`

Watch for changes to project graph and update in-browser
2 changes: 1 addition & 1 deletion docs/generated/packages/nx/documents/affected-dep-graph.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,6 @@ Choose whether to view the projects or task graph

Type: `boolean`

Default: `false`
Default: `true`

Watch for changes to project graph and update in-browser
2 changes: 1 addition & 1 deletion docs/generated/packages/nx/documents/dep-graph.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,6 @@ Choose whether to view the projects or task graph

Type: `boolean`

Default: `false`
Default: `true`

Watch for changes to project graph and update in-browser
2 changes: 1 addition & 1 deletion packages/nx/src/command-line/affected/affected.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export async function affected(

return await generateGraph(
{
watch: false,
watch: true,
open: true,
view: 'tasks',
targets: nxArgs.targets,
Expand Down
2 changes: 1 addition & 1 deletion packages/nx/src/command-line/graph/graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ async function startServer(
environmentJs: string,
host: string,
port = 4211,
watchForchanges = false,
watchForchanges = true,
affected: string[] = [],
focus: string = null,
groupByFolder: boolean = false,
Expand Down
3 changes: 2 additions & 1 deletion packages/nx/src/command-line/release/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,10 @@ async function runPublishOnProjects(
.filter((projectName) =>
projectHasTarget(projectGraph.nodes[projectName], requiredTargetName)
);

await generateGraph(
{
watch: false,
watch: true,
all: false,
open: true,
view: 'tasks',
Expand Down
2 changes: 1 addition & 1 deletion packages/nx/src/command-line/run-many/run-many.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export async function runMany(
const projectNames = projects.map((t) => t.name);
return await generateGraph(
{
watch: false,
watch: true,
open: true,
view: 'tasks',
all: nxArgs.all,
Expand Down
2 changes: 1 addition & 1 deletion packages/nx/src/command-line/run/run-one.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export async function runOne(

return await generateGraph(
{
watch: false,
watch: true,
open: true,
view: 'tasks',
targets: nxArgs.targets,
Expand Down
2 changes: 1 addition & 1 deletion packages/nx/src/command-line/yargs-utils/shared-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ export function withDepGraphOptions(yargs: Argv) {
.option('watch', {
describe: 'Watch for changes to project graph and update in-browser',
type: 'boolean',
default: false,
default: true,
})
.option('open', {
describe: 'Open the project graph in the browser.',
Expand Down

0 comments on commit 73ab6d3

Please sign in to comment.