Releases: hoodiehq/hoodie-client
v10.2.0
v10.1.1
v10.0.2
v10.0.1
v10.0.0
10.0.0 (2017-03-09)
Breaking Changes
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 directlyThe 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 forstore.add
, and once forstore.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
becomesdoc.hoodie.createdAt
)
For hoodie.account
:
-
account.ready
has been removed. All APIs are now asynchronous, no setup is needed any longer -
account.fetch()
andaccount.profile.fetch()
have been removed. Useaccount.get()
andaccount.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 unlessoptions.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- User is signed out
- Only
id
and orsession
properties are requested options.local
is set to true
-
account.hasInvalidSession()
has been removed. Useaccount.get(session)
instead (check ofsession.invalid
) -
account.isSignedIn()
has been removed. Useaccount.get(session)
instead.
(5ebdbb67)
v9.0.2
v9.0.1
v9.0.0
<a name"9.0.0">
9.0.0 (2016-12-25)
Features
- hoodie.ready (28b49664)
Breaking Changes
- Hoodie dropped its dependency on localStorage in order to work in non-browser environments. In order to make that work we have to use async store APIs to load the current state like the session id, username or the connection status.
The APIs hoodie.account
, hoodie.store
and hoodie.connectionStatus
can now only be used after the promise returned by hoodie.ready
resolves.
(28b49664)