fix(misc): adjust deprecation messages to v20 (#23223)

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

## Breaking Changes:


BREAKING CHANGE: `nx print-affected` was deprecated in 16.4.0 and has
been removed.
BREAKING CHANGE: `nx affected:graph` was deprecated in 16.4.0 and has
been removed.
BREAKING CHANGE: The `criticalPath` and `affectedProjects` properties of
the JSON created by `nx graph --file graph.json` was deprecated in
16.2.0 and has been removed.

## Current Behavior
<!-- This is the behavior we have today -->

Some deprecation messages still reference v19.

`nx print-affected` was deprecated in 16.4.0 to be removed in Nx 19 but
was not removed.
`nx affected:graph` was deprecated in 16.4.0 to be removed in Nx 19 but
was not removed.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

Deprecation messages reference v20 now.

`nx print-affected` is removed.
`nx affected:graph` is removed.

There are redirects to a `deprecated` page describing those commands for
Nx users using Nx <19

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
This commit is contained in:
Jason Jean 2024-05-08 21:54:41 -04:00 committed by GitHub
parent dc20a3b462
commit 8f705e31e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
159 changed files with 372 additions and 1022 deletions

View File

@ -4,13 +4,13 @@
**`Deprecated`** **`Deprecated`**
Use [NxPluginV2](../../devkit/documents/NxPluginV2) instead. This will be removed in Nx 19 Use [NxPluginV2](../../devkit/documents/NxPluginV2) instead. This will be removed in Nx 20
#### Type declaration #### Type declaration
| Name | Type | Description | | Name | Type | Description |
| :------------------------ | :------------------------------------------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | :------------------------ | :------------------------------------------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name` | `string` | - | | `name` | `string` | - |
| `processProjectGraph?` | `ProjectGraphProcessor` | **`Deprecated`** Use [CreateNodes](../../devkit/documents/CreateNodes) and [CreateDependencies](../../devkit/documents/CreateDependencies) instead. This will be removed in Nx 19 | | `processProjectGraph?` | `ProjectGraphProcessor` | **`Deprecated`** Use [CreateNodes](../../devkit/documents/CreateNodes) and [CreateDependencies](../../devkit/documents/CreateDependencies) instead. This will be removed in Nx 20 |
| `projectFilePatterns?` | `string`[] | A glob pattern to search for non-standard project files. @example: ["*.csproj", "pom.xml"] **`Deprecated`** Use [CreateNodes](../../devkit/documents/CreateNodes) instead. This will be removed in Nx 19 | | `projectFilePatterns?` | `string`[] | A glob pattern to search for non-standard project files. @example: ["*.csproj", "pom.xml"] **`Deprecated`** Use [CreateNodes](../../devkit/documents/CreateNodes) instead. This will be removed in Nx 20 |
| `registerProjectTargets?` | [`ProjectTargetConfigurator`](../../devkit/documents/ProjectTargetConfigurator) | **`Deprecated`** Add targets to the projects inside of [CreateNodes](../../devkit/documents/CreateNodes) instead. This will be removed in Nx 19 | | `registerProjectTargets?` | [`ProjectTargetConfigurator`](../../devkit/documents/ProjectTargetConfigurator) | **`Deprecated`** Add targets to the projects inside of [CreateNodes](../../devkit/documents/CreateNodes) instead. This will be removed in Nx 20 |

View File

@ -4,7 +4,7 @@ A class which builds up a project graph
**`Deprecated`** **`Deprecated`**
The ProjectGraphProcessor has been deprecated. Use a [CreateNodes](../../devkit/documents/CreateNodes) and/or a [CreateDependencies](../../devkit/documents/CreateDependencies) instead. This will be removed in Nx 19. The ProjectGraphProcessor has been deprecated. Use a [CreateNodes](../../devkit/documents/CreateNodes) and/or a [CreateDependencies](../../devkit/documents/CreateDependencies) instead. This will be removed in Nx 20.
## Table of contents ## Table of contents

View File

@ -4,7 +4,7 @@ Additional information to be used to process a project graph
**`Deprecated`** **`Deprecated`**
The ProjectGraphProcessor is deprecated. This will be removed in Nx 19. The ProjectGraphProcessor is deprecated. This will be removed in Nx 20.
## Table of contents ## Table of contents

View File

@ -4,7 +4,7 @@
**`Deprecated`** **`Deprecated`**
Add targets to the projects in a [CreateNodes](../../devkit/documents/CreateNodes) function instead. This will be removed in Nx 19 Add targets to the projects in a [CreateNodes](../../devkit/documents/CreateNodes) function instead. This will be removed in Nx 20
#### Type declaration #### Type declaration

View File

@ -15,7 +15,7 @@
**`Deprecated`** **`Deprecated`**
Pass the target and overrides instead. This will be removed in v19. Pass the target and overrides instead. This will be removed in v20.
**getOutputsForTargetAndConfiguration**(`target`, `overrides`, `node`): `string`[] **getOutputsForTargetAndConfiguration**(`target`, `overrides`, `node`): `string`[]

View File

@ -4603,6 +4603,22 @@
"id": "deprecated", "id": "deprecated",
"isExternal": false, "isExternal": false,
"children": [ "children": [
{
"name": "affected:graph",
"path": "/deprecated/affected-graph",
"id": "affected-graph",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "print-affected",
"path": "/deprecated/print-affected",
"id": "print-affected",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{ {
"name": "workspace.json", "name": "workspace.json",
"path": "/deprecated/workspace-json", "path": "/deprecated/workspace-json",
@ -4686,6 +4702,22 @@
], ],
"disableCollapsible": false "disableCollapsible": false
}, },
{
"name": "affected:graph",
"path": "/deprecated/affected-graph",
"id": "affected-graph",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "print-affected",
"path": "/deprecated/print-affected",
"id": "print-affected",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{ {
"name": "workspace.json", "name": "workspace.json",
"path": "/deprecated/workspace-json", "path": "/deprecated/workspace-json",
@ -8378,22 +8410,6 @@
"children": [], "children": [],
"disableCollapsible": false "disableCollapsible": false
}, },
{
"name": "affected:graph",
"path": "/nx-api/nx/documents/affected-dep-graph",
"id": "affected-dep-graph",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "print-affected",
"path": "/nx-api/nx/documents/print-affected",
"id": "print-affected",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{ {
"name": "format:check", "name": "format:check",
"path": "/nx-api/nx/documents/format-check", "path": "/nx-api/nx/documents/format-check",

View File

@ -1778,28 +1778,6 @@
"tags": ["run-tasks"], "tags": ["run-tasks"],
"originalFilePath": "generated/cli/affected" "originalFilePath": "generated/cli/affected"
}, },
"/nx-api/nx/documents/affected-dep-graph": {
"id": "affected-dep-graph",
"name": "affected:graph",
"description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",
"file": "generated/packages/nx/documents/affected-dep-graph",
"itemList": [],
"isExternal": false,
"path": "/nx-api/nx/documents/affected-dep-graph",
"tags": [],
"originalFilePath": "generated/cli/affected-graph"
},
"/nx-api/nx/documents/print-affected": {
"id": "print-affected",
"name": "print-affected",
"description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",
"file": "generated/packages/nx/documents/print-affected",
"itemList": [],
"isExternal": false,
"path": "/nx-api/nx/documents/print-affected",
"tags": [],
"originalFilePath": "generated/cli/print-affected"
},
"/nx-api/nx/documents/format-check": { "/nx-api/nx/documents/format-check": {
"id": "format-check", "id": "format-check",
"name": "format:check", "name": "format:check",

View File

@ -6302,6 +6302,28 @@
"mediaImage": "", "mediaImage": "",
"file": "", "file": "",
"itemList": [ "itemList": [
{
"id": "affected-graph",
"name": "affected:graph",
"description": "",
"mediaImage": "",
"file": "shared/deprecated/affected-graph",
"itemList": [],
"isExternal": false,
"path": "/deprecated/affected-graph",
"tags": []
},
{
"id": "print-affected",
"name": "print-affected",
"description": "",
"mediaImage": "",
"file": "shared/deprecated/print-affected",
"itemList": [],
"isExternal": false,
"path": "/deprecated/print-affected",
"tags": []
},
{ {
"id": "workspace-json", "id": "workspace-json",
"name": "workspace.json", "name": "workspace.json",
@ -6417,6 +6439,28 @@
"path": "/deprecated", "path": "/deprecated",
"tags": [] "tags": []
}, },
"/deprecated/affected-graph": {
"id": "affected-graph",
"name": "affected:graph",
"description": "",
"mediaImage": "",
"file": "shared/deprecated/affected-graph",
"itemList": [],
"isExternal": false,
"path": "/deprecated/affected-graph",
"tags": []
},
"/deprecated/print-affected": {
"id": "print-affected",
"name": "print-affected",
"description": "",
"mediaImage": "",
"file": "shared/deprecated/print-affected",
"itemList": [],
"isExternal": false,
"path": "/deprecated/print-affected",
"tags": []
},
"/deprecated/workspace-json": { "/deprecated/workspace-json": {
"id": "workspace-json", "id": "workspace-json",
"name": "workspace.json", "name": "workspace.json",

View File

@ -1757,28 +1757,6 @@
"tags": ["run-tasks"], "tags": ["run-tasks"],
"originalFilePath": "generated/cli/affected" "originalFilePath": "generated/cli/affected"
}, },
{
"id": "affected-dep-graph",
"name": "affected:graph",
"description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",
"file": "generated/packages/nx/documents/affected-dep-graph",
"itemList": [],
"isExternal": false,
"path": "nx/documents/affected-dep-graph",
"tags": [],
"originalFilePath": "generated/cli/affected-graph"
},
{
"id": "print-affected",
"name": "print-affected",
"description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",
"file": "generated/packages/nx/documents/print-affected",
"itemList": [],
"isExternal": false,
"path": "nx/documents/print-affected",
"tags": [],
"originalFilePath": "generated/cli/print-affected"
},
{ {
"id": "format-check", "id": "format-check",
"name": "format:check", "name": "format:check",

View File

@ -17,7 +17,7 @@
"type": "string", "type": "string",
"description": "A browser builder target to serve in the format of `project:target[:configuration]`. Ignored if `buildTarget` is set.", "description": "A browser builder target to serve in the format of `project:target[:configuration]`. Ignored if `buildTarget` is set.",
"pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$", "pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$",
"x-deprecated": "Use 'buildTarget' instead. It will be removed in Nx v19." "x-deprecated": "Use 'buildTarget' instead. It will be removed in Nx v20."
}, },
"buildTarget": { "buildTarget": {
"type": "string", "type": "string",

View File

@ -15,7 +15,7 @@
"type": "string", "type": "string",
"description": "A browser builder target to serve in the format of `project:target[:configuration]`.", "description": "A browser builder target to serve in the format of `project:target[:configuration]`.",
"pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$", "pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$",
"x-deprecated": "Use 'buildTarget' instead. It will be removed in Nx v19." "x-deprecated": "Use 'buildTarget' instead. It will be removed in Nx v20."
}, },
"buildTarget": { "buildTarget": {
"type": "string", "type": "string",

View File

@ -32,7 +32,7 @@
"description": "The name of the project.", "description": "The name of the project.",
"$default": { "$source": "projectName" }, "$default": { "$source": "projectName" },
"x-dropdown": "projects", "x-dropdown": "projects",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"prefix": { "prefix": {
"type": "string", "type": "string",
@ -96,7 +96,7 @@
"type": "boolean", "type": "boolean",
"description": "Create the new files at the top level of the current project.", "description": "Create the new files at the top level of the current project.",
"default": false, "default": false,
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20."
}, },
"skipImport": { "skipImport": {
"type": "boolean", "type": "boolean",

View File

@ -32,7 +32,7 @@
"description": "The name of the project.", "description": "The name of the project.",
"$default": { "$source": "projectName" }, "$default": { "$source": "projectName" },
"x-dropdown": "projects", "x-dropdown": "projects",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"prefix": { "prefix": {
"type": "string", "type": "string",
@ -67,7 +67,7 @@
"type": "boolean", "type": "boolean",
"description": "When true (the default), creates the new files at the top level of the current project.", "description": "When true (the default), creates the new files at the top level of the current project.",
"default": true, "default": true,
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20."
}, },
"module": { "module": {
"type": "string", "type": "string",

View File

@ -32,13 +32,13 @@
"description": "The name of the project.", "description": "The name of the project.",
"$default": { "$source": "projectName" }, "$default": { "$source": "projectName" },
"x-dropdown": "projects", "x-dropdown": "projects",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"flat": { "flat": {
"type": "boolean", "type": "boolean",
"default": true, "default": true,
"description": "When true (the default) creates files at the top level of the project.", "description": "When true (the default) creates files at the top level of the project.",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20."
}, },
"skipTests": { "skipTests": {
"type": "boolean", "type": "boolean",

View File

@ -39,7 +39,7 @@
"description": "The name of the project.", "description": "The name of the project.",
"$default": { "$source": "projectName" }, "$default": { "$source": "projectName" },
"x-dropdown": "projects", "x-dropdown": "projects",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"skipTests": { "skipTests": {
"type": "boolean", "type": "boolean",
@ -56,7 +56,7 @@
"type": "boolean", "type": "boolean",
"description": "Create the new files at the top level of the current project.", "description": "Create the new files at the top level of the current project.",
"default": true, "default": true,
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20."
}, },
"selector": { "selector": {
"type": "string", "type": "string",

View File

@ -39,7 +39,7 @@
"description": "The name of the project.", "description": "The name of the project.",
"$default": { "$source": "projectName" }, "$default": { "$source": "projectName" },
"x-dropdown": "projects", "x-dropdown": "projects",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"skipTests": { "skipTests": {
"type": "boolean", "type": "boolean",
@ -56,7 +56,7 @@
"type": "boolean", "type": "boolean",
"description": "Create the new files at the top level of the current project.", "description": "Create the new files at the top level of the current project.",
"default": true, "default": true,
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20."
}, },
"export": { "export": {
"type": "boolean", "type": "boolean",

View File

@ -38,7 +38,7 @@
"description": "The name of the project.", "description": "The name of the project.",
"$default": { "$source": "projectName" }, "$default": { "$source": "projectName" },
"x-dropdown": "projects", "x-dropdown": "projects",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"displayBlock": { "displayBlock": {
"description": "Specifies if the style will contain `:host { display: block; }`.", "description": "Specifies if the style will contain `:host { display: block; }`.",
@ -92,7 +92,7 @@
"type": "boolean", "type": "boolean",
"description": "Create the new files at the top level of the current project.", "description": "Create the new files at the top level of the current project.",
"default": false, "default": false,
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20."
}, },
"selector": { "selector": {
"type": "string", "type": "string",

View File

@ -29,7 +29,7 @@
"configureCypress": { "configureCypress": {
"type": "boolean", "type": "boolean",
"description": "Specifies whether to configure Cypress or not.", "description": "Specifies whether to configure Cypress or not.",
"x-deprecated": "Use interactionTests instead. This option will be removed in v19." "x-deprecated": "Use interactionTests instead. This option will be removed in v20."
}, },
"generateStories": { "generateStories": {
"type": "boolean", "type": "boolean",
@ -41,7 +41,7 @@
"generateCypressSpecs": { "generateCypressSpecs": {
"type": "boolean", "type": "boolean",
"description": "Specifies whether to automatically generate test files in the generated Cypress e2e app.", "description": "Specifies whether to automatically generate test files in the generated Cypress e2e app.",
"x-deprecated": "Use interactionTests instead. This option will be removed in v19." "x-deprecated": "Use interactionTests instead. This option will be removed in v20."
}, },
"configureStaticServe": { "configureStaticServe": {
"type": "boolean", "type": "boolean",
@ -53,7 +53,7 @@
"cypressDirectory": { "cypressDirectory": {
"type": "string", "type": "string",
"description": "A directory where the Cypress project will be placed. Placed at the root by default.", "description": "A directory where the Cypress project will be placed. Placed at the root by default.",
"x-deprecated": "Use interactionTests instead. This option will be removed in v19." "x-deprecated": "Use interactionTests instead. This option will be removed in v20."
}, },
"linter": { "linter": {
"description": "The tool to use for running lint checks.", "description": "The tool to use for running lint checks.",

View File

@ -23,7 +23,7 @@
"description": "The name of the project.", "description": "The name of the project.",
"alias": "p", "alias": "p",
"$default": { "$source": "projectName" }, "$default": { "$source": "projectName" },
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"name": { "name": {
"type": "string", "type": "string",

View File

@ -25,7 +25,7 @@
"type": "string", "type": "string",
"$default": { "$source": "projectName" }, "$default": { "$source": "projectName" },
"alias": "p", "alias": "p",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"directory": { "directory": {
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.", "description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
@ -46,7 +46,7 @@
}, },
"flat": { "flat": {
"description": "Flag to indicate if a directory is created.", "description": "Flag to indicate if a directory is created.",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19.", "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
"type": "boolean", "type": "boolean",
"default": true "default": true
}, },

View File

@ -20,7 +20,7 @@
"type": "string", "type": "string",
"$default": { "$source": "projectName" }, "$default": { "$source": "projectName" },
"alias": "p", "alias": "p",
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. it will be removed in nx v19." "x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"nameAndDirectoryFormat": { "nameAndDirectoryFormat": {
"description": "Whether to generate the component in the directory as provided, relative to the current working directory and ignoring the project (`as-provided`) or generate it using the project and directory relative to the workspace root (`derived`).", "description": "Whether to generate the component in the directory as provided, relative to the current working directory and ignoring the project (`as-provided`) or generate it using the project and directory relative to the workspace root (`derived`).",
@ -46,7 +46,7 @@
}, },
"flat": { "flat": {
"description": "Flag to indicate if a directory is created.", "description": "Flag to indicate if a directory is created.",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19.", "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
"type": "boolean", "type": "boolean",
"default": false "default": false
}, },

View File

@ -25,7 +25,7 @@
"type": "string", "type": "string",
"$default": { "$source": "projectName" }, "$default": { "$source": "projectName" },
"alias": "p", "alias": "p",
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. it will be removed in nx v19." "x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"directory": { "directory": {
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.", "description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
@ -40,7 +40,7 @@
}, },
"flat": { "flat": {
"description": "Flag to indicate if a directory is created.", "description": "Flag to indicate if a directory is created.",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19.", "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
"type": "boolean", "type": "boolean",
"default": true "default": true
}, },

View File

@ -25,7 +25,7 @@
"type": "string", "type": "string",
"$default": { "$source": "projectName" }, "$default": { "$source": "projectName" },
"alias": "p", "alias": "p",
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. it will be removed in nx v19." "x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"directory": { "directory": {
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.", "description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
@ -46,7 +46,7 @@
}, },
"flat": { "flat": {
"description": "Flag to indicate if a directory is created.", "description": "Flag to indicate if a directory is created.",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19.", "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
"type": "boolean", "type": "boolean",
"default": true "default": true
}, },

View File

@ -25,7 +25,7 @@
"type": "string", "type": "string",
"$default": { "$source": "projectName" }, "$default": { "$source": "projectName" },
"alias": "p", "alias": "p",
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. it will be removed in nx v19." "x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"directory": { "directory": {
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.", "description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
@ -46,7 +46,7 @@
}, },
"flat": { "flat": {
"description": "Flag to indicate if a directory is created.", "description": "Flag to indicate if a directory is created.",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19.", "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
"type": "boolean", "type": "boolean",
"default": true "default": true
}, },

View File

@ -25,7 +25,7 @@
"type": "string", "type": "string",
"$default": { "$source": "projectName" }, "$default": { "$source": "projectName" },
"alias": "p", "alias": "p",
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. it will be removed in nx v19." "x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"directory": { "directory": {
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.", "description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
@ -46,7 +46,7 @@
}, },
"flat": { "flat": {
"description": "Flag to indicate if a directory is created.", "description": "Flag to indicate if a directory is created.",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19.", "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
"type": "boolean", "type": "boolean",
"default": true "default": true
}, },

View File

@ -25,7 +25,7 @@
"type": "string", "type": "string",
"$default": { "$source": "projectName" }, "$default": { "$source": "projectName" },
"alias": "p", "alias": "p",
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. it will be removed in nx v19." "x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"directory": { "directory": {
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.", "description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
@ -46,7 +46,7 @@
}, },
"flat": { "flat": {
"description": "Flag to indicate if a directory is created.", "description": "Flag to indicate if a directory is created.",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19.", "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
"type": "boolean", "type": "boolean",
"default": true "default": true
}, },

View File

@ -25,7 +25,7 @@
"type": "string", "type": "string",
"$default": { "$source": "projectName" }, "$default": { "$source": "projectName" },
"alias": "p", "alias": "p",
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. it will be removed in nx v19." "x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"directory": { "directory": {
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.", "description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
@ -40,7 +40,7 @@
}, },
"flat": { "flat": {
"description": "Flag to indicate if a directory is created.", "description": "Flag to indicate if a directory is created.",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19.", "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
"type": "boolean", "type": "boolean",
"default": true "default": true
} }

View File

@ -25,7 +25,7 @@
"type": "string", "type": "string",
"$default": { "$source": "projectName" }, "$default": { "$source": "projectName" },
"alias": "p", "alias": "p",
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. it will be removed in nx v19." "x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"directory": { "directory": {
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.", "description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
@ -46,7 +46,7 @@
}, },
"flat": { "flat": {
"description": "Flag to indicate if a directory is created.", "description": "Flag to indicate if a directory is created.",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19.", "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
"type": "boolean", "type": "boolean",
"default": true "default": true
}, },

View File

@ -25,7 +25,7 @@
"type": "string", "type": "string",
"$default": { "$source": "projectName" }, "$default": { "$source": "projectName" },
"alias": "p", "alias": "p",
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. it will be removed in nx v19." "x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"directory": { "directory": {
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.", "description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
@ -40,7 +40,7 @@
}, },
"flat": { "flat": {
"description": "Flag to indicate if a directory is created.", "description": "Flag to indicate if a directory is created.",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19.", "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
"type": "boolean", "type": "boolean",
"default": false "default": false
}, },

View File

@ -25,7 +25,7 @@
"type": "string", "type": "string",
"$default": { "$source": "projectName" }, "$default": { "$source": "projectName" },
"alias": "p", "alias": "p",
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. it will be removed in nx v19." "x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"directory": { "directory": {
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.", "description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
@ -46,7 +46,7 @@
}, },
"flat": { "flat": {
"description": "Flag to indicate if a directory is created.", "description": "Flag to indicate if a directory is created.",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19.", "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
"type": "boolean", "type": "boolean",
"default": true "default": true
}, },

View File

@ -25,7 +25,7 @@
"type": "string", "type": "string",
"$default": { "$source": "projectName" }, "$default": { "$source": "projectName" },
"alias": "p", "alias": "p",
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. it will be removed in nx v19." "x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"directory": { "directory": {
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.", "description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
@ -46,7 +46,7 @@
}, },
"flat": { "flat": {
"description": "Flag to indicate if a directory is created.", "description": "Flag to indicate if a directory is created.",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19.", "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
"type": "boolean", "type": "boolean",
"default": true "default": true
}, },

View File

@ -20,7 +20,7 @@
"type": "string", "type": "string",
"$default": { "$source": "projectName" }, "$default": { "$source": "projectName" },
"alias": "p", "alias": "p",
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. it will be removed in nx v19." "x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"directory": { "directory": {
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.", "description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
@ -41,7 +41,7 @@
}, },
"flat": { "flat": {
"description": "Flag to indicate if a directory is created.", "description": "Flag to indicate if a directory is created.",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19.", "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
"type": "boolean", "type": "boolean",
"default": false "default": false
}, },

View File

@ -20,7 +20,7 @@
"type": "string", "type": "string",
"$default": { "$source": "projectName" }, "$default": { "$source": "projectName" },
"alias": "p", "alias": "p",
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. it will be removed in nx v19." "x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"directory": { "directory": {
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.", "description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
@ -41,7 +41,7 @@
}, },
"flat": { "flat": {
"description": "Flag to indicate if a directory is created.", "description": "Flag to indicate if a directory is created.",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19.", "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
"type": "boolean", "type": "boolean",
"default": false "default": false
}, },

View File

@ -25,7 +25,7 @@
"type": "string", "type": "string",
"$default": { "$source": "projectName" }, "$default": { "$source": "projectName" },
"alias": "p", "alias": "p",
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. it will be removed in nx v19." "x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"directory": { "directory": {
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.", "description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
@ -46,7 +46,7 @@
}, },
"flat": { "flat": {
"description": "Flag to indicate if a directory is created.", "description": "Flag to indicate if a directory is created.",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19.", "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
"type": "boolean", "type": "boolean",
"default": false "default": false
}, },

View File

@ -14,7 +14,7 @@
"description": "The name of the project.", "description": "The name of the project.",
"alias": "p", "alias": "p",
"$default": { "$source": "projectName" }, "$default": { "$source": "projectName" },
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"name": { "name": {
"type": "string", "type": "string",

View File

@ -14,7 +14,7 @@
"description": "The name of the project.", "description": "The name of the project.",
"alias": "p", "alias": "p",
"$default": { "$source": "projectName" }, "$default": { "$source": "projectName" },
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"name": { "name": {
"type": "string", "type": "string",
@ -89,7 +89,7 @@
"type": "boolean", "type": "boolean",
"description": "Create component at the source root rather than its own directory.", "description": "Create component at the source root rather than its own directory.",
"default": false, "default": false,
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20."
}, },
"skipFormat": { "skipFormat": {
"description": "Skip formatting files.", "description": "Skip formatting files.",

View File

@ -1,168 +0,0 @@
---
title: 'affected:graph - CLI command'
description: 'Graph dependencies affected by changes'
---
# affected:graph
**Deprecated:** Use `nx graph --affected`, or `nx affected --graph` instead depending on which best suits your use case. The `affected:graph` command will be removed in Nx 19.
Graph dependencies affected by changes
## Usage
```shell
nx affected:graph
```
Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.
### Examples
Open the project graph of the workspace in the browser, and highlight the projects affected by changing the index.ts file:
```shell
nx affected:graph --files=libs/mylib/src/index.ts
```
Open the project graph of the workspace in the browser, and highlight the projects affected by the changes between main and HEAD (e.g., PR):
```shell
nx affected:graph --base=main --head=HEAD
```
Save 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):
```shell
nx affected:graph --base=main --head=HEAD --file=output.json
```
Generate 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):
```shell
nx affected:graph --base=main --head=HEAD --file=output.html
```
Open the project graph of the workspace in the browser, and highlight the projects affected by the last commit on main:
```shell
nx affected:graph --base=main~1 --head=main
```
Open the project graph of the workspace in the browser, highlight the projects affected, but exclude project-one and project-two:
```shell
nx affected:graph --exclude=project-one,project-two
```
## Options
### base
Type: `string`
Base of the current branch (usually main)
### exclude
Type: `string`
Exclude certain projects from being processed
### file
Type: `string`
Output file (e.g. --file=output.json or --file=dep-graph.html)
### files
Type: `string`
Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces
### focus
Type: `string`
Use to show the project graph for a particular project and every node that is either an ancestor or a descendant.
### groupByFolder
Type: `boolean`
Group projects by folder in the project graph
### head
Type: `string`
Latest commit of the current branch (usually HEAD)
### help
Type: `boolean`
Show help
### host
Type: `string`
Bind the project graph server to a specific ip address.
### open
Type: `boolean`
Default: `true`
Open the project graph in the browser.
### port
Type: `number`
Bind the project graph server to a specific port.
### targets
Type: `string`
The target to show tasks for in the task graph
### uncommitted
Type: `boolean`
Uncommitted changes
### untracked
Type: `boolean`
Untracked changes
### version
Type: `boolean`
Show version number
### view
Type: `string`
Choices: [projects, tasks]
Default: `projects`
Choose whether to view the projects or task graph
### watch
Type: `boolean`
Default: `true`
Watch for changes to project graph and update in-browser

View File

@ -1,126 +0,0 @@
---
title: 'print-affected - CLI command'
description: 'Prints information about the projects and targets affected by changes'
---
# print-affected
**Deprecated:** Use `nx show projects --affected`, `nx affected --graph -t build` or `nx graph --affected` depending on which best suits your use case. The `print-affected` command will be removed in Nx 19.
Prints information about the projects and targets affected by changes
## Usage
```shell
nx print-affected
```
Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.
### Examples
Print information about affected projects and the project graph:
```shell
nx print-affected
```
Print information about the projects affected by the changes between main and HEAD (e.g,. PR):
```shell
nx print-affected --base=main --head=HEAD
```
Prints information about the affected projects and a list of tasks to test them:
```shell
nx print-affected -t test
```
Prints the projects property from the print-affected output:
```shell
nx print-affected -t build --select=projects
```
Prints the tasks.target.project property from the print-affected output:
```shell
nx print-affected -t build --select=tasks.target.project
```
## Options
### base
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: `string`
Exclude certain projects from being processed
### files
Type: `string`
Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces
### head
Type: `string`
Latest commit of the current branch (usually HEAD)
### help
Type: `boolean`
Show help
### select
Type: `string`
Select the subset of the returned json document (e.g., --select=projects)
### targets
Type: `string`
Tasks to run for affected projects
### type
Type: `string`
Choices: [app, lib]
Select the type of projects to be returned (e.g., --type=app)
### uncommitted
Type: `boolean`
Uncommitted changes
### untracked
Type: `boolean`
Untracked changes
### version
Type: `boolean`
Show version number

View File

@ -60,7 +60,7 @@
"description": "The name of the project.", "description": "The name of the project.",
"alias": "p", "alias": "p",
"$default": { "$source": "projectName" }, "$default": { "$source": "projectName" },
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"skipFormat": { "skipFormat": {
"type": "boolean", "type": "boolean",

View File

@ -49,7 +49,7 @@
"description": "The name of the project.", "description": "The name of the project.",
"alias": "p", "alias": "p",
"$default": { "$source": "projectName" }, "$default": { "$source": "projectName" },
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"skipFormat": { "skipFormat": {
"type": "boolean", "type": "boolean",

View File

@ -42,7 +42,7 @@
"description": "The name of the project.", "description": "The name of the project.",
"alias": "p", "alias": "p",
"$default": { "$source": "projectName" }, "$default": { "$source": "projectName" },
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"packageJsonUpdates": { "packageJsonUpdates": {
"type": "boolean", "type": "boolean",

View File

@ -24,7 +24,7 @@
"description": "The name of the project.", "description": "The name of the project.",
"alias": "p", "alias": "p",
"$default": { "$source": "projectName" }, "$default": { "$source": "projectName" },
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"name": { "name": {
"type": "string", "type": "string",

View File

@ -14,7 +14,7 @@
"description": "The name of the project.", "description": "The name of the project.",
"alias": "p", "alias": "p",
"$default": { "$source": "projectName" }, "$default": { "$source": "projectName" },
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"name": { "name": {
"type": "string", "type": "string",

View File

@ -20,7 +20,7 @@
"description": "The name of the project.", "description": "The name of the project.",
"alias": "p", "alias": "p",
"$default": { "$source": "projectName" }, "$default": { "$source": "projectName" },
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"name": { "name": {
"type": "string", "type": "string",
@ -54,7 +54,7 @@
"type": "boolean", "type": "boolean",
"description": "Create hook at the source root rather than its own directory.", "description": "Create hook at the source root rather than its own directory.",
"default": false, "default": false,
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20."
}, },
"export": { "export": {
"type": "boolean", "type": "boolean",

View File

@ -20,7 +20,7 @@
"description": "The name of the project to add the slice to. If it is an application, then the store configuration will be updated too.", "description": "The name of the project to add the slice to. If it is an application, then the store configuration will be updated too.",
"alias": "p", "alias": "p",
"$default": { "$source": "projectName" }, "$default": { "$source": "projectName" },
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"directory": { "directory": {
"type": "string", "type": "string",

View File

@ -29,7 +29,7 @@
"configureCypress": { "configureCypress": {
"type": "boolean", "type": "boolean",
"description": "Run the cypress-configure generator.", "description": "Run the cypress-configure generator.",
"x-deprecated": "Use interactionTests instead. This option will be removed in v19." "x-deprecated": "Use interactionTests instead. This option will be removed in v20."
}, },
"generateStories": { "generateStories": {
"type": "boolean", "type": "boolean",
@ -41,7 +41,7 @@
"generateCypressSpecs": { "generateCypressSpecs": {
"type": "boolean", "type": "boolean",
"description": "Automatically generate test files in the Cypress E2E app generated by the `cypress-configure` generator.", "description": "Automatically generate test files in the Cypress E2E app generated by the `cypress-configure` generator.",
"x-deprecated": "Use interactionTests instead. This option will be removed in v19." "x-deprecated": "Use interactionTests instead. This option will be removed in v20."
}, },
"configureStaticServe": { "configureStaticServe": {
"type": "boolean", "type": "boolean",
@ -53,7 +53,7 @@
"cypressDirectory": { "cypressDirectory": {
"type": "string", "type": "string",
"description": "A directory where the Cypress project will be placed. Placed at the root by default.", "description": "A directory where the Cypress project will be placed. Placed at the root by default.",
"x-deprecated": "Use interactionTests instead. This option will be removed in v19." "x-deprecated": "Use interactionTests instead. This option will be removed in v20."
}, },
"js": { "js": {
"type": "boolean", "type": "boolean",

View File

@ -22,7 +22,7 @@
"type": "string", "type": "string",
"description": "The name of the project.", "description": "The name of the project.",
"pattern": "^[a-zA-Z].*$", "pattern": "^[a-zA-Z].*$",
"x-deprecated": "Provide the `path` option instead and use the `as-provided` format. The project will be determined from the path provided. It will be removed in Nx v19." "x-deprecated": "Provide the `path` option instead and use the `as-provided` format. The project will be determined from the path provided. It will be removed in Nx v20."
} }
}, },
"required": ["path"], "required": ["path"],

View File

@ -27,7 +27,7 @@
"type": "string", "type": "string",
"description": "The name of the project.", "description": "The name of the project.",
"pattern": "^[a-zA-Z].*$", "pattern": "^[a-zA-Z].*$",
"x-deprecated": "Provide the `path` option instead and use the `as-provided` format. The project will be determined from the path provided. It will be removed in Nx v19." "x-deprecated": "Provide the `path` option instead and use the `as-provided` format. The project will be determined from the path provided. It will be removed in Nx v20."
}, },
"skipFormat": { "skipFormat": {
"type": "boolean", "type": "boolean",

View File

@ -22,7 +22,7 @@
"type": "string", "type": "string",
"description": "The name of the project.", "description": "The name of the project.",
"pattern": "^[a-zA-Z].*$", "pattern": "^[a-zA-Z].*$",
"x-deprecated": "Provide the `path` option instead and use the `as-provided` format. The project will be determined from the path provided. It will be removed in Nx v19." "x-deprecated": "Provide the `path` option instead and use the `as-provided` format. The project will be determined from the path provided. It will be removed in Nx v20."
} }
}, },
"required": ["path"], "required": ["path"],

View File

@ -22,7 +22,7 @@
"type": "string", "type": "string",
"description": "The name of the project.", "description": "The name of the project.",
"pattern": "^[a-zA-Z].*$", "pattern": "^[a-zA-Z].*$",
"x-deprecated": "Provide the `path` option instead and use the `as-provided` format. The project will be determined from the path provided. It will be removed in Nx v19." "x-deprecated": "Provide the `path` option instead and use the `as-provided` format. The project will be determined from the path provided. It will be removed in Nx v20."
} }
}, },
"required": ["path"], "required": ["path"],

View File

@ -29,7 +29,7 @@
"type": "string", "type": "string",
"description": "The name of the project.", "description": "The name of the project.",
"pattern": "^[a-zA-Z].*$", "pattern": "^[a-zA-Z].*$",
"x-deprecated": "Provide the `path` option instead and use the `as-provided` format. The project will be determined from the path provided. It will be removed in Nx v19." "x-deprecated": "Provide the `path` option instead and use the `as-provided` format. The project will be determined from the path provided. It will be removed in Nx v20."
}, },
"action": { "action": {
"type": "boolean", "type": "boolean",

View File

@ -29,7 +29,7 @@
"type": "string", "type": "string",
"description": "The name of the project.", "description": "The name of the project.",
"pattern": "^[a-zA-Z].*$", "pattern": "^[a-zA-Z].*$",
"x-deprecated": "Provide the `path` option instead and use the `as-provided` format. The project will be determined from the path provided. It will be removed in Nx v19." "x-deprecated": "Provide the `path` option instead and use the `as-provided` format. The project will be determined from the path provided. It will be removed in Nx v20."
}, },
"style": { "style": {
"type": "string", "type": "string",

View File

@ -29,7 +29,7 @@
"type": "string", "type": "string",
"description": "The name of the project.", "description": "The name of the project.",
"pattern": "^[a-zA-Z].*$", "pattern": "^[a-zA-Z].*$",
"x-deprecated": "Provide the `path` option instead and use the `as-provided` format. The project will be determined from the path provided. It will be removed in Nx v19." "x-deprecated": "Provide the `path` option instead and use the `as-provided` format. The project will be determined from the path provided. It will be removed in Nx v20."
} }
}, },
"required": ["path"], "required": ["path"],

View File

@ -28,12 +28,12 @@
"configureCypress": { "configureCypress": {
"type": "boolean", "type": "boolean",
"description": "Run the cypress-configure generator.", "description": "Run the cypress-configure generator.",
"x-deprecated": "Use interactionTests instead. This option will be removed in v19." "x-deprecated": "Use interactionTests instead. This option will be removed in v20."
}, },
"cypressDirectory": { "cypressDirectory": {
"type": "string", "type": "string",
"description": "A directory where the Cypress project will be placed. Added at root by default.", "description": "A directory where the Cypress project will be placed. Added at root by default.",
"x-deprecated": "Use interactionTests instead. This option will be removed in v19." "x-deprecated": "Use interactionTests instead. This option will be removed in v20."
}, },
"linter": { "linter": {
"description": "The tool to use for running lint checks.", "description": "The tool to use for running lint checks.",

View File

@ -20,7 +20,7 @@
"description": "The name of the project.", "description": "The name of the project.",
"alias": "p", "alias": "p",
"$default": { "$source": "projectName" }, "$default": { "$source": "projectName" },
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"name": { "name": {
"type": "string", "type": "string",
@ -55,7 +55,7 @@
"type": "boolean", "type": "boolean",
"description": "Create component at the source root rather than its own directory.", "description": "Create component at the source root rather than its own directory.",
"default": false, "default": false,
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20."
}, },
"export": { "export": {
"type": "boolean", "type": "boolean",
@ -69,14 +69,14 @@
"description": "Use pascal case component file name (e.g. `App.tsx`).", "description": "Use pascal case component file name (e.g. `App.tsx`).",
"alias": "P", "alias": "P",
"default": false, "default": false,
"x-deprecated": "Provide the desired `name` option instead and use the `as-provided` format. It will be removed in Nx v19." "x-deprecated": "Provide the desired `name` option instead and use the `as-provided` format. It will be removed in Nx v20."
}, },
"pascalCaseDirectory": { "pascalCaseDirectory": {
"type": "boolean", "type": "boolean",
"description": "Use pascal case directory name (e.g. `App/App.tsx`).", "description": "Use pascal case directory name (e.g. `App/App.tsx`).",
"alias": "R", "alias": "R",
"default": false, "default": false,
"x-deprecated": "Provide the desired `directory` option instead and use the `as-provided` format. It will be removed in Nx v19." "x-deprecated": "Provide the desired `directory` option instead and use the `as-provided` format. It will be removed in Nx v20."
}, },
"routing": { "routing": {
"type": "boolean", "type": "boolean",

View File

@ -311,7 +311,7 @@
"type": "boolean", "type": "boolean",
"description": "Do not apply Nx webpack plugins automatically. Plugins need to be applied in the project's webpack.config.js file (e.g. withNx, withReact, etc.).", "description": "Do not apply Nx webpack plugins automatically. Plugins need to be applied in the project's webpack.config.js file (e.g. withNx, withReact, etc.).",
"default": true, "default": true,
"x-deprecated": "Automatic configuration of Webpack is deprecated in favor of an explicit 'webpack.config.js' file. This option will be removed in Nx 19. See https://nx.dev/recipes/webpack/webpack-config-setup." "x-deprecated": "Automatic configuration of Webpack is deprecated in favor of an explicit 'webpack.config.js' file. This option will be removed in Nx 20. See https://nx.dev/recipes/webpack/webpack-config-setup."
}, },
"standardWebpackConfigFunction": { "standardWebpackConfigFunction": {
"type": "boolean", "type": "boolean",

View File

@ -1272,7 +1272,6 @@
} }
] ]
}, },
{ {
"name": "Troubleshooting", "name": "Troubleshooting",
"id": "troubleshooting", "id": "troubleshooting",
@ -1314,6 +1313,16 @@
"id": "deprecated", "id": "deprecated",
"description": "Functionality that has been superseded in the current version of Nx. Listed here for those running older versions.", "description": "Functionality that has been superseded in the current version of Nx. Listed here for those running older versions.",
"itemList": [ "itemList": [
{
"name": "affected:graph",
"id": "affected-graph",
"file": "shared/deprecated/affected-graph"
},
{
"name": "print-affected",
"id": "print-affected",
"file": "shared/deprecated/print-affected"
},
{ {
"name": "workspace.json", "name": "workspace.json",
"id": "workspace-json", "id": "workspace-json",
@ -1988,16 +1997,6 @@
"id": "affected", "id": "affected",
"file": "generated/cli/affected" "file": "generated/cli/affected"
}, },
{
"name": "affected:graph",
"id": "affected-dep-graph",
"file": "generated/cli/affected-graph"
},
{
"name": "print-affected",
"id": "print-affected",
"file": "generated/cli/print-affected"
},
{ {
"name": "format:check", "name": "format:check",
"id": "format-check", "id": "format-check",

View File

@ -5,7 +5,8 @@ description: 'Graph dependencies affected by changes'
# affected:graph # affected:graph
**Deprecated:** Use `nx graph --affected`, or `nx affected --graph` instead depending on which best suits your use case. The `affected:graph` command will be removed in Nx 19. **Deprecated:** Use `nx graph --affected`, or `nx affected --graph` instead depending on which best suits your use case.
The `affected:graph` command was removed in Nx 19.
Graph dependencies affected by changes Graph dependencies affected by changes
@ -19,25 +20,29 @@ Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`
### Examples ### Examples
Open the project graph of the workspace in the browser, and highlight the projects affected by changing the index.ts file: Open the project graph of the workspace in the browser, and highlight the projects affected by changing the index.ts
file:
```shell ```shell
nx affected:graph --files=libs/mylib/src/index.ts nx affected:graph --files=libs/mylib/src/index.ts
``` ```
Open the project graph of the workspace in the browser, and highlight the projects affected by the changes between main and HEAD (e.g., PR): Open the project graph of the workspace in the browser, and highlight the projects affected by the changes between main
and HEAD (e.g., PR):
```shell ```shell
nx affected:graph --base=main --head=HEAD nx affected:graph --base=main --head=HEAD
``` ```
Save 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): Save 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):
```shell ```shell
nx affected:graph --base=main --head=HEAD --file=output.json nx affected:graph --base=main --head=HEAD --file=output.json
``` ```
Generate 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): Generate 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):
```shell ```shell
nx affected:graph --base=main --head=HEAD --file=output.html nx affected:graph --base=main --head=HEAD --file=output.html
@ -49,7 +54,8 @@ Open the project graph of the workspace in the browser, and highlight the projec
nx affected:graph --base=main~1 --head=main nx affected:graph --base=main~1 --head=main
``` ```
Open the project graph of the workspace in the browser, highlight the projects affected, but exclude project-one and project-two: Open the project graph of the workspace in the browser, highlight the projects affected, but exclude project-one and
project-two:
```shell ```shell
nx affected:graph --exclude=project-one,project-two nx affected:graph --exclude=project-one,project-two
@ -79,7 +85,8 @@ Output file (e.g. --file=output.json or --file=dep-graph.html)
Type: `string` Type: `string`
Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by
commas or spaces
### focus ### focus

