concurrently 4.1.2 → 5.0.0

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
@@ -147,7 +147,7 @@ Prefix styling
147
147
  prefix when it is set to "command"
148
148
  [number] [default: 10]
149
149
  -t, --timestamp-format Specify the timestamp in moment/date-fns format.
150
- [string] [default: "YYYY-MM-DD HH:mm:ss.SSS"]
150
+ [string] [default: "yyyy-MM-dd HH:mm:ss.SSS"]
151
151
 
152
152
  Input handling
153
153
  -i, --handle-input Whether input should be forwarded to the child
@@ -247,8 +247,8 @@ concurrently can be used programmatically by using the API documented below:
247
247
  Anything else means all processes should exit successfully.
248
248
  - `restartTries`: how many attempts to restart a process that dies will be made. Default: `0`.
249
249
  - `restartDelay`: how many milliseconds to wait between process restarts. Default: `0`.
250
- - `timestampFormat`: a [date-fns/moment format](https://date-fns.org/v1.29.0/docs/format)
251
- to use when prefixing with `time`. Default: `YYYY-MM-DD HH:mm:ss.ZZZ`
250
+ - `timestampFormat`: a [date-fns format](https://date-fns.org/v2.0.1/docs/format)
251
+ to use when prefixing with `time`. Default: `yyyy-MM-dd HH:mm:ss.ZZZ`
252
252
 
253
253
  > Returns: a `Promise` that resolves if the run was successful (according to `successCondition` option),
254
254
  > or rejects otherwise.
package/appveyor.yml CHANGED
@@ -1,5 +1,6 @@
1
1
  environment:
2
2
  matrix:
3
+ - nodejs_version: '12'
3
4
  - nodejs_version: '10'
4
5
  - nodejs_version: '8'
5
6
  - nodejs_version: '6'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "concurrently",
3
- "version": "4.1.2",
3
+ "version": "5.0.0",
4
4
  "description": "Run commands concurrently",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -30,7 +30,7 @@
30
30
  "license": "MIT",
31
31
  "dependencies": {
32
32
  "chalk": "^2.4.2",
33
- "date-fns": "^1.30.1",
33
+ "date-fns": "^2.0.1",
34
34
  "lodash": "^4.17.15",
35
35
  "read-pkg": "^4.0.1",
36
36
  "rxjs": "^6.5.2",
package/src/defaults.js CHANGED
@@ -22,6 +22,6 @@ module.exports = {
22
22
  restartDelay: 0,
23
23
  // Condition of success for concurrently itself.
24
24
  success: 'all',
25
- // Refer to https://date-fns.org/v1.29.0/docs/format
26
- timestampFormat: 'YYYY-MM-DD HH:mm:ss.SSS'
25
+ // Refer to https://date-fns.org/v2.0.1/docs/format
26
+ timestampFormat: 'yyyy-MM-dd HH:mm:ss.SSS'
27
27
  };
@@ -8,7 +8,7 @@ module.exports = class KillOnSignal {
8
8
 
9
9
  handle(commands) {
10
10
  let caughtSignal;
11
- ['SIGINT', 'SIGTERM'].forEach(signal => {
11
+ ['SIGINT', 'SIGTERM', 'SIGHUP'].forEach(signal => {
12
12
  this.process.on(signal, () => {
13
13
  caughtSignal = signal;
14
14
  commands.forEach(command => command.kill(signal));
@@ -68,3 +68,12 @@ it('kills all commands on SIGTERM', () => {
68
68
  expect(commands[0].kill).toHaveBeenCalledWith('SIGTERM');
69
69
  expect(commands[1].kill).toHaveBeenCalledWith('SIGTERM');
70
70
  });
71
+
72
+ it('kills all commands on SIGHUP', () => {
73
+ controller.handle(commands);
74
+ process.emit('SIGHUP');
75
+
76
+ expect(process.listenerCount('SIGHUP')).toBe(1);
77
+ expect(commands[0].kill).toHaveBeenCalledWith('SIGHUP');
78
+ expect(commands[1].kill).toHaveBeenCalledWith('SIGHUP');
79
+ });
@@ -111,7 +111,7 @@ describe('#logCommandText()', () => {
111
111
  });
112
112
 
113
113
  it('logs with prefixFormat set to time (with timestampFormat)', () => {
114
- const logger = createLogger({ prefixFormat: 'time', timestampFormat: 'YYYY' });
114
+ const logger = createLogger({ prefixFormat: 'time', timestampFormat: 'yyyy' });
115
115
  logger.logCommandText('foo', {});
116
116
 
117
117
  const year = new Date().getFullYear();