nx 22.2.0-canary.20251126-3558a4c → 22.2.0-canary.20251127-49fc6d5

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nx",
3
- "version": "22.2.0-canary.20251126-3558a4c",
3
+ "version": "22.2.0-canary.20251127-49fc6d5",
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": "22.2.0-canary.20251126-3558a4c",
87
- "@nx/nx-darwin-x64": "22.2.0-canary.20251126-3558a4c",
88
- "@nx/nx-freebsd-x64": "22.2.0-canary.20251126-3558a4c",
89
- "@nx/nx-linux-arm-gnueabihf": "22.2.0-canary.20251126-3558a4c",
90
- "@nx/nx-linux-arm64-gnu": "22.2.0-canary.20251126-3558a4c",
91
- "@nx/nx-linux-arm64-musl": "22.2.0-canary.20251126-3558a4c",
92
- "@nx/nx-linux-x64-gnu": "22.2.0-canary.20251126-3558a4c",
93
- "@nx/nx-linux-x64-musl": "22.2.0-canary.20251126-3558a4c",
94
- "@nx/nx-win32-arm64-msvc": "22.2.0-canary.20251126-3558a4c",
95
- "@nx/nx-win32-x64-msvc": "22.2.0-canary.20251126-3558a4c"
86
+ "@nx/nx-darwin-arm64": "22.2.0-canary.20251127-49fc6d5",
87
+ "@nx/nx-darwin-x64": "22.2.0-canary.20251127-49fc6d5",
88
+ "@nx/nx-freebsd-x64": "22.2.0-canary.20251127-49fc6d5",
89
+ "@nx/nx-linux-arm-gnueabihf": "22.2.0-canary.20251127-49fc6d5",
90
+ "@nx/nx-linux-arm64-gnu": "22.2.0-canary.20251127-49fc6d5",
91
+ "@nx/nx-linux-arm64-musl": "22.2.0-canary.20251127-49fc6d5",
92
+ "@nx/nx-linux-x64-gnu": "22.2.0-canary.20251127-49fc6d5",
93
+ "@nx/nx-linux-x64-musl": "22.2.0-canary.20251127-49fc6d5",
94
+ "@nx/nx-win32-arm64-msvc": "22.2.0-canary.20251127-49fc6d5",
95
+ "@nx/nx-win32-x64-msvc": "22.2.0-canary.20251127-49fc6d5"
96
96
  },
97
97
  "nx-migrations": {
98
98
  "migrations": "./migrations.json",
@@ -337,20 +337,20 @@ class RunningNodeProcess {
337
337
  });
338
338
  // Terminate any task processes on exit
339
339
  process.on('exit', () => {
340
- this.childProcess.kill();
340
+ this.kill();
341
341
  });
342
342
  process.on('SIGINT', () => {
343
- this.childProcess.kill('SIGTERM');
343
+ this.kill('SIGTERM');
344
344
  // we exit here because we don't need to write anything to cache.
345
345
  process.exit((0, exit_codes_1.signalToCode)('SIGINT'));
346
346
  });
347
347
  process.on('SIGTERM', () => {
348
- this.childProcess.kill('SIGTERM');
348
+ this.kill('SIGTERM');
349
349
  // no exit here because we expect child processes to terminate which
350
350
  // will store results to the cache and will terminate this process
351
351
  });
352
352
  process.on('SIGHUP', () => {
353
- this.childProcess.kill('SIGTERM');
353
+ this.kill('SIGTERM');
354
354
  // no exit here because we expect child processes to terminate which
355
355
  // will store results to the cache and will terminate this process
356
356
  });
@@ -1,5 +1,5 @@
1
- import { ChildProcess, Serializable } from 'child_process';
2
- import { RunningTask } from './running-task';
1
+ import type { ChildProcess, Serializable } from 'child_process';
2
+ import type { RunningTask } from './running-task';
3
3
  export declare class NodeChildProcessWithNonDirectOutput implements RunningTask {
4
4
  private childProcess;
5
5
  private terminalOutput;
@@ -1 +1 @@
1
- {"version":3,"file":"node-child-process.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/tasks-runner/running-tasks/node-child-process.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAK7C,qBAAa,mCAAoC,YAAW,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,MAAM,CAAC,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI;CAKpC"}
1
+ {"version":3,"file":"node-child-process.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/tasks-runner/running-tasks/node-child-process.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAKhE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,qBAAa,mCAAoC,YAAW,WAAW;IASnE,OAAO,CAAC,YAAY;IARtB,OAAO,CAAC,cAAc,CAAc;IACpC,OAAO,CAAC,aAAa,CAChB;IACL,OAAO,CAAC,eAAe,CAAuC;IAE9D,OAAO,CAAC,QAAQ,CAAS;gBAGf,YAAY,EAAE,YAAY,EAClC,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE;QAAE,YAAY,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;IAyDrE,MAAM,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,KAAK,IAAI;IAIzD,QAAQ,CAAC,EAAE,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI;IAI/B,UAAU,IAAI,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,MAAM,CAAA;KAAE,CAAC;IAcrE,IAAI,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI;IAK1B,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,OAAO;CAOpC;AA2DD,qBAAa,gCAAiC,YAAW,WAAW;IAQhE,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,mBAAmB;IAR7B,OAAO,CAAC,cAAc,CAAqB;IAC3C,OAAO,CAAC,aAAa,CAAqD;IAE1E,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,QAAQ,CAAS;gBAGf,YAAY,EAAE,YAAY,EAC1B,mBAAmB,EAAE,MAAM;IAqBrC,IAAI,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI;IAMjC,MAAM,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,OAAO,KAAK,IAAI;IAInD,UAAU,IAAI,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,MAAM,CAAA;KAAE,CAAC;IAQrE,WAAW;IAMX,iBAAiB;IAKjB,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI;CAOpC"}
@@ -1,10 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NodeChildProcessWithDirectOutput = exports.NodeChildProcessWithNonDirectOutput = void 0;
4
- const exit_codes_1 = require("../../utils/exit-codes");
5
- const stream_1 = require("stream");
6
4
  const chalk = require("chalk");
7
5
  const fs_1 = require("fs");
6
+ const stream_1 = require("stream");
7
+ const treeKill = require("tree-kill");
8
+ const exit_codes_1 = require("../../utils/exit-codes");
8
9
  class NodeChildProcessWithNonDirectOutput {
9
10
  constructor(childProcess, { streamOutput, prefix }) {
10
11
  this.childProcess = childProcess;
@@ -89,8 +90,10 @@ class NodeChildProcessWithNonDirectOutput {
89
90
  }
90
91
  }
91
92
  kill(signal) {
92
- if (this.childProcess.connected) {
93
- this.childProcess.kill(signal);
93
+ if (this.childProcess?.pid) {
94
+ treeKill(this.childProcess.pid, signal, () => {
95
+ // Ignore errors - process may have already exited
96
+ });
94
97
  }
95
98
  }
96
99
  }
@@ -190,8 +193,10 @@ class NodeChildProcessWithDirectOutput {
190
193
  return this.terminalOutput;
191
194
  }
192
195
  kill(signal) {
193
- if (this.childProcess.connected) {
194
- this.childProcess.kill(signal);
196
+ if (this.childProcess?.pid) {
197
+ treeKill(this.childProcess.pid, signal, () => {
198
+ // Ignore errors - process may have already exited
199
+ });
195
200
  }
196
201
  }
197
202
  }