You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Switch between rxjs version 6.5.5 and 7.0.0 to see the issue.
Minimal reproduction of the bug/regression with instructions
Prior to refactoring (3a9e1da) usage of throwError the error handler function from e.g. a call to service.getByKey('xxx') would yield the DataServiceError and by accessing the error property the underlying HttpErrorResponse object.
Since throwError now also supports passing functions as parameter (ReactiveX/rxjs@dad270a), a refactoring in several ngrx modules (data, component-store, effect) was undertaken to change instances of throwError(error) to throwError(() => error.
While this works with any rxjs versions 7+ this breaks compatibility with version rxjs 6.5.x as throwError due to the anonymous function (i.e. () => error) not being called prior to returning the error.
ngrx/{data, component-store, effect} v14+ all have peer dependencies to rxjs in the form of "rxjs": "^6.5.3 || ^7.5.0" indicating both version in the minor and major semver range to be compatible. Not updating rxjs will however break code relying on error to not be a function but the error instance itself.
Versions of NgRx, Angular, Node, affected browser(s) and operating system(s)
I would be willing to submit a PR to fix this issue but would argue that removing rxjs@6.5x as peer dependency should communicate this breaking change to every developer much better.
HOWEVER, that might retro-actively breaking current implementations. I'd like to discuss best viable options prior to submitting a PR.
I would be willing to submit a PR to fix this issue
Yes
No
The text was updated successfully, but these errors were encountered:
Which @ngrx/* package(s) are the source of the bug?
component-store, component, data, effects
Minimal reproduction of the bug/regression with instructions
https://ngrx-seed-jt4hej.stackblitz.io
Switch between rxjs version 6.5.5 and 7.0.0 to see the issue.
Minimal reproduction of the bug/regression with instructions
Prior to refactoring (3a9e1da) usage of throwError the error handler function from e.g. a call to service.getByKey('xxx') would yield the DataServiceError and by accessing the error property the underlying HttpErrorResponse object.
Since throwError now also supports passing functions as parameter (ReactiveX/rxjs@dad270a), a refactoring in several ngrx modules (data, component-store, effect) was undertaken to change instances of
throwError(error)
tothrowError(() => error
.While this works with any rxjs versions 7+ this breaks compatibility with version rxjs 6.5.x as throwError due to the anonymous function (i.e. () => error) not being called prior to returning the error.
ngrx/{data, component-store, effect} v14+ all have peer dependencies to rxjs in the form of
"rxjs": "^6.5.3 || ^7.5.0"
indicating both version in the minor and major semver range to be compatible. Not updating rxjs will however break code relying onerror
to not be a function but the error instance itself.Versions of NgRx, Angular, Node, affected browser(s) and operating system(s)
Ngrx/data@14+
Ngrx/component-store@14+
Ngrx/component@14+
Ngrx/effect@14+
Other information
I would be willing to submit a PR to fix this issue but would argue that removing rxjs@6.5x as peer dependency should communicate this breaking change to every developer much better.
HOWEVER, that might retro-actively breaking current implementations. I'd like to discuss best viable options prior to submitting a PR.
I would be willing to submit a PR to fix this issue
The text was updated successfully, but these errors were encountered: