vs [email protected]
Install
npm add [email protected]
đ Features
- Expand
kvStore
constructor parameter. Before the kvStore
only allowed customizing how to create key-value stores, now it allows customizing deleting them too. The kvStore
option 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 async iterables. mergeAsyncIterables
is a utility function that is provided to make implementing scan
for your custom JS backend easier. It is common to have Iterables
and AsyncIterables
have a return
method. This return
method allows cleaning up resources when the iteration is done.
- Include detailed error messages when cookies donât increase monotonically, or if something changes in the pull response but the cookies doesnât increase as it should.
- Ensure the
limit
parameter is enforced when an index
is passed while performing a scan
.
â ď¸Â 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