Skip to content

Commit cb04cbf

Browse files
committed
Remove deprecated flags/options
1 parent 0e50ac3 commit cb04cbf

4 files changed

Lines changed: 4 additions & 50 deletions

File tree

bin/index.spec.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -288,15 +288,6 @@ describe('--names', () => {
288288
expect(lines).toContainEqual(expect.stringContaining('[bar] bar'));
289289
});
290290
});
291-
292-
it('is split using --name-separator arg', async () => {
293-
const lines = await run(
294-
'--names "foo|bar" --name-separator "|" "echo foo" "echo bar"',
295-
).getLogLines();
296-
297-
expect(lines).toContainEqual(expect.stringContaining('[foo] foo'));
298-
expect(lines).toContainEqual(expect.stringContaining('[bar] bar'));
299-
});
300291
});
301292

302293
describe('specifies custom prefix', () => {

bin/index.ts

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import process from 'node:process';
44
import yargs from 'yargs';
55
import { hideBin } from 'yargs/helpers';
66

7-
import { assertDeprecated } from '../lib/assert.js';
87
import * as defaults from '../lib/defaults.js';
98
import { concurrently } from '../lib/index.js';
109
import { castArray, splitOutsideParens } from '../lib/utils.js';
@@ -46,12 +45,6 @@ const program = yargs(hideBin(process.argv))
4645
'Example names: "main,browser,server"',
4746
type: 'string',
4847
},
49-
'name-separator': {
50-
describe:
51-
'The character to split <names> on. Example usage:\n' +
52-
'-n "styles|scripts|server" --name-separator "|"',
53-
default: defaults.nameSeparator,
54-
},
5548
success: {
5649
alias: 's',
5750
describe:
@@ -214,20 +207,7 @@ const program = yargs(hideBin(process.argv))
214207
},
215208
})
216209
.group(
217-
[
218-
'm',
219-
'n',
220-
'name-separator',
221-
's',
222-
'r',
223-
'no-color',
224-
'hide',
225-
'g',
226-
'timings',
227-
'shell',
228-
'P',
229-
'teardown',
230-
],
210+
['m', 'n', 's', 'r', 'no-color', 'hide', 'g', 'timings', 'shell', 'P', 'teardown'],
231211
'General',
232212
)
233213
.group(['p', 'c', 'l', 't', 'pad-prefix'], 'Prefix styling')
@@ -237,14 +217,8 @@ const program = yargs(hideBin(process.argv))
237217
.epilogue(epilogue);
238218

239219
const args = program.parseSync();
240-
assertDeprecated(
241-
args.nameSeparator === defaults.nameSeparator,
242-
'name-separator',
243-
'Use commas as name separators instead.',
244-
);
245220

246-
// Get names of commands by the specified separator
247-
const names = (args.names || '').split(args.nameSeparator);
221+
const names = (args.names || '').split(',');
248222

249223
const additionalArguments = castArray(args['--'] ?? []).map(String);
250224
const commands = args.passthroughArguments ? args._ : args._.concat(additionalArguments);

lib/defaults.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ export const maxProcesses = 0;
2121
*/
2222
export const hide = '';
2323

24-
/**
25-
* The character to split <names> on.
26-
*/
27-
export const nameSeparator = ',';
28-
2924
/**
3025
* Which prefix style to use when logging processes output.
3126
*/

lib/index.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import process from 'node:process';
22
import { Readable } from 'node:stream';
33

4-
import { assertDeprecated, assertNotRuntime } from './assert.js';
4+
import { assertNotRuntime } from './assert.js';
55
import { CloseEvent, Command, CommandIdentifier, TimerEvent } from './command.js';
66
import {
77
concurrently as createConcurrently,
@@ -84,11 +84,6 @@ export type ConcurrentlyOptions = Omit<
8484
restartTries?: number;
8585

8686
// Process killing options
87-
/**
88-
* @deprecated Use `killOthersOn` instead.
89-
* @see KillOthers
90-
*/
91-
killOthers?: ProcessCloseCondition | ProcessCloseCondition[];
9287
/**
9388
* Once the first command exits with one of these statuses, kill other commands.
9489
* @see KillOthers
@@ -137,7 +132,6 @@ export function concurrently(
137132
commands: ConcurrentlyCommandInput[],
138133
options: Partial<ConcurrentlyOptions> = {},
139134
) {
140-
assertDeprecated(options.killOthers === undefined, 'killOthers', 'Use killOthersOn instead.');
141135
assertNotRuntime(
142136
// When run via /snap/bin/node, process.execPath maps to the actual snap path, but it also sets
143137
// several SNAP_* env variables. If the snap is run directly via e.g. /snap/node/current/bin/node,
@@ -201,7 +195,7 @@ export function concurrently(
201195
}),
202196
new KillOthers({
203197
logger,
204-
conditions: options.killOthersOn || options.killOthers || [],
198+
conditions: options.killOthersOn || [],
205199
timeoutMs: options.killTimeout,
206200
killSignal: options.killSignal,
207201
abortController,

0 commit comments

Comments
 (0)