- Add:
onBeforeWakeUp
andonAfterWakeUp
callback options.
- Fix: Both
withPersistent()
andwithPersistentMap()
, whenwakeUp
options is defined, not allow aStore
rather thenStoreWritable
.
- BREAKING: Drop Node < 18.
- BREAKING: Require
effector@^23
. Using^23
range rather than>=
as before. Upgrade to new Effector API, dropping previous versions. This cause the following changes:WithPersistentFlushEvent
onFlushStart
,onFlushDone
,onFlushFail
andonFlushFinally
was changed fromEvent
toEventCallable
.wakeUp
: AStore
case was changed toStoreWritable
.
- Both
withPersistent()
andwithPersistentMap()
changed their 1st argument fromStore
toStoreWritable
.
- BREAKING: Require
@cubux/storage-driver@^0.4
- Add: Allow TypeScript 5 in
peerDependencies
.
- Add:
flushDelayed()
options:flushDelay
now can beStore<number>
;filter
- optionalStore<boolean>
to conditionally disable flushes.
- Doc:
flushDelayed()
was not documented in README.
- BREAKING:
withPersistentMap()
now requires the given Driver to beStoreDriver
rather thenStoreDriverMapped
as before. This is how it should to work, but it wasn't before. - Fix:
withPersistentMap()
now tracks changed elements in underlyingMap
and writes to Driver only what was changed. Before this a wholeMap
was sent to overwrite on every update.
- BREAKING: Bump
effector
inpeerDependencies
to~20.4.0 || >=21
forguard()
. - May be BREAKING: Prevent unnecessary writing to Driver when it's triggered on "wake up" phase.
- Add: Option
readOnly
of typeStore<boolean>
to disable writes to storage. - Add: Options
onFlushStart
,onFlushDone
,onFlushFail
andonFlushFinally
to track flushes into Driver.
- BREAKING: Remove generic type parameter 3 in
withPersistent()
call. - BREAKING: Remove generic type parameter 3 in
withPersistentMap()
call. - Fix: Improve type inference in
withPersistentMap()
call in some cases. - Fix: Update
peerDependencies
for@cubux/storage-driver
. - Upd: Interface
WithPersistentOptions
is now generic with 3 optional type parameters. - Add: Options
serialize
for serialization before writing to driver andunserialize
for unserialization after reading from driver. - Add: Option
wakeUp
to set alternative target which will receive initial state read from driver on initialization.
- First release.