nx 20.0.5 → 20.0.7
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/src/command-line/graph/graph.js +5 -8
- package/src/hasher/hash-task.js +1 -1
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/tasks-runner/cache.d.ts +2 -0
- package/src/tasks-runner/cache.js +10 -1
- package/src/utils/powerpack.js +1 -1
- package/src/utils/task-history.d.ts +1 -1
- package/src/utils/task-history.js +2 -2
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "nx",
|
3
|
-
"version": "20.0.
|
3
|
+
"version": "20.0.7",
|
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": {
|
@@ -80,16 +80,16 @@
|
|
80
80
|
}
|
81
81
|
},
|
82
82
|
"optionalDependencies": {
|
83
|
-
"@nx/nx-darwin-x64": "20.0.
|
84
|
-
"@nx/nx-darwin-arm64": "20.0.
|
85
|
-
"@nx/nx-linux-x64-gnu": "20.0.
|
86
|
-
"@nx/nx-linux-x64-musl": "20.0.
|
87
|
-
"@nx/nx-win32-x64-msvc": "20.0.
|
88
|
-
"@nx/nx-linux-arm64-gnu": "20.0.
|
89
|
-
"@nx/nx-linux-arm64-musl": "20.0.
|
90
|
-
"@nx/nx-linux-arm-gnueabihf": "20.0.
|
91
|
-
"@nx/nx-win32-arm64-msvc": "20.0.
|
92
|
-
"@nx/nx-freebsd-x64": "20.0.
|
83
|
+
"@nx/nx-darwin-x64": "20.0.7",
|
84
|
+
"@nx/nx-darwin-arm64": "20.0.7",
|
85
|
+
"@nx/nx-linux-x64-gnu": "20.0.7",
|
86
|
+
"@nx/nx-linux-x64-musl": "20.0.7",
|
87
|
+
"@nx/nx-win32-x64-msvc": "20.0.7",
|
88
|
+
"@nx/nx-linux-arm64-gnu": "20.0.7",
|
89
|
+
"@nx/nx-linux-arm64-musl": "20.0.7",
|
90
|
+
"@nx/nx-linux-arm-gnueabihf": "20.0.7",
|
91
|
+
"@nx/nx-win32-arm64-msvc": "20.0.7",
|
92
|
+
"@nx/nx-freebsd-x64": "20.0.7"
|
93
93
|
},
|
94
94
|
"nx-migrations": {
|
95
95
|
"migrations": "./migrations.json",
|
@@ -579,7 +579,7 @@ async function createTaskGraphClientResponse(pruneExternal = false) {
|
|
579
579
|
}
|
580
580
|
const nxJson = (0, configuration_1.readNxJson)();
|
581
581
|
perf_hooks_1.performance.mark('task graph generation:start');
|
582
|
-
const taskGraphs = getAllTaskGraphsForWorkspace(
|
582
|
+
const taskGraphs = getAllTaskGraphsForWorkspace(graph);
|
583
583
|
perf_hooks_1.performance.mark('task graph generation:end');
|
584
584
|
const planner = new native_1.HashPlanner(nxJson, (0, native_1.transferProjectGraph)((0, transform_objects_1.transformProjectGraphForRust)(graph)));
|
585
585
|
perf_hooks_1.performance.mark('task hash plan generation:start');
|
@@ -613,8 +613,7 @@ async function createExpandedTaskInputResponse(taskGraphClientResponse, depGraph
|
|
613
613
|
perf_hooks_1.performance.measure('task input static generation', 'task input static generation:start', 'task input static generation:end');
|
614
614
|
return response;
|
615
615
|
}
|
616
|
-
function getAllTaskGraphsForWorkspace(
|
617
|
-
const defaultDependencyConfigs = (0, create_task_graph_1.mapTargetDefaultsToDependencies)(nxJson.targetDefaults);
|
616
|
+
function getAllTaskGraphsForWorkspace(projectGraph) {
|
618
617
|
const taskGraphs = {};
|
619
618
|
const taskGraphErrors = {};
|
620
619
|
// TODO(cammisuli): improve performance here. Cache results or something.
|
@@ -624,7 +623,7 @@ function getAllTaskGraphsForWorkspace(nxJson, projectGraph) {
|
|
624
623
|
targets.forEach((target) => {
|
625
624
|
const taskId = createTaskId(projectName, target);
|
626
625
|
try {
|
627
|
-
taskGraphs[taskId] = (0, create_task_graph_1.createTaskGraph)(projectGraph,
|
626
|
+
taskGraphs[taskId] = (0, create_task_graph_1.createTaskGraph)(projectGraph, {}, [projectName], [target], undefined, {});
|
628
627
|
}
|
629
628
|
catch (err) {
|
630
629
|
taskGraphs[taskId] = {
|
@@ -639,7 +638,7 @@ function getAllTaskGraphsForWorkspace(nxJson, projectGraph) {
|
|
639
638
|
configurations.forEach((configuration) => {
|
640
639
|
const taskId = createTaskId(projectName, target, configuration);
|
641
640
|
try {
|
642
|
-
taskGraphs[taskId] = (0, create_task_graph_1.createTaskGraph)(projectGraph,
|
641
|
+
taskGraphs[taskId] = (0, create_task_graph_1.createTaskGraph)(projectGraph, {}, [projectName], [target], configuration, {});
|
643
642
|
}
|
644
643
|
catch (err) {
|
645
644
|
taskGraphs[taskId] = {
|
@@ -771,9 +770,7 @@ async function createJsonOutput(prunedGraph, rawGraph, projects, targets) {
|
|
771
770
|
graph: prunedGraph,
|
772
771
|
};
|
773
772
|
if (targets?.length) {
|
774
|
-
const
|
775
|
-
const defaultDependencyConfigs = (0, create_task_graph_1.mapTargetDefaultsToDependencies)(nxJson.targetDefaults);
|
776
|
-
const taskGraph = (0, create_task_graph_1.createTaskGraph)(rawGraph, defaultDependencyConfigs, projects, targets, undefined, {});
|
773
|
+
const taskGraph = (0, create_task_graph_1.createTaskGraph)(rawGraph, {}, projects, targets, undefined, {});
|
777
774
|
const hasher = (0, create_task_hasher_1.createTaskHasher)(rawGraph, (0, configuration_1.readNxJson)());
|
778
775
|
let tasks = Object.values(taskGraph.tasks);
|
779
776
|
const hashes = await hasher.hashTasks(tasks, taskGraph);
|
package/src/hasher/hash-task.js
CHANGED
@@ -30,7 +30,7 @@ async function hashTasksThatDoNotDependOnOutputsOfOtherTasks(hasher, projectGrap
|
|
30
30
|
const tasksToHash = tasksWithHashers
|
31
31
|
.filter(({ task, customHasher }) => {
|
32
32
|
// If a task has a custom hasher, it might depend on the outputs of other tasks
|
33
|
-
if (customHasher) {
|
33
|
+
if (customHasher && customHasher.name !== 'eslint-hasher') {
|
34
34
|
return false;
|
35
35
|
}
|
36
36
|
return !(taskGraph.dependencies[task.id].length > 0 &&
|
Binary file
|
@@ -33,6 +33,8 @@ export declare class DbCache {
|
|
33
33
|
private _getRemoteCache;
|
34
34
|
private getPowerpackS3Cache;
|
35
35
|
private getPowerpackSharedCache;
|
36
|
+
private getPowerpackGcsCache;
|
37
|
+
private getPowerpackAzureCache;
|
36
38
|
private getPowerpackCache;
|
37
39
|
private resolvePackage;
|
38
40
|
private assertCacheIsValid;
|
@@ -21,7 +21,8 @@ const get_cloud_options_1 = require("../nx-cloud/utilities/get-cloud-options");
|
|
21
21
|
const is_ci_1 = require("../utils/is-ci");
|
22
22
|
const output_1 = require("../utils/output");
|
23
23
|
function dbCacheEnabled(nxJson = (0, nx_json_1.readNxJson)()) {
|
24
|
-
return (
|
24
|
+
return (!native_1.IS_WASM &&
|
25
|
+
process.env.NX_DISABLE_DB !== 'true' &&
|
25
26
|
nxJson.useLegacyCache !== true &&
|
26
27
|
process.env.NX_DB_CACHE !== 'false');
|
27
28
|
}
|
@@ -118,6 +119,8 @@ class DbCache {
|
|
118
119
|
else {
|
119
120
|
return ((await this.getPowerpackS3Cache()) ??
|
120
121
|
(await this.getPowerpackSharedCache()) ??
|
122
|
+
(await this.getPowerpackGcsCache()) ??
|
123
|
+
(await this.getPowerpackAzureCache()) ??
|
121
124
|
null);
|
122
125
|
}
|
123
126
|
}
|
@@ -127,6 +130,12 @@ class DbCache {
|
|
127
130
|
getPowerpackSharedCache() {
|
128
131
|
return this.getPowerpackCache('@nx/powerpack-shared-fs-cache');
|
129
132
|
}
|
133
|
+
getPowerpackGcsCache() {
|
134
|
+
return this.getPowerpackCache('@nx/powerpack-gcs-cache');
|
135
|
+
}
|
136
|
+
getPowerpackAzureCache() {
|
137
|
+
return this.getPowerpackCache('@nx/powerpack-azure-cache');
|
138
|
+
}
|
130
139
|
async getPowerpackCache(pkg) {
|
131
140
|
let getRemoteCache = null;
|
132
141
|
try {
|
package/src/utils/powerpack.js
CHANGED
@@ -9,7 +9,7 @@ const workspace_root_1 = require("./workspace-root");
|
|
9
9
|
async function printPowerpackLicense() {
|
10
10
|
try {
|
11
11
|
const { organizationName, seatCount, workspaceCount } = await getPowerpackLicenseInformation();
|
12
|
-
logger_1.logger.log(`Nx Powerpack Licensed to ${organizationName} for ${seatCount} user${seatCount > 1 ? '' : '
|
12
|
+
logger_1.logger.log(`Nx Powerpack Licensed to ${organizationName} for ${seatCount} user${seatCount > 1 ? 's' : ''} in ${workspaceCount === 9999 ? 'an unlimited number of' : workspaceCount} workspace${workspaceCount > 1 ? 's' : ''}`);
|
13
13
|
}
|
14
14
|
catch { }
|
15
15
|
}
|
@@ -12,6 +12,6 @@ export declare class TaskHistory {
|
|
12
12
|
}
|
13
13
|
/**
|
14
14
|
* This function returns the singleton instance of TaskHistory
|
15
|
-
* @returns singleton instance of TaskHistory, null if database is disabled or WASM is
|
15
|
+
* @returns singleton instance of TaskHistory, null if database is disabled or WASM is enabled
|
16
16
|
*/
|
17
17
|
export declare function getTaskHistory(): TaskHistory | null;
|
@@ -38,10 +38,10 @@ exports.TaskHistory = TaskHistory;
|
|
38
38
|
let taskHistory;
|
39
39
|
/**
|
40
40
|
* This function returns the singleton instance of TaskHistory
|
41
|
-
* @returns singleton instance of TaskHistory, null if database is disabled or WASM is
|
41
|
+
* @returns singleton instance of TaskHistory, null if database is disabled or WASM is enabled
|
42
42
|
*/
|
43
43
|
function getTaskHistory() {
|
44
|
-
if (process.env.NX_DISABLE_DB === 'true' ||
|
44
|
+
if (process.env.NX_DISABLE_DB === 'true' || native_1.IS_WASM) {
|
45
45
|
return null;
|
46
46
|
}
|
47
47
|
if (!taskHistory) {
|