The version 5.0.0 is not covered by your current version range.
Without accepting this pull request your project will work just like it did before. There might be a bunch of new features, fixes and perf improvements that the maintainers worked on for you though.
I recommend you look into these changes and try to get onto the latest version of @hoodie/account-client.
Given that you have a decent test suite, a passing build is a strong indicator that you can take advantage of these changes by merging the proposed change into your project. Otherwise this branch is a great starting point for you to work on the update.
As part of our effort to make Hoodie Client compatible with Service Worker and other environments that do not have access to localStorage, we have to make the Account Client compatible with async store APIs. That means we can’t load the current account state synchronously, so this is no longer be possible:
var account =newAccount({
url:/api
})
if (account.isSignedIn()) {
sayHi(account.username)
}
Starting with this release, you have to wrap the synchronous methods and properties into account.ready.then()
account.ready.then(function () {
if (account.isSignedIn()) {
sayHi(account.username)
}
})
By default, the account will still use localStorage (via humble-localstorage) to persist its state, but it will now be made asynchronous. In order to use another storage a new options.cache argument can be passed to the Account constructor:
This is not technically a breaking change as the pre:* and post:* events have not been documented, but as they are used by @hoodie/client we decided to make this a breaking change nevertheless
Not sure how things should work exactly?
There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html) and of course you may always [ask my humans](https://github.com/greenkeeperio/greenkeeper/issues/new).
Version 5.0.0 of @hoodie/account-client just got published.
The version 5.0.0 is not covered by your current version range.
Without accepting this pull request your project will work just like it did before. There might be a bunch of new features, fixes and perf improvements that the maintainers worked on for you though.
I recommend you look into these changes and try to get onto the latest version of @hoodie/account-client. Given that you have a decent test suite, a passing build is a strong indicator that you can take advantage of these changes by merging the proposed change into your project. Otherwise this branch is a great starting point for you to work on the update.
Release Notes
v5.0.05.0.0 (2016-12-23)
Features
options.cache
andaccount.ready
(962841a2)Breaking Changes
Starting with this release, you have to wrap the synchronous methods and properties into
account.ready.then()
By default, the account will still use localStorage (via humble-localstorage) to persist its state, but it will now be made asynchronous. In order to use another storage a new
options.cache
argument can be passed to the Account constructor:All three
options.cache
methods must return promises.options.cache.get
must resolve with the persisted account properties or an empty object.(962841a2)
pre:*
andpost:*
events introduced in #65 have now been removed in favor of a properaccount.hook.{before,after}
API. See https://github.com/hoodiehq/hoodie-account-client#hooks for more details.This is not technically a breaking change as the
pre:*
andpost:*
events have not been documented, but as they are used by@hoodie/client
we decided to make this a breaking change nevertheless(72f79c20)
Commits
The new version differs by 15 commits .
962841a
feat:
options.cache
andaccount.ready
cdf00bb
test:
options.cache
andaccount.ready
7e4bb9b
chore(package): async-get-set-store
d3c4b2d
docs(README):
options.cache
andaccount.ready
fd4d3b7
refactor: replace separate get/clear/save utils with store
72f79c2
feat: Hooks
500b4bf
test: Hooks
5324cdc
chore(package): before-after-hook
5e582d4
docs(README): Hooks
c60f681
Merge pull request #128 from hoodiehq/127/refactor-store
9678217
refactor: replace separate get/clear/save utils with store
983c511
test: replace separate get/clear/save utils with store
41076e5
docs(README): fix example for
account.off
8ce3b89
docs(README): new code coverage status URL (#122)
81b9d93
chore(package): update dependencies
See the full diff.
Not sure how things should work exactly?
There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html) and of course you may always [ask my humans](https://github.com/greenkeeperio/greenkeeper/issues/new).Your Greenkeeper Bot :palm_tree: