:koala: - PouchDB is a pocket-sized database.
Quick fix to address #5635.
To celebrate the USA and Canada's Labo(u)r Day, we have decided to work extra hard to bring you PouchDB 6.0.0. This release brings early retirement to those features that have done great work over the years, but whose services are no longer necessary (don't worry, we will pay their pensions in full).
Along with the removed features, we have a large list of bugfixes, documentation work and general improvements for you to enjoy with your BBQ.
PouchDB 5.4.0 introduced some deprecations. In 6.0.0, we have now removed these features permanently:
db.put(doc, id, rev)
Please use db.put({_id: id, _rev: rev, data: 'foo'})
instead.
new PouchDB(dbName).then
The constructor is now stateless. If you need to test whether setup can complete,
then new PouchDB(dbName).info()
can do that for you.
Note this also applies to the callback style, i.e. new PouchDB(dbName, function (err) { /* ... */ }
.
The WebSQL adapter no longer automatically detects the SQLite Plugin in Cordova environments. Please use the pouchdb-adapter-cordova-sqlite plugin instead.
extras
APIAPIs like require('pouchdb/extras/ajax')
are gone. Instead these have been extracted out into
separate packages:
Removed | Use instead |
---|---|
require('pouchdb/extras/ajax') |
require('pouchdb-ajax') |
require('pouchdb/extras/checkpointer') |
require('pouchdb-checkpointer') |
require('pouchdb/extras/generateReplicationId') |
require('pouchdb-generate-replication-id') |
require('pouchdb/extras/promise') |
require('pouchdb-promise') |
require('pouchdb/extras/fruitdown') |
require('pouchdb-adapter-fruitdown') * |
require('pouchdb/extras/localstorage') |
require('pouchdb-adapter-localstorage') * |
require('pouchdb/extras/memory') |
require('pouchdb-adapter-memory') * |
require('pouchdb/extras/websql') |
require('pouchdb-adapter-node-websql') * |
* For the adapters, you'll also need to explicitly register them using PouchDB.plugin()
, e.g. PouchDB.plugin(require('pouchdb-adapter-memory'))
. Please see Custom builds for more info.
getUrl()
, getHeaders()
from HTTP adapterInstead of the getUrl()
API, you can use db.name
to determine the URL for HTTP-based adapters. For getHeaders()
no replacement is intended. Both APIs were previously undocumented.
optionalDependencies
leveldown
and websql
are no longer optional dependencies. Instead, websql
is removed entirely (use
pouchdb-adapter-node-websql instead), and leveldown
is
now required.
If you want to avoid installing leveldown
, then you can use the pouchdb-browser preset if you don't need Node support, or you can use pouchdb-memory if you only need an in-memory database. For all other uses, see Custom builds.
View and filter functions now execute in 'use strict'
environments and within a sandbox in Node. If you were depending on
non-strict mode or non-sandboxed behavior, then you will need to change your view/filter functions.
(#3962) - Limit concurrent attachment requests 6a2955c8a4036cce24e4475e1e52bfc897fce228 (#4632) - fix attachment md5sum memory leak 52201f1307f8ab116fd04cabff01686ab2a060c5 (#4967) - fix map function called twice 45156c5bcf5c6ebbfb049c4234611636bb8220d8 (#5402) - Remove the unbounded accumulation of listeners 04c377b21ed6b33545110e891915d099569dd475 (#5417) - proper websql validation for cordova+ios f05ec7cc265a67c27fd89baa5d5e00c8a1e9a95c (#5214) - Stop squelching errors d31bf170ccfa54ca58e6afd43fe9f496e639e1a9