akita icon indicating copy to clipboard operation
akita copied to clipboard

The wrong rxjs peerDependency for >=8 version

Open petro-konopelko opened this issue 1 year ago • 2 comments

Is this a regression?

No

Description

The latest 8.0.1 version has rxjs peerDependency as *

{
  "name": "@datorama/akita",
  "version": "8.0.1",
  "description": "A Reactive State Management Tailored-Made for JS Applications",
  "keywords": [
    "angular",
    "state management",
    "react",
    "vue",
    "typescript",
    "javascript",
    "rxjs",
    "angular store",
    "store",
    "observable data stores",
    "redux",
    "reactive"
  ],
  "homepage": "https://github.com/datorama/akita/tree/master/libs/akita#readme",
  "bugs": {
    "url": "https://github.com/datorama/akita/issues"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/datorama/akita",
    "directory": "libs/akita"
  },
  "license": "Apache-2.0",
  "author": "Netanel Basal",
  "peerDependencies": {
    "rxjs": "*",
    "tslib": "2.4.1"
  },
  "main": "./src/index.js",
  "types": "./src/index.d.ts",
  "dependencies": {}
}

However in the 8.0.0 commit there was a re-writing of importing rxjs operators, the operators are imported from 'rxjs' rather then 'rxjs/operators'. Such operators import(from rxjs) are actual since ^7.2.0. So I guess, the rxjs peerDependency should update to ^7.2.0 or so.

Currently if we use [email protected] with @datorama/[email protected] it fails on build with error

./node_modules/@datorama/akita/src/lib/persistState.js:112:102-105 - Error: export 'map' (imported as 'map') was not found in 'rxjs' (possible exports: ArgumentOutOfRangeError, AsyncSubject, BehaviorSubject, ConnectableObservable, EMPTY, EmptyError, GroupedObservable, NEVER, Notification, NotificationKind, ObjectUnsubscribedError, Observable, ReplaySubject, Scheduler, Subject, Subscriber, Subscription, TimeoutError, UnsubscriptionError, VirtualAction, VirtualTimeScheduler, animationFrame, animationFrameScheduler, asap, asapScheduler, async, asyncScheduler, bindCallback, bindNodeCallback, combineLatest, concat, config, defer, empty, forkJoin, from, fromEvent, fromEventPattern, generate, identity, iif, interval, isObservable, merge, never, noop, observable, of, onErrorResumeNext, pairs, partition, pipe, queue, queueScheduler, race, range, scheduled, throwError, timer, using, zip)

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

./node_modules/@datorama/akita/src/lib/persistState.js:112:102-105 - Error: export 'map' (imported as 'map') was not found in 'rxjs' (possible exports: ArgumentOutOfRangeError, AsyncSubject, BehaviorSubject, ConnectableObservable, EMPTY, EmptyError, GroupedObservable, NEVER, Notification, NotificationKind, ObjectUnsubscribedError, Observable, ReplaySubject, Scheduler, Subject, Subscriber, Subscription, TimeoutError, UnsubscriptionError, VirtualAction, VirtualTimeScheduler, animationFrame, animationFrameScheduler, asap, asapScheduler, async, asyncScheduler, bindCallback, bindNodeCallback, combineLatest, concat, config, defer, empty, forkJoin, from, fromEvent, fromEventPattern, generate, identity, iif, interval, isObservable, merge, never, noop, observable, of, onErrorResumeNext, pairs, partition, pipe, queue, queueScheduler, race, range, scheduled, throwError, timer, using, zip)

Please provide the environment you discovered this bug in

[email protected]
@datorama/[email protected]

Anything else?

No response

Do you want to create a pull request?

No

petro-konopelko avatar Mar 23 '23 13:03 petro-konopelko

When it can be fixed? Faced with the same problem

OverPa1n avatar Mar 23 '23 16:03 OverPa1n

Also experiencing the same problem here. Seems like a quick fix to make...

PeterSimonis avatar Apr 04 '23 11:04 PeterSimonis