concurrently 9.2.0 → 9.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.
Files changed (42) hide show
  1. package/README.md +0 -1
  2. package/dist/bin/concurrently.js +19 -9
  3. package/dist/bin/read-package.js +18 -9
  4. package/dist/src/assert.js +2 -3
  5. package/dist/src/command-parser/expand-arguments.d.ts +5 -5
  6. package/dist/src/command-parser/expand-arguments.js +14 -12
  7. package/dist/src/command-parser/expand-wildcard.js +7 -6
  8. package/dist/src/command-parser/strip-quotes.d.ts +5 -5
  9. package/dist/src/command.d.ts +2 -6
  10. package/dist/src/command.js +27 -10
  11. package/dist/src/completion-listener.d.ts +0 -1
  12. package/dist/src/completion-listener.js +17 -7
  13. package/dist/src/concurrently.d.ts +0 -2
  14. package/dist/src/concurrently.js +10 -12
  15. package/dist/src/date-format.js +4 -1
  16. package/dist/src/flow-control/input-handler.d.ts +0 -1
  17. package/dist/src/flow-control/input-handler.js +17 -7
  18. package/dist/src/flow-control/kill-on-signal.d.ts +0 -2
  19. package/dist/src/flow-control/kill-others.d.ts +0 -1
  20. package/dist/src/flow-control/kill-others.js +2 -5
  21. package/dist/src/flow-control/log-timings.js +20 -16
  22. package/dist/src/flow-control/output-error-handler.d.ts +0 -2
  23. package/dist/src/flow-control/restart-process.js +17 -7
  24. package/dist/src/flow-control/teardown.js +17 -7
  25. package/dist/src/index.d.ts +0 -1
  26. package/dist/src/index.js +4 -7
  27. package/dist/src/jsonc.d.ts +2 -2
  28. package/dist/src/logger.js +27 -12
  29. package/dist/src/observables.d.ts +0 -1
  30. package/dist/src/observables.js +1 -2
  31. package/dist/src/output-writer.d.ts +0 -1
  32. package/dist/src/output-writer.js +17 -7
  33. package/dist/src/spawn.d.ts +6 -12
  34. package/dist/src/spawn.js +2 -2
  35. package/dist/src/utils.d.ts +10 -0
  36. package/dist/src/utils.js +16 -0
  37. package/dist/tsconfig.tsbuildinfo +1 -0
  38. package/docs/cli/passthrough-arguments.md +8 -8
  39. package/docs/cli/shortcuts.md +2 -2
  40. package/index.js +1 -1
  41. package/index.mjs +0 -1
  42. package/package.json +30 -35
package/README.md CHANGED
@@ -174,7 +174,6 @@ It has the following properties:
174
174
  - `timer`: an RxJS observable to the command's timing events (e.g. starting, stopping).
175
175
  - `stateChange`: an RxJS observable for changes to the command's `state` property.
176
176
  - `messages`: an object with the following properties:
177
-
178
177
  - `incoming`: an RxJS observable for the IPC messages received from the underlying process.
179
178
  - `outgoing`: an RxJS observable for the IPC messages sent to the underlying process.
180
179
 
@@ -16,23 +16,33 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
16
16
  }) : function(o, v) {
17
17
  o["default"] = v;
18
18
  });
19
- var __importStar = (this && this.__importStar) || function (mod) {
20
- if (mod && mod.__esModule) return mod;
21
- var result = {};
22
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
23
- __setModuleDefault(result, mod);
24
- return result;
25
- };
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
26
36
  var __importDefault = (this && this.__importDefault) || function (mod) {
27
37
  return (mod && mod.__esModule) ? mod : { "default": mod };
28
38
  };
29
39
  Object.defineProperty(exports, "__esModule", { value: true });
30
- const lodash_1 = __importDefault(require("lodash"));
31
40
  const yargs_1 = __importDefault(require("yargs"));
32
41
  const helpers_1 = require("yargs/helpers");
33
42
  const assert_1 = require("../src/assert");
34
43
  const defaults = __importStar(require("../src/defaults"));
35
44
  const index_1 = require("../src/index");
45
+ const utils_1 = require("../src/utils");
36
46
  const read_package_1 = require("./read-package");
37
47
  const version = String((0, read_package_1.readPackage)().version);
38
48
  const epilogue = `For documentation and more examples, visit:\nhttps://github.com/open-cli-tools/concurrently/tree/v${version}/docs`;
@@ -221,7 +231,7 @@ const args = program.parseSync();
221
231
  (0, assert_1.assertDeprecated)(args.nameSeparator === defaults.nameSeparator, 'name-separator', 'Use commas as name separators instead.');
222
232
  // Get names of commands by the specified separator
223
233
  const names = (args.names || '').split(args.nameSeparator);
224
- const additionalArguments = lodash_1.default.castArray(args['--'] ?? []).map(String);
234
+ const additionalArguments = (0, utils_1.castArray)(args['--'] ?? []).map(String);
225
235
  const commands = args.passthroughArguments ? args._ : args._.concat(additionalArguments);
