Alba Herrerías

By: Alba Herrerías
Published: 24 May 2024

The PouchDB developers are delighted to announce the immediate availability of PouchDB 9.0.0. This is a major release with 202 PRs merged since the last version.

For a full changelog from 8.0.1 to 9.0.0, please see the releases page or view the latest commits.

The PouchDB developers would like to thank all contributors for their hard and diligent work.

Highlights

  • Massively improved the stability and performance of the indexeddb adapter. Special thanks to @alxndrsn, Medic, and the Google Advanced Web Apps Fund.
  • Introduce a default limit (of 25) to the .find() method. This constitutes a backwards incompatible change and is the reason for the major version bump.
  • Streamline the automated test suites and move in-browser testing to Playwright resulting in much more reliable test runs.
  • Continue to update the codebase to ES6.

Changelog

Features

  • c7c8afb1 chore: remove clone-buffer polyfill (#8957)
  • ef655ecc chore: remove AbortController dependency and polyfills
  • 9a9ff27d chore: remove IE polyfill for ArrayBuffer.slice()
  • 8739f80f chore: remove Set/Map polyfill
  • 9c587a64 pouchdb-find: make _design/ prefix removal more specific (#8946)
  • 0297c6a6 (#8927) - Set default limit on find queries to 25
  • 2e48ed7d pouchdb-utils/flatten: replace with Array.flat() built-in (#8929)
  • e5731fae Replace lodash.flatten() with Array.flat() built-in (#8928)
  • 7505bedd isValidRev(): reject revs with more than one dash (#8933)
  • 3c852034 db.post(), db.bulkDocs(): throw INVALID_REV consistently (#8934)
  • 4a765418 feat: migrate dev dep watch-glob with maintained glob-watcher
  • 06170b67 replace the last occurrence of jsnext:main (#8663)
  • 905dfdfb isValidRev(): cache regex
  • 9afecb28 dev dependencies: replace individual lodash functions (#8907)
  • 41cc5687 chore(PouchDB-find): purified promise flow (#8860)
  • 08649d96 adapter-indexeddb: replace var with let/const (#8926)
  • 2789b704 indexeddb: improve allDocs() perf with skip & key ranges (#8603)
  • 95e8c1ee chore(PouchDB-find): utils oneSetIsSubArrayOfOther loop update (#8921)
  • e69fe210 chore(PouchDB-find): minor cleanup (#8920)
  • 9ba277bd chore(PouchDB-find): loop updates (#8918)
  • d0eee195 chore(pouchdb-find): var -> const/let (#8917)
  • 5bc8f319 chore: PouchDB-find abstract-mapper update (#8913)
  • 3e3be0be chore: PouchDB-find adapters/local refactor to async/await (#8914)
  • f48c76f7 chore: PouchDB-find validateSelector cleanup (#8915)
  • d3014959 chore: PouchDB-find adapters/http update (#8912)
  • acc12f69 remove unused devDependency: query-string (#8909)
  • 36d042b9 update dev dep: marky (#8903)
  • df735024 chore(abstract-mapreduce): cleanup taskqueue.js (#8891)
  • 9aaba0c8 chore(abstract-mapreduce): refactor to for ... of loops (#8892)
  • 96037a7b chore(abstract-mapreduce): reduce repetitive catch handlers (#8889)
  • 5f647e52 Remove legacy polyfill: Blob.slice() (#8895)
  • 59ac0d3e Remove legacy util/polyfill: Object.assign() (#8896)
  • 94eccbb9 chore(abstract-mapreduce): replace var with const (#8880)
  • 7b23c81e adapter-indexeddb: use isLocalId() (#8883)
  • 86b6c5ec Checkpointer shortcut (#8856)
  • 0f08688f remove isIE (#8867)
  • 281c3e11 Set default opts for CheckpointerInternal (#8871)
  • 7278ae4e (#8607) - replace immediate with queueMicrotask
  • def06b03 (#8526): Upgrade leveldown from 5.6.0 to 6.1.1
  • 5ea26d55 (#8526) - remove outdated bundle-collapser and es3ify
  • 15cd6a03 indexeddb: add checkBlobSupport() (#8804)
  • 85ec16ca core/adapter: use findIndex() (#8791)
  • c91d5eae Attempting to Make Database Version Staling Clearer (#8812)
  • 74d29507 commonUtils.createDocId(): simplify with padStart() (#8795)
  • 2b6219af adapter.getAttachment(): don't pass rev (#8792)
  • 1e69c31b indexeddb.bulkDocs(): inline parseBase64() (#8793)
  • 10d9edc7 adapter: use forEach() instead of map() when result not used (#8790)
  • 9f01e637 adapter: simplify compareByIdThenRev()(#8787)
  • 99f20e52 indexeddb.getAttachment(): don't open unnecessary transaction (#8786)
  • caa8c9cf idb.allDocs(): use seqStore.openKeyCursor() in place of openCursor() (#8764)
  • b0f2e57d indexeddb.getAttachments(): reduce selects from N+1 (#8771)
  • eafc0f14 indexeddb: rename main adapter fn (#8770)
  • 1a6a1820 bin/dev-server: simplify URL logging (#8772)
  • 2305addf adapter-idb/allDocs: simplify getMaxUpdateSeq() (#8762)
  • fc12d33f idb.info(): use seqStore.openKeyCursor() in place of openCursor() (#8763)
  • 1234036f get-postfixed-pouchdb-build: show helpful error if version arg missing (#8743)
  • f1a9b896 Remove dependency - promise-polyfill (#8643)
  • e8680dde (#8685) - .gitignore: remove lerna reference
  • 1b12b0d4 prevent urls ending with empty "?" when no params present
  • 0fdd5a8b (#8612) - use const where possible
  • e316c88c (#8627): Bump node-fetch to 2.6.9
  • c5f931a6 idb.allDocs(): reference keys consistently (#8578)
  • 102b303c indexeddb: fix typo in comment (#8604)

Bugfixes

  • 953f3b3f fix: docs/Gemfile & docs/Gemfile.lock to reduce vulnerabilities
  • 8ba73788 db.put(): throw INVALID_REV for invalid revs (#8931)
  • 18669009 fix: input isn't defined in array case (#8890)
  • e14c5474 fix: upgrade fetch-cookie from 2.1.0 to 2.2.0 (#8859)
  • 34cb6911 (#8525) - Fix compaction from the last last_seq
  • 14a566f2 eslint: add rule: object-shorthand; fix violations (#8794)
  • d9ee8e0f indexeddb: prevent collisions in find() (#8807)
  • 04a1735c indexeddb/rewrite: fix comment typo (#8809)
  • e28a62a9 (#8706) - Handle null options in 'get' method

Documentation

  • 51380f90 fix(docs): update testing docs to match reality after #8569
  • d4dab681 Pat Helland's blog is no longer available
  • d62526d3 docs: replace var in with let/const (#8932)
  • 63c856fa fix: remove dead Debug mode link (#8916)
  • bdb56789 README: update Getting Help links (#8888)
  • 230e9f66 README: Getting Help: remove glitch.com reference (#8887)
  • 6d9d5e14 pouchdb-find/README: remove outdated links to old repo (#8875)
  • 9757c0ba ci: use minified plugins if using minified core (#8870)
  • 04e82714 fix assert in error handler results in out of bound exception (#8861)
  • 88527c32 Clarify the semantics of since (#8624)
  • 4a05b536 spelling: update docs, comments (#8831)
  • 741fcc1e docs: remove sentence (#8830)
  • c469b042 spelling: dont -> don't (#8829)
  • dabd30ac spelling: comments & docs (#8828)
  • 6f3e8ab2 spelling: checkpoint (#8827)
  • a480a525 fix spelling(docs,comments): wtih -> with (#8822)
  • 102a1e39 immediate dependency: update documentation (#8815)
  • bae22f1a docs: reflect CI move travis to GitHub actions (#8798)
  • 1c697dc2 Remove Saucelabs references from docs (#8800)
  • c0565394 (#8748) - Fixing some non-function links in documentation + some http -> https
  • afbcf027 Remvove Promise polyfill mention from docs (#8736)
  • d67ff087 docs: standardise docs.couchdb.org links (#8745)
  • c11c4358 (#8742) - fix dead link in docs
  • 43b77da0 Remove TODO.md
  • babba217 (#8716) - update Committer guidelines
  • 171f80ee (#8732) - guides/queries: make link consistent
  • 18042829 chore(#8725): remove references to TonicDev
  • 307dea3a docs(#8722): fix image baseurls
  • 4498dcdd docs(#8721): include baseurl for favicon
  • 58e408c5 (#8668) - fix typo in attachments guide
  • 33b5ffc3 (#8402) - add note to docs regarding jwt usage

Automated Tests & Build System

  • 7d71f444 update CI workflow node environments to 18 and 20
  • 1cfbadc3 build: harden ci.yml permissions
  • f2401be4 chore(ci): remove PouchDB-Server
  • 84b7afbb fix: remove out of date test and flakey mocking lib
  • bb10785b fix: use universally portable shebang
  • 20a5ccc3 NOT_AN_OBJECT: throw for null; add additional tests (#8930)
  • db193f5c test.slash_id: assert getAttachment() result (#8923)
  • 43193de2 Add tests for attachments on local docs (#8897)
  • 29d568e0 test.slash_id: fix test name (#8924)
  • 3aa44a0c tests/perf: remove firefox bug workaround (#8904)
  • d8c79fe7 repeat-perf-test: allow specifying adapters (#8911)
  • 032ac45e ci: disable checkout.persist-credentials (#8882)
  • 799c564e test-browser: improve unhandled error debugging (#8826)
  • 3deef61f Reduce ci overhead (#8866)
  • 66852032 Add script: repeat-perf-test.sh (#8760)
  • 1f581739 ci: don't rebuild when running dev-server (#8874)
  • c792a33c tests: show unminified stacktraces for Errors (#8841)
  • 5cd750f6 perf-tests: fix JSON reporter (#8876)
  • 7e15d3b7 chore(test): update playwright dep (#8821)
  • 99a64240 chore(ci): upgrade node actions to node v20 (#8857)
  • 1a064d83 (#8863) - fix subsequent fails of 5007 sync 2 databases
  • 340635f4 (#8862): Fix timeout of test.issue3179.js conflicts synced live sync
  • 1d1a08e4 test-browser: fix indentation (#8851)
  • d1f6cdda ci: run tests in webkit (#8805)
  • 366e86a4 test-browser: add try/catch (#8824)
  • 75070d6c test: remove whatwg-fetch polyfill (#8825)
  • fe0905d1 ci: add shellcheck; fix violations (#8753)
  • 5054bf82 tests: use done() when closing express servers (#8840)
  • c7054c29 mocha v10: fix failure handling (#8844)
  • a6b47e29 chore(test): update mocha from v3.5 to v10 (#8838)
  • 519e3316 playwright: handle externally-triggered browser-close event (#8836)
  • e90267b6 chore: upgrade fetch-cookie from 0.11.0 to 2.1.0
  • b0879cb5 test.migration: move before() above beforeEach() (#8832)
  • dc97aedf test-browser: use native event handling (#8823)
  • a630555f test-browser: work around weird webkit behaviour (#8802)
  • 26e33960 eslint: set globals readonly (#8818)
  • 9618a042 eslint: separate test config from root config (#8817)
  • 24e6400b tests/performance: fix use of this.iterations in setup/tearDown (#8777)
  • 154440f0 eslint: comma-dangle: only allow for multiline declarations (#8846)
  • b8a29852 tests: remove commonUtils.Promise (#8776)
  • 60bf1021 test.changes: fix case ddoc without filters+key (#8775)
  • 70bd2afc tests/perf: fix doc creation in basic-gets (#8797)
  • 288714dc tests/perf: document pull-replication-perf-skimdb (#8796)
  • 43e6160a tests/performance/utils: use commonUtils.params() (#8780)
  • 2f5a5f66 test.browser.worker: use same PouchDB src as other tests (#8782)
  • 4f45948f tests/common-utils: parse query string w/ URLSearchParams (#8779)
  • 775b2e1a test-browser: catch-and-fail on unhandled error (#8768)
  • 5b9abdb4 eslint: add rule: no-undef-init (#8758)
  • 48bef766 tests/perf: support regex in GREP option (#8784)
  • 72a9b94c tests/browser.worker: parse query string w/ URLSearchParams (#8781)
  • 105b735f tests/browser.migration: test local docs with attachments (#8785)
  • 2b050594 test-browser: simplify building query string (#8773)
  • c89f4079 test.retry: skip "destroyed" event listener leak test (chrome+indexeddb) (#8765)
  • d2f6bcf4 test.issue3179: fix: allow test to run in browsers (#8769)
  • 6c5aa2b5 tests/browser.migration: compare version parts as numbers not strings (#8767)
  • 2dfadd17 tests/browser.migration: also run with indexeddb (#8766)
  • 7d874a1f perf-tests: add option to save benchmarks to file (#8759)
  • cb5cd952 run-test: echo COUCH_HOST value when waiting (#8761)
  • ad98df00 tests/integration: move isSafari checks to testUtils.isSafari() (#8756)
  • 197fcc40 tests/integration: rename leveldown.migration.js (#8755)
  • 238dc24d tests/integration: use asyncLoadScript() (#8751)
  • aa6d500e test.migration: simplify scenario/constructor mapping (#8750)
  • 6e705dfb test.migration: simplify version number checks (#8749)
  • a48c28f1 test/browser.migration: use this.skip() (#8744)
  • 02ca4e3c ci: test docs (#8747)
  • 642d3500 only build docs when triggered
  • 4f3a9260 (#8717) run-test.sh: always shut down server on exit
  • 12974e07 (#8569) - Switch browser tests to playwright
  • 2d78ed93 test.retry: clarifyevent-listener-leak test names
  • 98097033 Explicitly skip browser.worker tests (#8682)
  • 78d17872 (#8703) - tests/integration: decrease default test timeout
  • e6b8c937 (#8688) - test.issue3179: assert that conflicts exist
  • 27ab3b27 (#8686) - tests: safely de-reference PromiseRejectionEvent
  • 28f4f768 (#8684) - remove cordova test references
  • c8e532e4 (#8676) - browser.worker test: dereference globals safely
  • 4751ebdf (#8674) - jshint: remove legacy inline directives
  • 74c49df3 (#8667) - test-webpack: fail if git working tree is dirty
  • ba74ebe3 (#8670) - test-webpack: don't save new dependencies
  • 6daf0c01 (#8672) - eslint: introduce rule: no-trailing-spaces
  • 2876834b (#8671) - eslint: introduce rule: eol-last
  • 3d407892 (#8645) - test-webpack: don't rebuild node
  • e1fbbb41 (#8651) - restructure async handling of test.viewadapter
  • 080b8a93 (#8655) - remove deprecated usage
  • 0ef150fa (#8652) - only run test.viewadapter for expected adapters
  • 546c8bb6 (#5798) - set terser to minify with option ascii_only=true
  • aca46756 (#8656) - fix concurrent test-server errors
  • 4c92c946 (#8646) - standardise shell shebangs
  • 90ea8c17 (#8649) - fix build and test warnings
  • 5f59f248 ci: add NodeJS v16 to test matrix (#8616)
  • 4f39bd25 (#8602) - fix tests for local doc IDs
  • 8896707f test/integration/deps: add script: get-postfixed-pouchdb-build (#8622)
  • 71501f89 perf-tests: allow running specific suite(s) (#8592)
  • ba0a1060 Remove legacy script: start_standalone_couch.sh (#8635)
  • 9d9c1000 Remove script: bundle-browserify-test.sh (#8634)
  • 30c49354 Remove unused script: jenkins-deploy.sh (#8632)
  • 9b481e5b Add migration tests for v7 & v8 (#8625)
  • 44db15a4 Remove unused script: baldrick-test.sh (#8633)
  • 81f22d68 Use shells specified in shebangs (#8572)
  • ccccfb83 browser-tests: remove saucelabs support (#8577)
  • 9a41ca58 perf tests: enable in-browser performance profiling (#8579)
  • 9e307c3b Use shebang-defined shell for verify-bundle-size (#8644)

Get in touch

As always, we welcome feedback from the community. 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!