Skip to content

Commit 013c663

Browse files
clydinhansl
authored andcommitted
refactor(@angular-devkit/schematics): adjust rxjs type usage
Required for upcoming upgraded to rxjs 6.3
1 parent 1a3a117 commit 013c663

File tree

1 file changed

+7
-10
lines changed
  • packages/angular_devkit/schematics/src/workflow

1 file changed

+7
-10
lines changed

packages/angular_devkit/schematics/src/workflow/base.ts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88
import { logging, schema, virtualFs } from '@angular-devkit/core';
9-
import { Observable, Subject, concat, of, throwError } from 'rxjs';
9+
import { Observable, Subject, concat, from, of, throwError } from 'rxjs';
1010
import { concatMap, defaultIfEmpty, ignoreElements, last, map, tap } from 'rxjs/operators';
1111
import { EngineHost, SchematicEngine } from '../engine';
1212
import { UnsuccessfulWorkflowExecution } from '../exception/exception';
@@ -162,15 +162,12 @@ export abstract class BaseWorkflow implements Workflow {
162162
map(tree => optimize(tree)),
163163
concatMap((tree: Tree) => {
164164
// Process all sinks.
165-
return of(tree).pipe(
166-
...sinks.map(sink => {
167-
return concatMap((tree: Tree) => {
168-
return concat(
169-
sink.commit(tree).pipe(ignoreElements()),
170-
of(tree),
171-
);
172-
});
173-
}),
165+
return concat(
166+
from(sinks).pipe(
167+
concatMap(sink => sink.commit(tree)),
168+
ignoreElements(),
169+
),
170+
of(tree),
174171
);
175172
}),
176173
concatMap(() => {

0 commit comments

Comments
 (0)