Skip to content

Commit

Permalink
JSFIX patches
Browse files Browse the repository at this point in the history
  • Loading branch information
jsfix.live analysis committed May 19, 2022
1 parent 6f1e11d commit 2eeee42
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 @@ -75,16 +75,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 2eeee42

Please sign in to comment.