Skip to content

@garrensmith garrensmith released this Jun 14, 2019 · 13 commits to master since this release

we have another PouchDB release. The main improvements in this release are bug fixes and dependency updates.
For a full changelog from 7.0 to 7.1.0, please see the releases page or view the latest commits.

Get in touch

As always, we welcome feedback from the community and would love to hear what you think of this release as well as PouchDB's future direction. Please don't hesitate to file issues or get in touch. And of course, a big thanks to all of our new and existing contributors!

If you wondering where is 7.1.0, I had a slight publishing issue so the easiest was to bump it up to 7.1.1 to do a fresh deploy.

Assets 11

@daleharvey daleharvey released this Jun 21, 2018 · 137 commits to master since this release

As promised back in January it is time to drop WebSQL from our default builds. This not only lets us focus our development efforts on a single engine but along with the other changes explained below reduces the default PouchDB package size from 148KB to 122KB, thats 17.5% smaller!

Removed WebSQL

#6943 - The WebSQL adapter is still available to download and use, it will no longer be available as part of a default PouchDB build and will eventually be moved to the pouchdb-community repo. If you need to migrate your users from WebSQL to IndexeDB then there is some advice available in our previous release post.

Removed Promise Polyfill

#6945 - Including our own Promise polyfill means larger bundles when most apps already include their own polyfill if they need it. So if you support browsers which do not support Promises natively you will need to include a polyfill yourself. We use promise-polyfill and have found it to work great.

Switch to fetch

#6944 - This is another API that may need polyfilled if you use PouchDB and support IE, we use whatwg-fetch. Switching to fetch has allowed us to expose the ability to intercept the requests PouchDB makes for more flexibility, such as:

var db = new PouchDB('http://example.com/dbname', {
  fetch: function (url, opts) {
    opts.headers.set('X-Some-Special-Header', 'foo');
    return PouchDB.fetch(url, opts);
  }
});

That will add a X-Some-Special-Header to every HTTP request PouchDB makes.

Deterministic Revisions

#4642 - We now match CouchDB default behaviour and use the documents contents to determine its revision, this means automated conflict resolution handlers are less likely to generate extra conflicts.

More Deprecations

  • #6946 - Remove debug dep
  • #7134 - Remove IndexedDB storage option
  • #6944 - Remove deprecated skipSetup

Fixes

  • #7040 - Use fixed-length array in idb/indexeddb allDocs
  • #6655 - Use consistent types for replication progress values
  • #7085 - Accept old Safari version as valid
  • #7095 - Reduce replication to server requests
  • #7115 - Remove catastrophic backtracking vulnerability
  • #7127 - Fix docs for db.query()'s options.reduce default
  • #7141 - Fix ios idb blobSupport silent fail
  • #6502 - Set return_docs default false when opts.live = true
  • #7216 - Check level.destroy exists before calling
  • #5814 - Ensure prefix has trailing slash

Get in touch

As always, we welcome feedback from the community and would love to hear what you think of this release as well as PouchDB's future direction. Please don't hesitate to file issues or get in touch. And of course, a big thanks to all of our new and existing contributors!

Assets 15
Jun 21, 2018

@daleharvey daleharvey released this Jan 24, 2018 · 259 commits to master since this release

In this release PouchDB now supports IndexedDB by default in Safari and will drop support for WebSQL in future versions.

A brief history of WebSQL

Just over 5 years ago PouchDB got its first support for WebSQL, originally to support Opera WebSQL was able to pick up for the lack of support for IndexedDB in Safari and gave PouchDB the ability to support a wide variety of browsers. Opera gained IndexedDB support from its switch to Blink / Chromium and with WebSQL failing to become a web standard Safari started supporting IndexedDB from its 7.1 release. Initially there were too many bugs in Safari's implementation for PouchDB to use it however after a lot of work from the WebKit devs and a few releases IndexedDB support became stable in Safari and as of this release is now the default storage engine for PouchDB in Safari.

Switching to IndexedDB vastly reduces the amount of work we need to do to keep PouchDB stable, any new features and improvements relating to storage up until now has meant duplicating the entire code and effort for WebSQL, we will also see a nice reduction in the bundle size.

Migrating current users

If you are using PouchDB and expect to want to use new releases then you will need to
migrate your current users, this release of PouchDB supports both WebSQL and IndexedDB
in Safari so one solution that may work depending on your circumstances is to
replicate between them like so:

function openDB(name, opts) {
  return new Promise(function(resolve, reject) {
    var localdb = new PouchDB(name, opts);
    localdb.info().then(function(info) {

      if (info.adapter !== 'websql') {
        return resolve(localdb);
      }

      var newopts = opts || {};
      newopts.adapter = 'idb';

      var newdb = new PouchDB(name, opts);
      var replicate = localdb.replicate.to(newdb);
      replicate.then(function() {
        resolve(newdb);
      }).catch(reject);
    }).catch(reject);
  });
}

More Deprecations

With PouchDB we aim to keep breaking changes to a minimum which means when we do have a
breaking change release like the upcoming 7.0 there will usually be a few other changes.
Currently it looks likely that we will remove our Promise Polyfill and switch to the fetch API for HTTP requests. These arent all certain and you can follow along or join in with the 7.0 release discussion here.

Other Changes

  • #7019 - Dont crash on empty HTTP requests
  • #7008 - Add Glitch bug helper
  • #6954 - Fix hang when storage quota is exceeded
  • #6958 - Fix PouchDB find with zero values
  • #6971 - Fix allDocs keys and limit < keys.length

Get in touch

As always, we welcome feedback from the community and would love to hear what you think of this release as well as PouchDB's future direction. Please don't hesitate to file issues or get in touch. And of course, a big thanks to all of our new and existing contributors!

Assets 13
Jan 24, 2018
build 6.4.2
Dec 18, 2017
build 6.4.1

@daleharvey daleharvey released this Dec 17, 2017 · 301 commits to master since this release

I'm happy to announce the release of PouchDB 6.4.0, bringing in a number of important features and fixes. For a full changelog from 6.3.0 to 6.4.0 please see the releases page. Some of the highlights:

Add update_seq option to allDocs() and query()

#6230 - Dale Harders added support for passing update_seq: true to either allDocs() or query() or will return the current databases update_seq.

Add pending pending property

#5710 - Dale also added support for passing through the pending property newly implemented in CouchDB that reports the number of pending documents to replicate.

Use a single transaction for allDocs with keys requests

#6854 - @nename0 implemented an optimisation to use a single transaction in indexedDB and WebSQL for allDocs requests with keys. This seen a huge 8X speedup in Chrome and 2X in Firefox.

Add support to store cookies on Node.js

#6814 - @ptitjes fixed HTTP requests in Node.JS to ensure they use a cookie jar.

Full changelog

Bug fixes and performance improvements

  • #6443 - Support seq_interval for changes and use during replication
  • #6890 - Preventing SecurityError on Firefox
  • #6855 - Cache bust GET requests on IE11
  • #6736 - Fix {binary: true} in db.get() with open_revs and HTTP adapter
  • #6730 - Fix single-sided checkpointing
  • #6766 - Prevent field lookup on undefined value
  • #6793 - Fix incompatibility with pouchdb-wrappers

Get in touch

As always, we welcome feedback from the community and would love to hear what you think of this release as well as PouchDB's future direction. Please don't hesitate to file issues or get in touch. And of course, a big thanks to all of our new and existing contributors!

Assets 13
Dec 17, 2017
build 6.4.0
You can’t perform that action at this time.