Skip to content

Commit cda0302

Browse files
authored
update to concurrently 7.6.0 (#943)
* update to concurrently 7.6.0 * concurrently 7.0 API change
1 parent cd3c9a4 commit cda0302

File tree

4 files changed

+33
-77
lines changed

4 files changed

+33
-77
lines changed

apps/generator-cli/src/app/services/generator.service.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,10 @@ describe('GeneratorService', () => {
122122
concurrently.mockImplementation((ec, cfg) => {
123123
executedCommands = ec;
124124
concurrentlyCfg = cfg;
125-
return Promise.resolve();
125+
return {
126+
commands: ec.map((c) => ({ name: c })),
127+
result: Promise.resolve(),
128+
};
126129
});
127130
});
128131

apps/generator-cli/src/app/services/generator.service.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Inject, Injectable } from '@nestjs/common';
22
import { flatten, isString, kebabCase, sortBy, upperFirst } from 'lodash';
33

4-
import concurrently from 'concurrently';
4+
import concurrently, { type CloseEvent } from 'concurrently';
55
import * as path from 'path';
66
import * as fs from 'fs-extra';
77
import * as glob from 'glob';
@@ -94,7 +94,9 @@ export class GeneratorService {
9494
commands.length > 0 &&
9595
(await (async () => {
9696
try {
97-
this.printResult(await concurrently(commands, { maxProcesses: 10 }));
97+
this.printResult(
98+
await concurrently(commands, { maxProcesses: 10 }).result,
99+
);
98100
return true;
99101
} catch (e) {
100102
this.printResult(e);
@@ -110,13 +112,11 @@ export class GeneratorService {
110112
return generated;
111113
}
112114

113-
private printResult(
114-
res: { command: concurrently.CommandObj; exitCode: number }[]
115-
) {
115+
private printResult(res: CloseEvent[]) {
116116
this.logger.log(
117117
sortBy(res, 'command.name')
118118
.map(({ exitCode, command }) => {
119-
const failed = exitCode > 0;
119+
const failed = typeof exitCode === 'string' || exitCode > 0;
120120
return [
121121
chalk[failed ? 'red' : 'green'](command.name),
122122
...(failed ? [chalk.yellow(` ${command.command}\n`)] : []),

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
"chalk": "4.1.2",
8989
"commander": "8.3.0",
9090
"compare-versions": "4.1.4",
91-
"concurrently": "6.5.1",
91+
"concurrently": "^7.6.0",
9292
"console.table": "0.10.0",
9393
"fs-extra": "11.3.0",
9494
"glob": "11.x",
@@ -114,7 +114,6 @@
114114
"@nx/webpack": "20.8.2",
115115
"@nx/workspace": "20.8.2",
116116
"@semantic-release/changelog": "6.0.3",
117-
"@types/concurrently": "7.0.3",
118117
"@types/fs-extra": "11.0.4",
119118
"@types/inquirer": "8.2.11",
120119
"@types/jest": "29.5.14",

yarn.lock

Lines changed: 22 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -2627,13 +2627,6 @@
26272627
dependencies:
26282628
"@types/node" "*"
26292629

2630-
"@types/concurrently@7.0.3":
2631-
version "7.0.3"
2632-
resolved "https://registry.npmjs.org/@types/concurrently/-/concurrently-7.0.3.tgz#0e7f0a1d987cdcfed7bfd647b0d94dd98ff72789"
2633-
integrity sha512-6qiebMAdr4sRXLrczE3Wo/+JAQMXnYUhFulknKvhOVsZ1lL4bnV8EpB3YT2ZnbnJXkOTZ0KAkaa9cs1m0YIhXQ==
2634-
dependencies:
2635-
concurrently "*"
2636-
26372630
"@types/connect-history-api-fallback@^1.5.4":
26382631
version "1.5.4"
26392632
resolved "https://registry.npmjs.org/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.5.4.tgz#7de71645a103056b48ac3ce07b3520b819c1d5b3"
@@ -4254,32 +4247,20 @@ concat-stream@^2.0.0:
42544247
readable-stream "^3.0.2"
42554248
typedarray "^0.0.6"
42564249

4257-
concurrently@*:
4258-
version "9.1.2"
4259-
resolved "https://registry.npmjs.org/concurrently/-/concurrently-9.1.2.tgz#22d9109296961eaee773e12bfb1ce9a66bc9836c"
4260-
integrity sha512-H9MWcoPsYddwbOGM6difjVwVZHl63nwMEwDJG/L7VGtuaJhb12h2caPG2tVPWs7emuYix252iGfqOyrz1GczTQ==
4261-
dependencies:
4262-
chalk "^4.1.2"
4263-
lodash "^4.17.21"
4264-
rxjs "^7.8.1"
4265-
shell-quote "^1.8.1"
4266-
supports-color "^8.1.1"
4267-
tree-kill "^1.2.2"
4268-
yargs "^17.7.2"
4269-
4270-
concurrently@6.5.1:
4271-
version "6.5.1"
4272-
resolved "https://registry.npmjs.org/concurrently/-/concurrently-6.5.1.tgz#4518c67f7ac680cf5c34d5adf399a2a2047edc8c"
4273-
integrity sha512-FlSwNpGjWQfRwPLXvJ/OgysbBxPkWpiVjy1042b0U7on7S7qwwMIILRj7WTN1mTgqa582bG6NFuScOoh6Zgdag==
4250+
concurrently@^7.6.0:
4251+
version "7.6.0"
4252+
resolved "https://registry.yarnpkg.com/concurrently/-/concurrently-7.6.0.tgz#531a6f5f30cf616f355a4afb8f8fcb2bba65a49a"
4253+
integrity sha512-BKtRgvcJGeZ4XttiDiNcFiRlxoAeZOseqUvyYRUp/Vtd+9p1ULmeoSqGsDA+2ivdeDFpqrJvGvmI+StKfKl5hw==
42744254
dependencies:
42754255
chalk "^4.1.0"
4276-
date-fns "^2.16.1"
4256+
date-fns "^2.29.1"
42774257
lodash "^4.17.21"
4278-
rxjs "^6.6.3"
4258+
rxjs "^7.0.0"
4259+
shell-quote "^1.7.3"
42794260
spawn-command "^0.0.2-1"
42804261
supports-color "^8.1.0"
42814262
tree-kill "^1.2.2"
4282-
yargs "^16.2.0"
4263+
yargs "^17.3.1"
42834264

42844265
config-chain@^1.1.11:
42854266
version "1.1.13"
@@ -4672,9 +4653,9 @@ data-urls@^3.0.2:
46724653
whatwg-mimetype "^3.0.0"
46734654
whatwg-url "^11.0.0"
46744655

4675-
date-fns@^2.16.1:
4656+
date-fns@^2.29.1:
46764657
version "2.30.0"
4677-
resolved "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz#f367e644839ff57894ec6ac480de40cae4b0f4d0"
4658+
resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.30.0.tgz#f367e644839ff57894ec6ac480de40cae4b0f4d0"
46784659
integrity sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==
46794660
dependencies:
46804661
"@babel/runtime" "^7.21.0"
@@ -9656,14 +9637,7 @@ rxjs@7.8.1:
96569637
dependencies:
96579638
tslib "^2.1.0"
96589639

9659-
rxjs@^6.6.3:
9660-
version "6.6.7"
9661-
resolved "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9"
9662-
integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==
9663-
dependencies:
9664-
tslib "^1.9.0"
9665-
9666-
rxjs@^7.2.0, rxjs@^7.4.0, rxjs@^7.5.5, rxjs@^7.8.0, rxjs@^7.8.1, rxjs@^7.8.2:
9640+
rxjs@^7.0.0, rxjs@^7.2.0, rxjs@^7.4.0, rxjs@^7.5.5, rxjs@^7.8.0, rxjs@^7.8.2:
96679641
version "7.8.2"
96689642
resolved "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz#955bc473ed8af11a002a2be52071bf475638607b"
96699643
integrity sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==
@@ -10047,6 +10021,11 @@ shebang-regex@^3.0.0:
1004710021
resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
1004810022
integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
1004910023

10024+
shell-quote@^1.7.3:
10025+
version "1.8.3"
10026+
resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.3.tgz#55e40ef33cf5c689902353a3d8cd1a6725f08b4b"
10027+
integrity sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw==
10028+
1005010029
shell-quote@^1.8.1:
1005110030
version "1.8.2"
1005210031
resolved "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.2.tgz#d2d83e057959d53ec261311e9e9b8f51dcb2934a"
@@ -10374,16 +10353,7 @@ string-length@^4.0.1:
1037410353
char-regex "^1.0.2"
1037510354
strip-ansi "^6.0.0"
1037610355

10377-
"string-width-cjs@npm:string-width@^4.2.0":
10378-
version "4.2.3"
10379-
resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
10380-
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
10381-
dependencies:
10382-
emoji-regex "^8.0.0"
10383-
is-fullwidth-code-point "^3.0.0"
10384-
strip-ansi "^6.0.1"
10385-
10386-
string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
10356+
"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
1038710357
version "4.2.3"
1038810358
resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
1038910359
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
@@ -10415,14 +10385,7 @@ string_decoder@~1.1.1:
1041510385
dependencies:
1041610386
safe-buffer "~5.1.0"
1041710387

10418-
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
10419-
version "6.0.1"
10420-
resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
10421-
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
10422-
dependencies:
10423-
ansi-regex "^5.0.1"
10424-
10425-
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
10388+
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
1042610389
version "6.0.1"
1042710390
resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
1042810391
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
@@ -10881,7 +10844,7 @@ tslib@2.8.1, tslib@^2.0.0, tslib@^2.0.1, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.4.
1088110844
resolved "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f"
1088210845
integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==
1088310846

10884-
tslib@^1.13.0, tslib@^1.8.1, tslib@^1.9.0:
10847+
tslib@^1.13.0, tslib@^1.8.1:
1088510848
version "1.14.1"
1088610849
resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
1088710850
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
@@ -11407,7 +11370,7 @@ wordwrap@^1.0.0:
1140711370
resolved "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
1140811371
integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==
1140911372

11410-
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
11373+
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
1141111374
version "7.0.0"
1141211375
resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
1141311376
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
@@ -11425,15 +11388,6 @@ wrap-ansi@^6.0.1:
1142511388
string-width "^4.1.0"
1142611389
strip-ansi "^6.0.0"
1142711390

11428-
wrap-ansi@^7.0.0:
11429-
version "7.0.0"
11430-
resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
11431-
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
11432-
dependencies:
11433-
ansi-styles "^4.0.0"
11434-
string-width "^4.1.0"
11435-
strip-ansi "^6.0.0"
11436-
1143711391
wrap-ansi@^8.1.0:
1143811392
version "8.1.0"
1143911393
resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
@@ -11524,7 +11478,7 @@ yargs-parser@^20.2.2:
1152411478
resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee"
1152511479
integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==
1152611480

11527-
yargs@^16.0.0, yargs@^16.2.0:
11481+
yargs@^16.0.0:
1152811482
version "16.2.0"
1152911483
resolved "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66"
1153011484
integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==
@@ -11537,7 +11491,7 @@ yargs@^16.0.0, yargs@^16.2.0:
1153711491
y18n "^5.0.5"
1153811492
yargs-parser "^20.2.2"
1153911493

11540-
yargs@^17.0.0, yargs@^17.3.1, yargs@^17.5.1, yargs@^17.6.2, yargs@^17.7.2:
11494+
yargs@^17.0.0, yargs@^17.3.1, yargs@^17.5.1, yargs@^17.6.2:
1154111495
version "17.7.2"
1154211496
resolved "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269"
1154311497
integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==

0 commit comments

Comments
 (0)