Dale Harvey

By: Dale Harvey
Published: 03 February 2015

A new month means a new PouchDB release. Over the last month we have been looking around the rough edges and cleaning things up or chopping them off along with the usual slew of bugfixes and a lot of great news.

PouchDB-Inspector

Marten de Vries has taken the awesome work done by the CouchDB Fauxton team and wrapped Fauxton up in Firefox and Chrome plugins so you can inspect your local data in each browser.

PouchDB-Find

A few months ago Cloudant released a preview of Mango, a MongoDB-inspired query API for Cloudant and CouchDB. The MapReduce API exposed by CouchDB has long been a source of confusion for developers, and this will hopefully provide a more natural way to query data held within CouchDB / PouchDB.

Nolan Lawson took on the mantle and has developed an implementation of Mango for PouchDB. It is currently in beta, and you can try it out as a plugin, try the live demo or even test it by installing PouchDB-Server.

In other news

The excellent team at CozyCloud have been working on a web-based email application that you can run on a personal server based on PouchDB and ReactJS @ https://www.npmjs.com/package/emails. Yours truly will be speaking about PouchDB and the offline web at Web Rebels in Oslo and the Hood.ie team are working on 1. migrating their data storage to PouchDB and 2. extracting some of PouchDB's test setup to be reusable. Contributions and discussion always welcome.

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 received 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)

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!