View File

@ -1,6 +1,6 @@
# As Provided vs. Derived Generator Path Options # As Provided vs. Derived Generator Path Options
Nx is moving toward a more transparent and predictable way of determining where code will be generated when you run a generator. The new behavior is to take generator options _as provided_ and place the generated code in the exact folder that you specify. Nx will only use the new behavior in Nx version 19. The directory can be specified with a `--directory` flag or use a fully specified path (i.e. `libs/shared/my-lib/src/my-component`). The `--directory` flag will be calculated relative to where you run the command. Nx is moving toward a more transparent and predictable way of determining where code will be generated when you run a generator. The new behavior is to take generator options _as provided_ and place the generated code in the exact folder that you specify. Nx will only use the new behavior in Nx version 20. The directory can be specified with a `--directory` flag or use a fully specified path (i.e. `libs/shared/my-lib/src/my-component`). The `--directory` flag will be calculated relative to where you run the command.
In the past, Nx had lots of logic to try and _derive_ the best place to put code for you. This approach worked for some people, but there were always people that wanted to generate their code in a slightly different location. Accounting for these variations lead to either (1) people in repos with a different structure not being able to use these generators or (2) Nx introducing lots of flags to allow people to tweak where code was generated (flags like `--project`, `--flat`, `--pascalCaseFiles`, `--pascalCaseDirectory`, `--fileName`). It also caused some confusion when code was not generated in the expected location or frustration when the user did not know how to get Nx to derive the right thing. In the past, Nx had lots of logic to try and _derive_ the best place to put code for you. This approach worked for some people, but there were always people that wanted to generate their code in a slightly different location. Accounting for these variations lead to either (1) people in repos with a different structure not being able to use these generators or (2) Nx introducing lots of flags to allow people to tweak where code was generated (flags like `--project`, `--flat`, `--pascalCaseFiles`, `--pascalCaseDirectory`, `--fileName`). It also caused some confusion when code was not generated in the expected location or frustration when the user did not know how to get Nx to derive the right thing.
@ -19,7 +19,7 @@ You can use [Nx Console](/getting-started/editor-setup) for an intuitive experie
## Prompting ## Prompting
To mitigate the impact of this change of direction, Nx will prompt you when running most generators until Nx 19. We know changing these habits may take time so this prompt allows you to choose the previous behavior. To mitigate the impact of this change of direction, Nx will prompt you when running most generators until Nx 20. We know changing these habits may take time so this prompt allows you to choose the previous behavior.
```{% command="nx g lib my-lib --directory=shared/my-lib" path="~/myorg" %} ```{% command="nx g lib my-lib --directory=shared/my-lib" path="~/myorg" %}
✔ Which generator would you like to use? · @nx/node:library ✔ Which generator would you like to use? · @nx/node:library
@ -44,7 +44,7 @@ Your intent is your intent. However, the commands you write and run are based on
## Project Generators ## Project Generators
As of Nx 16.8.0, generating a project will prompt you to choose how Nx will calculate where the project should be located. For now, you can choose between `as-provided` and `derived` but `as-provided` will be the only option in Nx 19. The CLI flag to choose between the two algorithms for project generators is `--projectNameAndRootFormat`. As of Nx 16.8.0, generating a project will prompt you to choose how Nx will calculate where the project should be located. For now, you can choose between `as-provided` and `derived` but `as-provided` will be the only option in Nx 20. The CLI flag to choose between the two algorithms for project generators is `--projectNameAndRootFormat`.
### Generate Paths and Names `as-provided` ### Generate Paths and Names `as-provided`
@ -83,7 +83,7 @@ If you accidentally generate a project in the wrong folder, use the [move genera
## Code Generators ## Code Generators
As of Nx 17, code generators such as `component`, `service`, and others will prompt you to choose whether or not Nx will derive the location based on your options or not. In Nx 19, Nx will take the generator options as provided. The following flags are deprecated and will be removed in Nx 19: `--project`, `--flat`, `--pascalCaseFiles`, `--pascalCaseDirectory`, `--fileName`. The CLI flag to choose between the two algorithms for code generators is `--nameAndDirectoryFormat`. As of Nx 17, code generators such as `component`, `service`, and others will prompt you to choose whether or not Nx will derive the location based on your options or not. In Nx 20, Nx will take the generator options as provided. The following flags are deprecated and will be removed in Nx 20: `--project`, `--flat`, `--pascalCaseFiles`, `--pascalCaseDirectory`, `--fileName`. The CLI flag to choose between the two algorithms for code generators is `--nameAndDirectoryFormat`.
### Generate Paths and Names `as-provided` ### Generate Paths and Names `as-provided`
@ -100,7 +100,7 @@ If the directory specified is not inside a project, an error will be thrown.
### Use the Old `derived` Paths and Names ### Use the Old `derived` Paths and Names
Choosing `derived` makes Nx behave the way it did before version 17. Nx will use the deprecated flags (`--project`, `--flat`, `--pascalCaseFiles`, `--pascalCaseDirectory`, `--fileName`) to calculate where to generate the code. This behavior will not be available in Nx 19. Choosing `derived` makes Nx behave the way it did before version 17. Nx will use the deprecated flags (`--project`, `--flat`, `--pascalCaseFiles`, `--pascalCaseDirectory`, `--fileName`) to calculate where to generate the code. This behavior will not be available in Nx 20.
This makes generators behave in the following way: This makes generators behave in the following way:

View File

@ -5,7 +5,8 @@ description: 'Prints information about the projects and targets affected by chan
# print-affected # print-affected
**Deprecated:** Use `nx show projects --affected`, `nx affected --graph -t build` or `nx graph --affected` depending on which best suits your use case. The `print-affected` command will be removed in Nx 19. **Deprecated:** Use `nx show projects --affected`, `nx affected --graph -t build` or `nx graph --affected` depending on
which best suits your use case. The `print-affected` command was removed in Nx 19.
Prints information about the projects and targets affected by changes Prints information about the projects and targets affected by changes
@ -73,7 +74,8 @@ Exclude certain projects from being processed
Type: `string` Type: `string`
Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by
commas or spaces
### head ### head

View File

@ -1,7 +1,7 @@
# Extending the Project Graph of Nx (v1 API) # Extending the Project Graph of Nx (v1 API)
{% callout type="caution" title="Experimental" %} {% callout type="caution" title="Experimental" %}
This API has been superceded by the [v2 API](/extending-nx/recipes/project-graph-plugins) and will be removed in Nx 19. If targeting Nx version 16.7 or higher, please use the v2 API instead. This API has been superceded by the [v2 API](/extending-nx/recipes/project-graph-plugins) and will be removed in Nx 20. If targeting Nx version 16.7 or higher, please use the v2 API instead.
{% /callout %} {% /callout %}
The v1 plugin API for modifying the project graph was split into two parts: The v1 plugin API for modifying the project graph was split into two parts:

View File

@ -207,6 +207,8 @@
- [Unknown Local Cache Error](/troubleshooting/unknown-local-cache) - [Unknown Local Cache Error](/troubleshooting/unknown-local-cache)
- [Profiling Build Performance](/troubleshooting/performance-profiling) - [Profiling Build Performance](/troubleshooting/performance-profiling)
- [Deprecated](/deprecated) - [Deprecated](/deprecated)
- [affected:graph](/deprecated/affected-graph)
- [print-affected](/deprecated/print-affected)
- [workspace.json](/deprecated/workspace-json) - [workspace.json](/deprecated/workspace-json)
- [As Provided vs. Derived](/deprecated/as-provided-vs-derived) - [As Provided vs. Derived](/deprecated/as-provided-vs-derived)
- [Workspace Generators](/deprecated/workspace-generators) - [Workspace Generators](/deprecated/workspace-generators)
@ -530,8 +532,6 @@
- [graph](/nx-api/nx/documents/dep-graph) - [graph](/nx-api/nx/documents/dep-graph)
- [run-many](/nx-api/nx/documents/run-many) - [run-many](/nx-api/nx/documents/run-many)
- [affected](/nx-api/nx/documents/affected) - [affected](/nx-api/nx/documents/affected)
- [affected:graph](/nx-api/nx/documents/affected-dep-graph)
- [print-affected](/nx-api/nx/documents/print-affected)
- [format:check](/nx-api/nx/documents/format-check) - [format:check](/nx-api/nx/documents/format-check)
- [format:write](/nx-api/nx/documents/format-write) - [format:write](/nx-api/nx/documents/format-write)
- [migrate](/nx-api/nx/documents/migrate) - [migrate](/nx-api/nx/documents/migrate)

View File

@ -1,6 +1,5 @@
import type { NxJsonConfiguration } from '@nx/devkit'; import type { NxJsonConfiguration } from '@nx/devkit';
import { import {
getPackageManagerCommand,
isNotWindows, isNotWindows,
newProject, newProject,
readFile, readFile,
@ -204,17 +203,17 @@ describe('Nx Affected and Graph Tests', () => {
// TODO: investigate why affected gives different results on windows // TODO: investigate why affected gives different results on windows
if (isNotWindows()) { if (isNotWindows()) {
runCLI(`generate @nx/web:app ${myapp}`); runCLI(`generate @nx/web:app ${myapp}`);
expect(runCLI('print-affected --select projects')).toContain(myapp); expect(runCLI('show projects --affected')).toContain(myapp);
runCommand(`git add . && git commit -am "add ${myapp}"`); runCommand(`git add . && git commit -am "add ${myapp}"`);
runCLI(`generate @nx/web:app ${myapp2}`); runCLI(`generate @nx/web:app ${myapp2}`);
let output = runCLI('print-affected --select projects'); let output = runCLI('show projects --affected');
expect(output).not.toContain(myapp); expect(output).not.toContain(myapp);
expect(output).toContain(myapp2); expect(output).toContain(myapp2);
runCommand(`git add . && git commit -am "add ${myapp2}"`); runCommand(`git add . && git commit -am "add ${myapp2}"`);
runCLI(`generate @nx/js:lib ${mylib}`); runCLI(`generate @nx/js:lib ${mylib}`);
output = runCLI('print-affected --select projects'); output = runCLI('show projects --affected');
expect(output).not.toContain(myapp); expect(output).not.toContain(myapp);
expect(output).not.toContain(myapp2); expect(output).not.toContain(myapp2);
expect(output).toContain(mylib); expect(output).toContain(mylib);
@ -230,7 +229,7 @@ describe('Nx Affected and Graph Tests', () => {
data.tags = ['tag']; data.tags = ['tag'];
return JSON.stringify(data, null, 2); return JSON.stringify(data, null, 2);
}); });
const output = runCLI('print-affected --select projects'); const output = runCLI('show projects --affected');
expect(output).toContain(myapp); expect(output).toContain(myapp);
expect(output).not.toContain(myapp2); expect(output).not.toContain(myapp2);
expect(output).not.toContain(mylib); expect(output).not.toContain(mylib);
@ -241,7 +240,7 @@ describe('Nx Affected and Graph Tests', () => {
generateAll(); generateAll();
const root = `libs/${mylib}`; const root = `libs/${mylib}`;
removeFile(root); removeFile(root);
const output = runCLI('print-affected --select projects'); const output = runCLI('show projects --affected');
expect(output).toContain(myapp); expect(output).toContain(myapp);
expect(output).toContain(myapp2); expect(output).toContain(myapp2);
expect(output).not.toContain(mylib); expect(output).not.toContain(mylib);
@ -258,7 +257,7 @@ describe('Nx Affected and Graph Tests', () => {
runCommand('git commit -m "setup test"'); runCommand('git commit -m "setup test"');
updateFile(`libs/${mylib}/index.html`, '<html></html>'); updateFile(`libs/${mylib}/index.html`, '<html></html>');
const output = runCLI('print-affected --select projects'); const output = runCLI('show projects --affected');
expect(output).toContain(myapp); expect(output).toContain(myapp);
expect(output).not.toContain(myapp2); expect(output).not.toContain(myapp2);
@ -283,14 +282,12 @@ describe('Nx Affected and Graph Tests', () => {
); );
removeFile(`apps/${myapp}/src/index.html`); removeFile(`apps/${myapp}/src/index.html`);
const affectedProjects = runCLI( const affectedProjects = runCLI('show projects --affected --uncommitted');
'print-affected --uncommitted --select projects' // .replace(
) // /.*nx print-affected --uncommitted --select projects( --verbose)?\n/,
.replace( // ''
/.*nx print-affected --uncommitted --select projects( --verbose)?\n/, // )
'' // .split(', ');
)
.split(', ');
expect(affectedProjects).toContain(myapp); expect(affectedProjects).toContain(myapp);
expect(affectedProjects).toContain(myapp2); expect(affectedProjects).toContain(myapp2);
@ -406,19 +403,6 @@ describe('Nx Affected and Graph Tests', () => {
[myapp3]: [], [myapp3]: [],
}) })
); );
runCLI(
`affected:graph --files="libs/${mylib}/src/index.ts" --file="project-graph.json"`
);
expect(() => checkFilesExist('project-graph.json')).not.toThrow();
const jsonFileContents2 = readJson('project-graph.json');
expect(jsonFileContents2.criticalPath).toContain(myapp);
expect(jsonFileContents2.criticalPath).toContain(myapp2);
expect(jsonFileContents2.criticalPath).toContain(mylib);
expect(jsonFileContents2.criticalPath).not.toContain(mylib2);
}, 1000000); }, 1000000);
if (isNotWindows()) { if (isNotWindows()) {
@ -538,7 +522,7 @@ describe('Nx Affected and Graph Tests', () => {
}); });
}); });
describe('Print-affected', () => { describe('show projects --affected', () => {
let proj: string; let proj: string;
beforeAll(() => (proj = newProject())); beforeAll(() => (proj = newProject()));
@ -583,65 +567,34 @@ describe('Print-affected', () => {
` `
); );
const resWithoutTarget = JSON.parse( const { stdout: resWithoutTarget } = await runCLIAsync(
( `show projects --affected --files=apps/${myapp}/src/app/app.element.spec.ts`
await runCLIAsync(
`print-affected --files=apps/${myapp}/src/app/app.element.spec.ts`,
{
silent: true,
}
)
).stdout
); );
expect(resWithoutTarget.tasks).toEqual([]); compareTwoArrays(resWithoutTarget.split('\n').filter(Boolean), [
compareTwoArrays(resWithoutTarget.projects, [`${myapp}-e2e`, myapp]); `${myapp}-e2e`,
myapp,
]);
const resWithTarget = JSON.parse( const resWithTarget = JSON.parse(
( (
await runCLIAsync( await runCLIAsync(
`print-affected --files=apps/${myapp}/src/app/app.element.spec.ts --target=test`, `affected -t test --files=apps/${myapp}/src/app/app.element.spec.ts --graph stdout`,
{ silent: true } { silent: true }
) )
).stdout.trim() ).stdout.trim()
); );
const { runNx } = getPackageManagerCommand(); expect(resWithTarget.tasks.tasks[`${myapp}:test`]).toMatchObject({
expect(resWithTarget.tasks[0]).toMatchObject({
id: `${myapp}:test`, id: `${myapp}:test`,
overrides: {}, overrides: {},
target: { target: {
project: myapp, project: myapp,
target: 'test', target: 'test',
}, },
command: `${runNx} run ${myapp}:test`,
outputs: [`coverage/apps/${myapp}`], outputs: [`coverage/apps/${myapp}`],
}); });
compareTwoArrays(resWithTarget.projects, [myapp]);
const resWithTargetWithSelect1 = (
await runCLIAsync(
`print-affected --files=apps/${myapp}/src/app/app.element.spec.ts --target=test --select=projects`,
{ silent: true }
)
).stdout.trim();
compareTwoSerializedArrays(resWithTargetWithSelect1, myapp);
const resWithTargetWithSelect2 = (
await runCLIAsync(
`print-affected --files=apps/${myapp}/src/app/app.element.spec.ts --target=test --select="tasks.target.project"`,
{ silent: true }
)
).stdout.trim();
compareTwoSerializedArrays(resWithTargetWithSelect2, myapp);
}, 120000); }, 120000);
function compareTwoSerializedArrays(a: string, b: string) {
compareTwoArrays(
a.split(',').map((_) => _.trim()),
b.split(',').map((_) => _.trim())
);
}
function compareTwoArrays(a: string[], b: string[]) { function compareTwoArrays(a: string[], b: string[]) {
expect(a.sort((x, y) => x.localeCompare(y))).toEqual( expect(a.sort((x, y) => x.localeCompare(y))).toEqual(
b.sort((x, y) => x.localeCompare(y)) b.sort((x, y) => x.localeCompare(y))

View File

@ -329,10 +329,6 @@ const cliUrls = {
'/cli/dep-graph': '/nx/dep-graph', '/cli/dep-graph': '/nx/dep-graph',
'/cli/run-many': '/nx/run-many', '/cli/run-many': '/nx/run-many',
'/cli/affected': '/nx/affected', '/cli/affected': '/nx/affected',
'/cli/affected-dep-graph': '/nx/affected-dep-graph',
'/cli/affected-apps': '/packages/nx/documents/print-affected',
'/cli/affected-libs': '/packages/nx/documents/print-affected',
'/cli/print-affected': '/packages/nx/documents/print-affected',
'/cli/format-check': '/nx/format-check', '/cli/format-check': '/nx/format-check',
'/cli/format-write': '/nx/format-write', '/cli/format-write': '/nx/format-write',
'/cli/migrate': '/nx/migrate', '/cli/migrate': '/nx/migrate',
@ -649,14 +645,6 @@ const packagesDocuments = {
'/nx/dep-graph': '/packages/nx/documents/dep-graph', '/nx/dep-graph': '/packages/nx/documents/dep-graph',
'/nx/run-many': '/packages/nx/documents/run-many', '/nx/run-many': '/packages/nx/documents/run-many',
'/nx/affected': '/packages/nx/documents/affected', '/nx/affected': '/packages/nx/documents/affected',
'/nx/affected-dep-graph': '/packages/nx/documents/affected-dep-graph',
'/nx/affected-apps': '/packages/nx/documents/print-affected',
'/nx/affected-libs': '/packages/nx/documents/print-affected',
'/nx/print-affected': '/packages/nx/documents/print-affected',
'/packages/nx/documents/affected-apps':
'/packages/nx/documents/print-affected',
'/packages/nx/documents/affected-libs':
'/packages/nx/documents/print-affected',
'/nx/format-check': '/packages/nx/documents/format-check', '/nx/format-check': '/packages/nx/documents/format-check',
'/nx/format-write': '/packages/nx/documents/format-write', '/nx/format-write': '/packages/nx/documents/format-write',
'/nx/migrate': '/packages/nx/documents/migrate', '/nx/migrate': '/packages/nx/documents/migrate',
@ -1043,6 +1031,19 @@ const troubleshootingOutOfRecipes = {
* Removed deprecated URLs * Removed deprecated URLs
*/ */
const removedDeprecatedUrls = { const removedDeprecatedUrls = {
'/nx-api/nx/documents/affected-dep-graph': '/deprecated/affected-graph', // nx affected:graph was removed in Nx 19
'/cli/affected-dep-graph': '/deprecated/affected-graph',
'/nx/affected-dep-graph': '/deprecated/affected-graph',
'/nx-api/nx/documents/print-affected': '/deprecated/print-affected', // nx affected:graph was removed in Nx 19
'/cli/affected-apps': '/deprecated/print-affected',
'/cli/affected-libs': '/deprecated/print-affected',
'/cli/print-affected': '/deprecated/print-affected',
'/packages/nx/documents/print-affected': '/deprecated/print-affected',
'/nx/affected-apps': '/deprecated/print-affected',
'/nx/affected-libs': '/deprecated/print-affected',
'/nx/print-affected': '/deprecated/print-affected',
'/packages/nx/documents/affected-apps': '/deprecated/print-affected',
'/packages/nx/documents/affected-libs': '/deprecated/print-affected',
'/deprecated/default-collection': '/features/generate-code', // 46 views: has not worked since Nx 17 and has very little views '/deprecated/default-collection': '/features/generate-code', // 46 views: has not worked since Nx 17 and has very little views
'/deprecated/workspace-lint': '/nx-api/nx/documents/report', // 168 views: workspace-lint hasn't worked since Nx 15 and users should use `nx report` to check versions and other info '/deprecated/workspace-lint': '/nx-api/nx/documents/report', // 168 views: workspace-lint hasn't worked since Nx 15 and users should use `nx report` to check versions and other info
'/deprecated/storybook/angular-storybook-targets': '/deprecated/storybook/angular-storybook-targets':

View File

@ -17,7 +17,7 @@
"type": "string", "type": "string",
"description": "A browser builder target to serve in the format of `project:target[:configuration]`. Ignored if `buildTarget` is set.", "description": "A browser builder target to serve in the format of `project:target[:configuration]`. Ignored if `buildTarget` is set.",
"pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$", "pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$",
"x-deprecated": "Use 'buildTarget' instead. It will be removed in Nx v19." "x-deprecated": "Use 'buildTarget' instead. It will be removed in Nx v20."
}, },
"buildTarget": { "buildTarget": {
"type": "string", "type": "string",

View File

@ -7,7 +7,7 @@ export type BrowserBuilderSchema = Schema & {
indexHtmlTransformer?: string; indexHtmlTransformer?: string;
buildLibsFromSource?: boolean; buildLibsFromSource?: boolean;
/** /**
* @deprecated Use `indexHtmlTransformer` instead. It will be removed in Nx 19. * @deprecated Use `indexHtmlTransformer` instead. It will be removed in Nx 20.
*/ */
indexFileTransformer?: string; indexFileTransformer?: string;
}; };

View File

@ -15,7 +15,7 @@
"type": "string", "type": "string",
"description": "A browser builder target to serve in the format of `project:target[:configuration]`.", "description": "A browser builder target to serve in the format of `project:target[:configuration]`.",
"pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$", "pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$",
"x-deprecated": "Use 'buildTarget' instead. It will be removed in Nx v19." "x-deprecated": "Use 'buildTarget' instead. It will be removed in Nx v20."
}, },
"buildTarget": { "buildTarget": {
"type": "string", "type": "string",

View File

@ -22,15 +22,15 @@ export interface Schema {
skipFormat?: boolean; skipFormat?: boolean;
/** /**
* @deprecated Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19. * @deprecated Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.
*/ */
flat?: boolean; flat?: boolean;
/** /**
* @deprecated Provide the `directory` option instead. It will be removed in Nx v19. * @deprecated Provide the `directory` option instead. It will be removed in Nx v20.
*/ */
path?: string; path?: string;
/** /**
* @deprecated Provide the `directory` option instead. The project will be determined from the directory provided. It will be removed in Nx v19. * @deprecated Provide the `directory` option instead. The project will be determined from the directory provided. It will be removed in Nx v20.
*/ */
project?: string; project?: string;
} }

View File

@ -34,7 +34,7 @@
"$source": "projectName" "$source": "projectName"
}, },
"x-dropdown": "projects", "x-dropdown": "projects",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"prefix": { "prefix": {
"type": "string", "type": "string",
@ -98,7 +98,7 @@
"type": "boolean", "type": "boolean",
"description": "Create the new files at the top level of the current project.", "description": "Create the new files at the top level of the current project.",
"default": false, "default": false,
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20."
}, },
"skipImport": { "skipImport": {
"type": "boolean", "type": "boolean",

View File

@ -13,15 +13,15 @@ export interface Schema {
export?: boolean; export?: boolean;
skipFormat?: boolean; skipFormat?: boolean;
/** /**
* @deprecated Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19. * @deprecated Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.
*/ */
flat?: boolean; flat?: boolean;
/** /**
* @deprecated Provide the `directory` option instead. It will be removed in Nx v19. * @deprecated Provide the `directory` option instead. It will be removed in Nx v20.
*/ */
path?: string; path?: string;
/** /**
* @deprecated Provide the `directory` option instead. The project will be determined from the directory provided. It will be removed in Nx v19. * @deprecated Provide the `directory` option instead. The project will be determined from the directory provided. It will be removed in Nx v20.
*/ */
project?: string; project?: string;
} }

View File

@ -34,7 +34,7 @@
"$source": "projectName" "$source": "projectName"
}, },
"x-dropdown": "projects", "x-dropdown": "projects",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"prefix": { "prefix": {
"type": "string", "type": "string",
@ -74,7 +74,7 @@
"type": "boolean", "type": "boolean",
"description": "When true (the default), creates the new files at the top level of the current project.", "description": "When true (the default), creates the new files at the top level of the current project.",
"default": true, "default": true,
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20."
}, },
"module": { "module": {
"type": "string", "type": "string",

View File

@ -11,15 +11,15 @@ export interface Schema {
export?: boolean; export?: boolean;
skipFormat?: boolean; skipFormat?: boolean;
/** /**
* @deprecated Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19. * @deprecated Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.
*/ */
flat?: boolean; flat?: boolean;
/** /**
* @deprecated Provide the `directory` option instead. It will be removed in Nx v19. * @deprecated Provide the `directory` option instead. It will be removed in Nx v20.
*/ */
path?: string; path?: string;
/** /**
* @deprecated Provide the `directory` option instead. The project will be determined from the directory provided. It will be removed in Nx v19. * @deprecated Provide the `directory` option instead. The project will be determined from the directory provided. It will be removed in Nx v20.
*/ */
project?: string; project?: string;
} }

View File

@ -34,13 +34,13 @@
"$source": "projectName" "$source": "projectName"
}, },
"x-dropdown": "projects", "x-dropdown": "projects",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"flat": { "flat": {
"type": "boolean", "type": "boolean",
"default": true, "default": true,
"description": "When true (the default) creates files at the top level of the project.", "description": "When true (the default) creates files at the top level of the project.",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20."
}, },
"skipTests": { "skipTests": {
"type": "boolean", "type": "boolean",

View File

@ -11,15 +11,15 @@ export interface Schema {
export?: boolean; export?: boolean;
skipFormat?: boolean; skipFormat?: boolean;
/** /**
* @deprecated Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19. * @deprecated Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.
*/ */
flat?: boolean; flat?: boolean;
/** /**
* @deprecated Provide the `directory` option instead. It will be removed in Nx v19. * @deprecated Provide the `directory` option instead. It will be removed in Nx v20.
*/ */
path?: string; path?: string;
/** /**
* @deprecated Provide the `directory` option instead. The project will be determined from the directory provided. It will be removed in Nx v19. * @deprecated Provide the `directory` option instead. The project will be determined from the directory provided. It will be removed in Nx v20.
*/ */
project?: string; project?: string;
} }

View File

@ -41,7 +41,7 @@
"$source": "projectName" "$source": "projectName"
}, },
"x-dropdown": "projects", "x-dropdown": "projects",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"skipTests": { "skipTests": {
"type": "boolean", "type": "boolean",
@ -58,7 +58,7 @@
"type": "boolean", "type": "boolean",
"description": "Create the new files at the top level of the current project.", "description": "Create the new files at the top level of the current project.",
"default": true, "default": true,
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20."
}, },
"selector": { "selector": {
"type": "string", "type": "string",

View File

@ -9,15 +9,15 @@ export interface Schema {
export?: boolean; export?: boolean;
skipFormat?: boolean; skipFormat?: boolean;
/** /**
* @deprecated Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19. * @deprecated Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.
*/ */
flat?: boolean; flat?: boolean;
/** /**
* @deprecated Provide the `directory` option instead. It will be removed in Nx v19. * @deprecated Provide the `directory` option instead. It will be removed in Nx v20.
*/ */
path?: string; path?: string;
/** /**
* @deprecated Provide the `directory` option instead. The project will be determined from the directory provided. It will be removed in Nx v19. * @deprecated Provide the `directory` option instead. The project will be determined from the directory provided. It will be removed in Nx v20.
*/ */
project?: string; project?: string;
} }

View File

@ -41,7 +41,7 @@
"$source": "projectName" "$source": "projectName"
}, },
"x-dropdown": "projects", "x-dropdown": "projects",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"skipTests": { "skipTests": {
"type": "boolean", "type": "boolean",
@ -58,7 +58,7 @@
"type": "boolean", "type": "boolean",
"description": "Create the new files at the top level of the current project.", "description": "Create the new files at the top level of the current project.",
"default": true, "default": true,
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20."
}, },
"export": { "export": {
"type": "boolean", "type": "boolean",

View File

@ -19,15 +19,15 @@ export interface Schema {
export?: boolean; export?: boolean;
skipFormat?: boolean; skipFormat?: boolean;
/** /**
* @deprecated Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19. * @deprecated Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.
*/ */
flat?: boolean; flat?: boolean;
/** /**
* @deprecated Provide the `directory` option instead. It will be removed in Nx v19. * @deprecated Provide the `directory` option instead. It will be removed in Nx v20.
*/ */
path?: string; path?: string;
/** /**
* @deprecated Provide the `directory` option instead. The project will be determined from the directory provided. It will be removed in Nx v19. * @deprecated Provide the `directory` option instead. The project will be determined from the directory provided. It will be removed in Nx v20.
*/ */
project?: string; project?: string;
} }

View File

@ -40,7 +40,7 @@
"$source": "projectName" "$source": "projectName"
}, },
"x-dropdown": "projects", "x-dropdown": "projects",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"displayBlock": { "displayBlock": {
"description": "Specifies if the style will contain `:host { display: block; }`.", "description": "Specifies if the style will contain `:host { display: block; }`.",
@ -94,7 +94,7 @@
"type": "boolean", "type": "boolean",
"description": "Create the new files at the top level of the current project.", "description": "Create the new files at the top level of the current project.",
"default": false, "default": false,
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20."
}, },
"selector": { "selector": {
"type": "string", "type": "string",

View File

@ -29,7 +29,7 @@
"configureCypress": { "configureCypress": {
"type": "boolean", "type": "boolean",
"description": "Specifies whether to configure Cypress or not.", "description": "Specifies whether to configure Cypress or not.",
"x-deprecated": "Use interactionTests instead. This option will be removed in v19." "x-deprecated": "Use interactionTests instead. This option will be removed in v20."
}, },
"generateStories": { "generateStories": {
"type": "boolean", "type": "boolean",
@ -41,7 +41,7 @@
"generateCypressSpecs": { "generateCypressSpecs": {
"type": "boolean", "type": "boolean",
"description": "Specifies whether to automatically generate test files in the generated Cypress e2e app.", "description": "Specifies whether to automatically generate test files in the generated Cypress e2e app.",
"x-deprecated": "Use interactionTests instead. This option will be removed in v19." "x-deprecated": "Use interactionTests instead. This option will be removed in v20."
}, },
"configureStaticServe": { "configureStaticServe": {
"type": "boolean", "type": "boolean",
@ -53,7 +53,7 @@
"cypressDirectory": { "cypressDirectory": {
"type": "string", "type": "string",
"description": "A directory where the Cypress project will be placed. Placed at the root by default.", "description": "A directory where the Cypress project will be placed. Placed at the root by default.",
"x-deprecated": "Use interactionTests instead. This option will be removed in v19." "x-deprecated": "Use interactionTests instead. This option will be removed in v20."
}, },
"linter": { "linter": {
"description": "The tool to use for running lint checks.", "description": "The tool to use for running lint checks.",

View File

@ -55,7 +55,7 @@ export default {
* previously defined v5 of `@typescript-eslint`. v6 of `@typescript-eslint` * previously defined v5 of `@typescript-eslint`. v6 of `@typescript-eslint`
* changed how configurations are defined. * changed how configurations are defined.
* *
* TODO(v20): re-evalute these deviations from @typescript-eslint/recommended in v19 of Nx * TODO(v20): re-evalute these deviations from @typescript-eslint/recommended in v20 of Nx
*/ */
'no-extra-semi': 'off', 'no-extra-semi': 'off',
'@typescript-eslint/no-extra-semi': 'error', '@typescript-eslint/no-extra-semi': 'error',

View File

@ -38,7 +38,7 @@ export default {
* previously defined v5 of `@typescript-eslint`. v6 of `@typescript-eslint` * previously defined v5 of `@typescript-eslint`. v6 of `@typescript-eslint`
* changed how configurations are defined. * changed how configurations are defined.
* *
* TODO(v20): re-evalute these deviations from @typescript-eslint/recommended in v19 of Nx * TODO(v20): re-evalute these deviations from @typescript-eslint/recommended in v20 of Nx
*/ */
'no-extra-semi': 'off', 'no-extra-semi': 'off',
'@typescript-eslint/no-extra-semi': 'error', '@typescript-eslint/no-extra-semi': 'error',

View File

@ -7,7 +7,7 @@ export interface ExpoEnsureSymlinkOutput {
} }
/** /**
* TODO (@xiongemi): remove this function in v19. * TODO (@xiongemi): remove this function in v20.
* @deprecated It is no longer needed for react native 73. * @deprecated It is no longer needed for react native 73.
*/ */
export default async function* ensureSymlinkExecutor( export default async function* ensureSymlinkExecutor(

View File

@ -4,7 +4,7 @@
export interface Schema { export interface Schema {
name: string; name: string;
/** /**
* @deprecated Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19. * @deprecated Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20.
*/ */
project: string; project: string;
directory?: string; directory?: string;

View File

@ -22,7 +22,7 @@
"$default": { "$default": {
"$source": "projectName" "$source": "projectName"
}, },
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"name": { "name": {
"type": "string", "type": "string",

View File

@ -41,7 +41,7 @@ module.exports = function (api: any, options: NxWebBabelPresetOptions = {}) {
const loose = options.classProperties?.loose ?? options.loose ?? true; const loose = options.classProperties?.loose ?? options.loose ?? true;
if (options.classProperties) { if (options.classProperties) {
logger.warn( logger.warn(
`Use =\`loose\` option instead of \`classProperties.loose\`. The \`classProperties\` option will be removed in Nx 19` `Use =\`loose\` option instead of \`classProperties.loose\`. The \`classProperties\` option will be removed in Nx 20`
); );
} }

View File

@ -27,7 +27,7 @@
"$source": "projectName" "$source": "projectName"
}, },
"alias": "p", "alias": "p",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19." "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"directory": { "directory": {
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.", "description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
@ -48,7 +48,7 @@
}, },
"flat": { "flat": {
"description": "Flag to indicate if a directory is created.", "description": "Flag to indicate if a directory is created.",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19.", "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
"type": "boolean", "type": "boolean",
"default": true "default": true
}, },

View File

@ -22,7 +22,7 @@
"$source": "projectName" "$source": "projectName"
}, },
"alias": "p", "alias": "p",
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. it will be removed in nx v19." "x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"nameAndDirectoryFormat": { "nameAndDirectoryFormat": {
"description": "Whether to generate the component in the directory as provided, relative to the current working directory and ignoring the project (`as-provided`) or generate it using the project and directory relative to the workspace root (`derived`).", "description": "Whether to generate the component in the directory as provided, relative to the current working directory and ignoring the project (`as-provided`) or generate it using the project and directory relative to the workspace root (`derived`).",
@ -48,7 +48,7 @@
}, },
"flat": { "flat": {
"description": "Flag to indicate if a directory is created.", "description": "Flag to indicate if a directory is created.",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19.", "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
"type": "boolean", "type": "boolean",
"default": false "default": false
}, },

View File

@ -27,7 +27,7 @@
"$source": "projectName" "$source": "projectName"
}, },
"alias": "p", "alias": "p",
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. it will be removed in nx v19." "x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"directory": { "directory": {
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.", "description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
@ -42,7 +42,7 @@
}, },
"flat": { "flat": {
"description": "Flag to indicate if a directory is created.", "description": "Flag to indicate if a directory is created.",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19.", "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
"type": "boolean", "type": "boolean",
"default": true "default": true
}, },

View File

@ -27,7 +27,7 @@
"$source": "projectName" "$source": "projectName"
}, },
"alias": "p", "alias": "p",
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. it will be removed in nx v19." "x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"directory": { "directory": {
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.", "description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
@ -48,7 +48,7 @@
}, },
"flat": { "flat": {
"description": "Flag to indicate if a directory is created.", "description": "Flag to indicate if a directory is created.",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19.", "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
"type": "boolean", "type": "boolean",
"default": true "default": true
}, },

View File

@ -27,7 +27,7 @@
"$source": "projectName" "$source": "projectName"
}, },
"alias": "p", "alias": "p",
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. it will be removed in nx v19." "x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"directory": { "directory": {
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.", "description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
@ -48,7 +48,7 @@
}, },
"flat": { "flat": {
"description": "Flag to indicate if a directory is created.", "description": "Flag to indicate if a directory is created.",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19.", "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
"type": "boolean", "type": "boolean",
"default": true "default": true
}, },

View File

@ -27,7 +27,7 @@
"$source": "projectName" "$source": "projectName"
}, },
"alias": "p", "alias": "p",
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. it will be removed in nx v19." "x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"directory": { "directory": {
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.", "description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
@ -48,7 +48,7 @@
}, },
"flat": { "flat": {
"description": "Flag to indicate if a directory is created.", "description": "Flag to indicate if a directory is created.",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19.", "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
"type": "boolean", "type": "boolean",
"default": true "default": true
}, },

View File

@ -27,7 +27,7 @@
"$source": "projectName" "$source": "projectName"
}, },
"alias": "p", "alias": "p",
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. it will be removed in nx v19." "x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"directory": { "directory": {
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.", "description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
@ -48,7 +48,7 @@
}, },
"flat": { "flat": {
"description": "Flag to indicate if a directory is created.", "description": "Flag to indicate if a directory is created.",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19.", "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
"type": "boolean", "type": "boolean",
"default": true "default": true
}, },

View File

@ -27,7 +27,7 @@
"$source": "projectName" "$source": "projectName"
}, },
"alias": "p", "alias": "p",
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. it will be removed in nx v19." "x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"directory": { "directory": {
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.", "description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
@ -42,7 +42,7 @@
}, },
"flat": { "flat": {
"description": "Flag to indicate if a directory is created.", "description": "Flag to indicate if a directory is created.",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19.", "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
"type": "boolean", "type": "boolean",
"default": true "default": true
} }

