Skip to content

Commit

Permalink
chore(package): @hoodie/account-client@6, @hoodie/store-client@8.1
Browse files Browse the repository at this point in the history
BREAKING CHANGE:

For `hoodie.store`:

- 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. hoodiehq/pouchdb-hoodie-api@1958c42

- 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.

- separate methods like `require(pouchdb-hoodie-api/add)` can no longer be required directly

  The reason for that is that all the methods now also accept a `prefix` argument which by default is null. That way we don’t need to implement each method twice, once for `store.add`, and once for `store.withIdPrefix(test/).add`

- 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`)

BREAKING CHANGE:

For `hoodie.account`:

* `account.ready` has been removed. All APIs are now asynchronous, no setup is needed any longer
* `account.fetch()` and `account.profile.fetch()` have been removed. Use `account.get()` and `account.profile.get()` instead
* `account.profile.get()` returns a promise now. It also sends a request to the server requesting the current user’s profile properties unless `options.local` is set to true
* `account.get()` returns a promise now. It also sends a request to the server requested the current user’s account properties unless one of the following conditions is true

  1. User is signed out
  2. Only `id` and or `session` properties are requested
  3. `options.local` is set to true
* `account.hasInvalidSession()` has been removed. Use `account.get(session)` instead (check of `session.invalid`)
* `account.isSignedIn()` has been removed. Use `account.get(session)` instead.
  • Loading branch information
gr2m committed Mar 9, 2017
1 parent f243535 commit 5ebdbb6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"url": "https://github.com/hoodiehq/hoodie-client/issues"
},
"dependencies": {
"@hoodie/account-client": "^5.0.0",
"@hoodie/account-client": "^6.0.0",
"@hoodie/connection-status": "^4.0.1",
"@hoodie/log": "^2.1.0",
"@hoodie/store-client": "^7.0.0",
"@hoodie/store-client": "^8.1.0",
"lie": "^3.0.1",
"lodash": "^4.11.1",
"nets": "^3.2.0",
Expand All @@ -22,6 +22,7 @@
"istanbul-coveralls": "^1.0.3",
"mkdirp": "^0.5.1",
"npm-run-all": "^4.0.0",
"pouchdb-adapter-http": "^6.1.2",
"pouchdb-adapter-memory": "^6.0.7",
"pouchdb-core": "^6.0.7",
"pouchdb-replication": "^6.0.7",
Expand Down

0 comments on commit 5ebdbb6

Please sign in to comment.