Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@hoodie/store-server 3.0.0 #538

Merged
merged 1 commit into from
Mar 8, 2017
Merged

@hoodie/store-server 3.0.0 #538

merged 1 commit into from
Mar 8, 2017

Conversation

gr2m
Copy link
Member

@gr2m gr2m commented Mar 8, 2017

BREAKING CHANGE:

The store instance which server.plugins.store.api.open(dbName) resolves to
has 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 always
    triggered, 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 to
    enforce 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 becomes doc.hoodie.createdAt)

Unless you use the server.plugins.store.api.open(name) API you are not affected by any of this.

@gr2m gr2m changed the base branch from legacy-info to master March 8, 2017 05:05
BREAKING CHANGE:

The store instance which `server.plugins.store.api.open(dbName)` resolves to
has several breaking changes via [[email protected]](https://github.com/hoodiehq/pouchdb-hoodie-api/releases/tag/v2.0.0)

- Before, change events (incl. add, update, remove) have only been triggered
  when using the custom APIs like `.add()` or `.update()`. Now they get always
  triggered, 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 to
  enforce 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` becomes `doc.hoodie.createdAt`)

Unless you use the `server.plugins.store.api.open(name)` API you are not affected by any of this.
@gr2m gr2m merged commit c23f252 into master Mar 8, 2017
@gr2m gr2m deleted the update-store-server branch March 8, 2017 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant