nx 22.1.0 → 22.2.0-beta.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/package.json +11 -11
- package/release/changelog-renderer/index.d.ts +1 -0
- package/release/changelog-renderer/index.d.ts.map +1 -1
- package/release/changelog-renderer/index.js +12 -12
- package/src/ai/constants.d.ts +6 -1
- package/src/ai/constants.d.ts.map +1 -1
- package/src/ai/constants.js +14 -3
- package/src/ai/set-up-ai-agents/set-up-ai-agents.d.ts.map +1 -1
- package/src/ai/set-up-ai-agents/set-up-ai-agents.js +41 -7
- package/src/command-line/daemon/command-object.d.ts +3 -2
- package/src/command-line/daemon/command-object.d.ts.map +1 -1
- package/src/command-line/daemon/command-object.js +11 -4
- package/src/command-line/graph/graph.d.ts.map +1 -1
- package/src/command-line/graph/graph.js +25 -16
- package/src/command-line/release/utils/resolve-semver-specifier.d.ts +1 -1
- package/src/command-line/release/utils/resolve-semver-specifier.d.ts.map +1 -1
- package/src/command-line/release/utils/resolve-semver-specifier.js +3 -3
- package/src/command-line/release/utils/shared.d.ts +2 -1
- package/src/command-line/release/utils/shared.d.ts.map +1 -1
- package/src/command-line/release/utils/shared.js +27 -1
- package/src/command-line/release/version/derive-specifier-from-conventional-commits.js +1 -1
- package/src/command-line/report/report.d.ts +4 -0
- package/src/command-line/report/report.d.ts.map +1 -1
- package/src/command-line/report/report.js +72 -1
- package/src/command-line/yargs-utils/arguments-of.d.ts +12 -0
- package/src/command-line/yargs-utils/arguments-of.d.ts.map +1 -0
- package/src/command-line/yargs-utils/arguments-of.js +9 -0
- package/src/core/graph/main.js +1 -1
- package/src/daemon/cache.d.ts +2 -1
- package/src/daemon/cache.d.ts.map +1 -1
- package/src/daemon/cache.js +10 -26
- package/src/daemon/client/client.d.ts +2 -0
- package/src/daemon/client/client.d.ts.map +1 -1
- package/src/daemon/client/client.js +55 -26
- package/src/daemon/is-nx-version-mismatch.d.ts +3 -0
- package/src/daemon/is-nx-version-mismatch.d.ts.map +1 -0
- package/src/daemon/is-nx-version-mismatch.js +24 -0
- package/src/daemon/server/server.d.ts.map +1 -1
- package/src/daemon/server/server.js +7 -18
- package/src/daemon/tmp-dir.d.ts.map +1 -1
- package/src/daemon/tmp-dir.js +1 -0
- package/src/project-graph/error-types.d.ts +3 -2
- package/src/project-graph/error-types.d.ts.map +1 -1
- package/src/project-graph/error-types.js +9 -2
- package/src/project-graph/plugins/get-plugins.d.ts.map +1 -1
- package/src/project-graph/plugins/get-plugins.js +33 -35
- package/src/project-graph/plugins/in-process-loader.d.ts.map +1 -1
- package/src/project-graph/plugins/in-process-loader.js +2 -2
- package/src/project-graph/plugins/isolation/plugin-pool.js +3 -2
- package/src/project-graph/plugins/isolation/plugin-worker.js +3 -3
- package/src/project-graph/plugins/loaded-nx-plugin.d.ts +5 -0
- package/src/project-graph/plugins/loaded-nx-plugin.d.ts.map +1 -1
- package/src/project-graph/plugins/loaded-nx-plugin.js +5 -0
- package/src/project-graph/project-graph.d.ts +1 -0
- package/src/project-graph/project-graph.d.ts.map +1 -1
- package/src/project-graph/project-graph.js +21 -0
- package/src/project-graph/utils/project-configuration-utils.d.ts +1 -1
- package/src/project-graph/utils/project-configuration-utils.d.ts.map +1 -1
- package/src/project-graph/utils/project-configuration-utils.js +46 -15
- package/src/project-graph/utils/retrieve-workspace-files.d.ts +1 -1
- package/src/project-graph/utils/retrieve-workspace-files.d.ts.map +1 -1
- package/src/tasks-runner/pseudo-terminal.js +1 -1
- package/src/tasks-runner/task-orchestrator.d.ts +1 -0
- package/src/tasks-runner/task-orchestrator.d.ts.map +1 -1
- package/src/tasks-runner/task-orchestrator.js +22 -5
- package/src/tasks-runner/utils.d.ts.map +1 -1
- package/src/tasks-runner/utils.js +3 -2
- package/src/utils/ab-testing.js +1 -1
- package/src/utils/assert-workspace-validity.d.ts.map +1 -1
- package/src/utils/assert-workspace-validity.js +5 -8
- package/src/utils/call-sites.d.ts +15 -0
- package/src/utils/call-sites.d.ts.map +1 -0
- package/src/utils/call-sites.js +28 -0
- package/src/utils/package-manager.d.ts +1 -0
- package/src/utils/package-manager.d.ts.map +1 -1
- package/src/utils/package-manager.js +4 -0
|
@@ -71,7 +71,7 @@ const server = (0, net_1.createServer)((socket) => {
|
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
|
-
createNodes: async ({ configFiles, context, tx })
|
|
74
|
+
createNodes: async function createNodes({ configFiles, context, tx }) {
|
|
75
75
|
try {
|
|
76
76
|
const result = await plugin.createNodes[1](configFiles, context);
|
|
77
77
|
return {
|
|
@@ -90,7 +90,7 @@ const server = (0, net_1.createServer)((socket) => {
|
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
|
-
createDependencies: async ({ context, tx })
|
|
93
|
+
createDependencies: async function createDependencies({ context, tx }) {
|
|
94
94
|
try {
|
|
95
95
|
const result = await plugin.createDependencies(context);
|
|
96
96
|
return {
|
|
@@ -109,7 +109,7 @@ const server = (0, net_1.createServer)((socket) => {
|
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
111
|
},
|
|
112
|
-
createMetadata: async ({ graph, context, tx })
|
|
112
|
+
createMetadata: async function createMetadata({ graph, context, tx }) {
|
|
113
113
|
try {
|
|
114
114
|
const result = await plugin.createMetadata(graph, context);
|
|
115
115
|
return {
|
|
@@ -2,6 +2,11 @@ import type { ProjectGraph } from '../../config/project-graph';
|
|
|
2
2
|
import { type PluginConfiguration } from '../../config/nx-json';
|
|
3
3
|
import type { RawProjectGraphDependency } from '../project-graph-builder';
|
|
4
4
|
import type { CreateDependenciesContext, CreateMetadataContext, CreateNodesContextV2, CreateNodesResult, NxPluginV2, PostTasksExecutionContext, PreTasksExecutionContext, ProjectsMetadata } from './public-api';
|
|
5
|
+
/**
|
|
6
|
+
* NOTE: Avoid using `import type` with this class. It causes issues with
|
|
7
|
+
* jest's module resolution when running tests in projects that import
|
|
8
|
+
* the devkit-internals
|
|
9
|
+
*/
|
|
5
10
|
export declare class LoadedNxPlugin {
|
|
6
11
|
index?: number;
|
|
7
12
|
readonly name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loaded-nx-plugin.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/project-graph/plugins/loaded-nx-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAKhE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,KAAK,EACV,yBAAyB,EACzB,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,UAAU,EACV,yBAAyB,EACzB,wBAAwB,EACxB,gBAAgB,EACjB,MAAM,cAAc,CAAC;AAItB,qBAAa,cAAc;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,CAAC,EAAE;QACrB,WAAW,EAAE,MAAM;QAGnB,EAAE,EAAE,CACF,YAAY,EAAE,MAAM,EAAE,EACtB,OAAO,EAAE,oBAAoB,KAC1B,OAAO,CACV,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAC1E;KACF,CAAC;IACF,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAC5B,OAAO,EAAE,yBAAyB,KAC/B,OAAO,CAAC,yBAAyB,EAAE,CAAC,CAAC;IAC1C,QAAQ,CAAC,cAAc,CAAC,EAAE,CACxB,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,qBAAqB,KAC3B,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC/B,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAC3B,OAAO,EAAE,wBAAwB,KAC9B,OAAO,CAA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AAC,EAAE,CAC5B,OAAO,EAAE,yBAAyB,KAC/B,OAAO,CAAC,yBAAyB,EAAE,CAAC,CAAC;IAC1C,QAAQ,CAAC,cAAc,CAAC,EAAE,CACxB,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,qBAAqB,KAC3B,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC/B,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAC3B,OAAO,EAAE,wBAAwB,KAC9B,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAChC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAC5B,OAAO,EAAE,yBAAyB,KAC/B,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnB,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;gBAEhB,MAAM,EAAE,UAAU,EAAE,gBAAgB,EAAE,mBAAmB;CAuFtE"}
|
|
@@ -4,6 +4,11 @@ exports.LoadedNxPlugin = void 0;
|
|
|
4
4
|
const error_types_1 = require("../error-types");
|
|
5
5
|
const enabled_1 = require("./isolation/enabled");
|
|
6
6
|
const client_1 = require("../../daemon/client/client");
|
|
7
|
+
/**
|
|
8
|
+
* NOTE: Avoid using `import type` with this class. It causes issues with
|
|
9
|
+
* jest's module resolution when running tests in projects that import
|
|
10
|
+
* the devkit-internals
|
|
11
|
+
*/
|
|
7
12
|
class LoadedNxPlugin {
|
|
8
13
|
constructor(plugin, pluginDefinition) {
|
|
9
14
|
this.name = plugin.name;
|
|
@@ -51,4 +51,5 @@ export declare function createProjectGraphAndSourceMapsAsync(opts?: {
|
|
|
51
51
|
projectGraph: ProjectGraph;
|
|
52
52
|
sourceMaps: import("./utils/project-configuration-utils").ConfigurationSourceMaps;
|
|
53
53
|
}>;
|
|
54
|
+
export declare function preventRecursionInGraphConstruction(): void;
|
|
54
55
|
//# sourceMappingURL=project-graph.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-graph.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/project-graph/project-graph.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"project-graph.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/project-graph/project-graph.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,uCAAuC,CAAC;AAqC/C;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,iBAAiB,CAAC,EAAE,MAAM,GACzB,YAAY,CAuBd;AAED,wBAAgB,8BAA8B,CAC5C,WAAW,EAAE,MAAM,GAClB,oBAAoB,CAQtB;AAED;;GAEG;AACH,wBAAgB,yCAAyC,CACvD,YAAY,EAAE,YAAY,GACzB,sBAAsB,CAUxB;AAED,wBAAsB,2CAA2C;;;GAiFhE;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE;IAAE,WAAW,EAAE,OAAO,CAAA;CAAE,EAAE,CAAC,KAAA,QA8BxE;AAgBD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,uBAAuB,CAC3C,IAAI,GAAE;IAAE,WAAW,EAAE,OAAO,CAAC;IAAC,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAGxD,GACA,OAAO,CAAC,YAAY,CAAC,CAkBvB;AAED,wBAAsB,oCAAoC,CACxD,IAAI,GAAE;IAAE,WAAW,EAAE,OAAO,CAAC;IAAC,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAGxD;;;GAmIF;AAED,wBAAgB,mCAAmC,SA0BlD"}
|
|
@@ -7,6 +7,7 @@ exports.buildProjectGraphAndSourceMapsWithoutDaemon = buildProjectGraphAndSource
|
|
|
7
7
|
exports.handleProjectGraphError = handleProjectGraphError;
|
|
8
8
|
exports.createProjectGraphAsync = createProjectGraphAsync;
|
|
9
9
|
exports.createProjectGraphAndSourceMapsAsync = createProjectGraphAndSourceMapsAsync;
|
|
10
|
+
exports.preventRecursionInGraphConstruction = preventRecursionInGraphConstruction;
|
|
10
11
|
const perf_hooks_1 = require("perf_hooks");
|
|
11
12
|
const nx_json_1 = require("../config/nx-json");
|
|
12
13
|
const client_1 = require("../daemon/client/client");
|
|
@@ -25,6 +26,7 @@ const native_1 = require("../native");
|
|
|
25
26
|
const path_1 = require("path");
|
|
26
27
|
const cache_directory_1 = require("../utils/cache-directory");
|
|
27
28
|
const delayed_spinner_1 = require("../utils/delayed-spinner");
|
|
29
|
+
const call_sites_1 = require("../utils/call-sites");
|
|
28
30
|
/**
|
|
29
31
|
* Synchronously reads the latest cached copy of the workspace's ProjectGraph.
|
|
30
32
|
*
|
|
@@ -77,6 +79,7 @@ function readProjectsConfigurationFromProjectGraph(projectGraph) {
|
|
|
77
79
|
};
|
|
78
80
|
}
|
|
79
81
|
async function buildProjectGraphAndSourceMapsWithoutDaemon() {
|
|
82
|
+
preventRecursionInGraphConstruction();
|
|
80
83
|
global.NX_GRAPH_CREATION = true;
|
|
81
84
|
const nxJson = (0, nx_json_1.readNxJson)();
|
|
82
85
|
perf_hooks_1.performance.mark('retrieve-project-configurations:start');
|
|
@@ -325,3 +328,21 @@ async function createProjectGraphAndSourceMapsAsync(opts = {
|
|
|
325
328
|
}
|
|
326
329
|
}
|
|
327
330
|
}
|
|
331
|
+
function preventRecursionInGraphConstruction() {
|
|
332
|
+
// preventRecursionInGraphConstruction -> callee -> ...
|
|
333
|
+
// slice removes preventRecursionInGraphConstruction and its caller,
|
|
334
|
+
// which is useful when using this function to detect recursion in buildProjectGraphAndSourceMapsWithoutDaemon
|
|
335
|
+
const stackframes = (0, call_sites_1.getCallSites)().slice(2);
|
|
336
|
+
if (stackframes.some((f) => {
|
|
337
|
+
const functionName = f.getFunctionName();
|
|
338
|
+
const fileName = f.getFileName() || '';
|
|
339
|
+
return (functionName === buildProjectGraphAndSourceMapsWithoutDaemon.name ||
|
|
340
|
+
(['createNodes', 'createDependencies', 'createMetadata'].includes(functionName || '') &&
|
|
341
|
+
fileName.endsWith('plugin-worker.js')));
|
|
342
|
+
})) {
|
|
343
|
+
throw new Error(`Project graph construction cannot be performed due to a loop detected in the call stack. This can happen if 'createProjectGraphAsync' is called directly or indirectly during project graph construction.\n` +
|
|
344
|
+
'To avoid this, you can add a check against "global.NX_GRAPH_CREATION" before calling "createProjectGraphAsync".\n' +
|
|
345
|
+
'Call stack:\n' +
|
|
346
|
+
stackframes.join('\n'));
|
|
347
|
+
}
|
|
348
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NxJsonConfiguration, TargetDefaults } from '../../config/nx-json';
|
|
2
2
|
import { ProjectGraphExternalNode } from '../../config/project-graph';
|
|
3
3
|
import { ProjectConfiguration, ProjectMetadata, TargetConfiguration, TargetMetadata } from '../../config/workspace-json-project-json';
|
|
4
|
-
import { LoadedNxPlugin } from '../plugins/loaded-nx-plugin';
|
|
4
|
+
import type { LoadedNxPlugin } from '../plugins/loaded-nx-plugin';
|
|
5
5
|
export type SourceInformation = [file: string | null, plugin: string];
|
|
6
6
|
export type ConfigurationSourceMaps = Record<string, Record<string, SourceInformation>>;
|
|
7
7
|
export declare function mergeProjectConfigurationIntoRootMap(projectRootMap: Record<string, ProjectConfiguration>, project: ProjectConfiguration, configurationSourceMaps?: ConfigurationSourceMaps, sourceInformation?: SourceInformation, skipTargetNormalization?: boolean): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-configuration-utils.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/project-graph/utils/project-configuration-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,mBAAmB,EACnB,cAAc,EACf,MAAM,0CAA0C,CAAC;AAUlD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"project-configuration-utils.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/project-graph/utils/project-configuration-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,mBAAmB,EACnB,cAAc,EACf,MAAM,0CAA0C,CAAC;AAUlD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AA2BlE,MAAM,MAAM,iBAAiB,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AACtE,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAC1C,MAAM,EACN,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAClC,CAAC;AAEF,wBAAgB,oCAAoC,CAClD,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,EACpD,OAAO,EAAE,oBAAoB,EAC7B,uBAAuB,CAAC,EAAE,uBAAuB,EACjD,iBAAiB,CAAC,EAAE,iBAAiB,EAGrC,uBAAuB,CAAC,EAAE,OAAO,GAChC,IAAI,CAgLN;AAED,wBAAgB,aAAa,CAAC,CAAC,GAAG,eAAe,GAAG,cAAc,EAChE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,EACzD,iBAAiB,EAAE,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C3C,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,GAC3C,mBAAmB,CAyErB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,mBAAmB,EAC3B,UAAU,CAAC,EAAE,mBAAmB,EAChC,sBAAsB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,EAC1D,iBAAiB,CAAC,EAAE,iBAAiB,EACrC,gBAAgB,CAAC,EAAE,MAAM,GACxB,mBAAmB,CAyErB;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,CAAC,EAAE,mBAAmB,EACtB,CAAC,EAAE,mBAAmB,WA+BvB;AA8DD,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,EACxE,MAAM,EAAE,CAAC,EACT,OAAO,EAAE,oBAAoB,EAC7B,GAAG,EAAE,MAAM,GACV,CAAC,CAwBH;AAED,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,MAAM,EAClB,cAAc,EAAE,cAAc,EAC9B,QAAQ,CAAC,EAAE,MAAM,GAChB,cAAc,CAAC,MAAM,CAAC,CA6BxB;AAqCD;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,mBAAmB,EAC3B,OAAO,EAAE,oBAAoB,EAC7B,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,EACjD,WAAW,EAAE,MAAM,4BAiDpB"}
|
|
@@ -354,13 +354,18 @@ function mergeCreateNodesResults(results, nxJsonConfiguration, workspaceRoot, er
|
|
|
354
354
|
try {
|
|
355
355
|
validateAndNormalizeProjectRootMap(workspaceRoot, projectRootMap, nxJsonConfiguration, configurationSourceMaps);
|
|
356
356
|
}
|
|
357
|
-
catch (
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
357
|
+
catch (error) {
|
|
358
|
+
const unknownErrors = [];
|
|
359
|
+
let _errors = error instanceof AggregateError ? error.errors : [error];
|
|
360
|
+
for (const e of _errors) {
|
|
361
|
+
if ((0, error_types_1.isProjectsWithNoNameError)(e) ||
|
|
362
|
+
(0, error_types_1.isMultipleProjectsWithSameNameError)(e) ||
|
|
363
|
+
(0, error_types_1.isWorkspaceValidityError)(e)) {
|
|
364
|
+
errors.push(e);
|
|
365
|
+
}
|
|
366
|
+
else {
|
|
367
|
+
throw e;
|
|
368
|
+
}
|
|
364
369
|
}
|
|
365
370
|
}
|
|
366
371
|
const rootMap = createRootMap(projectRootMap);
|
|
@@ -438,6 +443,7 @@ function validateAndNormalizeProjectRootMap(workspaceRoot, projectRootMap, nxJso
|
|
|
438
443
|
// to provide better error messaging.
|
|
439
444
|
const conflicts = new Map();
|
|
440
445
|
const projectRootsWithNoName = [];
|
|
446
|
+
const validityErrors = [];
|
|
441
447
|
for (const root in projectRootMap) {
|
|
442
448
|
const project = projectRootMap[root];
|
|
443
449
|
// We're setting `// targets` as a comment `targets` is empty due to Project Crystal.
|
|
@@ -473,13 +479,30 @@ function validateAndNormalizeProjectRootMap(workspaceRoot, projectRootMap, nxJso
|
|
|
473
479
|
}
|
|
474
480
|
for (const root in projectRootMap) {
|
|
475
481
|
const project = projectRootMap[root];
|
|
476
|
-
|
|
482
|
+
try {
|
|
483
|
+
normalizeTargets(project, sourceMaps, nxJsonConfiguration, workspaceRoot, projects);
|
|
484
|
+
}
|
|
485
|
+
catch (e) {
|
|
486
|
+
if (e instanceof error_types_1.WorkspaceValidityError) {
|
|
487
|
+
validityErrors.push(e);
|
|
488
|
+
}
|
|
489
|
+
else {
|
|
490
|
+
throw e;
|
|
491
|
+
}
|
|
492
|
+
}
|
|
477
493
|
}
|
|
494
|
+
const errors = [];
|
|
478
495
|
if (conflicts.size > 0) {
|
|
479
|
-
|
|
496
|
+
errors.push(new error_types_1.MultipleProjectsWithSameNameError(conflicts, projects));
|
|
480
497
|
}
|
|
481
498
|
if (projectRootsWithNoName.length > 0) {
|
|
482
|
-
|
|
499
|
+
errors.push(new error_types_1.ProjectsWithNoNameError(projectRootsWithNoName, projects));
|
|
500
|
+
}
|
|
501
|
+
if (validityErrors.length > 0) {
|
|
502
|
+
errors.push(...validityErrors);
|
|
503
|
+
}
|
|
504
|
+
if (errors.length > 0) {
|
|
505
|
+
throw new AggregateError(errors);
|
|
483
506
|
}
|
|
484
507
|
return projectRootMap;
|
|
485
508
|
}
|
|
@@ -488,6 +511,7 @@ function normalizeTargets(project, sourceMaps, nxJsonConfiguration, workspaceRoo
|
|
|
488
511
|
* Project configurations keyed by project name
|
|
489
512
|
*/
|
|
490
513
|
projects) {
|
|
514
|
+
const targetErrorMessage = [];
|
|
491
515
|
for (const targetName in project.targets) {
|
|
492
516
|
project.targets[targetName] = normalizeTarget(project.targets[targetName], project, workspaceRoot, projects, [project.root, targetName].join(':'));
|
|
493
517
|
const projectSourceMaps = sourceMaps[project.root];
|
|
@@ -497,14 +521,14 @@ projects) {
|
|
|
497
521
|
if (targetDefaults && isCompatibleTarget(targetConfig, targetDefaults)) {
|
|
498
522
|
project.targets[targetName] = mergeTargetDefaultWithTargetDefinition(targetName, project, normalizeTarget(targetDefaults, project, workspaceRoot, projects, ['nx.json[targetDefaults]', targetName].join(':')), projectSourceMaps);
|
|
499
523
|
}
|
|
524
|
+
const target = project.targets[targetName];
|
|
500
525
|
if (
|
|
501
526
|
// If the target has no executor or command, it doesn't do anything
|
|
502
|
-
!
|
|
503
|
-
!
|
|
527
|
+
!target.executor &&
|
|
528
|
+
!target.command) {
|
|
504
529
|
// But it may have dependencies that do something
|
|
505
|
-
if (
|
|
506
|
-
|
|
507
|
-
project.targets[targetName].executor = 'nx:noop';
|
|
530
|
+
if (target.dependsOn && target.dependsOn.length > 0) {
|
|
531
|
+
target.executor = 'nx:noop';
|
|
508
532
|
}
|
|
509
533
|
else {
|
|
510
534
|
// If it does nothing, and has no depenencies,
|
|
@@ -512,6 +536,13 @@ projects) {
|
|
|
512
536
|
delete project.targets[targetName];
|
|
513
537
|
}
|
|
514
538
|
}
|
|
539
|
+
if (target.cache && target.continuous) {
|
|
540
|
+
targetErrorMessage.push(`- "${targetName}" has both "cache" and "continuous" set to true. Continuous targets cannot be cached. Please remove the "cache" property.`);
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
if (targetErrorMessage.length > 0) {
|
|
544
|
+
targetErrorMessage.unshift(`Errors detected in targets of project "${project.name}":`);
|
|
545
|
+
throw new error_types_1.WorkspaceValidityError(targetErrorMessage.join('\n'));
|
|
515
546
|
}
|
|
516
547
|
}
|
|
517
548
|
function validateProject(project,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ProjectConfiguration } from '../../config/workspace-json-project-json';
|
|
2
2
|
import { NxJsonConfiguration } from '../../config/nx-json';
|
|
3
3
|
import { ConfigurationResult } from './project-configuration-utils';
|
|
4
|
-
import { LoadedNxPlugin } from '../plugins/loaded-nx-plugin';
|
|
4
|
+
import type { LoadedNxPlugin } from '../plugins/loaded-nx-plugin';
|
|
5
5
|
/**
|
|
6
6
|
* Walks the workspace directory to create the `projectFileMap`, `ProjectConfigurations` and `allWorkspaceFiles`
|
|
7
7
|
* @throws
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retrieve-workspace-files.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/project-graph/utils/retrieve-workspace-files.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAKhF,OAAO,EAAE,mBAAmB,EAAc,MAAM,sBAAsB,CAAC;AACvE,OAAO,EACL,mBAAmB,EAEpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"retrieve-workspace-files.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/project-graph/utils/retrieve-workspace-files.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAKhF,OAAO,EAAE,mBAAmB,EAAc,MAAM,sBAAsB,CAAC;AACvE,OAAO,EACL,mBAAmB,EAEpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAUlE;;;;;GAKG;AACH,wBAAsB,sBAAsB,CAC1C,aAAa,EAAE,MAAM,EACrB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;;;;;;;GA6BvC;AAED;;GAEG;AAEH,wBAAsB,6BAA6B,CACjD,OAAO,EAAE,cAAc,EAAE,EACzB,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,mBAAmB,CAAC,CAc9B;AAED,wBAAsB,gDAAgD,CACpE,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,mBAAmB,CAAC,CAsB9B;AAED,wBAAsB,iCAAiC,CACrD,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,KAAK,CAAC,cAAc,CAAC,GAC7B,OAAO,CAAC,MAAM,EAAE,CAAC,CAOnB;AAQD,wBAAsB,mDAAmD,CACvE,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC,CAsB/C;AAED,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,KAAK,CAAC,cAAc,CAAC,GAC7B,MAAM,EAAE,CAEV"}
|
|
@@ -110,7 +110,7 @@ class PseudoTtyProcess {
|
|
|
110
110
|
kill(s) {
|
|
111
111
|
if (this.isAlive) {
|
|
112
112
|
try {
|
|
113
|
-
this.childProcess.kill(s);
|
|
113
|
+
this.childProcess.kill(s || 'SIGTERM');
|
|
114
114
|
}
|
|
115
115
|
catch {
|
|
116
116
|
// when the child process completes before we explicitly call kill, this will throw
|
|
@@ -37,6 +37,7 @@ export declare class TaskOrchestrator {
|
|
|
37
37
|
private waitingForTasks;
|
|
38
38
|
private groups;
|
|
39
39
|
private bailed;
|
|
40
|
+
private cleaningUp;
|
|
40
41
|
private runningContinuousTasks;
|
|
41
42
|
private runningRunCommandsTasks;
|
|
42
43
|
constructor(hasher: TaskHasher, initiatingProject: string | undefined, initiatingTasks: Task[], projectGraph: ProjectGraph, taskGraph: TaskGraph, nxJson: NxJsonConfiguration, options: NxArgs & DefaultTasksRunnerOptions, bail: boolean, daemon: DaemonClient, outputStyle: string, taskGraphForHashing?: TaskGraph);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-orchestrator.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/tasks-runner/task-orchestrator.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGvD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAQnD,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAMrD,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAGnE,OAAO,EAAgB,UAAU,EAAE,MAAM,cAAc,CAAC;AAGxD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAM3D,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAiB,MAAM,kBAAkB,CAAC;AAUxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAExE,qBAAa,gBAAgB;
|
|
1
|
+
{"version":3,"file":"task-orchestrator.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/tasks-runner/task-orch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AC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM;YAoIvC,WAAW;YAQX,YAAY;YAmFZ,kCAAkC;IAQhD,OAAO,CAAC,QAAQ;YA0CF,iBAAiB;IAiB/B,OAAO,CAAC,qBAAqB;IAO7B,OAAO,CAAC,UAAU;IASlB,OAAO,CAAC,SAAS;YAIH,0BAA0B;YAQ1B,iBAAiB;YAQjB,OAAO;IA6BrB,OAAO,CAAC,8BAA8B;CA6BvC;AAED,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,GAAG,yBAAyB,EAC3C,SAAS,EAAE,SAAS,UAqBrB"}
|
|
@@ -54,6 +54,7 @@ class TaskOrchestrator {
|
|
|
54
54
|
this.waitingForTasks = [];
|
|
55
55
|
this.groups = [];
|
|
56
56
|
this.bailed = false;
|
|
57
|
+
this.cleaningUp = false;
|
|
57
58
|
this.runningContinuousTasks = new Map();
|
|
58
59
|
this.runningRunCommandsTasks = new Map();
|
|
59
60
|
}
|
|
@@ -458,11 +459,16 @@ class TaskOrchestrator {
|
|
|
458
459
|
}
|
|
459
460
|
const runningTask = new shared_running_task_1.SharedRunningTask(this.runningTasksService, task.id);
|
|
460
461
|
this.runningContinuousTasks.set(task.id, runningTask);
|
|
461
|
-
runningTask.onExit(() => {
|
|
462
|
-
if (this.tuiEnabled) {
|
|
462
|
+
runningTask.onExit((code) => {
|
|
463
|
+
if (this.tuiEnabled && !this.completedTasks[task.id]) {
|
|
463
464
|
this.options.lifeCycle.setTaskStatus(task.id, 9 /* NativeTaskStatus.Stopped */);
|
|
464
465
|
}
|
|
465
466
|
this.runningContinuousTasks.delete(task.id);
|
|
467
|
+
// we're not cleaning up, so this is an unexpected exit, fail the task
|
|
468
|
+
if (!this.cleaningUp) {
|
|
469
|
+
console.error(`Task "${task.id}" is continuous but exited with code ${code}`);
|
|
470
|
+
this.complete([{ taskId: task.id, status: 'failure' }]);
|
|
471
|
+
}
|
|
466
472
|
});
|
|
467
473
|
// task is already running by another process, we schedule the next tasks
|
|
468
474
|
// and release the threads
|
|
@@ -497,13 +503,19 @@ class TaskOrchestrator {
|
|
|
497
503
|
const childProcess = await this.runTask(task, streamOutput, env, temporaryOutputPath, pipeOutput);
|
|
498
504
|
this.runningTasksService.addRunningTask(task.id);
|
|
499
505
|
this.runningContinuousTasks.set(task.id, childProcess);
|
|
500
|
-
childProcess.onExit(() => {
|
|
501
|
-
if
|
|
506
|
+
childProcess.onExit((code) => {
|
|
507
|
+
// Only set status to Stopped if task hasn't been completed yet
|
|
508
|
+
if (this.tuiEnabled && !this.completedTasks[task.id]) {
|
|
502
509
|
this.options.lifeCycle.setTaskStatus(task.id, 9 /* NativeTaskStatus.Stopped */);
|
|
503
510
|
}
|
|
504
511
|
if (this.runningContinuousTasks.delete(task.id)) {
|
|
505
512
|
this.runningTasksService.removeRunningTask(task.id);
|
|
506
513
|
}
|
|
514
|
+
// we're not cleaning up, so this is an unexpected exit, fail the task
|
|
515
|
+
if (!this.cleaningUp) {
|
|
516
|
+
console.error(`Task "${task.id}" is continuous but exited with code ${code}`);
|
|
517
|
+
this.complete([{ taskId: task.id, status: 'failure' }]);
|
|
518
|
+
}
|
|
507
519
|
});
|
|
508
520
|
await this.scheduleNextTasksAndReleaseThreads();
|
|
509
521
|
if (this.initializingTaskIds.has(task.id)) {
|
|
@@ -659,6 +671,7 @@ class TaskOrchestrator {
|
|
|
659
671
|
}
|
|
660
672
|
// endregion utils
|
|
661
673
|
async cleanup() {
|
|
674
|
+
this.cleaningUp = true;
|
|
662
675
|
this.forkedProcessTaskRunner.cleanup();
|
|
663
676
|
await Promise.all([
|
|
664
677
|
...Array.from(this.runningContinuousTasks).map(async ([taskId, t]) => {
|
|
@@ -687,8 +700,12 @@ class TaskOrchestrator {
|
|
|
687
700
|
}
|
|
688
701
|
cleanUpUnneededContinuousTasks() {
|
|
689
702
|
const incompleteTasks = this.tasksSchedule.getIncompleteTasks();
|
|
690
|
-
const neededContinuousTasks = new Set(
|
|
703
|
+
const neededContinuousTasks = new Set();
|
|
691
704
|
for (const task of incompleteTasks) {
|
|
705
|
+
// Keep initiating tasks that are still incomplete
|
|
706
|
+
if (task.continuous && this.initializingTaskIds.has(task.id)) {
|
|
707
|
+
neededContinuousTasks.add(task.id);
|
|
708
|
+
}
|
|
692
709
|
const continuousDependencies = this.taskGraph.continuousDependencies[task.id];
|
|
693
710
|
for (const continuousDependency of continuousDependencies) {
|
|
694
711
|
neededContinuousTasks.add(continuousDependency);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/tasks-runner/utils.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACvB,MAAM,uCAAuC,CAAC;AAe/C,MAAM,MAAM,gCAAgC,GAAG,sBAAsB,GAAG;IACtE,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAEF,wBAAgB,oBAAoB,CAClC,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EACxD,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,sBAAsB,GAAG,MAAM,CAAC,EAAE,CAAC,EAC5E,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,MAAM,EAAE,GACvB,gCAAgC,EAAE,GAAG,SAAS,CAehD;AAED,wBAAgB,mCAAmC,CACjD,UAAU,EAAE,MAAM,GAAG,sBAAsB,EAC3C,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,YAAY,EACnB,cAAc,EAAE,MAAM,EAAE,GACvB,gCAAgC,EAAE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
|
|
386
386
|
return false;
|
|
387
387
|
}
|
|
388
388
|
function isCacheableTask(task, options) {
|
|
389
|
-
if (task.cache !== undefined
|
|
389
|
+
if (task.cache !== undefined) {
|
|
390
390
|
return task.cache;
|
|
391
391
|
}
|
|
392
392
|
const cacheable = options.cacheableOperations || options.cacheableTargets;
|
|
@@ -396,7 +396,8 @@ function isCacheableTask(task, options) {
|
|
|
396
396
|
}
|
|
397
397
|
function longRunningTask(task) {
|
|
398
398
|
const t = task.target.target;
|
|
399
|
-
return (
|
|
399
|
+
return (task.continuous ||
|
|
400
|
+
(!!task.overrides['watch'] && task.overrides['watch'] !== 'false') ||
|
|
400
401
|
t.endsWith(':watch') ||
|
|
401
402
|
t.endsWith('-watch') ||
|
|
402
403
|
t === 'serve' ||
|
package/src/utils/ab-testing.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assert-workspace-validity.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/utils/assert-workspace-validity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAMxD,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,EAC9C,MAAM,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"assert-workspace-validity.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/utils/assert-workspace-validity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAMxD,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,EAC9C,MAAM,EAAE,mBAAmB,QA2F5B"}
|
|
@@ -28,19 +28,16 @@ function assertWorkspaceValidity(projects, nxJson) {
|
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
const projectsWithNonArrayImplicitDependencies = new Map();
|
|
31
|
-
projectNames
|
|
32
|
-
.filter((projectName) => {
|
|
31
|
+
projectNames.reduce((map, projectName) => {
|
|
33
32
|
const project = projects[projectName];
|
|
34
|
-
// Report if for whatever reason, a project is configured to use implicitDependencies but it is not an array
|
|
35
33
|
if (!!project.implicitDependencies &&
|
|
36
34
|
!Array.isArray(project.implicitDependencies)) {
|
|
37
35
|
projectsWithNonArrayImplicitDependencies.set(projectName, project.implicitDependencies);
|
|
36
|
+
return map;
|
|
37
|
+
}
|
|
38
|
+
if (!project.implicitDependencies) {
|
|
39
|
+
return map;
|
|
38
40
|
}
|
|
39
|
-
return (!!project.implicitDependencies &&
|
|
40
|
-
Array.isArray(project.implicitDependencies));
|
|
41
|
-
})
|
|
42
|
-
.reduce((map, projectName) => {
|
|
43
|
-
const project = projects[projectName];
|
|
44
41
|
detectAndSetInvalidProjectGlobValues(map, projectName, project.implicitDependencies, projects, projectGraphNodes);
|
|
45
42
|
return map;
|
|
46
43
|
}, invalidImplicitDependencies);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns an array of CallSite objects representing the current call stack.
|
|
3
|
+
*
|
|
4
|
+
* NOTE: The returned CallSite[] does not include the frame for getCallSites itself,
|
|
5
|
+
* but will include the function that called getCallSites. If you are checking for
|
|
6
|
+
* things like recursion, you need to make sure to account for that.
|
|
7
|
+
*
|
|
8
|
+
* The behavior should match node:util.getCallSites, introduced in Node.js v22.0.0.
|
|
9
|
+
*
|
|
10
|
+
* @todo(@AgentEnder) Move this to node:util when we remove support for Node.js versions < 22, around Nx 24
|
|
11
|
+
*
|
|
12
|
+
* @returns {NodeJS.CallSite[]} An array of CallSite objects.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getCallSites(): NodeJS.CallSite[];
|
|
15
|
+
//# sourceMappingURL=call-sites.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"call-sites.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/utils/call-sites.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,sBAY3B"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCallSites = getCallSites;
|
|
4
|
+
/**
|
|
5
|
+
* Returns an array of CallSite objects representing the current call stack.
|
|
6
|
+
*
|
|
7
|
+
* NOTE: The returned CallSite[] does not include the frame for getCallSites itself,
|
|
8
|
+
* but will include the function that called getCallSites. If you are checking for
|
|
9
|
+
* things like recursion, you need to make sure to account for that.
|
|
10
|
+
*
|
|
11
|
+
* The behavior should match node:util.getCallSites, introduced in Node.js v22.0.0.
|
|
12
|
+
*
|
|
13
|
+
* @todo(@AgentEnder) Move this to node:util when we remove support for Node.js versions < 22, around Nx 24
|
|
14
|
+
*
|
|
15
|
+
* @returns {NodeJS.CallSite[]} An array of CallSite objects.
|
|
16
|
+
*/
|
|
17
|
+
function getCallSites() {
|
|
18
|
+
const prepareStackTraceBackup = Error.prepareStackTrace;
|
|
19
|
+
Error.prepareStackTrace = (_, stackTraces) => {
|
|
20
|
+
return stackTraces;
|
|
21
|
+
};
|
|
22
|
+
const errorObject = {};
|
|
23
|
+
Error.captureStackTrace(errorObject);
|
|
24
|
+
const trace = errorObject.stack;
|
|
25
|
+
Error.prepareStackTrace = prepareStackTraceBackup;
|
|
26
|
+
trace.shift(); // remove getCallSites
|
|
27
|
+
return trace; // return stack up to what called getCallSites
|
|
28
|
+
}
|
|
@@ -10,6 +10,7 @@ export interface PackageManagerCommands {
|
|
|
10
10
|
exec: string;
|
|
11
11
|
dlx: string;
|
|
12
12
|
list: string;
|
|
13
|
+
why: string;
|
|
13
14
|
run: (script: string, args?: string) => string;
|
|
14
15
|
getRegistryUrl?: string;
|
|
15
16
|
publish: (packageRoot: string, registry: string, registryConfigKey: string, tag: string) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-manager.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/utils/package-manager.ts"],"names":[],"mappings":"AA+BA,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,CAAC;AAE7D,MAAM,WAAW,sBAAsB;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAE/C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,CACP,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,iBAAiB,EAAE,MAAM,EACzB,GAAG,EAAE,MAAM,KACR,MAAM,CAAC;IAEZ,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,GAAE,MAAW,GAAG,cAAc,CAYrE;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,cAAc,GAAE,cAAuC,EACvD,IAAI,GAAE,MAAsB,GAC3B,OAAO,CAmBT;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,wBAAwB,CACtC,cAAc,GAAE,cAAuC,EACvD,IAAI,GAAE,MAAsB,GAC3B,sBAAsB,
|
|
1
|
+
{"version":3,"file":"package-manager.d.ts","sourceRoot":"","sources":["../../../../../packages/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,GAAE,cAAuC,EACvD,UAAU,GAAE,MAAM,EAAyC,EAC3D,IAAI,GAAE,MAAsB,GAC3B,IAAI,CAiEN"}
|
|
@@ -113,6 +113,7 @@ function getPackageManagerCommand(packageManager = detectPackageManager(), root
|
|
|
113
113
|
dlx: useBerry ? 'yarn dlx' : 'npx',
|
|
114
114
|
run: (script, args) => `yarn ${script}${args ? ` ${args}` : ''}`,
|
|
115
115
|
list: useBerry ? 'yarn info --name-only' : 'yarn list',
|
|
116
|
+
why: 'yarn why',
|
|
116
117
|
getRegistryUrl: useBerry
|
|
117
118
|
? 'yarn config get npmRegistryServer'
|
|
118
119
|
: 'yarn config get registry',
|
|
@@ -151,6 +152,7 @@ function getPackageManagerCommand(packageManager = detectPackageManager(), root
|
|
|
151
152
|
: ` ${args}`
|
|
152
153
|
: ''}`,
|
|
153
154
|
list: 'pnpm ls --depth 100',
|
|
155
|
+
why: 'pnpm why',
|
|
154
156
|
getRegistryUrl: 'pnpm config get registry',
|
|
155
157
|
publish: (packageRoot, registry, registryConfigKey, tag) => `pnpm publish "${packageRoot}" --json --"${allowRegistryConfigKey ? registryConfigKey : 'registry'}=${registry}" --tag=${tag} --no-git-checks`,
|
|
156
158
|
ignoreScriptsFlag: '--ignore-scripts',
|
|
@@ -168,6 +170,7 @@ function getPackageManagerCommand(packageManager = detectPackageManager(), root
|
|
|
168
170
|
dlx: 'npx',
|
|
169
171
|
run: (script, args) => `npm run ${script}${args ? ' -- ' + args : ''}`,
|
|
170
172
|
list: 'npm ls',
|
|
173
|
+
why: 'npm explain',
|
|
171
174
|
getRegistryUrl: 'npm config get registry',
|
|
172
175
|
publish: (packageRoot, registry, registryConfigKey, tag) => `npm publish "${packageRoot}" --json --"${registryConfigKey}=${registry}" --tag=${tag}`,
|
|
173
176
|
ignoreScriptsFlag: '--ignore-scripts',
|
|
@@ -186,6 +189,7 @@ function getPackageManagerCommand(packageManager = detectPackageManager(), root
|
|
|
186
189
|
dlx: 'bunx',
|
|
187
190
|
run: (script, args) => `bun run ${script} -- ${args}`,
|
|
188
191
|
list: 'bun pm ls',
|
|
192
|
+
why: 'bun why',
|
|
189
193
|
// Unlike npm, bun publish does not support a custom registryConfigKey option
|
|
190
194
|
publish: (packageRoot, registry, registryConfigKey, tag) => `bun publish --cwd="${packageRoot}" --json --registry="${registry}" --tag=${tag}`,
|
|
191
195
|
ignoreScriptsFlag: '--ignore-scripts',
|