-
Notifications
You must be signed in to change notification settings - Fork 38
Update rxjs peer dependency to include rxjs 7.x #103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| private _refCount = 0 | ||
|
|
||
| // Rx method overrides | ||
| _subscribe(subscriber: Subscriber<TDest>) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rxjs@7 https://rxjs.dev/6-to-7-change-summary#observable
_subscribemethod is no longerpublicand is now marked@internal.
packages/focal-atom/src/atom/base.ts
Outdated
| } | ||
| }) | ||
| sub.add(super._subscribe(subscriber)) | ||
| sub.add(super.subscribe(...(args as [Partial<Observer<TDest>>]))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to make TS happy
| 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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Now both
focalandfocal-atomhave peer dependency torxjs < 7. However the library totally works fine with[email protected]. this PR updates peer dependency to now include[email protected].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
[email protected]here's PR #104 which has the same changes but doesn't update rxjs.