226
236
  if (!commands.length) {
227
237
  program.showHelp();
@@ -15,15 +15,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.readPackage = void 0;
36
+ exports.readPackage = readPackage;
27
37
  const fs = __importStar(require("fs"));
28
38
  const path = __importStar(require("path"));
29
39
  /**
@@ -44,4 +54,3 @@ function readPackage() {
44
54
  } while (oldDir !== dir);
45
55
  throw new Error('package.json not found');
46
56
  }
47
- exports.readPackage = readPackage;
@@ -1,16 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.assertDeprecated = void 0;
3
+ exports.assertDeprecated = assertDeprecated;
4
4
  const deprecations = new Set();
5
5
  /**
6
6
  * Asserts that some condition is true, and if not, prints a warning about it being deprecated.
7
7
  * The message is printed only once.
8
8
  */
9
9
  function assertDeprecated(check, name, message) {
10
- if (!check) {
10
+ if (!check && !deprecations.has(name)) {
11
11
  // eslint-disable-next-line no-console
12
12
  console.warn(`[concurrently] ${name} is deprecated. ${message}`);
13
13
  deprecations.add(name);
14
14
  }
15
15
  }
16
- exports.assertDeprecated = assertDeprecated;
@@ -9,10 +9,10 @@ export declare class ExpandArguments implements CommandParser {
9
9
  parse(commandInfo: CommandInfo): {
10
10
  command: string;
11
11
  name: string;
12
- env?: Record<string, unknown> | undefined;
13
- cwd?: string | undefined;
14
- prefixColor?: string | undefined;
15
- ipc?: number | undefined;
16
- raw?: boolean | undefined;
12
+ env?: Record<string, unknown>;
13
+ cwd?: string;
14
+ prefixColor?: string;
15
+ ipc?: number;
16
+ raw?: boolean;
17
17
  };
18
18
  }
@@ -16,18 +16,20 @@ class ExpandArguments {
16
16
  if (match.startsWith('\\')) {
17
17
  return match.slice(1);
18
18
  }
19
- // Replace numeric placeholder if value exists in additional arguments.
20
- if (!isNaN(placeholderTarget) &&
21
- placeholderTarget <= this.additionalArguments.length) {
22
- return (0, shell_quote_1.quote)([this.additionalArguments[placeholderTarget - 1]]);
23
- }
24
- // Replace all arguments placeholder.
25
- if (placeholderTarget === '@') {
26
- return (0, shell_quote_1.quote)(this.additionalArguments);
27
- }
28
- // Replace combined arguments placeholder.
29
- if (placeholderTarget === '*') {
30
- return (0, shell_quote_1.quote)([this.additionalArguments.join(' ')]);
19
+ if (this.additionalArguments.length > 0) {
20
+ // Replace numeric placeholder if value exists in additional arguments.
21
+ if (!isNaN(placeholderTarget) &&
22
+ placeholderTarget <= this.additionalArguments.length) {
23
+ return (0, shell_quote_1.quote)([this.additionalArguments[placeholderTarget - 1]]);
24
+ }
25
+ // Replace all arguments placeholder.
26
+ if (placeholderTarget === '@') {
27
+ return (0, shell_quote_1.quote)(this.additionalArguments);
28
+ }
29
+ // Replace combined arguments placeholder.
30
+ if (placeholderTarget === '*') {
31
+ return (0, shell_quote_1.quote)([this.additionalArguments.join(' ')]);
32
+ }
31
33
  }
32
34
  // Replace placeholder with empty string
33
35
  // if value doesn't exist in additional arguments.
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ExpandWildcard = void 0;
7
7
  const fs_1 = __importDefault(require("fs"));
8
- const lodash_1 = __importDefault(require("lodash"));
9
8
  const jsonc_1 = __importDefault(require("../jsonc"));
9
+ const utils_1 = require("../utils");
10
10
  // Matches a negative filter surrounded by '(!' and ')'.
11
11
  const OMISSION = /\(!([^)]+)\)/;
12
12
  /**
@@ -28,7 +28,7 @@ class ExpandWildcard {
28
28
  }
29
29
  return jsonc_1.default.parse(json);
30
30
  }
31
- catch (e) {
31
+ catch {
32
32
  return {};
33
33
  }
34
34
  }
@@ -37,7 +37,7 @@ class ExpandWildcard {
37
37
  const json = fs_1.default.readFileSync('package.json', { encoding: 'utf-8' });
38
38
  return JSON.parse(json);
39
39
  }
40
- catch (e) {
40
+ catch {
41
41
  return {};
42
42
  }
43
43
  }
@@ -79,8 +79,8 @@ class ExpandWildcard {
79
79
  }
80
80
  const [, omission] = OMISSION.exec(scriptGlob) || [];
81
81
  const scriptGlobSansOmission = scriptGlob.replace(OMISSION, '');
82
- const preWildcard = lodash_1.default.escapeRegExp(scriptGlobSansOmission.slice(0, wildcardPosition));
83
- const postWildcard = lodash_1.default.escapeRegExp(scriptGlobSansOmission.slice(wildcardPosition + 1));
82
+ const preWildcard = (0, utils_1.escapeRegExp)(scriptGlobSansOmission.slice(0, wildcardPosition));
83
+ const postWildcard = (0, utils_1.escapeRegExp)(scriptGlobSansOmission.slice(wildcardPosition + 1));
84
84
  const wildcardRegex = new RegExp(`^${preWildcard}(.*?)${postWildcard}$`);
85
85
  // If 'commandInfo.name' doesn't match 'scriptGlob', this means a custom name
86
86
  // has been specified and thus becomes the prefix (as described in the README).
@@ -90,7 +90,8 @@ class ExpandWildcard {
90
90
  if (omission && RegExp(omission).test(script)) {
91
91
  return;
92
92
  }
93
- const [, match] = wildcardRegex.exec(script) || [];
93
+ const result = wildcardRegex.exec(script);
94
+ const match = result?.[1];
94
95
  if (match !== undefined) {
95
96
  return {
96
97
  ...commandInfo,
@@ -7,10 +7,10 @@ export declare class StripQuotes implements CommandParser {
7
7
  parse(commandInfo: CommandInfo): {
8
8
  command: string;
9
9
  name: string;
10
- env?: Record<string, unknown> | undefined;
11
- cwd?: string | undefined;
12
- prefixColor?: string | undefined;
13
- ipc?: number | undefined;
14
- raw?: boolean | undefined;
10
+ env?: Record<string, unknown>;
11
+ cwd?: string;
12
+ prefixColor?: string;
13
+ ipc?: number;
14
+ raw?: boolean;
15
15
  };
16
16
  }
@@ -1,7 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
- /// <reference types="node" />
4
- /// <reference types="node" />
5
1
  import { ChildProcess as BaseChildProcess, MessageOptions, SendHandle, SpawnOptions } from 'child_process';
6
2
  import * as Rx from 'rxjs';
7
3
  import { EventEmitter, Writable } from 'stream';
@@ -114,8 +110,8 @@ export declare class Command implements CommandInfo {
114
110
  readonly ipc?: number;
115
111
  readonly close: Rx.Subject<CloseEvent>;
116
112
  readonly error: Rx.Subject<unknown>;
117
- readonly stdout: Rx.Subject<Buffer>;
118
- readonly stderr: Rx.Subject<Buffer>;
113
+ readonly stdout: Rx.Subject<Buffer<ArrayBufferLike>>;
114
+ readonly stderr: Rx.Subject<Buffer<ArrayBufferLike>>;
119
115
  readonly timer: Rx.Subject<TimerEvent>;
120
116
  /**
121
117
  * A stream of changes to the `#state` property.
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.Command = void 0;
27
37
  const Rx = __importStar(require("rxjs"));
@@ -120,10 +130,12 @@ class Command {
120
130
  },
121
131
  });
122
132
  });
123
- child.stdout &&
133
+ if (child.stdout) {
124
134
  pipeTo(Rx.fromEvent(child.stdout, 'data').pipe(Rx.map((event) => event)), this.stdout);
125
- child.stderr &&
135
+ }
136
+ if (child.stderr) {
126
137
  pipeTo(Rx.fromEvent(child.stderr, 'data').pipe(Rx.map((event) => event)), this.stderr);
138
+ }
127
139
  this.stdin = child.stdin || undefined;
128
140
  }
129
141
  changeState(state) {
@@ -166,7 +178,12 @@ class Command {
166
178
  handle,
167
179
  options,
168
180
  onSent(error) {
169
- error ? reject(error) : resolve();
181
+ if (error) {
182
+ reject(error);
183
+ }
184
+ else {
185
+ resolve();
186
+ }
170
187
  },
171
188
  });
172
189
  });
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import * as Rx from 'rxjs';
3
2
  import { CloseEvent, Command } from './command';
4
3
  /**
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.CompletionListener = void 0;
27
37
  const Rx = __importStar(require("rxjs"));
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import { Writable } from 'stream';
4
2
  import { CloseEvent, Command, CommandIdentifier, CommandInfo, KillProcess, SpawnCommand } from './command';
5
3
  import { SuccessCondition } from './completion-listener';
@@ -3,10 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.concurrently = void 0;
6
+ exports.concurrently = concurrently;
7
7
  const assert_1 = __importDefault(require("assert"));
8
- const lodash_1 = __importDefault(require("lodash"));
9
- const os_1 = require("os");
8
+ const os_1 = __importDefault(require("os"));
10
9
  const rxjs_1 = require("rxjs");
11
10
  const tree_kill_1 = __importDefault(require("tree-kill"));
12
11
  const command_1 = require("./command");
@@ -18,6 +17,7 @@ const completion_listener_1 = require("./completion-listener");
18
17
  const output_writer_1 = require("./output-writer");
19
18
  const prefix_color_selector_1 = require("./prefix-color-selector");
20
19
  const spawn_1 = require("./spawn");
20
+ const utils_1 = require("./utils");
21
21
  const defaults = {
22
22
  spawn: spawn_1.spawn,
23
23
  kill: tree_kill_1.default,
@@ -34,7 +34,7 @@ const defaults = {
34
34
  function concurrently(baseCommands, baseOptions) {
35
35
  assert_1.default.ok(Array.isArray(baseCommands), '[concurrently] commands should be an array');
36
36
  assert_1.default.notStrictEqual(baseCommands.length, 0, '[concurrently] no commands provided');
37
- const options = lodash_1.default.defaults(baseOptions, defaults);
37
+ const options = { ...defaults, ...baseOptions };
38
38
  const prefixColorSelector = new prefix_color_selector_1.PrefixColorSelector(options.prefixColors || []);
39
39
  const commandParsers = [
40
40
  new strip_quotes_1.StripQuotes(),
@@ -45,7 +45,7 @@ function concurrently(baseCommands, baseOptions) {
45
45
  commandParsers.push(new expand_arguments_1.ExpandArguments(options.additionalArguments));
46
46
  }
47
47
  const hide = (options.hide || []).map(String);
48
- let commands = (0, lodash_1.default)(baseCommands)
48
+ let commands = baseCommands
49
49
  .map(mapToCommandInfo)
50
50
  .flatMap((command) => parseCommand(command, commandParsers))
51
51
  .map((command, index) => {
@@ -56,17 +56,16 @@ function concurrently(baseCommands, baseOptions) {
56
56
  ...command,
57
57
  }, (0, spawn_1.getSpawnOpts)({
58
58
  ipc: command.ipc,
59
- stdio: hidden ? 'hidden' : command.raw ?? options.raw ? 'raw' : 'normal',
59
+ stdio: hidden ? 'hidden' : (command.raw ?? options.raw) ? 'raw' : 'normal',
60
60
  env: command.env,
61
61
  cwd: command.cwd || options.cwd,
62
62
  }), options.spawn, options.kill);
63
- })
64
- .value();
63
+ });
65
64
  const handleResult = options.controllers.reduce(({ commands: prevCommands, onFinishCallbacks }, controller) => {
66
65
  const { commands, onFinish } = controller.handle(prevCommands);
67
66
  return {
68
67
  commands,
69
- onFinishCallbacks: lodash_1.default.concat(onFinishCallbacks, onFinish ? [onFinish] : []),
68
+ onFinishCallbacks: onFinishCallbacks.concat(onFinish ? [onFinish] : []),
70
69
  };
71
70
  }, { commands, onFinishCallbacks: [] });
72
71
  commands = handleResult.commands;
@@ -83,7 +82,7 @@ function concurrently(baseCommands, baseOptions) {
83
82
  }
84
83
  const commandsLeft = commands.slice();
85
84
  const maxProcesses = Math.max(1, (typeof options.maxProcesses === 'string' && options.maxProcesses.endsWith('%')
86
- ? Math.round(((0, os_1.cpus)().length * Number(options.maxProcesses.slice(0, -1))) / 100)
85
+ ? Math.round((os_1.default.cpus().length * Number(options.maxProcesses.slice(0, -1))) / 100)
87
86
  : Number(options.maxProcesses)) || commandsLeft.length);
88
87
  for (let i = 0; i < maxProcesses; i++) {
89
88
  maybeRunMore(commandsLeft, options.abortSignal);
@@ -96,7 +95,6 @@ function concurrently(baseCommands, baseOptions) {
96
95
  commands,
97
96
  };
98
97
  }
99
- exports.concurrently = concurrently;
100
98
  function mapToCommandInfo(command) {
101
99
  if (typeof command === 'string') {
102
100
  return mapToCommandInfo({ command });
@@ -121,7 +119,7 @@ function mapToCommandInfo(command) {
121
119
  };
122
120
  }
123
121
  function parseCommand(command, parsers) {
124
- return parsers.reduce((commands, parser) => lodash_1.default.flatMap(commands, (command) => parser.parse(command)), lodash_1.default.castArray(command));
122
+ return parsers.reduce((commands, parser) => commands.flatMap((command) => parser.parse(command)), (0, utils_1.castArray)(command));
125
123
  }
126
124
  function maybeRunMore(commandsLeft, abortSignal) {
127
125
  const command = commandsLeft.shift();
@@ -235,7 +235,9 @@ const tokens = new Map()
235
235
  let locale;
236
236
  function getLocale(options) {
237
237
  if (!locale || locale.baseName !== options.locale) {
238
- locale = new Intl.Locale(options.locale || new Intl.DateTimeFormat().resolvedOptions().locale);
238
+ locale = new Intl.Locale(
239
+ /* v8 ignore next - fallback value only for safety */
240
+ options.locale || new Intl.DateTimeFormat().resolvedOptions().locale);
239
241
  }
240
242
  return locale;
241
243
  }
