Releases: hoodiehq/hoodie-server
v23.0.0
<a name"23.0.0">
23.0.0 (2017-03-08)
Breaking Changes
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
becomesdoc.hoodie.createdAt
)
Unless you use the server.plugins.store.api.open(name)
API you are not affected by any of this.
(c23f2524)
v22.0.2
v22.0.1
v22.0.0
<a name"22.0.0">
22.0.0 (2017-01-05)
Bug Fixes
- do not set
authenticationDb
name from CouchDB config (e9ee7a06)
Features
Breaking Changes
-
Before this change, we loaded admin accounts from CouchDB’s
/_config/admins
API or for PouchDB we simply set the password to"secret"
and wrote it into.hoodie/config.json
We dropped persisting the admin password altogether and instead made it an option:
adminPassword
. If it’s not set, then no admin account exists.(5899eda1)
-
Before storing the secret in the database using PouchDB, it was stored in different ways based on the adapter.
- If the used adapter was CouchDB, the secret was loaded from
/_config/couch_httpd_auth/secret
- If the used adapter was any other PouchDB adapter, the secret was stored in a file at
<data path>/config.json
To migate to this version, create a database
hoodie-config
with a document{"_id": "hoodie", "secret": "<your secret here>"}
(cd055af1)
- If the used adapter was CouchDB, the secret was loaded from
-
CouchDB’s
_users
database is configurable at/_config/couch_httpd_auth/authentication_db
. We read out this configuration and used it as the name of the users database. But as we don’t rely on the special behavior of CouchDB’s users database (auto-hashing of passwords) we can use any normal CouchDB database to store the accoutns of Hoodie. And as the/_config
API is not implemented by CouchDB-like hosters like Cloudant, we want to store this configuration ourselves.For now, we hardcode the database name to default to
_users
. The name can be configured viaoptions.account.usersDb
.(e9ee7a06)
v21.1.4
v21.1.3
v21.1.2
v21.1.1
v21.1.0
v21.0.0
<a name"21.0.0">
21.0.0 (2016-09-12)
Breaking Changes
- The API now keeps state of all databases and access in a dedicated
hoodie-store
database. If your app uses CouchDB as its backend, there
is no migration required, it happens automatically on next restart.
If you don’t use CouchDB (which is the default), the simplest way to
"migrate" is to delete the .hoodie/data
folder. It will loose all
data, so this is only an option for local development. If you don’t want
to loose all data, you manually have to create the hoodie-store
database with documents for each user database. The documents look
like this:
{
"_id": "db_user/lsdlo55",
"_rev": "1-a01e6998fb10543ca0402e648dd1d048",
"access": {
"read": {
"role": [
"id:lsdlo55"
]
},
"write": {
"role": [
"id:lsdlo55"
]
}
}
}
Besides that, this release also updates to a new express-pouchdb version
which includes a bugfix for a faulty encoding of database folders. You
must rename all folders that look like user%2Fabc4567
to
user/abc4567
(nested directories). See pouchdb/express-pouchdb#377
(4b6c7c47)