nx 21.0.0 → 21.0.1
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/release/release.js +6 -1
- package/src/core/graph/main.js +1 -1
- package/src/core/graph/styles.js +1 -1
- package/src/executors/run-commands/running-tasks.js +1 -1
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/tasks-runner/forked-process-task-runner.d.ts +1 -0
- package/src/tasks-runner/forked-process-task-runner.js +14 -11
- package/src/tasks-runner/task-orchestrator.js +1 -0
package/src/core/graph/styles.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[869],{
|
1
|
+
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[869],{2259:()=>{}},s=>{var e;e=2259,s(s.s=e)}]);
|
@@ -231,7 +231,7 @@ class RunningNodeProcess {
|
|
231
231
|
}
|
232
232
|
kill(signal) {
|
233
233
|
return new Promise((res, rej) => {
|
234
|
-
if (process.platform === 'win32'
|
234
|
+
if (process.platform === 'win32') {
|
235
235
|
if (this.childProcess.kill(signal)) {
|
236
236
|
res();
|
237
237
|
}
|
Binary file
|
@@ -233,6 +233,12 @@ class ForkedProcessTaskRunner {
|
|
233
233
|
writeTerminalOutput(outputPath, content) {
|
234
234
|
(0, fs_1.writeFileSync)(outputPath, content);
|
235
235
|
}
|
236
|
+
cleanup(signal) {
|
237
|
+
this.processes.forEach((p) => {
|
238
|
+
p.kill(signal);
|
239
|
+
});
|
240
|
+
this.cleanUpBatchProcesses();
|
241
|
+
}
|
236
242
|
setupProcessEventListeners() {
|
237
243
|
const messageHandler = (message) => {
|
238
244
|
this.pseudoTerminals.forEach((p) => {
|
@@ -246,29 +252,26 @@ class ForkedProcessTaskRunner {
|
|
246
252
|
};
|
247
253
|
// When the nx process gets a message, it will be sent into the task's process
|
248
254
|
process.on('message', messageHandler);
|
249
|
-
const cleanUp = (signal) => {
|
250
|
-
this.processes.forEach((p) => {
|
251
|
-
p.kill(signal);
|
252
|
-
});
|
253
|
-
process.off('message', messageHandler);
|
254
|
-
this.cleanUpBatchProcesses();
|
255
|
-
};
|
256
255
|
// Terminate any task processes on exit
|
257
256
|
process.once('exit', () => {
|
258
|
-
|
257
|
+
this.cleanup();
|
258
|
+
process.off('message', messageHandler);
|
259
259
|
});
|
260
260
|
process.once('SIGINT', () => {
|
261
|
-
|
261
|
+
this.cleanup('SIGTERM');
|
262
|
+
process.off('message', messageHandler);
|
262
263
|
// we exit here because we don't need to write anything to cache.
|
263
264
|
process.exit((0, exit_codes_1.signalToCode)('SIGINT'));
|
264
265
|
});
|
265
266
|
process.once('SIGTERM', () => {
|
266
|
-
|
267
|
+
this.cleanup('SIGTERM');
|
268
|
+
process.off('message', messageHandler);
|
267
269
|
// no exit here because we expect child processes to terminate which
|
268
270
|
// will store results to the cache and will terminate this process
|
269
271
|
});
|
270
272
|
process.once('SIGHUP', () => {
|
271
|
-
|
273
|
+
this.cleanup('SIGTERM');
|
274
|
+
process.off('message', messageHandler);
|
272
275
|
// no exit here because we expect child processes to terminate which
|
273
276
|
// will store results to the cache and will terminate this process
|
274
277
|
});
|