@@ -261,6 +263,7 @@ function makeTokenFn(options, type, fallback) {
261
263
  }
262
264
  const parts = formatter.formatToParts(date);
263
265
  const part = parts.find((p) => p.type === type);
266
+ /* v8 ignore next - fallback value '' only for safety */
264
267
  return part?.value ?? (fallback ? fallback(date, formatterOptions) : '');
265
268
  };
266
269
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { Readable } from 'stream';
3
2
  import { Command, CommandIdentifier } from '../command';
4
3
  import { Logger } from '../logger';
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.InputHandler = void 0;
27
37
  const Rx = __importStar(require("rxjs"));
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import EventEmitter from 'events';
4
2
  import { Command } from '../command';
5
3
  import { FlowController } from './flow-controller';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { Command } from '../command';
3
2
  import { Logger } from '../logger';
4
3
  import { FlowController } from './flow-controller';
@@ -1,12 +1,9 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.KillOthers = void 0;
7
- const lodash_1 = __importDefault(require("lodash"));
8
4
  const operators_1 = require("rxjs/operators");
9
5
  const command_1 = require("../command");
6
+ const utils_1 = require("../utils");
10
7
  /**
11
8
  * Sends a SIGTERM signal to all commands when one of the commands exits with a matching condition.
12
9
  */
