Skip to content

Commit 8095268

Browse files
alan-agius4angular-robot[bot]
authored andcommitted
build: update to rxjs 7
G3 is now using RXJS version 7 which makes it possible for the CLI to also be updated to RXJS 7. NB: this change does not remove all usages of the deprecated APIs. Closes #24371
1 parent 3cbeee7 commit 8095268

File tree

113 files changed

+500
-417
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+500
-417
lines changed

bin/devkit-admin

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ let logger = null;
3535
try {
3636
logger = new (require('@angular-devkit/core').logging.IndentLogger)('root');
3737
const colors = require('ansi-colors').create();
38-
const filter = require('rxjs/operators').filter;
38+
const filter = require('rxjs').filter;
3939

4040
logger
4141
.pipe(filter(entry => (entry.level !== 'debug' || args.verbose)))

goldens/public-api/angular_devkit/architect/index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import { JsonObject } from '@angular-devkit/core';
1010
import { JsonValue } from '@angular-devkit/core';
1111
import { logging } from '@angular-devkit/core';
1212
import { Observable } from 'rxjs';
13+
import { ObservableInput } from 'rxjs';
1314
import { Observer } from 'rxjs';
1415
import { schema } from '@angular-devkit/core';
15-
import { SubscribableOrPromise } from 'rxjs';
1616

1717
// @public (undocumented)
1818
export class Architect {
@@ -67,7 +67,7 @@ export type BuilderInput = json.JsonObject & Schema;
6767
export type BuilderOutput = json.JsonObject & Schema_2;
6868

6969
// @public
70-
export type BuilderOutputLike = AsyncIterable<BuilderOutput> | SubscribableOrPromise<BuilderOutput> | BuilderOutput;
70+
export type BuilderOutputLike = ObservableInput<BuilderOutput> | BuilderOutput;
7171

7272
// @public (undocumented)
7373
export type BuilderProgress = json.JsonObject & Schema_3 & TypedBuilderProgress;
@@ -97,6 +97,7 @@ export type BuilderRegistry = Registry<json.JsonObject, BuilderInput, BuilderOut
9797
export interface BuilderRun {
9898
id: number;
9999
info: BuilderInfo;
100+
lastOutput: Promise<BuilderOutput>;
100101
output: Observable<BuilderOutput>;
101102
progress: Observable<BuilderProgressReport>;
102103
result: Promise<BuilderOutput>;

goldens/public-api/angular_devkit/core/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
import { ErrorObject } from 'ajv';
88
import { Format } from 'ajv';
99
import { Observable } from 'rxjs';
10+
import { ObservableInput } from 'rxjs';
1011
import { Operator } from 'rxjs';
1112
import { PartialObserver } from 'rxjs';
1213
import { Position } from 'source-map';
1314
import { Subject } from 'rxjs';
14-
import { SubscribableOrPromise } from 'rxjs';
1515
import { Subscription } from 'rxjs';
1616
import { ValidateFunction } from 'ajv';
1717

@@ -714,7 +714,7 @@ interface PromptDefinition {
714714
}
715715

716716
// @public (undocumented)
717-
type PromptProvider = (definitions: Array<PromptDefinition>) => SubscribableOrPromise<{
717+
type PromptProvider = (definitions: Array<PromptDefinition>) => ObservableInput<{
718718
[id: string]: JsonValue;
719719
}>;
720720

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@
193193
"puppeteer": "18.2.1",
194194
"quicktype-core": "22.0.0",
195195
"resolve-url-loader": "5.0.0",
196-
"rxjs": "6.6.7",
196+
"rxjs": "7.8.0",
197197
"sass": "1.58.1",
198198
"sass-loader": "13.2.0",
199199
"sauce-connect-proxy": "https://saucelabs.com/downloads/sc-4.8.1-linux.tar.gz",

packages/angular/cli/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ ts_library(
142142
"//packages/angular_devkit/schematics",
143143
"//packages/angular_devkit/schematics/testing",
144144
"@npm//@types/semver",
145-
"@npm//rxjs",
146145
],
147146
)
148147

packages/angular/cli/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@
4141
"symbol-observable": "4.0.0",
4242
"yargs": "17.6.2"
4343
},
44-
"devDependencies": {
45-
"rxjs": "6.6.7"
46-
},
4744
"ng-update": {
4845
"migrations": "@schematics/angular/migrations/migration-collection.json",
4946
"packageGroup": {

packages/angular/cli/src/command-builder/architect-base-command-module.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ export abstract class ArchitectBaseCommandModule<T extends object>
8585
}
8686

8787
try {
88-
const { error, success } = await run.output.toPromise();
89-
88+
const { error, success } = await run.lastOutput;
9089
if (error) {
9190
logger.error(error);
9291
}

packages/angular_devkit/architect/builders/all-of.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
*/
88

99
import { json } from '@angular-devkit/core';
10-
import { EMPTY, from, of } from 'rxjs';
11-
import { map, mergeMap } from 'rxjs/operators';
10+
import { EMPTY, from, map, mergeMap, of } from 'rxjs';
1211
import { BuilderOutput, BuilderRun, createBuilder } from '../src';
1312
import { Schema as OperatorSchema } from './operator-schema';
1413

packages/angular_devkit/architect/builders/concat.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
*/
88

99
import { json } from '@angular-devkit/core';
10-
import { from, of } from 'rxjs';
11-
import { concatMap, first, last, map, switchMap } from 'rxjs/operators';
10+
import { concatMap, first, from, last, map, of, switchMap } from 'rxjs';
1211
import { BuilderOutput, BuilderRun, createBuilder } from '../src';
1312
import { Schema as OperatorSchema } from './operator-schema';
1413

packages/angular_devkit/architect/node/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ ts_library(
4040
":node",
4141
"//packages/angular_devkit/architect",
4242
"//tests/angular_devkit/architect/node/jobs:jobs_test_lib",
43+
"@npm//rxjs",
4344
],
4445
)
4546

0 commit comments

Comments
 (0)