Releases: pouchdb/pouchdb
4.0.1
Changelog
Bugfixes
- Correctly support
start_key
andend_key
aliases (#3833 #4154) - Fix memory leak in
PouchDB
constructor (#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
bluebird
and uselie
as onlyPromise
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');
- Remove
local_seq
- (#4080)
This was a little-used functionality whose semantics are due to change in CouchDB 2.0.
- Remove
onChange
andcomplete
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);
- Remove
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);
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
localStorage
in 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
androidDatabaseImplementation
option for the SQLite Plugin in Cordova (#3835)
Performance improvements
- Avoid
application/json
whenGET
ing 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/json
format. (#3870) - Similarly, for uploading of documents with attachments, use the
multipart/related
format rather thanapplication/json
, because it is more efficient. This also improves Couchbase Sync Gateway support. (#3876) - Avoid using
readAsBinaryString
whenreadAsArrayBuffer
is 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.upload
in 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
request
polyfill (#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
leveldown
is 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
skipSetup
is true (#2915) - Fixes for webpack (#3287)
auto_compaction
is 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_ids
filter 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)
3.1.0
Today marks the dawn of a new PouchDB release, 3.1.0 is released today with a whole bunch of goodness. Here are some of the highlights:
This release includes a migration. Your existing database will be updated automatically, but you cannot downgrade to a previous version of PouchDB once you've upgraded.
PouchDB Guides (#2766)
Nolan Lawson and Nick Colley worked together to produce some excellent guides to PouchDB which you can see @ http://pouchdb.com/guides/. They cover a lot of the issues surrounding building PouchDB applications including conflicts and promises vs callbacks. As a bonus the guides as well as the rest of the website now work offline.
Compaction removes orphaned attachments (#2818)
If you have been using attachments in your PouchDB databases, you may have noticed that it was a bit bigger round the waist than it should have been. We now work harder to ensure there isnt any extra things lying around the database taking up space that you no longer need. This change came along with a lot of compaction and attachment related fixes: #2890, #2905, #2951
Test against CouchDB master (#2850)
There is a big change brewing in CouchDB world, https://issues.apache.org/jira/browse/COUCHDB-1843 is in progress to merge the clustered 'BigCouch' merge from Cloudant into CouchDB master. This will represent a big change towards CouchDB however there is no need to worry, we now run all of our tests against the current master CouchDB (and they are all green!) so when the big CouchDB 2.0 release comes, your PouchDB applications will continue to work as well as before.
In related news
We keep a list of plugins and related external projects to PouchDB, here are a few new ones we added during this month:
- PouchDB Dump and Load are designed to help you load data into your newly started PouchDB app faster than replication will do currently.
- If you want to use PouchDB with Angular, you are in luck, there are now 4! adapters to help you integrate them: angular-pouchdb, Factoryng, ngPouch, ng-pouchdb.
- Ember users arent left in the wild: ember-pouchdb should get you going with PouchDB and Ember.
- If you are using Blobs with PouchDB, you probably want to take a look at blob-util.
Bug fixes Galore
Some of the other important fixes include:
- (#2951) - fix concurrency in leveldb.js
- (#2935) - new_edits=false works regardless of order
- (#2867) - do not stack notify change listeners
- (#2779) - fix undeletion with wrong rev
- (#2794) - explain normal 404s in console.info
- (#2841) - respect options when making dependent dbs
- (#2844) - Encode attachment names
- (#2807) - auto_compaction properly trims tree
- (#2708) - implement attachment stub length
Please file issues or tell us what you think. We would also like to give a huge thanks to our new and existing contributors.