@@ -19,7 +16,7 @@ class KillOthers {
19
16
  constructor({ logger, abortController, conditions, killSignal, timeoutMs, }) {
20
17
  this.logger = logger;
21
18
  this.abortController = abortController;
22
- this.conditions = lodash_1.default.castArray(conditions);
19
+ this.conditions = (0, utils_1.castArray)(conditions);
23
20
  this.killSignal = killSignal;
24
21
  this.timeoutMs = timeoutMs;
25
22
  }
@@ -15,20 +15,26 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
28
35
  Object.defineProperty(exports, "__esModule", { value: true });
29
36
  exports.LogTimings = void 0;
30
37
  const assert = __importStar(require("assert"));
31
- const lodash_1 = __importDefault(require("lodash"));
32
38
  const Rx = __importStar(require("rxjs"));
33
39
  const operators_1 = require("rxjs/operators");
34
40
  const date_format_1 = require("../date-format");
@@ -55,11 +61,9 @@ class LogTimings {
55
61
  }
56
62
  printExitInfoTimingTable(exitInfos) {
57
63
  assert.ok(this.logger);
58
- const exitInfoTable = (0, lodash_1.default)(exitInfos)
59
- .sortBy(({ timings }) => timings.durationSeconds)
60
- .reverse()
61
- .map(LogTimings.mapCloseEventToTimingInfo)
62
- .value();
64
+ const exitInfoTable = exitInfos
65
+ .sort((a, b) => b.timings.durationSeconds - a.timings.durationSeconds)
66
+ .map(LogTimings.mapCloseEventToTimingInfo);
63
67
  this.logger.logGlobalEvent('Timings:');
64
68
  this.logger.logTable(exitInfoTable);
65
69
  return exitInfos;
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import { Writable } from 'stream';
4
2
  import { Command } from '../command';
5
3
  import { FlowController } from './flow-controller';
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.RestartProcess = void 0;
27
37
  const Rx = __importStar(require("rxjs"));
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.Teardown = void 0;
27
37
  const Rx = __importStar(require("rxjs"));
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { Readable } from 'stream';
3
2
  import { CloseEvent, Command, CommandIdentifier, TimerEvent } from './command';
4
3
  import { concurrently as createConcurrently, ConcurrentlyCommandInput, ConcurrentlyOptions as BaseConcurrentlyOptions, ConcurrentlyResult } from './concurrently';
package/dist/src/index.js CHANGED
@@ -1,10 +1,7 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.RestartProcess = exports.LogTimings = exports.LogOutput = exports.LogExit = exports.LogError = exports.KillOthers = exports.KillOnSignal = exports.InputHandler = exports.Command = exports.Logger = exports.createConcurrently = exports.concurrently = void 0;
7
- const lodash_1 = __importDefault(require("lodash"));
3
+ exports.RestartProcess = exports.LogTimings = exports.LogOutput = exports.LogExit = exports.LogError = exports.KillOthers = exports.KillOnSignal = exports.InputHandler = exports.Command = exports.Logger = exports.createConcurrently = void 0;
4
+ exports.concurrently = concurrently;
8
5
  const assert_1 = require("./assert");
9
6
  const command_1 = require("./command");
10
7
  Object.defineProperty(exports, "Command", { enumerable: true, get: function () { return command_1.Command; } });
@@ -31,12 +28,13 @@ Object.defineProperty(exports, "RestartProcess", { enumerable: true, get: functi
31
28
  const teardown_1 = require("./flow-control/teardown");
32
29
  const logger_1 = require("./logger");
33
30
  Object.defineProperty(exports, "Logger", { enumerable: true, get: function () { return logger_1.Logger; } });
31
+ const utils_1 = require("./utils");
34
32
  function concurrently(commands, options = {}) {
35
33
  (0, assert_1.assertDeprecated)(options.killOthers === undefined, 'killOthers', 'Use killOthersOn instead.');
36
34
  // To avoid empty strings from hiding the output of commands that don't have a name,
37
35
  // keep in the list of commands to hide only strings with some length.
38
36
  // This might happen through the CLI when no `--hide` argument is specified, for example.
39
- const hide = lodash_1.default.castArray(options.hide).filter((id) => id || id === 0);
37
+ const hide = (0, utils_1.castArray)(options.hide).filter((id) => id || id === 0);
40
38
  const logger = options.logger ||
41
39
  new logger_1.Logger({
42
40
  hide,
@@ -96,4 +94,3 @@ function concurrently(commands, options = {}) {
96
94
  additionalArguments: options.additionalArguments,
97
95
  });
98
96
  }
99
- exports.concurrently = concurrently;
@@ -1,8 +1,8 @@
1
1
  declare const JSONC: {
2
2
  parse: (text: string) => any;
3
3
  stringify: {
4
- (value: any, replacer?: ((this: any, key: string, value: any) => any) | undefined, space?: string | number | undefined): string;
5
- (value: any, replacer?: (string | number)[] | null | undefined, space?: string | number | undefined): string;
4
+ (value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
5
+ (value: any, replacer?: (number | string)[] | null, space?: string | number): string;
6
6
  };
7
7
  };
8
8
  export default JSONC;
@@ -15,25 +15,40 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
37
  };
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
39
  exports.Logger = void 0;
30
40
  const chalk_1 = __importDefault(require("chalk"));
31
- const lodash_1 = __importDefault(require("lodash"));
32
41
  const Rx = __importStar(require("rxjs"));
33
42
  const date_format_1 = require("./date-format");
34
43
  const defaults = __importStar(require("./defaults"));
44
+ const utils_1 = require("./utils");
35
45
  const defaultChalk = chalk_1.default;
36
46
  const noColorChalk = new chalk_1.default.Instance({ level: 0 });
47
+ function getChalkPath(chalk, path) {
48
+ return path
49
+ .split('.')
50
+ .reduce((prev, key) => prev[key], chalk);
51
+ }
37
52
  class Logger {
38
53
  hide;
39
54
  raw;
@@ -101,8 +116,8 @@ class Logger {
101
116
  if (Object.keys(prefixes).includes(prefix)) {
102
117
  return { type: 'default', value: prefixes[prefix] };
103
118
  }
104
- const value = lodash_1.default.reduce(prefixes, (prev, val, key) => {
105
- const keyRegex = new RegExp(lodash_1.default.escapeRegExp(`{${key}}`), 'g');
119
+ const value = Object.entries(prefixes).reduce((prev, [key, val]) => {
120
+ const keyRegex = new RegExp((0, utils_1.escapeRegExp)(`{${key}}`), 'g');
106
121
  return prev.replace(keyRegex, String(val));
107
122
  }, prefix);
108
123
  return { type: 'template', value };
@@ -125,8 +140,8 @@ class Logger {
125
140
  color = this.chalk.hex(command.prefixColor);
126
141
  }
127
142
  else {
128
- const defaultColor = lodash_1.default.get(this.chalk, defaults.prefixColors, this.chalk.reset);
129
- color = lodash_1.default.get(this.chalk, command.prefixColor ?? '', defaultColor);
143
+ const defaultColor = getChalkPath(this.chalk, defaults.prefixColors);
144
+ color = getChalkPath(this.chalk, command.prefixColor ?? '') ?? defaultColor;
130
145
  }
131
146
  return color(text);
132
147
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import EventEmitter from 'events';
3
2
  import { Observable } from 'rxjs';
4
3
  /**
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fromSharedEvent = void 0;
3
+ exports.fromSharedEvent = fromSharedEvent;
4
4
  const rxjs_1 = require("rxjs");
5
5
  const sharedEvents = new WeakMap();
6
6
  /**
@@ -21,4 +21,3 @@ function fromSharedEvent(emitter, event) {
21
21
  }
22
22
  return observable;
23
23
  }
24
- exports.fromSharedEvent = fromSharedEvent;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import * as Rx from 'rxjs';
3
2
  import { Writable } from 'stream';
4
3
  import { Command } from './command';
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.OutputWriter = void 0;
27
37
  const Rx = __importStar(require("rxjs"));
@@ -1,9 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
- /// <reference types="node" />
4
- /// <reference types="node" />
5
- /// <reference types="node" />
6
- /// <reference types="node" />
7
1
  import { ChildProcess, SpawnOptions } from 'child_process';
8
2
  import supportsColor from 'supports-color';
9
3
  /**
@@ -17,21 +11,21 @@ export declare const getSpawnOpts: ({ colorSupport, cwd, process, ipc, stdio, en
17
11
  *
18
12
  * Defaults to whatever the terminal's stdout support is.
19
13
  */
20
- colorSupport?: false | Pick<supportsColor.supportsColor.Level, "level"> | undefined;
14
+ colorSupport?: Pick<supportsColor.supportsColor.Level, "level"> | false;
21
15
  /**
22
16
  * The NodeJS process.
23
17
  */
24
- process?: Pick<NodeJS.Process, "platform" | "cwd" | "env"> | undefined;
18
+ process?: Pick<NodeJS.Process, "cwd" | "platform" | "env">;
25
19
  /**
26
20
  * A custom working directory to spawn processes in.
27
21
  * Defaults to `process.cwd()`.
28
22
  */
29
- cwd?: string | undefined;
23
+ cwd?: string;
30
24
  /**
31
25
  * The file descriptor number at which the channel for inter-process communication
32
26
  * should be set up.
33
27
  */
34
- ipc?: number | undefined;
28
+ ipc?: number;
35
29
  /**
36
30
  * Which stdio mode to use. Raw implies inheriting the parent process' stdio.
37
31
  *
@@ -41,9 +35,9 @@ export declare const getSpawnOpts: ({ colorSupport, cwd, process, ipc, stdio, en
41
35
  *
42
36
  * Defaults to `normal`.
43
37
  */
44
- stdio?: "raw" | "hidden" | "normal" | undefined;
38
+ stdio?: "normal" | "hidden" | "raw";
45
39
  /**
46
40
  * Map of custom environment variables to include in the spawn options.
47
41
  */
48
- env?: Record<string, unknown> | undefined;
42
+ env?: Record<string, unknown>;
49
43
  }) => SpawnOptions;
package/dist/src/spawn.js CHANGED
@@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getSpawnOpts = exports.spawn = void 0;
6
+ exports.getSpawnOpts = void 0;
7
+ exports.spawn = spawn;
7
8
  const assert_1 = __importDefault(require("assert"));
8
9
  const child_process_1 = require("child_process");
9
10
  const supports_color_1 = __importDefault(require("supports-color"));
@@ -23,7 +24,6 @@ spawn = child_process_1.spawn, process = global.process) {
23
24
  }
24
25
  return spawn(file, args, options);
25
26
  }
26
- exports.spawn = spawn;
27
27
  const getSpawnOpts = ({ colorSupport = supports_color_1.default.stdout, cwd, process = global.process, ipc, stdio = 'normal', env = {}, }) => {
28
28
  const stdioValues = stdio === 'normal'
29
29
  ? ['pipe', 'pipe', 'pipe']
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Escapes a string for use in a regular expression.
3
+ */
4
+ export declare function escapeRegExp(str: string): string;
5
+ type CastArrayResult<T> = T extends undefined | null ? never[] : T extends unknown[] ? T : T[];
6
+ /**
7
+ * Casts a value to an array if it's not one.
8
+ */
9
+ export declare function castArray<T = never[]>(value?: T): CastArrayResult<T>;
10
+ export {};
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.escapeRegExp = escapeRegExp;
4
+ exports.castArray = castArray;
5
+ /**
6
+ * Escapes a string for use in a regular expression.
7
+ */
8
+ function escapeRegExp(str) {
9
+ return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
10
+ }
11
+ /**
12
+ * Casts a value to an array if it's not one.
13
+ */
14
+ function castArray(value) {
15
+ return (Array.isArray(value) ? value : value != null ? [value] : []);
16
+ }
@@ -0,0 +1 @@
1
+ {"root":["../bin/concurrently.spec.ts","../bin/concurrently.ts","../bin/read-package.ts","../declarations/intl.d.ts","../src/assert.spec.ts","../src/assert.ts","../src/command.spec.ts","../src/command.ts","../src/completion-listener.spec.ts","../src/completion-listener.ts","../src/concurrently.spec.ts","../src/concurrently.ts","../src/date-format.spec.ts","../src/date-format.ts","../src/defaults.ts","../src/index.ts","../src/jsonc.spec.ts","../src/jsonc.ts","../src/logger.spec.ts","../src/logger.ts","../src/observables.spec.ts","../src/observables.ts","../src/output-writer.spec.ts","../src/output-writer.ts","../src/prefix-color-selector.spec.ts","../src/prefix-color-selector.ts","../src/spawn.spec.ts","../src/spawn.ts","../src/utils.spec.ts","../src/utils.ts","../src/command-parser/command-parser.ts","../src/command-parser/expand-arguments.spec.ts","../src/command-parser/expand-arguments.ts","../src/command-parser/expand-shortcut.spec.ts","../src/command-parser/expand-shortcut.ts","../src/command-parser/expand-wildcard.spec.ts","../src/command-parser/expand-wildcard.ts","../src/command-parser/strip-quotes.spec.ts","../src/command-parser/strip-quotes.ts","../src/fixtures/create-mock-instance.ts","../src/fixtures/fake-command.ts","../src/flow-control/flow-controller.ts","../src/flow-control/input-handler.spec.ts","../src/flow-control/input-handler.ts","../src/flow-control/kill-on-signal.spec.ts","../src/flow-control/kill-on-signal.ts","../src/flow-control/kill-others.spec.ts","../src/flow-control/kill-others.ts","../src/flow-control/log-error.spec.ts","../src/flow-control/log-error.ts","../src/flow-control/log-exit.spec.ts","../src/flow-control/log-exit.ts","../src/flow-control/log-output.spec.ts","../src/flow-control/log-output.ts","../src/flow-control/log-timings.spec.ts","../src/flow-control/log-timings.ts","../src/flow-control/logger-padding.spec.ts","../src/flow-control/logger-padding.ts","../src/flow-control/output-error-handler.spec.ts","../src/flow-control/output-error-handler.ts","../src/flow-control/restart-process.spec.ts","../src/flow-control/restart-process.ts","../src/flow-control/teardown.spec.ts","../src/flow-control/teardown.ts"],"version":"5.9.2"}
@@ -11,8 +11,8 @@ For example, imagine you have in your `package.json` file scripts like this:
11
11
  "scripts": {
12
12
  "build:client": "tsc -p client",
13
13
  "build:server": "tsc -p server",
14
- "build": "concurrently npm:build:client npm:build:server"
15
- }
14
+ "build": "concurrently npm:build:client npm:build:server",
15
+ },
16
16
  }
17
17
  ```
18
18
 
@@ -37,8 +37,8 @@ a 1-indexed `{number}` placeholder to the command you want it to apply to:
37
37
  "scripts": {
38
38
  // ...
39
39
  "build": "concurrently -P 'npm:build:client -- {1}' npm:build:server --",
40
- "typecheck": "npm run build -- --noEmit"
41
- }
40
+ "typecheck": "npm run build -- --noEmit",
41
+ },
42
42
  }
43
43
  ```
44
44
 
@@ -55,8 +55,8 @@ to your commands. This can be done with the `{@}` placeholder.
55
55
  "scripts": {
56
56
  // ...
57
57
  "build": "concurrently -P 'npm:build:client -- {@}' 'npm:build:server -- {@}' --",
58
- "typecheck": "npm run build -- --watch --noEmit"
59
- }
58
+ "typecheck": "npm run build -- --watch --noEmit",
59
+ },
60
60
  }
61
61
  ```
62
62
 
@@ -72,8 +72,8 @@ which wraps the arguments in quotes.
72
72
  // ...
73
73
  "scripts": {
74
74
  // ...
75
- "build": "concurrently -P 'npm:build:client -- --outDir {*}/client' 'npm:build:server -- --outDir {*}/server' -- $(date)"
76
- }
75
+ "build": "concurrently -P 'npm:build:client -- --outDir {*}/client' 'npm:build:server -- --outDir {*}/server' -- $(date)",
76
+ },
77
77
  }
78
78
  ```
79
79
 
@@ -25,9 +25,9 @@ For example, given the following `package.json` contents:
25
25
  "lint:js": "...",
26
26
  "lint:ts": "...",
27
27
  "lint:fix:js": "...",
28
- "lint:fix:ts": "..."
28
+ "lint:fix:ts": "...",
29
29
  // ...
30
- }
30
+ },
31
31
  // ...
