vs [email protected]
Install
npm add [email protected]
Summary
🎁 Features
- Expand
kvStore
constructor parameter. Before the kvStore
only allowed customizing how to create kv stores, now it allows customizing deleting them too. The kvStore
function has been expanded into a KVStoreProvider
which has both the create and delete function.
- Remove the
experimental
tag from kvStore
.
- As a convenience you can specify
kvStore: 'mem'
and get a memory implementation rather than having to implement KVStoreProvider
manually.
🧰 Fixes
- Treat all non-200 responses from push or pull as an error
- Starting in Replicache 13, cookies uniquely identify server states. Duplicate cookies are supposed to be assumed to mean that nothing changed, and be ignored. However, we weren’t consistently doing this:
- The cross-tab sync wasn’t consistently doing this, meaning you could temporarily see a pull response with a duplicate cookie honored, but then reverted.
- We were in some cases honoring pull responses with duplicate cookie if the lastMutationIDChanges was non-empty.
- Allow explicit
undefined
for prefix
and initialValuesInDiff
params to watch
.
- Ensure
return
is called in mergeAsyncIterables
on passed in AsyncIterable
.
⚠️ Breaking Changes
- The change to
kvStore
above is a breaking change, albeit to an interface that was previously marked experimental
.
- The change to how cookies are treated is breaking. If you were changing last mutation IDs without updating the cookie these changes will no longer be honored (at least until the next change to the cookie).
⚡️ Performance
📄 Documentation
👨🏻🏫 Upgrading