Skip to content

Commit

Permalink
fix(devkit): correct nx-json typing after plugin tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
AgentEnder committed Oct 18, 2023
1 parent 472dbc3 commit 496cd86
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/generated/devkit/NxJsonConfiguration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions docs/generated/devkit/PluginDefinition.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Type alias: PluginDefinition

Ƭ **PluginDefinition**: `string` \| { `options?`: `unknown` ; `plugin`: `string` }
1 change: 1 addition & 0 deletions docs/generated/devkit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion docs/generated/devkit/Workspace.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions docs/generated/packages/devkit/documents/nx_devkit.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 1 addition & 3 deletions packages/nx/src/config/nx-json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,7 @@ export interface NxJsonConfiguration<T = '*' | string[]> {
useDaemonProcess?: boolean;
}

export type PluginDefinition =
| string
| { plugin: string; options?: Record<string, unknown> };
export type PluginDefinition = string | { plugin: string; options?: unknown };

export function readNxJson(root: string = workspaceRoot): NxJsonConfiguration {
const nxJson = join(root, 'nx.json');
Expand Down
1 change: 1 addition & 0 deletions packages/nx/src/devkit-exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export type {
ImplicitDependencyEntry,
ImplicitJsonSubsetDependency,
NxJsonConfiguration,
PluginDefinition,
TargetDefaults,
NxAffectedConfig,
} from './config/nx-json';
Expand Down
2 changes: 1 addition & 1 deletion packages/nx/src/project-graph/nx-deps-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ function processProjectNode(
type PluginData = {
name: string;
version: string;
options?: Record<string, unknown>;
options?: unknown;
};

function getNxJsonPluginsData(
Expand Down

0 comments on commit 496cd86

Please sign in to comment.