diff --git a/docs/generated/cli/affected-apps.md b/docs/generated/cli/affected-apps.md index 39948cfcbbdf0..f317f38e735f9 100644 --- a/docs/generated/cli/affected-apps.md +++ b/docs/generated/cli/affected-apps.md @@ -51,12 +51,6 @@ Type: `string` Base of the current branch (usually main) -### configuration - -Type: `string` - -This is the configuration to use when performing tasks on projects - ### exclude Type: `array` @@ -83,40 +77,10 @@ Type: `boolean` Show help -### nx-bail - -Type: `boolean` - -Default: `false` - -Stop command execution after the first failed task - -### nx-ignore-cycles - -Type: `boolean` - -Default: `false` - -Ignore cycles in the task graph - ### plain Produces a plain output for affected:apps and affected:libs -### runner - -Type: `string` - -This is the name of the tasks runner configured in nx.json - -### skip-nx-cache - -Type: `boolean` - -Default: `false` - -Rerun the tasks even when the results are available in the cache - ### uncommitted Type: `boolean` @@ -129,14 +93,6 @@ Type: `boolean` Untracked changes -### verbose - -Type: `boolean` - -Default: `false` - -Prints additional information about the commands (e.g., stack traces) - ### version Type: `boolean` diff --git a/docs/generated/cli/affected-graph.md b/docs/generated/cli/affected-graph.md index 25c1cf7645ca4..056645fc8094f 100644 --- a/docs/generated/cli/affected-graph.md +++ b/docs/generated/cli/affected-graph.md @@ -67,12 +67,6 @@ Type: `string` Base of the current branch (usually main) -### configuration - -Type: `string` - -This is the configuration to use when performing tasks on projects - ### exclude Type: `array` @@ -123,22 +117,6 @@ Type: `string` Bind the project graph server to a specific ip address. -### nx-bail - -Type: `boolean` - -Default: `false` - -Stop command execution after the first failed task - -### nx-ignore-cycles - -Type: `boolean` - -Default: `false` - -Ignore cycles in the task graph - ### open Type: `boolean` @@ -153,20 +131,6 @@ Type: `number` Bind the project graph server to a specific port. -### runner - -Type: `string` - -This is the name of the tasks runner configured in nx.json - -### skip-nx-cache - -Type: `boolean` - -Default: `false` - -Rerun the tasks even when the results are available in the cache - ### uncommitted Type: `boolean` @@ -179,14 +143,6 @@ Type: `boolean` Untracked changes -### verbose - -Type: `boolean` - -Default: `false` - -Prints additional information about the commands (e.g., stack traces) - ### version Type: `boolean` diff --git a/docs/generated/cli/affected-libs.md b/docs/generated/cli/affected-libs.md index 19fb106619651..61e9f06cc177a 100644 --- a/docs/generated/cli/affected-libs.md +++ b/docs/generated/cli/affected-libs.md @@ -51,12 +51,6 @@ Type: `string` Base of the current branch (usually main) -### configuration - -Type: `string` - -This is the configuration to use when performing tasks on projects - ### exclude Type: `array` @@ -83,40 +77,10 @@ Type: `boolean` Show help -### nx-bail - -Type: `boolean` - -Default: `false` - -Stop command execution after the first failed task - -### nx-ignore-cycles - -Type: `boolean` - -Default: `false` - -Ignore cycles in the task graph - ### plain Produces a plain output for affected:apps and affected:libs -### runner - -Type: `string` - -This is the name of the tasks runner configured in nx.json - -### skip-nx-cache - -Type: `boolean` - -Default: `false` - -Rerun the tasks even when the results are available in the cache - ### uncommitted Type: `boolean` @@ -129,14 +93,6 @@ Type: `boolean` Untracked changes -### verbose - -Type: `boolean` - -Default: `false` - -Prints additional information about the commands (e.g., stack traces) - ### version Type: `boolean` diff --git a/docs/generated/cli/format-check.md b/docs/generated/cli/format-check.md index f59a7644976b3..01a937dd854cd 100644 --- a/docs/generated/cli/format-check.md +++ b/docs/generated/cli/format-check.md @@ -29,12 +29,6 @@ Type: `string` Base of the current branch (usually main) -### configuration - -Type: `string` - -This is the configuration to use when performing tasks on projects - ### exclude Type: `array` @@ -67,42 +61,12 @@ Type: `boolean` Format only libraries and applications files. -### nx-bail - -Type: `boolean` - -Default: `false` - -Stop command execution after the first failed task - -### nx-ignore-cycles - -Type: `boolean` - -Default: `false` - -Ignore cycles in the task graph - ### projects Type: `array` Projects to format (comma delimited) -### runner - -Type: `string` - -This is the name of the tasks runner configured in nx.json - -### skip-nx-cache - -Type: `boolean` - -Default: `false` - -Rerun the tasks even when the results are available in the cache - ### uncommitted Type: `boolean` @@ -115,14 +79,6 @@ Type: `boolean` Untracked changes -### verbose - -Type: `boolean` - -Default: `false` - -Prints additional information about the commands (e.g., stack traces) - ### version Type: `boolean` diff --git a/docs/generated/cli/format-write.md b/docs/generated/cli/format-write.md index 9ee38c5a868f0..573103262b7ce 100644 --- a/docs/generated/cli/format-write.md +++ b/docs/generated/cli/format-write.md @@ -29,12 +29,6 @@ Type: `string` Base of the current branch (usually main) -### configuration - -Type: `string` - -This is the configuration to use when performing tasks on projects - ### exclude Type: `array` @@ -67,42 +61,12 @@ Type: `boolean` Format only libraries and applications files. -### nx-bail - -Type: `boolean` - -Default: `false` - -Stop command execution after the first failed task - -### nx-ignore-cycles - -Type: `boolean` - -Default: `false` - -Ignore cycles in the task graph - ### projects Type: `array` Projects to format (comma delimited) -### runner - -Type: `string` - -This is the name of the tasks runner configured in nx.json - -### skip-nx-cache - -Type: `boolean` - -Default: `false` - -Rerun the tasks even when the results are available in the cache - ### uncommitted Type: `boolean` @@ -115,14 +79,6 @@ Type: `boolean` Untracked changes -### verbose - -Type: `boolean` - -Default: `false` - -Prints additional information about the commands (e.g., stack traces) - ### version Type: `boolean` diff --git a/docs/generated/cli/print-affected.md b/docs/generated/cli/print-affected.md index f28d2cf84d7d5..6c33c6bbeab2e 100644 --- a/docs/generated/cli/print-affected.md +++ b/docs/generated/cli/print-affected.md @@ -61,12 +61,6 @@ Type: `string` Base of the current branch (usually main) -### configuration - -Type: `string` - -This is the configuration to use when performing tasks on projects - ### exclude Type: `array` @@ -93,42 +87,12 @@ Type: `boolean` Show help -### nx-bail - -Type: `boolean` - -Default: `false` - -Stop command execution after the first failed task - -### nx-ignore-cycles - -Type: `boolean` - -Default: `false` - -Ignore cycles in the task graph - -### runner - -Type: `string` - -This is the name of the tasks runner configured in nx.json - ### select Type: `string` Select the subset of the returned json document (e.g., --select=projects) -### skip-nx-cache - -Type: `boolean` - -Default: `false` - -Rerun the tasks even when the results are available in the cache - ### target Type: `string` @@ -155,14 +119,6 @@ Type: `boolean` Untracked changes -### verbose - -Type: `boolean` - -Default: `false` - -Prints additional information about the commands (e.g., stack traces) - ### version Type: `boolean` diff --git a/docs/generated/cli/run-many.md b/docs/generated/cli/run-many.md index 1c11ba15677a5..3fc46406e6072 100644 --- a/docs/generated/cli/run-many.md +++ b/docs/generated/cli/run-many.md @@ -105,7 +105,7 @@ Projects to run (comma delimited) Type: `string` -Override the tasks runner in `nx.json` +This is the name of the tasks runner configured in nx.json ### skip-nx-cache diff --git a/docs/generated/packages/nx.json b/docs/generated/packages/nx.json index 1255c0cbff709..36fd88f9affd7 100644 --- a/docs/generated/packages/nx.json +++ b/docs/generated/packages/nx.json @@ -50,7 +50,7 @@ "tags": ["run-tasks", "use-task-executors"], "id": "run-many", "file": "generated/cli/run-many", - "content": "---\ntitle: 'run-many - CLI command'\ndescription: 'Run target for multiple listed projects'\n---\n\n# run-many\n\nRun target for multiple listed projects\n\n## Usage\n\n```terminal\nnx run-many\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n\n### Examples\n\nTest all projects:\n\n```terminal\n nx run-many --target=test\n```\n\nTest proj1 and proj2:\n\n```terminal\n nx run-many --target=test --projects=proj1,proj2\n```\n\nTest proj1 and proj2 in parallel:\n\n```terminal\n nx run-many --target=test --projects=proj1,proj2 --parallel=2\n```\n\n## Options\n\n### all\n\nType: `boolean`\n\nDefault: `true`\n\n[deprecated] Run the target on all projects in the workspace\n\n### configuration\n\nType: `string`\n\nThis is the configuration to use when performing tasks on projects\n\n### exclude\n\nType: `array`\n\nDefault: `[]`\n\nExclude certain projects from being processed\n\n### help\n\nType: `boolean`\n\nShow help\n\n### nx-bail\n\nType: `boolean`\n\nDefault: `false`\n\nStop command execution after the first failed task\n\n### nx-ignore-cycles\n\nType: `boolean`\n\nDefault: `false`\n\nIgnore cycles in the task graph\n\n### output-style\n\nType: `string`\n\nChoices: [dynamic, static, stream, stream-without-prefixes]\n\nDefines how Nx emits outputs tasks logs\n\n### parallel\n\nType: `string`\n\nMax number of parallel processes [default is 3]\n\n### projects\n\nType: `string`\n\nProjects to run (comma delimited)\n\n### runner\n\nType: `string`\n\nOverride the tasks runner in `nx.json`\n\n### skip-nx-cache\n\nType: `boolean`\n\nDefault: `false`\n\nRerun the tasks even when the results are available in the cache\n\n### target\n\nType: `string`\n\nTask to run for affected projects\n\n### verbose\n\nType: `boolean`\n\nDefault: `false`\n\nPrints additional information about the commands (e.g., stack traces)\n\n### version\n\nType: `boolean`\n\nShow version number\n" + "content": "---\ntitle: 'run-many - CLI command'\ndescription: 'Run target for multiple listed projects'\n---\n\n# run-many\n\nRun target for multiple listed projects\n\n## Usage\n\n```terminal\nnx run-many\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n\n### Examples\n\nTest all projects:\n\n```terminal\n nx run-many --target=test\n```\n\nTest proj1 and proj2:\n\n```terminal\n nx run-many --target=test --projects=proj1,proj2\n```\n\nTest proj1 and proj2 in parallel:\n\n```terminal\n nx run-many --target=test --projects=proj1,proj2 --parallel=2\n```\n\n## Options\n\n### all\n\nType: `boolean`\n\nDefault: `true`\n\n[deprecated] Run the target on all projects in the workspace\n\n### configuration\n\nType: `string`\n\nThis is the configuration to use when performing tasks on projects\n\n### exclude\n\nType: `array`\n\nDefault: `[]`\n\nExclude certain projects from being processed\n\n### help\n\nType: `boolean`\n\nShow help\n\n### nx-bail\n\nType: `boolean`\n\nDefault: `false`\n\nStop command execution after the first failed task\n\n### nx-ignore-cycles\n\nType: `boolean`\n\nDefault: `false`\n\nIgnore cycles in the task graph\n\n### output-style\n\nType: `string`\n\nChoices: [dynamic, static, stream, stream-without-prefixes]\n\nDefines how Nx emits outputs tasks logs\n\n### parallel\n\nType: `string`\n\nMax number of parallel processes [default is 3]\n\n### projects\n\nType: `string`\n\nProjects to run (comma delimited)\n\n### runner\n\nType: `string`\n\nThis is the name of the tasks runner configured in nx.json\n\n### skip-nx-cache\n\nType: `boolean`\n\nDefault: `false`\n\nRerun the tasks even when the results are available in the cache\n\n### target\n\nType: `string`\n\nTask to run for affected projects\n\n### verbose\n\nType: `boolean`\n\nDefault: `false`\n\nPrints additional information about the commands (e.g., stack traces)\n\n### version\n\nType: `boolean`\n\nShow version number\n" }, { "name": "affected", @@ -63,39 +63,39 @@ "name": "affected:graph", "id": "affected-dep-graph", "file": "generated/cli/affected-graph", - "content": "---\ntitle: 'affected:graph - CLI command'\ndescription: 'Graph dependencies affected by changes'\n---\n\n# affected:graph\n\nGraph dependencies affected by changes\n\n## Usage\n\n```terminal\nnx affected:graph\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n\n### Examples\n\nOpen the project graph of the workspace in the browser, and highlight the projects affected by changing the index.ts file:\n\n```terminal\n nx affected:graph --files=libs/mylib/src/index.ts\n```\n\nOpen the project graph of the workspace in the browser, and highlight the projects affected by the changes between main and HEAD (e.g., PR):\n\n```terminal\n nx affected:graph --base=main --head=HEAD\n```\n\nSave the project graph of the workspace in a json file, and highlight the projects affected by the changes between main and HEAD (e.g., PR):\n\n```terminal\n nx affected:graph --base=main --head=HEAD --file=output.json\n```\n\nGenerate a static website with project graph data in an html file, highlighting the projects affected by the changes between main and HEAD (e.g., PR):\n\n```terminal\n nx affected:graph --base=main --head=HEAD --file=output.html\n```\n\nOpen the project graph of the workspace in the browser, and highlight the projects affected by the last commit on main:\n\n```terminal\n nx affected:graph --base=main~1 --head=main\n```\n\nOpen the project graph of the workspace in the browser, highlight the projects affected, but exclude project-one and project-two:\n\n```terminal\n nx affected:graph --exclude=project-one,project-two\n```\n\n## Options\n\n### all\n\nType: `boolean`\n\nAll projects\n\n### base\n\nType: `string`\n\nBase of the current branch (usually main)\n\n### configuration\n\nType: `string`\n\nThis is the configuration to use when performing tasks on projects\n\n### exclude\n\nType: `array`\n\nDefault: `[]`\n\nExclude certain projects from being processed\n\n### file\n\nType: `string`\n\nOutput file (e.g. --file=output.json or --file=dep-graph.html)\n\n### files\n\nType: `array`\n\nChange the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas\n\n### focus\n\nType: `string`\n\nUse to show the project graph for a particular project and every node that is either an ancestor or a descendant.\n\n### groupByFolder\n\nType: `boolean`\n\nGroup projects by folder in the project graph\n\n### head\n\nType: `string`\n\nLatest commit of the current branch (usually HEAD)\n\n### help\n\nType: `boolean`\n\nShow help\n\n### host\n\nType: `string`\n\nBind the project graph server to a specific ip address.\n\n### nx-bail\n\nType: `boolean`\n\nDefault: `false`\n\nStop command execution after the first failed task\n\n### nx-ignore-cycles\n\nType: `boolean`\n\nDefault: `false`\n\nIgnore cycles in the task graph\n\n### open\n\nType: `boolean`\n\nDefault: `true`\n\nOpen the project graph in the browser.\n\n### port\n\nType: `number`\n\nBind the project graph server to a specific port.\n\n### runner\n\nType: `string`\n\nThis is the name of the tasks runner configured in nx.json\n\n### skip-nx-cache\n\nType: `boolean`\n\nDefault: `false`\n\nRerun the tasks even when the results are available in the cache\n\n### uncommitted\n\nType: `boolean`\n\nUncommitted changes\n\n### untracked\n\nType: `boolean`\n\nUntracked changes\n\n### verbose\n\nType: `boolean`\n\nDefault: `false`\n\nPrints additional information about the commands (e.g., stack traces)\n\n### version\n\nType: `boolean`\n\nShow version number\n\n### watch\n\nType: `boolean`\n\nDefault: `false`\n\nWatch for changes to project graph and update in-browser\n" + "content": "---\ntitle: 'affected:graph - CLI command'\ndescription: 'Graph dependencies affected by changes'\n---\n\n# affected:graph\n\nGraph dependencies affected by changes\n\n## Usage\n\n```terminal\nnx affected:graph\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n\n### Examples\n\nOpen the project graph of the workspace in the browser, and highlight the projects affected by changing the index.ts file:\n\n```terminal\n nx affected:graph --files=libs/mylib/src/index.ts\n```\n\nOpen the project graph of the workspace in the browser, and highlight the projects affected by the changes between main and HEAD (e.g., PR):\n\n```terminal\n nx affected:graph --base=main --head=HEAD\n```\n\nSave the project graph of the workspace in a json file, and highlight the projects affected by the changes between main and HEAD (e.g., PR):\n\n```terminal\n nx affected:graph --base=main --head=HEAD --file=output.json\n```\n\nGenerate a static website with project graph data in an html file, highlighting the projects affected by the changes between main and HEAD (e.g., PR):\n\n```terminal\n nx affected:graph --base=main --head=HEAD --file=output.html\n```\n\nOpen the project graph of the workspace in the browser, and highlight the projects affected by the last commit on main:\n\n```terminal\n nx affected:graph --base=main~1 --head=main\n```\n\nOpen the project graph of the workspace in the browser, highlight the projects affected, but exclude project-one and project-two:\n\n```terminal\n nx affected:graph --exclude=project-one,project-two\n```\n\n## Options\n\n### all\n\nType: `boolean`\n\nAll projects\n\n### base\n\nType: `string`\n\nBase of the current branch (usually main)\n\n### exclude\n\nType: `array`\n\nDefault: `[]`\n\nExclude certain projects from being processed\n\n### file\n\nType: `string`\n\nOutput file (e.g. --file=output.json or --file=dep-graph.html)\n\n### files\n\nType: `array`\n\nChange the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas\n\n### focus\n\nType: `string`\n\nUse to show the project graph for a particular project and every node that is either an ancestor or a descendant.\n\n### groupByFolder\n\nType: `boolean`\n\nGroup projects by folder in the project graph\n\n### head\n\nType: `string`\n\nLatest commit of the current branch (usually HEAD)\n\n### help\n\nType: `boolean`\n\nShow help\n\n### host\n\nType: `string`\n\nBind the project graph server to a specific ip address.\n\n### open\n\nType: `boolean`\n\nDefault: `true`\n\nOpen the project graph in the browser.\n\n### port\n\nType: `number`\n\nBind the project graph server to a specific port.\n\n### uncommitted\n\nType: `boolean`\n\nUncommitted changes\n\n### untracked\n\nType: `boolean`\n\nUntracked changes\n\n### version\n\nType: `boolean`\n\nShow version number\n\n### watch\n\nType: `boolean`\n\nDefault: `false`\n\nWatch for changes to project graph and update in-browser\n" }, { "name": "affected:apps", "id": "affected-apps", "file": "generated/cli/affected-apps", - "content": "---\ntitle: 'affected:apps - CLI command'\ndescription: 'Print applications affected by changes'\n---\n\n# affected:apps\n\n **Deprecated:** Use `nx print-affected --type=app ...` instead. This command will be removed in v15.\n\n Print applications affected by changes\n\n## Usage\n\n```terminal\nnx affected:apps\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n\n### Examples\n\nPrint the names of all the apps affected by changing the index.ts file:\n\n```terminal\n nx affected:apps --files=libs/mylib/src/index.ts\n```\n\nPrint the names of all the apps affected by the changes between main and HEAD (e.g., PR):\n\n```terminal\n nx affected:apps --base=main --head=HEAD\n```\n\nPrint the names of all the apps affected by the last commit on main:\n\n```terminal\n nx affected:apps --base=main~1 --head=main\n```\n\n## Options\n\n### all\n\nType: `boolean`\n\nAll projects\n\n### base\n\nType: `string`\n\nBase of the current branch (usually main)\n\n### configuration\n\nType: `string`\n\nThis is the configuration to use when performing tasks on projects\n\n### exclude\n\nType: `array`\n\nDefault: `[]`\n\nExclude certain projects from being processed\n\n### files\n\nType: `array`\n\nChange the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas\n\n### head\n\nType: `string`\n\nLatest commit of the current branch (usually HEAD)\n\n### help\n\nType: `boolean`\n\nShow help\n\n### nx-bail\n\nType: `boolean`\n\nDefault: `false`\n\nStop command execution after the first failed task\n\n### nx-ignore-cycles\n\nType: `boolean`\n\nDefault: `false`\n\nIgnore cycles in the task graph\n\n### plain\n\nProduces a plain output for affected:apps and affected:libs\n\n### runner\n\nType: `string`\n\nThis is the name of the tasks runner configured in nx.json\n\n### skip-nx-cache\n\nType: `boolean`\n\nDefault: `false`\n\nRerun the tasks even when the results are available in the cache\n\n### uncommitted\n\nType: `boolean`\n\nUncommitted changes\n\n### untracked\n\nType: `boolean`\n\nUntracked changes\n\n### verbose\n\nType: `boolean`\n\nDefault: `false`\n\nPrints additional information about the commands (e.g., stack traces)\n\n### version\n\nType: `boolean`\n\nShow version number\n" + "content": "---\ntitle: 'affected:apps - CLI command'\ndescription: 'Print applications affected by changes'\n---\n\n# affected:apps\n\n **Deprecated:** Use `nx print-affected --type=app ...` instead. This command will be removed in v15.\n\n Print applications affected by changes\n\n## Usage\n\n```terminal\nnx affected:apps\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n\n### Examples\n\nPrint the names of all the apps affected by changing the index.ts file:\n\n```terminal\n nx affected:apps --files=libs/mylib/src/index.ts\n```\n\nPrint the names of all the apps affected by the changes between main and HEAD (e.g., PR):\n\n```terminal\n nx affected:apps --base=main --head=HEAD\n```\n\nPrint the names of all the apps affected by the last commit on main:\n\n```terminal\n nx affected:apps --base=main~1 --head=main\n```\n\n## Options\n\n### all\n\nType: `boolean`\n\nAll projects\n\n### base\n\nType: `string`\n\nBase of the current branch (usually main)\n\n### exclude\n\nType: `array`\n\nDefault: `[]`\n\nExclude certain projects from being processed\n\n### files\n\nType: `array`\n\nChange the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas\n\n### head\n\nType: `string`\n\nLatest commit of the current branch (usually HEAD)\n\n### help\n\nType: `boolean`\n\nShow help\n\n### plain\n\nProduces a plain output for affected:apps and affected:libs\n\n### uncommitted\n\nType: `boolean`\n\nUncommitted changes\n\n### untracked\n\nType: `boolean`\n\nUntracked changes\n\n### version\n\nType: `boolean`\n\nShow version number\n" }, { "name": "affected:libs", "id": "affected-libs", "file": "generated/cli/affected-libs", - "content": "---\ntitle: 'affected:libs - CLI command'\ndescription: 'Print libraries affected by changes'\n---\n\n# affected:libs\n\n **Deprecated:** Use `nx print-affected --type=lib ...` instead. This command will be removed in v15.\n\n Print libraries affected by changes\n\n## Usage\n\n```terminal\nnx affected:libs\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n\n### Examples\n\nPrint the names of all the libs affected by changing the index.ts file:\n\n```terminal\n nx affected:libs --files=libs/mylib/src/index.ts\n```\n\nPrint the names of all the libs affected by the changes between main and HEAD (e.g., PR):\n\n```terminal\n nx affected:libs --base=main --head=HEAD\n```\n\nPrint the names of all the libs affected by the last commit on main:\n\n```terminal\n nx affected:libs --base=main~1 --head=main\n```\n\n## Options\n\n### all\n\nType: `boolean`\n\nAll projects\n\n### base\n\nType: `string`\n\nBase of the current branch (usually main)\n\n### configuration\n\nType: `string`\n\nThis is the configuration to use when performing tasks on projects\n\n### exclude\n\nType: `array`\n\nDefault: `[]`\n\nExclude certain projects from being processed\n\n### files\n\nType: `array`\n\nChange the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas\n\n### head\n\nType: `string`\n\nLatest commit of the current branch (usually HEAD)\n\n### help\n\nType: `boolean`\n\nShow help\n\n### nx-bail\n\nType: `boolean`\n\nDefault: `false`\n\nStop command execution after the first failed task\n\n### nx-ignore-cycles\n\nType: `boolean`\n\nDefault: `false`\n\nIgnore cycles in the task graph\n\n### plain\n\nProduces a plain output for affected:apps and affected:libs\n\n### runner\n\nType: `string`\n\nThis is the name of the tasks runner configured in nx.json\n\n### skip-nx-cache\n\nType: `boolean`\n\nDefault: `false`\n\nRerun the tasks even when the results are available in the cache\n\n### uncommitted\n\nType: `boolean`\n\nUncommitted changes\n\n### untracked\n\nType: `boolean`\n\nUntracked changes\n\n### verbose\n\nType: `boolean`\n\nDefault: `false`\n\nPrints additional information about the commands (e.g., stack traces)\n\n### version\n\nType: `boolean`\n\nShow version number\n" + "content": "---\ntitle: 'affected:libs - CLI command'\ndescription: 'Print libraries affected by changes'\n---\n\n# affected:libs\n\n **Deprecated:** Use `nx print-affected --type=lib ...` instead. This command will be removed in v15.\n\n Print libraries affected by changes\n\n## Usage\n\n```terminal\nnx affected:libs\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n\n### Examples\n\nPrint the names of all the libs affected by changing the index.ts file:\n\n```terminal\n nx affected:libs --files=libs/mylib/src/index.ts\n```\n\nPrint the names of all the libs affected by the changes between main and HEAD (e.g., PR):\n\n```terminal\n nx affected:libs --base=main --head=HEAD\n```\n\nPrint the names of all the libs affected by the last commit on main:\n\n```terminal\n nx affected:libs --base=main~1 --head=main\n```\n\n## Options\n\n### all\n\nType: `boolean`\n\nAll projects\n\n### base\n\nType: `string`\n\nBase of the current branch (usually main)\n\n### exclude\n\nType: `array`\n\nDefault: `[]`\n\nExclude certain projects from being processed\n\n### files\n\nType: `array`\n\nChange the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas\n\n### head\n\nType: `string`\n\nLatest commit of the current branch (usually HEAD)\n\n### help\n\nType: `boolean`\n\nShow help\n\n### plain\n\nProduces a plain output for affected:apps and affected:libs\n\n### uncommitted\n\nType: `boolean`\n\nUncommitted changes\n\n### untracked\n\nType: `boolean`\n\nUntracked changes\n\n### version\n\nType: `boolean`\n\nShow version number\n" }, { "name": "print-affected", "id": "print-affected", "file": "generated/cli/print-affected", - "content": "---\ntitle: 'print-affected - CLI command'\ndescription: 'Prints information about the projects and targets affected by changes'\n---\n\n# print-affected\n\nPrints information about the projects and targets affected by changes\n\n## Usage\n\n```terminal\nnx print-affected\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n\n### Examples\n\nPrint information about affected projects and the project graph:\n\n```terminal\n nx print-affected\n```\n\nPrint information about the projects affected by the changes between main and HEAD (e.g,. PR):\n\n```terminal\n nx print-affected --base=main --head=HEAD\n```\n\nPrints information about the affected projects and a list of tasks to test them:\n\n```terminal\n nx print-affected --target=test\n```\n\nPrints the projects property from the print-affected output:\n\n```terminal\n nx print-affected --target=build --select=projects\n```\n\nPrints the tasks.target.project property from the print-affected output:\n\n```terminal\n nx print-affected --target=build --select=tasks.target.project\n```\n\n## Options\n\n### all\n\nType: `boolean`\n\nAll projects\n\n### base\n\nType: `string`\n\nBase of the current branch (usually main)\n\n### configuration\n\nType: `string`\n\nThis is the configuration to use when performing tasks on projects\n\n### exclude\n\nType: `array`\n\nDefault: `[]`\n\nExclude certain projects from being processed\n\n### files\n\nType: `array`\n\nChange the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas\n\n### head\n\nType: `string`\n\nLatest commit of the current branch (usually HEAD)\n\n### help\n\nType: `boolean`\n\nShow help\n\n### nx-bail\n\nType: `boolean`\n\nDefault: `false`\n\nStop command execution after the first failed task\n\n### nx-ignore-cycles\n\nType: `boolean`\n\nDefault: `false`\n\nIgnore cycles in the task graph\n\n### runner\n\nType: `string`\n\nThis is the name of the tasks runner configured in nx.json\n\n### select\n\nType: `string`\n\nSelect the subset of the returned json document (e.g., --select=projects)\n\n### skip-nx-cache\n\nType: `boolean`\n\nDefault: `false`\n\nRerun the tasks even when the results are available in the cache\n\n### target\n\nType: `string`\n\nTask to run for affected projects\n\n### type\n\nType: `string`\n\nChoices: [app, lib]\n\nSelect the type of projects to be returned (e.g., --type=app)\n\n### uncommitted\n\nType: `boolean`\n\nUncommitted changes\n\n### untracked\n\nType: `boolean`\n\nUntracked changes\n\n### verbose\n\nType: `boolean`\n\nDefault: `false`\n\nPrints additional information about the commands (e.g., stack traces)\n\n### version\n\nType: `boolean`\n\nShow version number\n" + "content": "---\ntitle: 'print-affected - CLI command'\ndescription: 'Prints information about the projects and targets affected by changes'\n---\n\n# print-affected\n\nPrints information about the projects and targets affected by changes\n\n## Usage\n\n```terminal\nnx print-affected\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n\n### Examples\n\nPrint information about affected projects and the project graph:\n\n```terminal\n nx print-affected\n```\n\nPrint information about the projects affected by the changes between main and HEAD (e.g,. PR):\n\n```terminal\n nx print-affected --base=main --head=HEAD\n```\n\nPrints information about the affected projects and a list of tasks to test them:\n\n```terminal\n nx print-affected --target=test\n```\n\nPrints the projects property from the print-affected output:\n\n```terminal\n nx print-affected --target=build --select=projects\n```\n\nPrints the tasks.target.project property from the print-affected output:\n\n```terminal\n nx print-affected --target=build --select=tasks.target.project\n```\n\n## Options\n\n### all\n\nType: `boolean`\n\nAll projects\n\n### base\n\nType: `string`\n\nBase of the current branch (usually main)\n\n### exclude\n\nType: `array`\n\nDefault: `[]`\n\nExclude certain projects from being processed\n\n### files\n\nType: `array`\n\nChange the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas\n\n### head\n\nType: `string`\n\nLatest commit of the current branch (usually HEAD)\n\n### help\n\nType: `boolean`\n\nShow help\n\n### select\n\nType: `string`\n\nSelect the subset of the returned json document (e.g., --select=projects)\n\n### target\n\nType: `string`\n\nTask to run for affected projects\n\n### type\n\nType: `string`\n\nChoices: [app, lib]\n\nSelect the type of projects to be returned (e.g., --type=app)\n\n### uncommitted\n\nType: `boolean`\n\nUncommitted changes\n\n### untracked\n\nType: `boolean`\n\nUntracked changes\n\n### version\n\nType: `boolean`\n\nShow version number\n" }, { "name": "format:check", "id": "format-check", "tags": ["enforce-project-boundaries"], "file": "generated/cli/format-check", - "content": "---\ntitle: 'format:check - CLI command'\ndescription: 'Check for un-formatted files'\n---\n\n# format:check\n\nCheck for un-formatted files\n\n## Usage\n\n```terminal\nnx format:check\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n\n## Options\n\n### all\n\nType: `boolean`\n\nAll projects\n\n### base\n\nType: `string`\n\nBase of the current branch (usually main)\n\n### configuration\n\nType: `string`\n\nThis is the configuration to use when performing tasks on projects\n\n### exclude\n\nType: `array`\n\nDefault: `[]`\n\nExclude certain projects from being processed\n\n### files\n\nType: `array`\n\nChange the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas\n\n### head\n\nType: `string`\n\nLatest commit of the current branch (usually HEAD)\n\n### help\n\nType: `boolean`\n\nShow help\n\n### libs-and-apps\n\nType: `boolean`\n\nFormat only libraries and applications files.\n\n### nx-bail\n\nType: `boolean`\n\nDefault: `false`\n\nStop command execution after the first failed task\n\n### nx-ignore-cycles\n\nType: `boolean`\n\nDefault: `false`\n\nIgnore cycles in the task graph\n\n### projects\n\nType: `array`\n\nProjects to format (comma delimited)\n\n### runner\n\nType: `string`\n\nThis is the name of the tasks runner configured in nx.json\n\n### skip-nx-cache\n\nType: `boolean`\n\nDefault: `false`\n\nRerun the tasks even when the results are available in the cache\n\n### uncommitted\n\nType: `boolean`\n\nUncommitted changes\n\n### untracked\n\nType: `boolean`\n\nUntracked changes\n\n### verbose\n\nType: `boolean`\n\nDefault: `false`\n\nPrints additional information about the commands (e.g., stack traces)\n\n### version\n\nType: `boolean`\n\nShow version number\n" + "content": "---\ntitle: 'format:check - CLI command'\ndescription: 'Check for un-formatted files'\n---\n\n# format:check\n\nCheck for un-formatted files\n\n## Usage\n\n```terminal\nnx format:check\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n\n## Options\n\n### all\n\nType: `boolean`\n\nAll projects\n\n### base\n\nType: `string`\n\nBase of the current branch (usually main)\n\n### exclude\n\nType: `array`\n\nDefault: `[]`\n\nExclude certain projects from being processed\n\n### files\n\nType: `array`\n\nChange the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas\n\n### head\n\nType: `string`\n\nLatest commit of the current branch (usually HEAD)\n\n### help\n\nType: `boolean`\n\nShow help\n\n### libs-and-apps\n\nType: `boolean`\n\nFormat only libraries and applications files.\n\n### projects\n\nType: `array`\n\nProjects to format (comma delimited)\n\n### uncommitted\n\nType: `boolean`\n\nUncommitted changes\n\n### untracked\n\nType: `boolean`\n\nUntracked changes\n\n### version\n\nType: `boolean`\n\nShow version number\n" }, { "name": "format:write", "id": "format-write", "tags": ["enforce-project-boundaries"], "file": "generated/cli/format-write", - "content": "---\ntitle: 'format:write - CLI command'\ndescription: 'Overwrite un-formatted files'\n---\n\n# format:write\n\nOverwrite un-formatted files\n\n## Usage\n\n```terminal\nnx format:write\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n\n## Options\n\n### all\n\nType: `boolean`\n\nAll projects\n\n### base\n\nType: `string`\n\nBase of the current branch (usually main)\n\n### configuration\n\nType: `string`\n\nThis is the configuration to use when performing tasks on projects\n\n### exclude\n\nType: `array`\n\nDefault: `[]`\n\nExclude certain projects from being processed\n\n### files\n\nType: `array`\n\nChange the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas\n\n### head\n\nType: `string`\n\nLatest commit of the current branch (usually HEAD)\n\n### help\n\nType: `boolean`\n\nShow help\n\n### libs-and-apps\n\nType: `boolean`\n\nFormat only libraries and applications files.\n\n### nx-bail\n\nType: `boolean`\n\nDefault: `false`\n\nStop command execution after the first failed task\n\n### nx-ignore-cycles\n\nType: `boolean`\n\nDefault: `false`\n\nIgnore cycles in the task graph\n\n### projects\n\nType: `array`\n\nProjects to format (comma delimited)\n\n### runner\n\nType: `string`\n\nThis is the name of the tasks runner configured in nx.json\n\n### skip-nx-cache\n\nType: `boolean`\n\nDefault: `false`\n\nRerun the tasks even when the results are available in the cache\n\n### uncommitted\n\nType: `boolean`\n\nUncommitted changes\n\n### untracked\n\nType: `boolean`\n\nUntracked changes\n\n### verbose\n\nType: `boolean`\n\nDefault: `false`\n\nPrints additional information about the commands (e.g., stack traces)\n\n### version\n\nType: `boolean`\n\nShow version number\n" + "content": "---\ntitle: 'format:write - CLI command'\ndescription: 'Overwrite un-formatted files'\n---\n\n# format:write\n\nOverwrite un-formatted files\n\n## Usage\n\n```terminal\nnx format:write\n```\n\nInstall `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.\n\n## Options\n\n### all\n\nType: `boolean`\n\nAll projects\n\n### base\n\nType: `string`\n\nBase of the current branch (usually main)\n\n### exclude\n\nType: `array`\n\nDefault: `[]`\n\nExclude certain projects from being processed\n\n### files\n\nType: `array`\n\nChange the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas\n\n### head\n\nType: `string`\n\nLatest commit of the current branch (usually HEAD)\n\n### help\n\nType: `boolean`\n\nShow help\n\n### libs-and-apps\n\nType: `boolean`\n\nFormat only libraries and applications files.\n\n### projects\n\nType: `array`\n\nProjects to format (comma delimited)\n\n### uncommitted\n\nType: `boolean`\n\nUncommitted changes\n\n### untracked\n\nType: `boolean`\n\nUntracked changes\n\n### version\n\nType: `boolean`\n\nShow version number\n" }, { "name": "migrate", diff --git a/packages/nx/src/command-line/nx-commands.ts b/packages/nx/src/command-line/nx-commands.ts index 04c88d457fb6c..4410de0e8acfc 100644 --- a/packages/nx/src/command-line/nx-commands.ts +++ b/packages/nx/src/command-line/nx-commands.ts @@ -58,9 +58,7 @@ export const commandsObject = yargs describe: 'Run target for multiple listed projects', builder: (yargs) => linkToNxDevAndExamples( - withRunManyOptions( - withOutputStyleOption(withParallelOption(withTargetOption(yargs))) - ), + withRunManyOptions(withOutputStyleOption(withTargetOption(yargs))), 'run-many' ), handler: async (args) => @@ -72,7 +70,7 @@ export const commandsObject = yargs builder: (yargs) => linkToNxDevAndExamples( withAffectedOptions( - withOutputStyleOption(withParallelOption(withTargetOption(yargs))) + withRunOptions(withOutputStyleOption(withTargetOption(yargs))) ), 'affected' ), @@ -84,7 +82,7 @@ export const commandsObject = yargs describe: false, builder: (yargs) => linkToNxDevAndExamples( - withAffectedOptions(withOutputStyleOption(withParallelOption(yargs))), + withAffectedOptions(withRunOptions(withOutputStyleOption(yargs))), 'affected' ), handler: async (args) => @@ -98,7 +96,7 @@ export const commandsObject = yargs describe: false, builder: (yargs) => linkToNxDevAndExamples( - withAffectedOptions(withOutputStyleOption(withParallelOption(yargs))), + withAffectedOptions(withRunOptions(withOutputStyleOption(yargs))), 'affected' ), handler: async (args) => @@ -112,7 +110,7 @@ export const commandsObject = yargs describe: false, builder: (yargs) => linkToNxDevAndExamples( - withAffectedOptions(withOutputStyleOption(withParallelOption(yargs))), + withAffectedOptions(withRunOptions(withOutputStyleOption(yargs))), 'affected' ), handler: async (args) => @@ -126,7 +124,7 @@ export const commandsObject = yargs describe: false, builder: (yargs) => linkToNxDevAndExamples( - withAffectedOptions(withOutputStyleOption(withParallelOption(yargs))), + withAffectedOptions(withRunOptions(withOutputStyleOption(yargs))), 'affected' ), handler: async (args) => @@ -405,6 +403,55 @@ function withPlainOption(yargs: yargs.Argv): yargs.Argv { }); } +function withRunOptions(yargs: yargs.Argv): yargs.Argv { + return yargs + .option('parallel', { + describe: 'Max number of parallel processes [default is 3]', + type: 'string', + }) + .option('maxParallel', { + type: 'number', + hidden: true, + }) + .options('runner', { + describe: 'This is the name of the tasks runner configured in nx.json', + type: 'string', + }) + .options('configuration', { + describe: + 'This is the configuration to use when performing tasks on projects', + type: 'string', + }) + .option('prod', { + describe: 'Use the production configuration', + type: 'boolean', + default: false, + hidden: true, + }) + .option('verbose', { + type: 'boolean', + describe: + 'Prints additional information about the commands (e.g., stack traces)', + default: false, + }) + .option('nx-bail', { + describe: 'Stop command execution after the first failed task', + type: 'boolean', + default: false, + }) + .option('nx-ignore-cycles', { + describe: 'Ignore cycles in the task graph', + type: 'boolean', + default: false, + }) + .options('skip-nx-cache', { + describe: + 'Rerun the tasks even when the results are available in the cache', + type: 'boolean', + default: false, + }); +} + function withAffectedOptions(yargs: yargs.Argv): yargs.Argv { return yargs .parserConfiguration({ @@ -460,43 +507,6 @@ function withAffectedOptions(yargs: yargs.Argv): yargs.Argv { coerce: parseCSV, default: [], }) - .options('runner', { - describe: 'This is the name of the tasks runner configured in nx.json', - type: 'string', - }) - .options('skip-nx-cache', { - describe: - 'Rerun the tasks even when the results are available in the cache', - type: 'boolean', - default: false, - }) - .options('configuration', { - describe: - 'This is the configuration to use when performing tasks on projects', - type: 'string', - }) - .option('prod', { - describe: 'Use the production configuration', - type: 'boolean', - default: false, - hidden: true, - }) - .option('verbose', { - type: 'boolean', - describe: - 'Prints additional information about the commands (e.g., stack traces)', - default: false, - }) - .option('nx-bail', { - describe: 'Stop command execution after the first failed task', - type: 'boolean', - default: false, - }) - .option('nx-ignore-cycles', { - describe: 'Ignore cycles in the task graph', - type: 'boolean', - default: false, - }) .conflicts({ files: ['uncommitted', 'untracked', 'base', 'head', 'all'], untracked: ['uncommitted', 'files', 'base', 'head', 'all'], @@ -523,7 +533,7 @@ function withAffectedOptions(yargs: yargs.Argv): yargs.Argv { } function withRunManyOptions(yargs: yargs.Argv): yargs.Argv { - return yargs + return withRunOptions(yargs) .parserConfiguration({ 'strip-dashed': true, 'unknown-options-as-args': true, @@ -538,48 +548,11 @@ function withRunManyOptions(yargs: yargs.Argv): yargs.Argv { type: 'boolean', default: true, }) - .option('prod', { - describe: 'Use the production configuration', - type: 'boolean', - default: false, - hidden: true, - }) - .options('runner', { - describe: 'Override the tasks runner in `nx.json`', - type: 'string', - }) - .options('skip-nx-cache', { - describe: - 'Rerun the tasks even when the results are available in the cache', - type: 'boolean', - default: false, - }) - .options('configuration', { - describe: - 'This is the configuration to use when performing tasks on projects', - type: 'string', - }) .option('exclude', { describe: 'Exclude certain projects from being processed', type: 'array', coerce: parseCSV, default: [], - }) - .option('verbose', { - type: 'boolean', - describe: - 'Prints additional information about the commands (e.g., stack traces)', - default: false, - }) - .option('nx-bail', { - describe: 'Stop command execution after the first failed task', - type: 'boolean', - default: false, - }) - .option('nx-ignore-cycles', { - describe: 'Ignore cycles in the task graph', - type: 'boolean', - default: false, }); } @@ -635,18 +608,14 @@ function withOverrides(args: any): any { return args; } -function withParallelOption(yargs: yargs.Argv): yargs.Argv { - return yargs.option('parallel', { - describe: 'Max number of parallel processes [default is 3]', - type: 'string', - }); -} - -function withOutputStyleOption(yargs: yargs.Argv): yargs.Argv { +function withOutputStyleOption( + yargs: yargs.Argv, + choices = ['dynamic', 'static', 'stream', 'stream-without-prefixes'] +): yargs.Argv { return yargs.option('output-style', { describe: 'Defines how Nx emits outputs tasks logs', type: 'string', - choices: ['dynamic', 'static', 'stream', 'stream-without-prefixes'], + choices, }); } @@ -714,52 +683,24 @@ function withRunOneOptions(yargs: yargs.Argv) { const executorShouldShowHelp = !( process.argv[2] === 'run' && process.argv[3] === '--help' ); - const res = withOutputStyleOption(yargs) + + const res = withRunOptions( + withOutputStyleOption(yargs, [ + 'dynamic', + 'static', + 'stream', + 'stream-without-prefixes', + 'compact', + ]) + ) .parserConfiguration({ 'strip-dashed': true, 'unknown-options-as-args': true, 'populate--': true, }) - .option('prod', { - describe: 'Use the production configuration', - type: 'boolean', - default: false, - }) - .option('configuration', { - describe: 'Target configuration', - alias: 'c', - type: 'string', - }) .option('project', { describe: 'Target project', type: 'string', - }) - .option('output-style', { - describe: 'Defines how Nx emits outputs tasks logs', - type: 'string', - choices: [ - 'dynamic', - 'static', - 'stream', - 'stream-without-prefixes', - 'compact', - ], - }) - .option('nx-bail', { - describe: 'Stop command execution after the first failed task', - type: 'boolean', - default: false, - }) - .option('nx-ignore-cycles', { - describe: 'Ignore cycles in the task graph', - type: 'boolean', - default: false, - }) - .option('verbose', { - type: 'boolean', - describe: - 'Prints additional information about the commands (e.g., stack traces)', - default: false, }); if (executorShouldShowHelp) {