Skip to content

Commit f74bfa3

Browse files
committed
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 1864d71 commit f74bfa3

File tree

93 files changed

+1237
-1311
lines changed

Some content is hidden

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

93 files changed

+1237
-1311
lines changed

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

Lines changed: 2 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;

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

@@ -715,7 +715,7 @@ interface PromptDefinition {
715715
}
716716

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@
191191
"puppeteer": "18.2.1",
192192
"quicktype-core": "6.0.69",
193193
"resolve-url-loader": "5.0.0",
194-
"rxjs": "6.6.7",
194+
"rxjs": "7.6.0",
195195
"sass": "1.56.1",
196196
"sass-loader": "13.2.0",
197197
"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: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
import { json } from '@angular-devkit/core';
1515
import { spawnSync } from 'child_process';
1616
import { existsSync } from 'fs';
17+
import assert from 'node:assert';
1718
import { resolve } from 'path';
1819
import { isPackageNameSafeForAnalytics } from '../analytics/analytics';
1920
import { EventCustomDimension, EventCustomMetric } from '../analytics/analytics-parameters';
@@ -85,7 +86,11 @@ export abstract class ArchitectBaseCommandModule<T extends object>
8586
}
8687

8788
try {
88-
const { error, success } = await run.output.toPromise();
89+
const output = await run.output.toPromise();
90+
// TODO(RXJS): temporary assert to avoid adding rxjs dependency.
91+
assert(output);
92+
93+
const { error, success } = output;
8994

9095
if (error) {
9196
logger.error(error);

packages/angular/cli/src/command-builder/utilities/json-schema.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*/
88

99
import { json } from '@angular-devkit/core';
10+
import assert from 'node:assert';
1011
import yargs from 'yargs';
1112

1213
/**
@@ -198,6 +199,8 @@ export async function parseJsonSchemaToOptions(
198199
}
199200

200201
const flattenedSchema = await registry.flatten(schema).toPromise();
202+
// TODO(RXJS): temporary assert to avoid adding rxjs dependency.
203+
assert(flattenedSchema);
201204
json.schema.visitJsonSchema(flattenedSchema, visitor);
202205

203206
// Sort by positional and name.

0 commit comments

Comments
 (0)