@nx/dotnet 23.0.0-pr.35465.2bc2643 → 23.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -20,8 +20,6 @@
20
20
 
21
21
  <hr>
22
22
 
23
- > Note: The `@nx/dotnet` plugin is currently experimental. Features and APIs may change.
24
-
25
23
  # Nx: Smart Monorepos · Fast Builds
26
24
 
27
25
  Get to green PRs in half the time. Nx optimizes your builds, scales your CI, and fixes failed PRs. Built for developers and AI agents.
@@ -27,7 +27,7 @@ export interface DotNetAnalyzerOptions {
27
27
  * Results are cached based on the content hash of all project files.
28
28
  * This should be called by createNodes to populate the cache.
29
29
  */
30
- export declare function analyzeProjects(projectFiles: string[], options?: DotNetAnalyzerOptions): Promise<AnalysisResult>;
30
+ export declare function analyzeProjects(files: string[], options?: DotNetAnalyzerOptions): Promise<AnalysisResult>;
31
31
  /**
32
32
  * Read the cached analysis results without running the analyzer.
33
33
  * This should be called by createDependencies, which always runs after createNodes.
@@ -1 +1 @@
1
- {"version":3,"file":"analyzer-client.d.ts","sourceRoot":"","sources":["../../src/analyzer/analyzer-client.ts"],"names":[],"mappings":"AAIA,OAAO,EAAyB,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAMzE,MAAM,WAAW,qBAAqB;IAEpC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;IAElD,gBAAgB,EAAE,MAAM,CACtB,MAAM,EACN;QAAE,IAAI,EAAE,MAAM,EAAE,CAAC;QAAC,gBAAgB,EAAE,MAAM,CAAA;KAAE,CAC7C,CAAC;CACH;AACD,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,KAAK,CAAC;CACd;AACD,MAAM,MAAM,cAAc,GAAG,qBAAqB,GAAG,mBAAmB,CAAC;AA2BzE;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,c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iB,CAAC,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AA4ID;;;;GAIG;AACH,wBAAsB,eAAe,CACnC,KAAK,EAAE,MAAM,EAAE,EACf,OAAO,CAAC,EAAE,qBAAqB,GAC9B,OAAO,CAAC,cAAc,CAAC,CA2DzB;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,IAAI,cAAc,CASzD;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,IAAI,CAEjC;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,cAAc,GACrB,MAAM,IAAI,mBAAmB,CAE/B;AAED,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,cAAc,GACrB,MAAM,IAAI,qBAAqB,CAEjC"}
@@ -13,22 +13,6 @@ const workspace_context_1 = require("nx/src/utils/workspace-context");
13
13
  const cache_directory_1 = require("nx/src/utils/cache-directory");
14
14
  const file_hasher_1 = require("nx/src/hasher/file-hasher");
15
15
  const plugin_cache_utils_1 = require("nx/src/utils/plugin-cache-utils");
16
- const analyzerCaches = new Map();
17
- function getCachePathForOptionsHash(optionsHash) {
18
- return (0, node_path_1.join)(cache_directory_1.workspaceDataDirectory, `dotnet-${optionsHash}.hash`);
19
- }
20
- function readAnalyzerCache(optionsHash) {
21
- if (analyzerCaches.has(optionsHash)) {
22
- return analyzerCaches.get(optionsHash);
23
- }
24
- const cacheFilePath = getCachePathForOptionsHash(optionsHash);
25
- return new plugin_cache_utils_1.PluginCache(cacheFilePath);
26
- }
27
- function writeAnalyzerCache(optionsHash, cache) {
28
- analyzerCaches.set(optionsHash, cache);
29
- const cacheFilePath = getCachePathForOptionsHash(optionsHash);
30
- cache.writeToDisk(cacheFilePath);
31
- }
32
16
  let cache = null;
33
17
  /**
34
18
  * Get the path to the msbuild-analyzer executable
@@ -46,21 +30,22 @@ function getAnalyzerPath() {
46
30
  return path;
47
31
  }
48
32
  }
49
- throw new Error(`msbuild-analyzer not found at any expected location. Please build it first with: nx run dotnet:build-analyzer`);
33
+ throw new Error(`msbuild-analyzer not found at any expected location. Please build it first with: nx run dotnet:copy-assets`);
50
34
  }
51
35
  /**
52
- * Calculate a hash of all project files and Directory.Build.* files to determine if we need to re-analyze
36
+ * Hash every file that affects MSBuild evaluation project files plus the Directory.*
37
+ * matches surfaced by the createNodesV2 glob. The analyzer partitions the same list on
38
+ * its side, so we don't classify it here.
53
39
  */
54
- async function calculateProjectFilesHash(projectFiles) {
55
- const hash = await (0, workspace_context_1.hashWithWorkspaceContext)(devkit_1.workspaceRoot, projectFiles.concat('Directory.Build.*', '**/Directory.Build.*'));
56
- return hash;
40
+ async function calculateProjectFilesHash(files) {
41
+ return await (0, workspace_context_1.hashWithWorkspaceContext)(devkit_1.workspaceRoot, files);
57
42
  }
58
43
  /**
59
44
  * Run the msbuild-analyzer and return the results.
60
45
  * Uses stdin for large file lists to avoid ARG_MAX issues.
61
46
  */
62
- function runAnalyzer(projectFiles, options) {
63
- if (projectFiles.length === 0) {
47
+ function runAnalyzer(files, options) {
48
+ if (files.length === 0) {
64
49
  return { nodesByFile: {}, referencesByRoot: {} };
65
50
  }
66
51
  const analyzerPath = getAnalyzerPath();
@@ -98,8 +83,9 @@ function runAnalyzer(projectFiles, options) {
98
83
  if (options) {
99
84
  args.push(JSON.stringify(options));
100
85
  }
101
- // Use stdin mode for large file lists to avoid ARG_MAX issues
102
- const input = projectFiles.join('\n');
86
+ // Use stdin mode for large file lists to avoid ARG_MAX issues. The analyzer
87
+ // partitions paths by filename, so we just stream everything in one block.
88
+ const input = files.join('\n');
103
89
  const result = (0, node_child_process_1.spawnSync)('dotnet', args, {
104
90
  input,
105
91
  encoding: 'utf-8',
@@ -134,8 +120,8 @@ function runAnalyzer(projectFiles, options) {
134
120
  * Results are cached based on the content hash of all project files.
135
121
  * This should be called by createNodes to populate the cache.
136
122
  */
137
- async function analyzeProjects(projectFiles, options) {
138
- const filesHash = await calculateProjectFilesHash(projectFiles);
123
+ async function analyzeProjects(files, options) {
124
+ const filesHash = await calculateProjectFilesHash(files);
139
125
  // Return cached results if the hash matches
140
126
  if (cache &&
141
127
  cache.hash === filesHash &&
@@ -146,7 +132,7 @@ async function analyzeProjects(projectFiles, options) {
146
132
  return cache.result;
147
133
  }
148
134
  const optionsHash = (0, file_hasher_1.hashObject)(options);
149
- const analyzerCache = readAnalyzerCache(optionsHash);
135
+ const analyzerCache = new plugin_cache_utils_1.PluginCache((0, node_path_1.join)(cache_directory_1.workspaceDataDirectory, `dotnet-${optionsHash}.hash`));
150
136
  const cachedResult = analyzerCache.get(filesHash);
151
137
  if (cachedResult) {
152
138
  // Update cache
@@ -158,7 +144,7 @@ async function analyzeProjects(projectFiles, options) {
158
144
  }
159
145
  // Run the analyzer
160
146
  try {
161
- const result = runAnalyzer(projectFiles, options);
147
+ const result = runAnalyzer(files, options);
162
148
  // Update local cache
163
149
  cache = {
164
150
  hash: filesHash,
@@ -166,7 +152,7 @@ async function analyzeProjects(projectFiles, options) {
166
152
  };
167
153
  // Update persistent cache
168
154
  analyzerCache.set(filesHash, result);
169
- writeAnalyzerCache(optionsHash, analyzerCache);
155
+ analyzerCache.writeToDisk();
170
156
  return result;
171
157
  }
172
158
  catch (error) {
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export * from './plugin';
1
+ export { createNodes, createNodesV2, createDependencies, } from './plugins/plugin';
2
2
  export { DotNetPluginOptions } from './plugins/create-nodes';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AAEzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,aAAa,EACb,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC"}
package/dist/index.js CHANGED
@@ -1,4 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./plugin"), exports);
3
+ exports.createDependencies = exports.createNodesV2 = exports.createNodes = void 0;
4
+ var plugin_1 = require("./plugins/plugin");
5
+ Object.defineProperty(exports, "createNodes", { enumerable: true, get: function () { return plugin_1.createNodes; } });
6
+ Object.defineProperty(exports, "createNodesV2", { enumerable: true, get: function () { return plugin_1.createNodesV2; } });
7
+ Object.defineProperty(exports, "createDependencies", { enumerable: true, get: function () { return plugin_1.createDependencies; } });
Binary file
Binary file
Binary file
@@ -0,0 +1,9 @@
1
+ import { Tree } from '@nx/devkit';
2
+ /**
3
+ * The `@nx/dotnet/plugin` subpath export has been removed in favor of the bare
4
+ * `@nx/dotnet` specifier. This migration rewrites any `nx.json` plugin entries
5
+ * that still register the plugin via the old `@nx/dotnet/plugin` path, updating
6
+ * each entry in place so the order of the `plugins` array is preserved.
7
+ */
8
+ export default function update(tree: Tree): void;
9
+ //# sourceMappingURL=update-plugin-path.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-plugin-path.d.ts","sourceRoot":"","sources":["../../../src/migrations/update-23-0-0/update-plugin-path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,IAAI,EAAgB,MAAM,YAAY,CAAC;AAK5D;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,IAAI,EAAE,IAAI,QAuBxC"}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = update;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const OLD_PATH = '@nx/dotnet/plugin';
6
+ const NEW_PATH = '@nx/dotnet';
7
+ /**
8
+ * The `@nx/dotnet/plugin` subpath export has been removed in favor of the bare
9
+ * `@nx/dotnet` specifier. This migration rewrites any `nx.json` plugin entries
10
+ * that still register the plugin via the old `@nx/dotnet/plugin` path, updating
11
+ * each entry in place so the order of the `plugins` array is preserved.
12
+ */
13
+ function update(tree) {
14
+ const nxJson = (0, devkit_1.readNxJson)(tree);
15
+ if (!nxJson?.plugins?.length) {
16
+ return;
17
+ }
18
+ let updated = false;
19
+ for (let i = 0; i < nxJson.plugins.length; i++) {
20
+ const plugin = nxJson.plugins[i];
21
+ if (typeof plugin === 'string') {
22
+ if (plugin === OLD_PATH) {
23
+ nxJson.plugins[i] = NEW_PATH;
24
+ updated = true;
25
+ }
26
+ }
27
+ else if (plugin.plugin === OLD_PATH) {
28
+ plugin.plugin = NEW_PATH;
29
+ updated = true;
30
+ }
31
+ }
32
+ if (updated) {
33
+ (0, devkit_1.updateNxJson)(tree, nxJson);
34
+ }
35
+ }
@@ -1,4 +1,4 @@
1
- import { CreateNodesV2, TargetConfiguration } from '@nx/devkit';
1
+ import { CreateNodes, TargetConfiguration } from '@nx/devkit';
2
2
  export type TargetConfigurationWithName = Partial<TargetConfiguration> & {
3
3
  /**
4
4
  * The name of the target. Defaults to the target type (e.g., 'build', 'test', etc.)
@@ -79,5 +79,9 @@ export interface DotNetPluginOptions {
79
79
  */
80
80
  run?: TargetConfigurationWithName | false;
81
81
  }
82
- export declare const createNodesV2: CreateNodesV2<DotNetPluginOptions>;
82
+ export declare const createNodes: CreateNodes<DotNetPluginOptions>;
83
+ /**
84
+ * @deprecated Use {@link createNodes} instead. This will be removed in Nx 24.
85
+ */
86
+ export declare const createNodesV2: CreateNodes<DotNetPluginOptions>;
83
87
  //# sourceMappingURL=create-nodes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-nodes.d.ts","sourceRoot":"","sources":["../../src/plugins/create-nodes.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAGb,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAOpB,MAAM,MAAM,2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G,KAAK,CAAC;IAC3C;;;OAGG;IACH,KAAK,CAAC,EAAE,2BAA2B,GAAG,KAAK,CAAC;IAC5C;;;OAGG;IACH,OAAO,CAAC,EAAE,2BAA2B,GAAG,KAAK,CAAC;IAC9C;;;OAGG;IACH,OAAO,CAAC,EAAE,2BAA2B,GAAG,KAAK,CAAC;IAC9C;;;OAGG;IACH,IAAI,CAAC,EAAE,2BAA2B,GAAG,KAAK,CAAC;IAC3C;;;OAGG;IACH,KAAK,CAAC,EAAE,2BAA2B,GAAG,KAAK,CAAC;IAC5C;;;OAGG;IACH,GAAG,CAAC,EAAE,2BAA2B,GAAG,KAAK,CAAC;CAC3C;AAqFD,eAAO,MAAM,WAAW,EAAE,WAAW,CAAC,mBAAmB,CA6ExD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,kCAAc,CAAC"}
@@ -1,10 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createNodesV2 = void 0;
3
+ exports.createNodesV2 = exports.createNodes = void 0;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const analyzer_client_1 = require("../analyzer/analyzer-client");
6
6
  const project_configuration_utils_1 = require("nx/src/project-graph/utils/project-configuration-utils");
7
- const dotnetProjectGlob = '**/*.{csproj,fsproj,vbproj}';
7
+ // MSBuild auto-imports Directory.Build.props/.targets from each ancestor of a project file,
8
+ // reads Directory.Build.rsp from ancestors during CLI builds, applies Directory.Solution.*
9
+ // when building a .sln, and reads Directory.Packages.props from the nearest ancestor when
10
+ // Central Package Management is in use. Matching them here causes createNodesV2 to re-run
11
+ // (and the analyzer's cache to invalidate) when any of them change, and gives us the file
12
+ // list to hand to the analyzer so it can declare per-project ancestor inputs.
13
+ // The analyzer partitions matched paths into project vs directory files by filename, so we
14
+ // don't have to repeat that classification on this side.
15
+ const dotnetProjectGlob = '**/{*.{csproj,fsproj,vbproj},Directory.Build.{props,targets,rsp},Directory.Solution.{props,targets},Directory.Packages.props}';
8
16
  /**
9
17
  * Merge user-specified target configurations with the generated targets from the analyzer
10
18
  */
@@ -57,7 +65,7 @@ function mergeUserTargetConfigurations(node, options) {
57
65
  targets: mergedTargets,
58
66
  };
59
67
  }
60
- exports.createNodesV2 = [
68
+ exports.createNodes = [
61
69
  dotnetProjectGlob,
62
70
  async (configFilePaths, options, context) => {
63
71
  // Analyze all projects - the C# analyzer builds the complete Nx structure
@@ -91,9 +99,12 @@ exports.createNodesV2 = [
91
99
  return configFilePaths.map((configFile) => {
92
100
  const node = nodesByFile[configFile];
93
101
  if (!node) {
102
+ // Directory.Build.* / Directory.Solution.* files contribute no projects of
103
+ // their own; returning an empty config is the conventional "skip" response.
94
104
  return [configFile, {}];
95
105
  }
96
- // Merge user-specified target configurations with generated targets
106
+ // Merge user-specified target configurations with generated targets. The analyzer
107
+ // has already written the Directory.* inputs onto each cacheable target's Inputs.
97
108
  const mergedNode = mergeUserTargetConfigurations(node, normalizedOptions);
98
109
  return [
99
110
  configFile,
@@ -112,3 +123,7 @@ exports.createNodesV2 = [
112
123
  }
113
124
  },
114
125
  ];
126
+ /**
127
+ * @deprecated Use {@link createNodes} instead. This will be removed in Nx 24.
128
+ */
129
+ exports.createNodesV2 = exports.createNodes;
@@ -1,5 +1,5 @@
1
- import { type DotNetPluginOptions } from './create-nodes';
2
- import { NxPlugin } from '@nx/devkit';
3
- declare const plugin: NxPlugin<DotNetPluginOptions>;
4
- export = plugin;
1
+ export declare const name: string;
2
+ export declare const createNodes: import("packages/devkit/dist").CreateNodes<import("./create-nodes").DotNetPluginOptions>;
3
+ export declare const createNodesV2: import("packages/devkit/dist").CreateNodes<import("./create-nodes").DotNetPluginOptions>;
4
+ export declare const createDependencies: import("packages/devkit/dist").CreateDependencies<import("./create-nodes").DotNetPluginOptions>;
5
5
  //# sourceMappingURL=plugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/plugins/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAEzE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAatC,QAAA,MAAM,MAAM,EAAE,QAAQ,CAAC,mBAAmB,CAC6B,CAAC;AAExE,SAAS,MAAM,CAAC"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/plugins/plugin.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,IAAI,QAAoD,CAAC;AAEtE,eAAO,MAAM,WAAW,0FAA2C,CAAC;AAEpE,eAAO,MAAM,aAAa,0FAA2C,CAAC;AAEtE,eAAO,MAAM,kBAAkB,iGAEH,CAAC"}
@@ -1,14 +1,15 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createDependencies = exports.createNodesV2 = exports.createNodes = exports.name = void 0;
2
4
  const create_nodes_1 = require("./create-nodes");
3
5
  const create_dependencies_1 = require("./create-dependencies");
4
- const regularPlugin = {
5
- name: '@nx/dotnet',
6
- createNodes: create_nodes_1.createNodesV2,
7
- createNodesV2: create_nodes_1.createNodesV2,
8
- createDependencies: create_dependencies_1.createDependencies,
9
- };
10
- const noopPlugin = {
11
- name: '@nx/dotnet [disabled]',
12
- };
13
- const plugin = process.env.NX_DOTNET_DISABLE === 'true' ? noopPlugin : regularPlugin;
14
- module.exports = plugin;
6
+ // The plugin can be fully disabled (e.g. to debug graph issues) via the
7
+ // NX_DOTNET_DISABLE environment variable. When disabled, no nodes or
8
+ // dependencies are created so Nx effectively ignores .NET projects.
9
+ const disabled = process.env.NX_DOTNET_DISABLE === 'true';
10
+ exports.name = disabled ? '@nx/dotnet [disabled]' : '@nx/dotnet';
11
+ exports.createNodes = disabled ? undefined : create_nodes_1.createNodes;
12
+ exports.createNodesV2 = disabled ? undefined : create_nodes_1.createNodes;
13
+ exports.createDependencies = disabled
14
+ ? undefined
15
+ : create_dependencies_1.createDependencies;
@@ -9,8 +9,6 @@
9
9
 
10
10
  <hr>
11
11
 
12
- > Note: The `@nx/dotnet` plugin is currently experimental. Features and APIs may change.
13
-
14
12
  # Nx: Smart Monorepos · Fast Builds
15
13
 
16
14
  Get to green PRs in half the time. Nx optimizes your builds, scales your CI, and fixes failed PRs. Built for developers and AI agents.
package/migrations.json CHANGED
@@ -1,4 +1,11 @@
1
1
  {
2
- "generators": {},
2
+ "generators": {
3
+ "update-23-0-0-migrate-dotnet-plugin-path": {
4
+ "cli": "nx",
5
+ "version": "23.0.0-beta.24",
6
+ "description": "Update `nx.json` plugin registrations that use the removed `@nx/dotnet/plugin` subpath to the bare `@nx/dotnet` specifier.",
7
+ "implementation": "./dist/migrations/update-23-0-0/update-plugin-path"
8
+ }
9
+ },
3
10
  "packageJsonUpdates": {}
4
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/dotnet",
3
- "version": "23.0.0-pr.35465.2bc2643",
3
+ "version": "23.0.0-rc.0",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for .NET containing graph support for working with .NET projects in an Nx workspace.",
6
6
  "keywords": [
@@ -26,13 +26,10 @@
26
26
  "type": "commonjs",
27
27
  "exports": {
28
28
  ".": {
29
+ "@nx/nx-source": "./src/index.ts",
29
30
  "default": "./dist/index.js",
30
31
  "types": "./dist/index.d.ts"
31
32
  },
32
- "./plugin": {
33
- "default": "./dist/plugin.js",
34
- "types": "./dist/plugin.d.ts"
35
- },
36
33
  "./generators/*/schema.json": "./dist/generators/*/schema.json",
37
34
  "./generators/*/schema": "./dist/generators/*/schema.d.ts",
38
35
  "./generators.json": "./generators.json",
@@ -41,7 +38,7 @@
41
38
  },
42
39
  "main": "./dist/index.js",
43
40
  "types": "./dist/index.d.ts",
44
- "typings": "./dist/src/index.d.ts",
41
+ "typings": "./dist/index.d.ts",
45
42
  "files": [
46
43
  "dist",
47
44
  "generators.json",
@@ -50,18 +47,18 @@
50
47
  "!dist/tsconfig.lib.tsbuildinfo"
51
48
  ],
52
49
  "dependencies": {
53
- "@nx/devkit": "23.0.0-pr.35465.2bc2643",
54
50
  "tslib": "^2.3.0",
55
- "ignore": "^7.0.5"
51
+ "ignore": "^7.0.5",
52
+ "@nx/devkit": "23.0.0-rc.0"
56
53
  },
57
54
  "devDependencies": {
58
55
  "@types/jest": "30.0.0",
59
- "@types/node": "^20.19.10",
60
- "jest": "^30.0.2",
56
+ "@types/node": "^24.11.0",
57
+ "jest": "30.3.0",
61
58
  "memfs": "^4.9.2",
62
- "nx": "23.0.0-pr.35465.2bc2643",
63
59
  "ts-jest": "^29.4.0",
64
- "typescript": "~5.9.2"
60
+ "typescript": "~5.9.2",
61
+ "nx": "23.0.0-rc.0"
65
62
  },
66
63
  "publishConfig": {
67
64
  "access": "public"
@@ -69,7 +66,8 @@
69
66
  "executors": "./executors.json",
70
67
  "generators": "./generators.json",
71
68
  "nx-migrations": {
72
- "migrations": "./migrations.json"
69
+ "migrations": "./migrations.json",
70
+ "supportsOptionalMigrations": true
73
71
  },
74
72
  "scripts": {}
75
73
  }
package/dist/plugin.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export { createNodesV2, createNodes, createDependencies, } from './plugins/plugin';
2
- //# sourceMappingURL=plugin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,WAAW,EACX,kBAAkB,GACnB,MAAM,kBAAkB,CAAC"}
package/dist/plugin.js DELETED
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createDependencies = exports.createNodes = exports.createNodesV2 = void 0;
4
- var plugin_1 = require("./plugins/plugin");
5
- Object.defineProperty(exports, "createNodesV2", { enumerable: true, get: function () { return plugin_1.createNodesV2; } });
6
- Object.defineProperty(exports, "createNodes", { enumerable: true, get: function () { return plugin_1.createNodes; } });
7
- Object.defineProperty(exports, "createDependencies", { enumerable: true, get: function () { return plugin_1.createDependencies; } });
@@ -1,5 +0,0 @@
1
- import { ProjectConfiguration } from '@nx/devkit';
2
- export type DotNetTargets = Pick<ProjectConfiguration, 'targets' | 'metadata'>;
3
- export declare function readTargetsCache(cachePath: string): Record<string, DotNetTargets>;
4
- export declare function writeTargetsToCache(cachePath: string, results: Record<string, DotNetTargets>): void;
5
- //# sourceMappingURL=cache.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../src/utils/cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAA+B,MAAM,YAAY,CAAC;AAG/E,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,oBAAoB,EAAE,SAAS,GAAG,UAAU,CAAC,CAAC;AAE/E,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,MAAM,GAChB,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAI/B;AAED,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,QAGvC"}
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.readTargetsCache = readTargetsCache;
4
- exports.writeTargetsToCache = writeTargetsToCache;
5
- const devkit_1 = require("@nx/devkit");
6
- const fs_1 = require("fs");
7
- function readTargetsCache(cachePath) {
8
- return process.env.NX_CACHE_PROJECT_GRAPH !== 'false' && (0, fs_1.existsSync)(cachePath)
9
- ? (0, devkit_1.readJsonFile)(cachePath)
10
- : {};
11
- }
12
- function writeTargetsToCache(cachePath, results) {
13
- (0, devkit_1.writeJsonFile)(cachePath, results);
14
- }