32
32
  }
33
33
  ```
package/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * While in local development, make sure you've run `pnpm run build` first.
3
3
  */
4
4
 
5
- // eslint-disable-next-line @typescript-eslint/no-var-requires
5
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
6
6
  const concurrently = require('./dist/src/index.js');
7
7
 
8
8
  // For require()
package/index.mjs CHANGED
@@ -4,7 +4,6 @@
4
4
 
5
5
  import { concurrently } from './dist/src/index.js';
6
6
 
7
- // NOTE: the star reexport doesn't work in Node <12.20, <14.13 and <15.
8
7
  export * from './dist/src/index.js';
9
8
 
10
9
  export default concurrently;
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "concurrently",
3
- "version": "9.2.0",
3
+ "version": "9.2.1",
4
4
  "description": "Run commands concurrently",
5
- "packageManager": "pnpm@8.15.9+sha256.daa27a0b541bc635323ff96c2ded995467ff9fe6d69ff67021558aa9ad9dcc36",
6
5
  "main": "index.js",
7
6
  "types": "index.d.ts",
8
7
  "type": "commonjs",
@@ -42,44 +41,40 @@
42
41
  "author": "Kimmo Brunfeldt",
43
42
  "license": "MIT",
44
43
  "dependencies": {
45
- "chalk": "^4.1.2",
46
- "lodash": "^4.17.21",
47
- "rxjs": "^7.8.1",
48
- "shell-quote": "^1.8.1",
49
- "supports-color": "^8.1.1",
50
- "tree-kill": "^1.2.2",
51
- "yargs": "^17.7.2"
44
+ "chalk": "4.1.2",
45
+ "rxjs": "7.8.2",
46
+ "shell-quote": "1.8.3",
47
+ "supports-color": "8.1.1",
48
+ "tree-kill": "1.2.2",
49
+ "yargs": "17.7.2"
52
50
  },
53
51
  "devDependencies": {
52
+ "@eslint/js": "^9.33.0",
54
53
  "@hirez_io/observer-spy": "^2.2.0",
55
- "@jest/types": "^30.0.0",
56
- "@swc/core": "^1.7.23",
57
- "@swc/jest": "^0.2.36",
58
- "@types/jest": "^30.0.0",
59
- "@types/lodash": "^4.17.7",
60
- "@types/node": "^18.19.50",
54
+ "@types/node": "^18.19.123",
61
55
  "@types/shell-quote": "^1.7.5",
62
56
  "@types/supports-color": "^8.1.3",
63
57
  "@types/yargs": "^17.0.33",
64
- "@typescript-eslint/eslint-plugin": "^7.18.0",
65
- "@typescript-eslint/parser": "^7.18.0",
66
- "coveralls-next": "^4.2.1",
67
- "ctrlc-wrapper": "^0.0.4",
68
- "esbuild": "~0.25.0",
69
- "eslint": "^8.57.0",
70
- "eslint-config-prettier": "^9.1.0",
71
- "eslint-plugin-import": "^2.30.0",
72
- "eslint-plugin-jest": "^27.9.0",
73
- "eslint-plugin-prettier": "^5.2.1",
74
- "eslint-plugin-simple-import-sort": "^10.0.0",
75
- "husky": "^9.1.5",
76
- "jest": "^30.0.0",
77
- "jest-create-mock-instance": "^2.0.0",
78
- "lint-staged": "^15.2.10",
79
- "prettier": "^3.0.3",
58
+ "@vitest/coverage-v8": "^3.2.4",
59
+ "@vitest/eslint-plugin": "^1.3.4",
60
+ "coveralls-next": "^5.0.0",
61
+ "ctrlc-wrapper": "^0.0.5",
62
+ "esbuild": "~0.25.9",
63
+ "eslint": "^9.33.0",
64
+ "eslint-config-flat-gitignore": "^2.1.0",
65
+ "eslint-config-prettier": "^10.1.8",
66
+ "eslint-plugin-import-lite": "^0.3.0",
67
+ "eslint-plugin-prettier": "^5.5.4",
68
+ "eslint-plugin-simple-import-sort": "^12.1.1",
69
+ "globals": "16.3.0",
70
+ "husky": "^9.1.7",
71
+ "lint-staged": "^15.5.2",
72
+ "prettier": "^3.6.2",
80
73
  "safe-publish-latest": "^2.0.0",
81
74
  "string-argv": "^0.3.2",
82
- "typescript": "~5.2.2"
75
+ "typescript": "~5.9.2",
76
+ "typescript-eslint": "^8.40.0",
77
+ "vitest": "^3.2.4"
83
78
  },
84
79
  "files": [
85
80
  "dist",
@@ -102,10 +97,10 @@
102
97
  "clean": "tsc --build --clean",
103
98
  "format": "prettier --check '**/*.{json,y?(a)ml,md}'",
104
99
  "format:fix": "pnpm run format --write",
105
- "lint": "eslint --ignore-path .gitignore --ext mjs,js,ts .",
100
+ "lint": "eslint",
106
101
  "lint:fix": "pnpm run lint --fix",
107
102
  "report-coverage": "cat coverage/lcov.info | coveralls",
108
- "test": "jest --selectProjects unit",
109
- "test:smoke": "jest --selectProjects smoke"
103
+ "test": "vitest --project unit",
104
+ "test:smoke": "vitest run --project smoke"
110
105
  }
111
106
  }