Skip to content

Commit

Permalink
deps: update rxjs to version 7.0.0 (#326)
Browse files Browse the repository at this point in the history
Co-authored-by: jsfix.live analysis <info@coana.tech>
  • Loading branch information
jsfix-updater and jsfix.live analysis committed Jun 13, 2022
1 parent 74412ba commit c88845e
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 21 deletions.
39 changes: 25 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"chalk": "^4.1.0",
"date-fns": "^2.16.1",
"lodash": "^4.17.21",
"rxjs": "^6.6.3",
"rxjs": "^7.0.0",
"shell-quote": "^1.7.3",
"spawn-command": "^0.0.2-1",
"supports-color": "^8.1.0",
Expand Down
8 changes: 3 additions & 5 deletions src/completion-listener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,14 @@ export class CompletionListener {
*/
listen(commands: Command[]): Promise<CloseEvent[]> {
const closeStreams = commands.map(command => command.close);
return Rx.merge(...closeStreams)
return Rx.lastValueFrom(Rx.merge(...closeStreams)
.pipe(
bufferCount(closeStreams.length),
switchMap(exitInfos =>
this.isSuccess(exitInfos)
? Rx.of(exitInfos, this.scheduler)
: Rx.throwError(exitInfos, this.scheduler),
),
: Rx.throwError(exitInfos, this.scheduler)),
take(1),
)
.toPromise();
));
}
};
2 changes: 1 addition & 1 deletion src/flow-control/log-timings.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ it('does not log timings summary if there was an error', () => {
controller.handle(commands);

commands[0].close.next(command0ExitInfo);
commands[1].error.next();
commands[1].error.next(undefined);

expect(logger.logTable).toHaveBeenCalledTimes(0);

Expand Down

0 comments on commit c88845e

Please sign in to comment.