Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
BREAKING CHANGE:
The store instance which
server.plugins.store.api.open(dbName)
resolves tohas several breaking changes via [email protected]
Before, change events (incl. add, update, remove) have only been triggered
when using the custom APIs like
.add()
or.update()
. Now they get alwaystriggered, including for changes replicated into the database.
the order of when the methods’ promises resolve and the events get triggered
cannot be guaranteed as we rely on PouchDB’s
.changes()
. We would love toenforce promises to resolve after changes get emitted, but the required
complexity to do that is not worth it.
We no longer map PouchDB’s ._id property to .id, instead we pass trough docs
from PouchDB 1:1. Also the timestamps are now all namespaced with
.hoodie
(doc.createdAt
becomesdoc.hoodie.createdAt
)Unless you use the
server.plugins.store.api.open(name)
API you are not affected by any of this.