diff --git a/docs/generated/devkit/NxJsonConfiguration.md b/docs/generated/devkit/NxJsonConfiguration.md index 630091b22a9b96..2714da15b1ce69 100644 --- a/docs/generated/devkit/NxJsonConfiguration.md +++ b/docs/generated/devkit/NxJsonConfiguration.md @@ -198,7 +198,7 @@ Specifies how many tasks can be run in parallel. ### plugins -• `Optional` **plugins**: `PluginDefinition`[] +• `Optional` **plugins**: [`PluginDefinition`](../../devkit/documents/PluginDefinition)[] Plugins for extending the project graph diff --git a/docs/generated/devkit/PluginDefinition.md b/docs/generated/devkit/PluginDefinition.md new file mode 100644 index 00000000000000..27131155b6b0bb --- /dev/null +++ b/docs/generated/devkit/PluginDefinition.md @@ -0,0 +1,3 @@ +# Type alias: PluginDefinition + +Ƭ **PluginDefinition**: `string` \| { `options?`: `unknown` ; `plugin`: `string` } diff --git a/docs/generated/devkit/README.md b/docs/generated/devkit/README.md index 9ff7a125e01a02..55a9ea396d593b 100644 --- a/docs/generated/devkit/README.md +++ b/docs/generated/devkit/README.md @@ -77,6 +77,7 @@ It only uses language primitives and immutable objects - [NxPluginV1](../../devkit/documents/NxPluginV1) - [NxPluginV2](../../devkit/documents/NxPluginV2) - [PackageManager](../../devkit/documents/PackageManager) +- [PluginDefinition](../../devkit/documents/PluginDefinition) - [ProjectGraphNode](../../devkit/documents/ProjectGraphNode) - [ProjectTargetConfigurator](../../devkit/documents/ProjectTargetConfigurator) - [ProjectType](../../devkit/documents/ProjectType) diff --git a/docs/generated/devkit/Workspace.md b/docs/generated/devkit/Workspace.md index b10eb82517971a..41de5dfd4e2024 100644 --- a/docs/generated/devkit/Workspace.md +++ b/docs/generated/devkit/Workspace.md @@ -254,7 +254,7 @@ Specifies how many tasks can be run in parallel. ### plugins -• `Optional` **plugins**: `PluginDefinition`[] +• `Optional` **plugins**: [`PluginDefinition`](../../devkit/documents/PluginDefinition)[] Plugins for extending the project graph diff --git a/docs/generated/packages/devkit/documents/nx_devkit.md b/docs/generated/packages/devkit/documents/nx_devkit.md index 9ff7a125e01a02..55a9ea396d593b 100644 --- a/docs/generated/packages/devkit/documents/nx_devkit.md +++ b/docs/generated/packages/devkit/documents/nx_devkit.md @@ -77,6 +77,7 @@ It only uses language primitives and immutable objects - [NxPluginV1](../../devkit/documents/NxPluginV1) - [NxPluginV2](../../devkit/documents/NxPluginV2) - [PackageManager](../../devkit/documents/PackageManager) +- [PluginDefinition](../../devkit/documents/PluginDefinition) - [ProjectGraphNode](../../devkit/documents/ProjectGraphNode) - [ProjectTargetConfigurator](../../devkit/documents/ProjectTargetConfigurator) - [ProjectType](../../devkit/documents/ProjectType) diff --git a/packages/nx/src/config/nx-json.ts b/packages/nx/src/config/nx-json.ts index 1abe6235872a64..e36673206aba8f 100644 --- a/packages/nx/src/config/nx-json.ts +++ b/packages/nx/src/config/nx-json.ts @@ -225,9 +225,7 @@ export interface NxJsonConfiguration { useDaemonProcess?: boolean; } -export type PluginDefinition = - | string - | { plugin: string; options?: Record }; +export type PluginDefinition = string | { plugin: string; options?: unknown }; export function readNxJson(root: string = workspaceRoot): NxJsonConfiguration { const nxJson = join(root, 'nx.json'); diff --git a/packages/nx/src/devkit-exports.ts b/packages/nx/src/devkit-exports.ts index a14192dbc115f3..c4fbf14b47421d 100644 --- a/packages/nx/src/devkit-exports.ts +++ b/packages/nx/src/devkit-exports.ts @@ -69,6 +69,7 @@ export type { ImplicitDependencyEntry, ImplicitJsonSubsetDependency, NxJsonConfiguration, + PluginDefinition, TargetDefaults, NxAffectedConfig, } from './config/nx-json'; diff --git a/packages/nx/src/project-graph/nx-deps-cache.ts b/packages/nx/src/project-graph/nx-deps-cache.ts index 93a8aa54acfc07..9e14320e0a6d94 100644 --- a/packages/nx/src/project-graph/nx-deps-cache.ts +++ b/packages/nx/src/project-graph/nx-deps-cache.ts @@ -328,7 +328,7 @@ function processProjectNode( type PluginData = { name: string; version: string; - options?: Record; + options?: unknown; }; function getNxJsonPluginsData(