concurrently 8.2.0 → 8.2.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/README.md CHANGED
@@ -376,7 +376,7 @@ const { result } = concurrently(
376
376
  killOthers: ['failure', 'success'],
377
377
  restartTries: 3,
378
378
  cwd: path.resolve(__dirname, 'scripts'),
379
- }
379
+ },
380
380
  );
381
381
  result.then(success, failure);
382
382
  ```
@@ -64,7 +64,9 @@ class Command {
64
64
  this.timer.next({ startDate, endDate });
65
65
  this.error.next(event);
66
66
  });
67
- Rx.fromEvent(child, 'close').subscribe(([exitCode, signal]) => {
67
+ Rx.fromEvent(child, 'close')
68
+ .pipe(Rx.map((event) => event))
69
+ .subscribe(([exitCode, signal]) => {
68
70
  this.process = undefined;
69
71
  this.exited = true;
70
72
  const endDate = new Date(Date.now());
@@ -82,8 +84,10 @@ class Command {
82
84
  },
83
85
  });
84
86
  });
85
- child.stdout && pipeTo(Rx.fromEvent(child.stdout, 'data'), this.stdout);
86
- child.stderr && pipeTo(Rx.fromEvent(child.stderr, 'data'), this.stderr);
87
+ child.stdout &&
88
+ pipeTo(Rx.fromEvent(child.stdout, 'data').pipe(Rx.map((event) => event)), this.stdout);
89
+ child.stderr &&
90
+ pipeTo(Rx.fromEvent(child.stderr, 'data').pipe(Rx.map((event) => event)), this.stderr);
87
91
  this.stdin = child.stdin || undefined;
88
92
  }
89
93
  /**
@@ -68,7 +68,7 @@ class CompletionListener {
68
68
  const closeStreams = commands.map((command) => command.close);
69
69
  return Rx.lastValueFrom(Rx.merge(...closeStreams).pipe((0, operators_1.bufferCount)(closeStreams.length), (0, operators_1.switchMap)((exitInfos) => this.isSuccess(exitInfos)
70
70
  ? this.emitWithScheduler(Rx.of(exitInfos))
71
- : this.emitWithScheduler(Rx.throwError(exitInfos))), (0, operators_1.take)(1)));
71
+ : this.emitWithScheduler(Rx.throwError(() => exitInfos))), (0, operators_1.take)(1)));
72
72
  }
73
73
  emitWithScheduler(input) {
74
74
  return this.scheduler ? input.pipe(Rx.observeOn(this.scheduler)) : input;
@@ -22,6 +22,10 @@ export declare class LogTimings implements FlowController {
22
22
  private printExitInfoTimingTable;
23
23
  handle(commands: Command[]): {
24
24
  commands: Command[];
25
+ onFinish?: undefined;
26
+ } | {
27
+ commands: Command[];
28
+ onFinish: () => void;
25
29
  };
26
30
  }
27
31
  export {};
@@ -83,9 +83,10 @@ class LogTimings {
83
83
  });
84
84
  // overall summary timings
85
85
  const closeStreams = commands.map((command) => command.close);
86
- const allProcessesClosed = Rx.merge(...closeStreams).pipe((0, operators_1.bufferCount)(closeStreams.length), (0, operators_1.take)(1));
87
- allProcessesClosed.subscribe((exitInfos) => this.printExitInfoTimingTable(exitInfos));
88
- return { commands };
86
+ const finished = new Rx.Subject();
87
+ const allProcessesClosed = Rx.merge(...closeStreams).pipe((0, operators_1.bufferCount)(closeStreams.length), (0, operators_1.take)(1), (0, operators_1.combineLatestWith)(finished));
88
+ allProcessesClosed.subscribe(([exitInfos]) => this.printExitInfoTimingTable(exitInfos));
89
+ return { commands, onFinish: () => finished.next() };
89
90
  }
90
91
  }
91
92
  exports.LogTimings = LogTimings;
@@ -47,11 +47,11 @@ class RestartProcess {
47
47
  .map((failure, index) => Rx.merge(
48
48
  // Delay the emission (so that the restarts happen on time),
49
49
  // explicitly telling the subscriber that a restart is needed
50
- failure.pipe((0, operators_1.delay)(this.delay, this.scheduler), (0, operators_1.mapTo)(true)),
50
+ failure.pipe((0, operators_1.delay)(this.delay, this.scheduler), (0, operators_1.map)(() => true)),
51
51
  // Skip the first N emissions (as these would be duplicates of the above),
52
52
  // meaning it will be empty because of success, or failed all N times,
53
53
  // and no more restarts should be attempted.
54
- failure.pipe((0, operators_1.skip)(this.tries), (0, operators_1.mapTo)(false), (0, operators_1.defaultIfEmpty)(false))).subscribe((restart) => {
54
+ failure.pipe((0, operators_1.skip)(this.tries), (0, operators_1.map)(() => false), (0, operators_1.defaultIfEmpty)(false))).subscribe((restart) => {
55
55
  const command = commands[index];
56
56
  if (restart) {
57
57
  this.logger.logCommandEvent(`${command.command} restarted`, command);
@@ -16,7 +16,7 @@ export declare const getSpawnOpts: ({ colorSupport, cwd, process, raw, env, }: {
16
16
  /**
17
17
  * The NodeJS process.
18
18
  */
19
- process?: Pick<NodeJS.Process, "cwd" | "env" | "platform"> | undefined;
19
+ process?: Pick<NodeJS.Process, "platform" | "cwd" | "env"> | undefined;
20
20
  /**
21
21
  * A custom working directory to spawn processes in.
22
22
  * Defaults to `process.cwd()`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "concurrently",
3
- "version": "8.2.0",
3
+ "version": "8.2.1",
4
4
  "description": "Run commands concurrently",
5
5
  "main": "index.js",
6
6
  "types": "dist/src/index.d.ts",
@@ -49,33 +49,33 @@
49
49
  },
50
50
  "devDependencies": {
51
51
  "@hirez_io/observer-spy": "^2.2.0",
52
- "@swc/core": "^1.3.62",
53
- "@swc/jest": "^0.2.26",
54
- "@types/jest": "^29.5.2",
55
- "@types/lodash": "^4.14.195",
56
- "@types/node": "^14.18.48",
52
+ "@swc/core": "^1.3.78",
53
+ "@swc/jest": "^0.2.29",
54
+ "@types/jest": "^29.5.3",
55
+ "@types/lodash": "^4.14.197",
56
+ "@types/node": "^14.18.54",
57
57
  "@types/shell-quote": "^1.7.1",
58
58
  "@types/supports-color": "^8.1.1",
59
59
  "@types/yargs": "^17.0.24",
60
- "@typescript-eslint/eslint-plugin": "^5.59.9",
61
- "@typescript-eslint/parser": "^5.59.9",
60
+ "@typescript-eslint/eslint-plugin": "^6.4.1",
61
+ "@typescript-eslint/parser": "^6.4.1",
62
62
  "coveralls-next": "^4.2.0",
63
63
  "ctrlc-wrapper": "^0.0.4",
64
- "esbuild": "~0.17.19",
65
- "eslint": "^8.42.0",
66
- "eslint-config-prettier": "^8.8.0",
67
- "eslint-plugin-import": "^2.27.5",
68
- "eslint-plugin-jest": "^27.2.1",
69
- "eslint-plugin-prettier": "^4.2.1",
64
+ "esbuild": "~0.19.2",
65
+ "eslint": "^8.47.0",
66
+ "eslint-config-prettier": "^9.0.0",
67
+ "eslint-plugin-import": "^2.28.1",
68
+ "eslint-plugin-jest": "^27.2.3",
69
+ "eslint-plugin-prettier": "^5.0.0",
70
70
  "eslint-plugin-simple-import-sort": "^10.0.0",
71
71
  "husky": "^8.0.3",
72
- "jest": "^29.5.0",
72
+ "jest": "^29.6.3",
73
73
  "jest-create-mock-instance": "^2.0.0",
74
- "lint-staged": "^13.2.2",
75
- "prettier": "^2.8.8",
74
+ "lint-staged": "^13.3.0",
75
+ "prettier": "^3.0.2",
76
76
  "safe-publish-latest": "^2.0.0",
77
77
  "string-argv": "^0.3.2",
78
- "typescript": "~5.1.3"
78
+ "typescript": "~5.1.6"
79
79
  },
80
80
  "files": [
81
81
  "dist",