docs/posts/2015-08-03-pouchdb-4.0.0-ballast-overboard.md
When discussing what features we should add, we should also discuss what to remove. - possibly Joe Armstrong
I can't remember or find the exact quote, but it was something along those lines. We try to maintain backwards compatibility as much as possible with PouchDB, however sometimes we need to let go of those features that just didn't work out like planned. We have previously marked quite a few things as deprecated, and in this 4.0.0 release we have finally removed them along with our usual slew of bugfixes, improvements and new features.
bluebird and use lie as only Promise polyfill - (#3839)We previously used bluebird as our Promise polyfill in node.js because it is a fast library. However bluebird contains a lot of non-standard Promise functionality, which authors could use and then have their code break in browsers as well as iojs and future versions of node.js, which have introduced a standard Promise implementation.
PouchDB will always use the globally available Promise object where available, so if you have only used standard Promise functionality, this change will not break anything. If you require the extra functionality provided by bluebird, then you can have PouchDB use it with
global.Promise = require('bluebird');
local_seq - (#4080)This was a little-used functionality whose semantics are due to change in CouchDB 2.0.
onChange and complete callbacks - (#4098)These callbacks have long been replaced with the EventEmitter-style changes(), replicate() and sync() APIs, and are finally being removed. If you still have:
db.changes({
onChange: changeFun,
complete: completeFun
});
You can replace them with:
db.changes()
.on('change', changeFun)
.on('complete', completeFun);
uptodate event - (#4100)uptodate was an event introduced to indicate when a live replication had finished processing all current changes and was waiting on future changes. It has since been replaced by the paused event, which will do the same and additionally indicate whether the replication was paused due to an error. If you have:
replication.on('uptodate', doneFun);
You can replace it with:
replication.on('paused', doneFun);
get() + allDocs() + changes() + query() with {binary: true} (#2858)localStorage in Safari private mode (#4070)Please file issues or tell us what you think. And as always, a big thanks to all of our new and existing contributors!