nx 21.0.0-beta.5 → 21.0.0-beta.6
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/native/nx.wasm32-wasi.wasm +0 -0
- package/src/tasks-runner/forked-process-task-runner.js +3 -0
- package/src/tasks-runner/life-cycles/tui-summary-life-cycle.js +5 -6
- package/src/tasks-runner/running-tasks/node-child-process.js +4 -11
- package/src/tasks-runner/task-orchestrator.js +20 -4
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "nx",
|
3
|
-
"version": "21.0.0-beta.
|
3
|
+
"version": "21.0.0-beta.6",
|
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": {
|
@@ -83,16 +83,16 @@
|
|
83
83
|
}
|
84
84
|
},
|
85
85
|
"optionalDependencies": {
|
86
|
-
"@nx/nx-darwin-arm64": "21.0.0-beta.
|
87
|
-
"@nx/nx-darwin-x64": "21.0.0-beta.
|
88
|
-
"@nx/nx-freebsd-x64": "21.0.0-beta.
|
89
|
-
"@nx/nx-linux-arm-gnueabihf": "21.0.0-beta.
|
90
|
-
"@nx/nx-linux-arm64-gnu": "21.0.0-beta.
|
91
|
-
"@nx/nx-linux-arm64-musl": "21.0.0-beta.
|
92
|
-
"@nx/nx-linux-x64-gnu": "21.0.0-beta.
|
93
|
-
"@nx/nx-linux-x64-musl": "21.0.0-beta.
|
94
|
-
"@nx/nx-win32-arm64-msvc": "21.0.0-beta.
|
95
|
-
"@nx/nx-win32-x64-msvc": "21.0.0-beta.
|
86
|
+
"@nx/nx-darwin-arm64": "21.0.0-beta.6",
|
87
|
+
"@nx/nx-darwin-x64": "21.0.0-beta.6",
|
88
|
+
"@nx/nx-freebsd-x64": "21.0.0-beta.6",
|
89
|
+
"@nx/nx-linux-arm-gnueabihf": "21.0.0-beta.6",
|
90
|
+
"@nx/nx-linux-arm64-gnu": "21.0.0-beta.6",
|
91
|
+
"@nx/nx-linux-arm64-musl": "21.0.0-beta.6",
|
92
|
+
"@nx/nx-linux-x64-gnu": "21.0.0-beta.6",
|
93
|
+
"@nx/nx-linux-x64-musl": "21.0.0-beta.6",
|
94
|
+
"@nx/nx-win32-arm64-msvc": "21.0.0-beta.6",
|
95
|
+
"@nx/nx-win32-x64-msvc": "21.0.0-beta.6"
|
96
96
|
},
|
97
97
|
"nx-migrations": {
|
98
98
|
"migrations": "./migrations.json",
|
Binary file
|
@@ -140,6 +140,9 @@ class ForkedProcessTaskRunner {
|
|
140
140
|
}
|
141
141
|
this.pseudoTerminals.delete(pseudoTerminal);
|
142
142
|
this.processes.delete(p);
|
143
|
+
if (!streamOutput) {
|
144
|
+
this.options.lifeCycle.printTaskTerminalOutput(task, code === 0 ? 'success' : 'failure', terminalOutput);
|
145
|
+
}
|
143
146
|
this.writeTerminalOutput(temporaryOutputPath, terminalOutput);
|
144
147
|
});
|
145
148
|
return p;
|
@@ -31,20 +31,19 @@ function getTuiTerminalSummaryLifeCycle({ projectNames, tasks, args, overrides,
|
|
31
31
|
}
|
32
32
|
};
|
33
33
|
lifeCycle.printTaskTerminalOutput = (task, taskStatus, terminalOutput) => {
|
34
|
+
taskIdsInOrderOfCompletion.push(task.id);
|
34
35
|
tasksToTerminalOutputs[task.id] = { terminalOutput, taskStatus };
|
35
36
|
};
|
36
37
|
lifeCycle.setTaskStatus = (taskId, taskStatus) => {
|
37
38
|
if (taskStatus === 9 /* NativeTaskStatus.Stopped */) {
|
38
39
|
totalStoppedTasks++;
|
39
|
-
taskIdsInOrderOfCompletion.push(taskId);
|
40
40
|
}
|
41
41
|
};
|
42
42
|
lifeCycle.endTasks = (taskResults) => {
|
43
|
-
for (
|
43
|
+
for (const { task, status } of taskResults) {
|
44
44
|
totalCompletedTasks++;
|
45
|
-
inProgressTasks.delete(
|
46
|
-
|
47
|
-
switch (t.status) {
|
45
|
+
inProgressTasks.delete(task.id);
|
46
|
+
switch (status) {
|
48
47
|
case 'remote-cache':
|
49
48
|
case 'local-cache':
|
50
49
|
case 'local-cache-kept-existing':
|
@@ -56,7 +55,7 @@ function getTuiTerminalSummaryLifeCycle({ projectNames, tasks, args, overrides,
|
|
56
55
|
break;
|
57
56
|
case 'failure':
|
58
57
|
totalFailedTasks++;
|
59
|
-
failedTasks.add(
|
58
|
+
failedTasks.add(task.id);
|
60
59
|
break;
|
61
60
|
}
|
62
61
|
}
|
@@ -153,18 +153,11 @@ class NodeChildProcessWithDirectOutput {
|
|
153
153
|
this.exitCallbacks.push(cb);
|
154
154
|
}
|
155
155
|
async getResults() {
|
156
|
-
|
157
|
-
|
158
|
-
return Promise.resolve({
|
159
|
-
code: this.exitCode,
|
160
|
-
terminalOutput,
|
161
|
-
});
|
156
|
+
if (!this.exited) {
|
157
|
+
await this.waitForExit();
|
162
158
|
}
|
163
|
-
|
164
|
-
return
|
165
|
-
code: this.exitCode,
|
166
|
-
terminalOutput,
|
167
|
-
});
|
159
|
+
const terminalOutput = this.getTerminalOutput();
|
160
|
+
return { code: this.exitCode, terminalOutput };
|
168
161
|
}
|
169
162
|
waitForExit() {
|
170
163
|
return new Promise((res) => {
|
@@ -408,8 +408,16 @@ class TaskOrchestrator {
|
|
408
408
|
// and release the threads
|
409
409
|
await this.scheduleNextTasksAndReleaseThreads();
|
410
410
|
if (this.initializingTaskIds.has(task.id)) {
|
411
|
-
|
412
|
-
|
411
|
+
await new Promise((res) => {
|
412
|
+
runningTask.onExit((code) => {
|
413
|
+
if (!this.tuiEnabled) {
|
414
|
+
if (code > 128) {
|
415
|
+
process.exit(code);
|
416
|
+
}
|
417
|
+
}
|
418
|
+
res();
|
419
|
+
});
|
420
|
+
});
|
413
421
|
}
|
414
422
|
return runningTask;
|
415
423
|
}
|
@@ -435,8 +443,16 @@ class TaskOrchestrator {
|
|
435
443
|
});
|
436
444
|
await this.scheduleNextTasksAndReleaseThreads();
|
437
445
|
if (this.initializingTaskIds.has(task.id)) {
|
438
|
-
|
439
|
-
|
446
|
+
await new Promise((res) => {
|
447
|
+
childProcess.onExit((code) => {
|
448
|
+
if (!this.tuiEnabled) {
|
449
|
+
if (code > 128) {
|
450
|
+
process.exit(code);
|
451
|
+
}
|
452
|
+
}
|
453
|
+
res();
|
454
|
+
});
|
455
|
+
});
|
440
456
|
}
|
441
457
|
return childProcess;
|
442
458
|
}
|