Releases: apache/pouchdb
4.0.2
Bugfixes
- Handle errors thrown from
filterfunctions (#3356) - Upgrade
levelupto 1.2.1,leveldownto 1.4.1, andlevel-sublevelto 6.5.0 (#3873) - Stateless constructor for the HTTP adpater, fixes errors syncing while offline (#4146)
- Ensure document properties are maintained, e.g. docs with keys like
hasOwnProperty(#3968) - Validate attachment names don't start with
_(#3357) - Correctly respect the
revs_limitof 1000, trim revision trees (#4204) - Allow passing in opts to
destroy()(#4219) - Update
requestto 2.61.0 (#4260) - Use
Function.prototype.nameshim consistently for IE (#4216) - Better CORS warning (#4256)
4.0.1
Changelog
Bugfixes
- Correctly support
start_keyandend_keyaliases (#3833 #4154) - Fix memory leak in
PouchDBconstructor (#4157 #4168 #4182) - Update Uglify to patch security vulnerability (#4203)
- Fix inconsistent Date serialization in IndexedDB (#3444)
- Fix error for invalid
doc_ids(#2204) - Better CORS warning message (#4189)
- Fix memory adapter in IE10 by shimming
Function.prototype.name(#4216) - Don't fail replication if fetching uuid fails (#4094)
Code cleanup, simplification
Performance improvements
4.0.0
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.
Deprecations
- Remove
bluebirdand uselieas onlyPromisepolyfill - (#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');
- Remove
local_seq- (#4080)
This was a little-used functionality whose semantics are due to change in CouchDB 2.0.
- Remove
onChangeandcompletecallbacks - (#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);
- Remove
uptodateevent - (#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);
New features
- Return Blobs (or Buffers) in
get()+allDocs()+changes()+query()with{binary: true}(#2858) - Allow chaining of plugin registration (#3943)
- Allow option to raise timeouts in changes / replication (#4022)
- Add direct edit button to website (#3747)
Bugfixes
- Fix attachment length for stubs (#3963)
- Reduce the number of checkpoint mismatches (#4009)
- Fallback from checkpoint mismatch correctly (less replication start from the beginning) (#3999)
- Dont fail replication when attachment request fails (#4021)
- Fix check for
localStoragein Safari private mode (#4070)
Coverage improvements
- Large number of new tests and dead code removed to increase our test coverage - (#4071)
Get in touch
Please file issues or tell us what you think. And as always, a big thanks to all of our new and existing contributors!
3.6.0
PouchDB 3.6.0 is a monthly release containing several bugfixes, most notably for "retry" replication and attachment replication. It also contains one minor new feature.
New features
getAttachment()now supportsrev(#3871)- Add
androidDatabaseImplementationoption for the SQLite Plugin in Cordova (#3835)
Performance improvements
- Avoid
application/jsonwhenGETing remote documents with attachments. This makes the replicator andget()s on remote PouchDBs more efficient, by preferring to fetch the attachments directly in separate parallel requests. You may see a negative performance impact if you have many small attachments, in which case you should inline them instead of using attachments. However, "normal" attachment use cases should see a big improvement, because attachments are no longer sent over the wire as base64-encoded strings. This also improves support for syncing attachments in Couchbase Sync Gateway, which does not support theapplication/jsonformat. (#3870) - Similarly, for uploading of documents with attachments, use the
multipart/relatedformat rather thanapplication/json, because it is more efficient. This also improves Couchbase Sync Gateway support. (#3876) - Avoid using
readAsBinaryStringwhenreadAsArrayBufferis more direct (#3877) - Better bit-twiddling in the md5 checksum (#3878)
Bugfixes
- Fix EventEmitter memory leaks in retry replication (#3858 #3699)
- Fix retry replication when started offline (#3768)
- Fixes for
fetch()in Service Workers on Chrome 41 (#3885) - Fix a race condition when retry replication is immediately canceled (#3894)
Test infrastructure
Vote for PouchDB
Do you support better documentation for PouchDB users? Do you value faster CORS and better Service Worker support? If so, then today you should cast your vote in support of PouchDB. Together, we can make a better future (release of PouchDB).
New features
- Extras API for PouchDB plugin authors (#3338)
- In-memory/LocalStorage/Level.js adapters are now browserifiable (#2286)
Bugfixes
- Fallback to the fetch API where XMLHTTPRequest does not exist (e.g. in Service Workers) (#3678)
- Stop triggering unneccesary OPTIONS requests during CORS replication (#3573)
- Multitudes of documentation fixes
- Fix es3ify behavior with dependencies (#3688)
- Add source maps to dev environment (#3731)
- Fix constructor when called with
{name: 'foo'}(#3471) - Support for Blackberry 10 (#3737)
- Fix detection for
xhr.uploadin React Native (#3796) - Webpack support (#3319)
Get in touch
Please file issues or tell us what you think. And as always, a big thanks to all of our new and existing contributors!
3.4.0
Everyone needs a break and for March PouchDB relaxed and enjoyed the arrival of Spring. However regularly scheduled programming has resumed and today I am happy to announce PouchDB 3.4.0.
Documentation, Documentation, Documentation
Over the last 2 months a huge amount of work has gone into PouchDB's documentation including #3584 which allows you to switch between a Promises and a callback format for your code examples.
We have hugely expanded the coverage of the documentation so if there is anything missing please feel free to point it out.
Changelog:
- Fix incompatibilities with Couchbase Sync Gateway (#3556, #3552, #3555, #3561, #3562, #3562, #3495, #3493)
- Added a copy of PouchDB to PouchDB.com (check the inspector - #2960)
- Fix replication using design documents (#3543)
- Fix immediately cancelling live replication (#3605)
- Fix replication with a view (#3606)
- Add support for new SqlitePlugin parameters (#3617)
- Fix for deleted conflicts (#3646)
- Fix design documents that contain a slash (#3680)
- Fix for setting ajax headers in GET requests (#3689)
- Allow setting auth headers in replication (#3543)
Get in touch
Please file issues or tell us what you think. And as always, a big thanks to all of our new and existing contributors!
3.3.1
This is a quick release, ahead of our normal monthly release schedule, to fix some critical bugs and ship them out sooner to our eager PouchDB fanbase.
Bugfixes
- Fixed live replication of conflicting revisions (#3179)
- Fixed in-memory/localStorage plugins (#3528)
- Fixed SQLite Plugin support (#3505)
- Fixed web worker support (beware cross-browser issues, though) (#3314)
New stuff
3.3.0
Release Changes
Sync Events - #3155
We have introduced new events to give you more information what is happening during syncing. There are now active and paused events triggered during replication and the uptodate event is now deprecated.
Retry Replication - #966
Calvin did the base work for this a long time ago, however we now officially support a retry option to replication. If you do a db.replicate(to, {retry: true}) or db.sync(db, {retry: true}) then the replication process will not halt when you go offline, and will automatically resume when you (or your server) comes back online.
Docs property in change events - #3358
A lot of developers wanted to know what documents were being referred to when they recieved a change event. Gregor from hood.ie implemented a new docs property in the change event, so you know exactly what documents have changed.
local_seq now deprecated - #3367
local_seq was a rarely used property that will be unsupported in CouchDB 2.0, so we have deprecated it and will be removed in future versions.
Changelog:
- We now have all tests passing against CouchDB master (#136)
- Fixed return of
.compact(#3350) - Fix a typo in the Error constructor (#1167)
- Disabled blob support due to bugs in Chrome, so we now use base64 for attachments in Chrome (#3369)
- Fix races in
.destroy()(mapreduce/#251) - Ensure both replications are cancelled properly during
.sync(#3431) - Replace ajax calls with
requestpolyfill (#3200) - Prefer readAsArrayBuffer to BinaryString (#3379)
- Get all tests green on Travis (including iPhone and IE) (#3058)
- Map/reduce views built concurrently (pouchdb/mapreduce#240)
- Quicker map/reduce view build times (pouchdb/mapreduce#242)
3.2.1
Bugfixes
leveldownis now an optional dependency in Node.js due to build issues with Windows (#3113)- Avoid call stack exceeded errors in the merge algorithm (#2543)
- Properly destroy MemDOWN-based databases (#3144)
- Avoid "too many listeners" errors in
changes()(#2867) - Non-winning conflicts properly replicated (#3136)
- Fixes for node-webkit (#3229)
- LevelDB uses a read queue to prevent database corruption (#3251)
- Can build and test on Windows (#2143)
- Avoid http header error in IE11 (#3278)
- Blobs are stored more efficiently in Chrome 38+ (#3326 #3325)
- Many fixes to the test suite to better support CouchDB master (#136)
- Fix replication when
skipSetupis true (#2915) - Fixes for webpack (#3287)
auto_compactionis correctly reported ininfo()(#3345)
Performance improvements
- Replication doesn't make unnecessary
allDocs()calls (#3153) - Replication GET requests issued in parallel (#3015)
- Auto-compaction occurs in same transaction as writes (#3089)
- Formal one-time IndexedDB migration, cleaner schema (#3211, #3182)
- IndexedDB doesn't store duplicated id/rev (#3213)
- Fall back from JSON to vuvuzela to improve parse/stringify (#3188)
- LevelDB makes changes in a single batch (#1738)
3.2.0
New features
- Finally, PouchDB has a debug mode! (#2874, #3084)
- You can now use
{attachments: true}to fetch attachments inallDocs(),changes(), andquery(), just like CouchDB 1.6.0+ (#2771, #3074, #190) - The
doc_idsfilter is now supported forchanges()(#3056)
Bugfixes
- Fix conflict during replication of deleted documents (#2970)
- Only detect blob support once (#2990)
- Fix tree-merging algorithm, correctly attach docs to deleted winning revs (#2888)
- Fix compaction-related race condition in LevelDB (#3026)
- Fix LevelDB
bulkDocs()ordering (#3062) - Fix WebSQL
put()local docs when missing (#3066) - Fix encoding of base64-string attachments over HTTP (#3008)
- Better error for invalid revs (#2994)
- Upgrade Browserify to v6 (#2884)