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

Commit

Permalink
fix: update to rxjs 7 (#1280)
Browse files Browse the repository at this point in the history
Updates to rxjs 7 to fix the deployment and keep us up to date.
  • Loading branch information
crisbeto authored Oct 24, 2024
1 parent bb2fc83 commit 4a8790a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 19 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@stackblitz/sdk": "^1.5.2",
"moment": "^2.29.1",
"path-normalize": "^6.0.7",
"rxjs": "^6.6.7",
"rxjs": "^7.8.1",
"tslib": "^2.3.0",
"zone.js": "~0.14.10"
},
Expand Down
4 changes: 2 additions & 2 deletions src/app/pages/component-viewer/component-viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import {ExampleViewer} from '../../shared/example-viewer/example-viewer';
export class ComponentViewer implements OnDestroy {
componentDocItem = new ReplaySubject<DocItem>(1);
sections: Set<string> = new Set(['overview', 'api']);
private _destroyed = new Subject();
private _destroyed = new Subject<void>();

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

showToc: Observable<boolean>;
private _destroyed = new Subject();
private _destroyed = new Subject<void>();

constructor(
public componentViewer: ComponentViewer,
Expand Down
7 changes: 3 additions & 4 deletions src/app/shared/stack-blitz/stack-blitz-writer.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {HttpClient} from '@angular/common/http';
import {Injectable, NgZone} from '@angular/core';
import {EXAMPLE_COMPONENTS, ExampleData} from '@angular/components-examples';
import {Observable} from 'rxjs';
import {shareReplay, take} from 'rxjs/operators';
import {Observable, firstValueFrom} from 'rxjs';
import {shareReplay} from 'rxjs/operators';

import stackblitz from '@stackblitz/sdk';

Expand Down Expand Up @@ -169,8 +169,7 @@ export class StackBlitzWriter {
this._fileCache.set(fileUrl, stream);
}

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

/**
Expand Down
15 changes: 3 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12771,7 +12771,7 @@ __metadata:
path-normalize: "npm:^6.0.7"
protractor: "npm:^7.0.0"
puppeteer: "npm:~21.1.0"
rxjs: "npm:^6.6.7"
rxjs: "npm:^7.8.1"
sass: "npm:^1.70.0"
shelljs: "npm:^0.8.4"
ts-node: "npm:^8.10.2"
Expand Down Expand Up @@ -15763,7 +15763,7 @@ __metadata:
languageName: node
linkType: hard

"rxjs@npm:7.8.1, rxjs@npm:^7.5.5":
"rxjs@npm:7.8.1, rxjs@npm:^7.5.5, rxjs@npm:^7.8.1":
version: 7.8.1
resolution: "rxjs@npm:7.8.1"
dependencies:
Expand All @@ -15772,15 +15772,6 @@ __metadata:
languageName: node
linkType: hard

"rxjs@npm:^6.6.7":
version: 6.6.7
resolution: "rxjs@npm:6.6.7"
dependencies:
tslib: "npm:^1.9.0"
checksum: 10c0/e556a13a9aa89395e5c9d825eabcfa325568d9c9990af720f3f29f04a888a3b854f25845c2b55875d875381abcae2d8100af9cacdc57576e7ed6be030a01d2fe
languageName: node
linkType: hard

"safe-array-concat@npm:^1.1.2":
version: 1.1.2
resolution: "safe-array-concat@npm:1.1.2"
Expand Down Expand Up @@ -17420,7 +17411,7 @@ __metadata:
languageName: node
linkType: hard

"tslib@npm:^1.8.1, tslib@npm:^1.9.0, tslib@npm:^1.9.3":
"tslib@npm:^1.8.1, tslib@npm:^1.9.3":
version: 1.14.1
resolution: "tslib@npm:1.14.1"
checksum: 10c0/69ae09c49eea644bc5ebe1bca4fa4cc2c82b7b3e02f43b84bd891504edf66dbc6b2ec0eef31a957042de2269139e4acff911e6d186a258fb14069cd7f6febce2
Expand Down

0 comments on commit 4a8790a

Please sign in to comment.