Skip to content
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

V2 Imports RxJS 7 inside RxJS 6 apps/bundles (and also provoke breaking changes) #752

Open
D34THWINGS opened this issue Sep 18, 2021 · 7 comments

Comments

@D34THWINGS
Copy link

D34THWINGS commented Sep 18, 2021

The README of the package says:

This has peer dependencies of rxjs@6.x.x and redux@4.x.x, which will have to be installed as well.

which is untrue since rxjs is listed as direct dependency and on version 7. This makes bundlers put 2 versions of RxJS inside final bundle which is a bad thing. Shouldn't rxjs be listed as a peerDependency like stated originally? I would be happy to open a PR to rectify this, just need to know if you want to keep it as dependency or not. In any case, putting RxJS 7 as direct dependency is a breaking change as it renders this library incompatible with version 6 (specially if you were using StateObservable to write your tests because the subscriber signature changed). My take on this would be to remove RxJS as direct dependency and put it as peer as people want to be in control of their RxJS version and update the README+CHANGELOG accordingly.

For reference, this is the error you get if you give an RxJS 6 Observable to the V2 StateObservable:

Screenshot 2021-09-19 at 00 07 43

@D34THWINGS
Copy link
Author

Also, second breaking change, ActionsObservable was removed, which was used in previous testing recipe (before marble testing)

@talhaguy
Copy link

talhaguy commented Oct 2, 2021

@D34THWINGS I’m also running into the same issue. Would you happen to have a work around?

@talhaguy
Copy link

talhaguy commented Oct 2, 2021

@D34THWINGS Just an update: So I ended up trying to delete node_modules and the package-lock.json and re-reunning npm install and that seems to have done the trick for now (as suggested in #706 (comment)). I guess it's okay since I just started my project, but in an existing project, not sure if deleting the package-lock.json is too great. Any way, curious on how you may have handled this.

@evertbouw
Copy link
Member

Redux-Observable v2 is meant to be used with Rxjs 7. If you're still on Rxjs 6 you can use v1.x. Sorry for the confusion with the outdated docs.

@robations
Copy link

Note that the published readme on npmjs still has the out of date info, which could be a cause of confusion (changes in github are unpublished). See

https://www.npmjs.com/package/redux-observable

@peter-coastpay-com
Copy link

im experiencing this issue after freshly installing npm packages-- did anyone ever come up with a solution ?

@D34THWINGS
Copy link
Author

You actually just need to upgrade to RxJS V7 to solve the issue but still I think that having RxJS as a direct dependency of this library is not super ideal. Also the doc located at https://redux-observable.js.org/ is still out of date

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants