@lde/task-runner-native 0.2.12 → 0.2.13

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAS,MAAM,oBAAoB,CAAC;AAGzD,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,qBAAa,gBAAiB,YAAW,UAAU,CAAC,YAAY,CAAC;IAC/D,OAAO,CAAC,MAAM,CAAkC;IAChD,OAAO,CAAC,MAAM,CAAkC;IAChD,OAAO,CAAC,KAAK,CAAQ;IACrB,OAAO,CAAC,GAAG,CAAC,CAAS;IACrB,OAAO,CAAC,uBAAuB,CAAS;gBAE5B,OAAO,CAAC,EAAE,uBAAuB;IAKvC,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAsC3C,IAAI,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;IAgBzC,IAAI,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAwCtD,OAAO,CAAC,UAAU;CAQnB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAS,MAAM,oBAAoB,CAAC;AAGzD,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,qBAAa,gBAAiB,YAAW,UAAU,CAAC,YAAY,CAAC;IAC/D,OAAO,CAAC,MAAM,CAAkC;IAChD,OAAO,CAAC,MAAM,CAAkC;IAChD,OAAO,CAAC,KAAK,CAAQ;IACrB,OAAO,CAAC,GAAG,CAAC,CAAS;IACrB,OAAO,CAAC,uBAAuB,CAAS;gBAE5B,OAAO,CAAC,EAAE,uBAAuB;IAKvC,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAqC3C,IAAI,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;IAgBzC,IAAI,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAwCtD,OAAO,CAAC,UAAU;CAQnB"}
package/dist/index.js CHANGED
@@ -20,12 +20,11 @@ export class NativeTaskRunner {
20
20
  /** code is null when the process was killed, which is expected when
21
21
  * {@link stop} is called. */
22
22
  if (code !== null && code !== 0) {
23
- // Throw to detect errors in the command arguments.
24
- throw new Error(this.taskOutput(task));
23
+ task.emit('error', new Error(this.taskOutput(task)));
25
24
  }
26
25
  });
27
- task.on('error', (code) => {
28
- throw new Error(`Task errored with code ${code}`);
26
+ task.on('error', () => {
27
+ // Handled by wait(); listener prevents 'unhandled error' crashes.
29
28
  });
30
29
  if (task.pid !== undefined) {
31
30
  task.stdout.on('data', (data) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lde/task-runner-native",
3
- "version": "0.2.12",
3
+ "version": "0.2.13",
4
4
  "repository": {
5
5
  "url": "git+https://github.com/ldelements/lde.git",
6
6
  "directory": "packages/task-runner-native"