Skip to content

[Feature Request] RxJS as a peer dependency #978

@rraziel

Description

@rraziel

Driver version: JS driver 4.4.7

RxJS 7 has been released a while back, and projects that use this version have observables that are not quite compatible with the ones from RxJS 6, mostly due to changes in their internals, e.g.:

Type 'Observable<T>' is missing the following properties from type 'Observable<T>': _isScalar, _trySubscribe, _subscribe

While bumping the neo4j-javascript-driver dependency to RxJS 7.x would solve this, it would likely bring similar issues for projects still using RxJS 6.x.

An alternative would be to have RxJS as a peer dependency (as projects that use the reactive sessions likely already use RxJS in other parts of the codebase) and broaden the version requirements so version 6 and 7 may be used.

Expected behavior

The RxJS package/module is a peer dependency.

Actual behavior

The RxJS package/module is a normal dependency

Activity

rraziel

rraziel commented on Aug 20, 2022

@rraziel
Author

Note for anybody having the issue, an override can be added to the package.json until the change mentioned above is made.

The following blocks describe how to override the dependency with RxJS 7.5.6 for common package managers:

npm

{
  "overrides": {
    "rxjs": "7.5.6"
  }
}

pnpm

{
  "pnpm": {
    "overrides": {
      "rxjs": "7.5.6"
    }
  }
}

Yarn

{
  "resolutions": {
    "rxjs": "7.5.6"
  }
}
self-assigned this
on Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @bigmontz@rraziel

      Issue actions

        [Feature Request] RxJS as a peer dependency · Issue #978 · neo4j/neo4j-javascript-driver