nx 19.4.0 → 19.4.2
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 +12 -12
- package/src/command-line/reset/reset.js +1 -1
- package/src/commands-runner/create-command-graph.js +32 -10
- package/src/core/graph/main.js +1 -1
- package/src/core/graph/styles.css +1 -1
- package/src/plugins/js/utils/register.js +29 -13
- package/src/project-graph/plugins/isolation/messaging.d.ts +1 -1
- package/src/project-graph/plugins/isolation/plugin-pool.js +1 -1
- package/src/project-graph/plugins/isolation/plugin-worker.js +5 -1
- package/src/project-graph/utils/project-configuration-utils.js +3 -1
- package/src/tasks-runner/create-task-graph.d.ts +2 -1
- package/src/tasks-runner/create-task-graph.js +14 -30
- package/src/tasks-runner/task-graph-utils.d.ts +1 -1
- package/src/tasks-runner/task-graph-utils.js +4 -4
- package/src/tasks-runner/utils.d.ts +15 -2
- package/src/tasks-runner/utils.js +89 -25
- package/src/utils/find-matching-projects.d.ts +4 -0
- package/src/utils/find-matching-projects.js +7 -4
- package/src/utils/serializable-error.js +6 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "nx",
|
3
|
-
"version": "19.4.
|
3
|
+
"version": "19.4.2",
|
4
4
|
"private": false,
|
5
5
|
"description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",
|
6
6
|
"repository": {
|
@@ -70,7 +70,7 @@
|
|
70
70
|
"yargs-parser": "21.1.1",
|
71
71
|
"node-machine-id": "1.1.12",
|
72
72
|
"ora": "5.3.0",
|
73
|
-
"@nrwl/tao": "19.4.
|
73
|
+
"@nrwl/tao": "19.4.2"
|
74
74
|
},
|
75
75
|
"peerDependencies": {
|
76
76
|
"@swc-node/register": "^1.8.0",
|
@@ -85,16 +85,16 @@
|
|
85
85
|
}
|
86
86
|
},
|
87
87
|
"optionalDependencies": {
|
88
|
-
"@nx/nx-darwin-x64": "19.4.
|
89
|
-
"@nx/nx-darwin-arm64": "19.4.
|
90
|
-
"@nx/nx-linux-x64-gnu": "19.4.
|
91
|
-
"@nx/nx-linux-x64-musl": "19.4.
|
92
|
-
"@nx/nx-win32-x64-msvc": "19.4.
|
93
|
-
"@nx/nx-linux-arm64-gnu": "19.4.
|
94
|
-
"@nx/nx-linux-arm64-musl": "19.4.
|
95
|
-
"@nx/nx-linux-arm-gnueabihf": "19.4.
|
96
|
-
"@nx/nx-win32-arm64-msvc": "19.4.
|
97
|
-
"@nx/nx-freebsd-x64": "19.4.
|
88
|
+
"@nx/nx-darwin-x64": "19.4.2",
|
89
|
+
"@nx/nx-darwin-arm64": "19.4.2",
|
90
|
+
"@nx/nx-linux-x64-gnu": "19.4.2",
|
91
|
+
"@nx/nx-linux-x64-musl": "19.4.2",
|
92
|
+
"@nx/nx-win32-x64-msvc": "19.4.2",
|
93
|
+
"@nx/nx-linux-arm64-gnu": "19.4.2",
|
94
|
+
"@nx/nx-linux-arm64-musl": "19.4.2",
|
95
|
+
"@nx/nx-linux-arm-gnueabihf": "19.4.2",
|
96
|
+
"@nx/nx-win32-arm64-msvc": "19.4.2",
|
97
|
+
"@nx/nx-freebsd-x64": "19.4.2"
|
98
98
|
},
|
99
99
|
"nx-migrations": {
|
100
100
|
"migrations": "./migrations.json",
|
@@ -52,7 +52,7 @@ async function resetHandler(args) {
|
|
52
52
|
await cleanupNativeFileCache();
|
53
53
|
}
|
54
54
|
catch {
|
55
|
-
|
55
|
+
// ignore, deleting the native file cache is not critical and can fail if another process is locking the file
|
56
56
|
}
|
57
57
|
try {
|
58
58
|
await cleanupWorkspaceData();
|
@@ -3,19 +3,41 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createCommandGraph = void 0;
|
4
4
|
const task_graph_utils_1 = require("../tasks-runner/task-graph-utils");
|
5
5
|
const output_1 = require("../utils/output");
|
6
|
+
/**
|
7
|
+
* Make structure { lib: [dep], dep: [dep1], dep1: [] } from projectName lib and projectGraph
|
8
|
+
* @param projectGraph
|
9
|
+
* @param projectName
|
10
|
+
* @param resolved reference to an object that will contain resolved dependencies
|
11
|
+
* @returns
|
12
|
+
*/
|
13
|
+
const recursiveResolveDeps = (projectGraph, projectName, resolved) => {
|
14
|
+
if (projectGraph.dependencies[projectName].length === 0) {
|
15
|
+
// no deps - no resolve
|
16
|
+
resolved[projectName] = [];
|
17
|
+
return;
|
18
|
+
}
|
19
|
+
// if already resolved - just skip
|
20
|
+
if (resolved[projectName]) {
|
21
|
+
return resolved[projectName];
|
22
|
+
}
|
23
|
+
// deps string list
|
24
|
+
const projectDeps = [
|
25
|
+
...new Set(projectGraph.dependencies[projectName]
|
26
|
+
.map((projectDep) => projectDep.target)
|
27
|
+
.filter((projectDep) => projectGraph.nodes[projectDep])).values(),
|
28
|
+
];
|
29
|
+
// define
|
30
|
+
resolved[projectName] = projectDeps;
|
31
|
+
if (projectDeps.length > 0) {
|
32
|
+
for (const dep of projectDeps) {
|
33
|
+
recursiveResolveDeps(projectGraph, dep, resolved);
|
34
|
+
}
|
35
|
+
}
|
36
|
+
};
|
6
37
|
function createCommandGraph(projectGraph, projectNames, nxArgs) {
|
7
38
|
const dependencies = {};
|
8
39
|
for (const projectName of projectNames) {
|
9
|
-
|
10
|
-
dependencies[projectName] = [
|
11
|
-
...new Set(projectGraph.dependencies[projectName]
|
12
|
-
.map((projectDep) => projectDep.target)
|
13
|
-
.filter((projectDep) => projectGraph.nodes[projectDep])).values(),
|
14
|
-
];
|
15
|
-
}
|
16
|
-
else {
|
17
|
-
dependencies[projectName] = [];
|
18
|
-
}
|
40
|
+
recursiveResolveDeps(projectGraph, projectName, dependencies);
|
19
41
|
}
|
20
42
|
const roots = Object.keys(dependencies).filter((d) => dependencies[d].length === 0);
|
21
43
|
const commandGraph = {
|