View File

@ -27,7 +27,7 @@
"$source": "projectName" "$source": "projectName"
}, },
"alias": "p", "alias": "p",
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. it will be removed in nx v19." "x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"directory": { "directory": {
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.", "description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
@ -48,7 +48,7 @@
}, },
"flat": { "flat": {
"description": "Flag to indicate if a directory is created.", "description": "Flag to indicate if a directory is created.",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19.", "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
"type": "boolean", "type": "boolean",
"default": true "default": true
}, },

View File

@ -27,7 +27,7 @@
"$source": "projectName" "$source": "projectName"
}, },
"alias": "p", "alias": "p",
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. it will be removed in nx v19." "x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"directory": { "directory": {
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.", "description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
@ -42,7 +42,7 @@
}, },
"flat": { "flat": {
"description": "Flag to indicate if a directory is created.", "description": "Flag to indicate if a directory is created.",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19.", "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
"type": "boolean", "type": "boolean",
"default": false "default": false
}, },

View File

@ -27,7 +27,7 @@
"$source": "projectName" "$source": "projectName"
}, },
"alias": "p", "alias": "p",
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. it will be removed in nx v19." "x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"directory": { "directory": {
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.", "description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
@ -48,7 +48,7 @@
}, },
"flat": { "flat": {
"description": "Flag to indicate if a directory is created.", "description": "Flag to indicate if a directory is created.",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19.", "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
"type": "boolean", "type": "boolean",
"default": true "default": true
}, },

