Update rxjs peer dependency to include rxjs 7.x#103
Merged
Igorbek merged 5 commits intogrammarly:masterfrom Oct 23, 2023
Merged
Update rxjs peer dependency to include rxjs 7.x#103Igorbek merged 5 commits intogrammarly:masterfrom
Igorbek merged 5 commits intogrammarly:masterfrom
Conversation
Igorbek
commented
Oct 23, 2023
| private _refCount = 0 | ||
|
|
||
| // Rx method overrides | ||
| _subscribe(subscriber: Subscriber<TDest>) { |
Contributor
Author
There was a problem hiding this comment.
rxjs@7 https://rxjs.dev/6-to-7-change-summary#observable
_subscribemethod is no longerpublicand is now marked@internal.
Igorbek
commented
Oct 23, 2023
packages/focal-atom/src/atom/base.ts
Outdated
| } | ||
| }) | ||
| sub.add(super._subscribe(subscriber)) | ||
| sub.add(super.subscribe(...(args as [Partial<Observer<TDest>>]))) |
Igorbek
commented
Oct 23, 2023
| test('emits atom', async () => { | ||
| const a = await Atom.fromObservable(from([1])).pipe(take(1)).toPromise() | ||
| expect(a.get()).toEqual(1) | ||
| expect(a?.get()).toEqual(1) |
Contributor
Author
There was a problem hiding this comment.
rxjs@7 https://rxjs.dev/6-to-7-change-summary#observable
toPromisemethod now correctly returnsPromise<T | undefined>instead ofPromise<T>. This is a correction without a runtime change, because if the observable does not emit a value before completion, the promise will resolve withundefined.
A-gambit
approved these changes
Oct 23, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Now both
focalandfocal-atomhave peer dependency torxjs < 7. However the library totally works fine withrxjs@t.x. this PR updates peer dependency to now includerxjs@7.x.As part of the change, dev dependencies have also been updated to
rx@7to test with the latestrxjs.In order to check the changes are compatible with
rxjs@6.3.3here's PR #104 which has the same changes but doesn't update rxjs.