We're happy to announce the release of PouchDB 7.3.0, bringing in features, fixes and dependency updates. For a full changelog from 7.2.2 to 7.3.0, please see the releases page or view the latest commits. Some of the highlights:
Improving testing
We have been investing lots of time into our test suites, with around 36 commits, 112 files changed, 3314 insertions and 2064 deletions made about this topic. We have:
Migrated from Travis CI to Github Actions, which has improved the speed, throughput and reliability of our CI.
Upgraded eslint configuration in order to use ES6 syntax within our tests. Feel free to incorporate newer syntax (such as async/await) into your new tests contributions.
Fixed bugs in CI configuration: ADAPTERS and GREP variables weren't working correctly, background servers being started incorrectly, build failure caused by an older version of pouchdb-express-router.
Unified the configuration variables used in the build.
Fix the majority of non-deterministic tests to substantially reduce random failure during CI runs, and put in tooling for retrying failed tasks. This includes improving tests that check behaviour for unreachable servers, which previously relied on a third party service being available.
Restructured the CI tasks so that each task exercises a single backend (i.e. CouchDB server version or client-side PouchDB adapter), rather than some combination of local and remote adapters. This reduces the impact of flaky tests, reduces the duration of each task, reduces redundant tasks repeating the same work, and allows more parallelisation of tests.
Improved the test coverage across target platforms, including cross-browser tests, different Node.js versions, and different CouchDB versions. We have fixed tests that assume CouchDB v1.x behaviour so that they now work on v2.x and v3.x.
Allowed the indexeddb adapter to be loaded and used during tests
Add indexeddb adapter in the default distribution
The indexeddb adapter is now available in the default distribution. You can use it specifying the adapter:
PouchDB.plugin(require('pouchdb-adapter-indexeddb'));
const db = new PouchDB('mydb', {adapter: 'indexeddb'});
Please note that it is considered BETA quality, use it carefully and please report any issues you find. Thank you.
Add view_update_changes_batch_size
#8320 With view_update_changes_batch_size, we can now specify how many change records will be consumed at a time when rebuilding view indexes when the query() method is used.
Indexing event to show the progress of view updates
#8321 We can now subscribe to an indexing event, which will emit a progress object containing the properties view, last_seq, results_count and indexed_docs.
Checkpoint events during replication
#8324 During replication, we can subscribe to checkpoint events, which will emit the following properties: checkpoint, revs_diff, start_next_batch and pending_batch.
Add style to replication options
#8380#8379 We expose changes feed style to replication options.
Add view_adapter option
#8335view_adapter provides an option for the user to specify a separate adapter to store their view index in addition to the main adapter for their core data:
const db = new PouchDB(DB_NAME, {adapter: 'idb', view_adapter: 'memory'});
469a4938 Fix mapreduce tests that assume bulkDocs() response order, which pouchdb-server does not guarantee
fc7f6855 Test for non-string values for views.*.map should pass on more recent CouchDB versions which do not reject the design doc on write, but fail on queries instead
5b0903cb Add missing "npm test" command in mapreduce CI tasks
ea46e5a8 Run integration tests on Node.js, and with the memory adapter, and use ADAPTERS (plural) to set the adapter
423124c0 Run integration tests against CouchDB and pouchdb-server
4040b214 Add all the combinations for testing the pouchdb-find plugin to the CI matrix
6893afd5 Build pouchdb-server correctly during tests on GitHub Actions
dae3e384 Add or update repository field in package.jsons
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, open discussions or get in touch. And of course, a big thanks to all of our new and existing contributors!