View File

@ -27,7 +27,7 @@
"$source": "projectName" "$source": "projectName"
}, },
"alias": "p", "alias": "p",
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. it will be removed in nx v19." "x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"directory": { "directory": {
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.", "description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
@ -48,7 +48,7 @@
}, },
"flat": { "flat": {
"description": "Flag to indicate if a directory is created.", "description": "Flag to indicate if a directory is created.",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19.", "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
"type": "boolean", "type": "boolean",
"default": true "default": true
}, },

View File

@ -22,7 +22,7 @@
"$source": "projectName" "$source": "projectName"
}, },
"alias": "p", "alias": "p",
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. it will be removed in nx v19." "x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"directory": { "directory": {
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.", "description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
@ -43,7 +43,7 @@
}, },
"flat": { "flat": {
"description": "Flag to indicate if a directory is created.", "description": "Flag to indicate if a directory is created.",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19.", "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
"type": "boolean", "type": "boolean",
"default": false "default": false
}, },

View File

@ -22,7 +22,7 @@
"$source": "projectName" "$source": "projectName"
}, },
"alias": "p", "alias": "p",
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. it will be removed in nx v19." "x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. It will be removed in Nx v20."
}, },
"directory": { "directory": {
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.", "description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
@ -43,7 +43,7 @@
}, },
"flat": { "flat": {
"description": "Flag to indicate if a directory is created.", "description": "Flag to indicate if a directory is created.",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19.", "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
"type": "boolean", "type": "boolean",
"default": false "default": false
}, },

Some files were not shown because too many files have changed in this diff Show More