neo4j/neo4j-javascript-driver

[Feature Request] RxJS as a peer dependency

rraziel opened this issue · 1 comments

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

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"
  }
}