Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit 4a8790a

Browse files
authored
fix: update to rxjs 7 (#1280)
Updates to rxjs 7 to fix the deployment and keep us up to date.
1 parent bb2fc83 commit 4a8790a

File tree

4 files changed

+9
-19
lines changed

4 files changed

+9
-19
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"@stackblitz/sdk": "^1.5.2",
5454
"moment": "^2.29.1",
5555
"path-normalize": "^6.0.7",
56-
"rxjs": "^6.6.7",
56+
"rxjs": "^7.8.1",
5757
"tslib": "^2.3.0",
5858
"zone.js": "~0.14.10"
5959
},

src/app/pages/component-viewer/component-viewer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ import {ExampleViewer} from '../../shared/example-viewer/example-viewer';
4949
export class ComponentViewer implements OnDestroy {
5050
componentDocItem = new ReplaySubject<DocItem>(1);
5151
sections: Set<string> = new Set(['overview', 'api']);
52-
private _destroyed = new Subject();
52+
private _destroyed = new Subject<void>();
5353

5454
constructor(_route: ActivatedRoute, private router: Router,
5555
public _componentPageTitle: ComponentPageTitle,
@@ -98,7 +98,7 @@ export class ComponentBaseView implements OnInit, OnDestroy {
9898
readonly viewers = viewChildren(DocViewer);
9999

100100
showToc: Observable<boolean>;
101-
private _destroyed = new Subject();
101+
private _destroyed = new Subject<void>();
102102

103103
constructor(
104104
public componentViewer: ComponentViewer,

src/app/shared/stack-blitz/stack-blitz-writer.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import {HttpClient} from '@angular/common/http';
22
import {Injectable, NgZone} from '@angular/core';
33
import {EXAMPLE_COMPONENTS, ExampleData} from '@angular/components-examples';
4-
import {Observable} from 'rxjs';
5-
import {shareReplay, take} from 'rxjs/operators';
4+
import {Observable, firstValueFrom} from 'rxjs';
5+
import {shareReplay} from 'rxjs/operators';
66

77
import stackblitz from '@stackblitz/sdk';
88

@@ -169,8 +169,7 @@ export class StackBlitzWriter {
169169
this._fileCache.set(fileUrl, stream);
170170
}
171171

172-
// The `take(1)` is necessary, because the Promise from `toPromise` resolves on complete.
173-
return stream.pipe(take(1)).toPromise();
172+
return firstValueFrom(stream);
174173
}
175174

176175
/**

yarn.lock

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12771,7 +12771,7 @@ __metadata:
1277112771
path-normalize: "npm:^6.0.7"
1277212772
protractor: "npm:^7.0.0"
1277312773
puppeteer: "npm:~21.1.0"
12774-
rxjs: "npm:^6.6.7"
12774+
rxjs: "npm:^7.8.1"
1277512775
sass: "npm:^1.70.0"
1277612776
shelljs: "npm:^0.8.4"
1277712777
ts-node: "npm:^8.10.2"
@@ -15763,7 +15763,7 @@ __metadata:
1576315763
languageName: node
1576415764
linkType: hard
1576515765

15766-
"rxjs@npm:7.8.1, rxjs@npm:^7.5.5":
15766+
"rxjs@npm:7.8.1, rxjs@npm:^7.5.5, rxjs@npm:^7.8.1":
1576715767
version: 7.8.1
1576815768
resolution: "rxjs@npm:7.8.1"
1576915769
dependencies:
@@ -15772,15 +15772,6 @@ __metadata:
1577215772
languageName: node
1577315773
linkType: hard
1577415774

15775-
"rxjs@npm:^6.6.7":
15776-
version: 6.6.7
15777-
resolution: "rxjs@npm:6.6.7"
15778-
dependencies:
15779-
tslib: "npm:^1.9.0"
15780-
checksum: 10c0/e556a13a9aa89395e5c9d825eabcfa325568d9c9990af720f3f29f04a888a3b854f25845c2b55875d875381abcae2d8100af9cacdc57576e7ed6be030a01d2fe
15781-
languageName: node
15782-
linkType: hard
15783-
1578415775
"safe-array-concat@npm:^1.1.2":
1578515776
version: 1.1.2
1578615777
resolution: "safe-array-concat@npm:1.1.2"
@@ -17420,7 +17411,7 @@ __metadata:
1742017411
languageName: node
1742117412
linkType: hard
1742217413

17423-
"tslib@npm:^1.8.1, tslib@npm:^1.9.0, tslib@npm:^1.9.3":
17414+
"tslib@npm:^1.8.1, tslib@npm:^1.9.3":
1742417415
version: 1.14.1
1742517416
resolution: "tslib@npm:1.14.1"
1742617417
checksum: 10c0/69ae09c49eea644bc5ebe1bca4fa4cc2c82b7b3e02f43b84bd891504edf66dbc6b2ec0eef31a957042de2269139e4acff911e6d186a258fb14069cd7f6febce2

0 commit comments

Comments
 (0)