client-side-databases
client-side-databases copied to clipboard
Update pouchdb monorepo to v9 (major)
This PR contains the following updates:
Package | Change | Age | Adoption | Passing | Confidence |
---|---|---|---|---|---|
pouchdb-adapter-http (source) | 7.3.1 -> 9.0.0 |
||||
pouchdb-adapter-idb (source) | 7.3.1 -> 9.0.0 |
||||
pouchdb-adapter-memory (source) | 7.3.1 -> 9.0.0 |
||||
pouchdb-find (source) | 7.3.1 -> 9.0.0 |
Release Notes
pouchdb/pouchdb (pouchdb-adapter-http)
v9.0.0
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()
withArray.flat()
built-in (#8928) -
7505bedd
isValidRev()
: reject revs with more than one dash (#8933) -
3c852034
db.post()
,db.bulkDocs()
: throwINVALID_REV
consistently (#8934) -
4a765418 feat: migrate dev dep
watch-glob
with maintainedglob-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
withconst
(#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
withqueueMicrotask
- def06b03 (#8526): Upgrade leveldown from 5.6.0 to 6.1.1
-
5ea26d55 (#8526) - remove outdated
bundle-collapser
andes3ify
-
15cd6a03 indexeddb: add c
heckBlobSupport()
(#8804) -
85ec16ca core/adapter: use
findIndex()
(#8791) - c91d5eae Attempting to Make Database Version Staling Clearer (#8812)
-
74d29507
commonUtils.createDocId()
: simplify withpadStart()
(#8795) -
2b6219af
adapter.getAttachment()
: don't pass rev (#8792) -
1e69c31b
indexeddb.bulkDocs()
: inlineparseBase64()
(#8793) -
10d9edc7 adapter: use
forEach()
instead ofmap()
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 fromN+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()
: useseqStore.openKeyCursor()
in place ofopenCursor()
(#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()
: throwINVALID_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 withlet
/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
: assertgetAttachment()
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()
abovebeforeEach()
(#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: clarify
event-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!
v8.0.1
The first release of the year! This is a patch release, it fixes a bug we introduced during a refactor made in the last release and sets Node 14 in our CI. For a full changelog from 8.0.0 to 8.0.1, please see the releases page or view the latest commits.
Fix this
of changesHandler
#8583 #8581 We introduced a bug in the #8450 refactor that has been fixed now.
Use Node 14
#8570 We were testing our CI in GHA against Node 12, which is EOL. Now we are testing against Node 14.
Changelog
Bugfixes
- da5069df (pouchdb#8581) - Fix this of changesHandler
Documentation
- 4dcaac82 docs: release post for 8.0.0
- 0bdb3423 feat: add mastodon verification link
- 40ac7a26 feat(site): faster website uploads, rsync skips files that are already on the server
- ae69d4fb fix(blog): title case
- 3728f020 Update 2022-12-14-pouchdb-8.0.0.md
- c90a0208 Update 2022-12-14-pouchdb-8.0.0.md
- e9bf059c docs: update to version 8.0.0
- 7484e245 docs: update 2022-12-14-pouchdb-8.0.0.md
Testing
-
06bfe891 (pouchdb#8581) - Fix test - Reorder for confirming
equal(7)
- 2c81da46 (pouchdb#8581) - Fix test Fix format issues.
- 3d36d2d8 (pouchdb#8581) - Fix test - Rewrite the function to callback-style. - Fix for timings.
- 6a7fd466 (pouchdb#8581) - Fix test.
- ff81fa35 ci: use node 14
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!
v8.0.0
We are thrilled to announce the release of PouchDB's new major version 8.0.0. For a full changelog from 7.3.1 to 8.0.0, please see the releases page or view the latest commits. Here are the highlights:
Embracing modern ES6+ JS syntax
We have started the process of moving to ES6+ syntax. We made refactors to use native JS classes instead of prototypes, deprecated some packages that implemented features that are now built in the language (inherits
, argsarray
), and started in packages such as pouchdb-abstract-mapreduce
and pouchdb-adapter-http
. We encourage you to embrace the syntax in your new contributions and, if you can, contribute to the refactoring effort.
This might mean a potentially breaking change, therefore we bump the major version. If you need to support ES5 we recommend you use a transpiler.
Add activeTasks
#8422 #8441 Analogous to the _active_tasks
feature in CouchDB, PouchDB now has activeTasks
. With this functionality, PouchDB is able to list all active database tasks, like database_compaction
, view_indexing
, or replication
. PouchDB will report the progress of these tasks to the active tasks API and remove tasks as soon as they are completed or have failed.
Example usage:
let tasks = PouchDB.activeTasks.list()
Example result:
[{
"id": "d81fea92-8ce4-42df-bb2b-89a4e67536c3",
"name": "database_compaction",
"created_at": "2022-02-08T15:38:45.318Z",
"total_items": 12,
"completed_items": 1,
"updated_at": "2022-02-08T15:38:45.821Z"
}]
Add purge
to the indexeddb
adapter
#8453 Similar to CouchDB's purge
, PouchDB has now purge
for its indexeddb
adapter.
Purge permanently removes data from the database. Normal deletion with db.remove()
does not, it only marks the document as _deleted=true
and creates a new revision. This behaviour ensures that deletes can be replicated across databases, and deleted documents don’t get undeleted by syncing with a database that still has this document.
db.purge()
is not intended as a regular method for deleting documents, instead, it is meant as an admin function for cases where some secret was erroneously added to the database and must now be removed completely, eg. a credit card or social security number. Purge effectively puts the database in a state where the offending write never happened.
Example usage:
try {
const result = await db.purge('mydoc', '6-3a24009a9525bde9e4bfa8a99046b00d');
// handle result
} catch (error) {
// handle error
}
Example result:
{
"ok": true,
"deletedRevs": [
"6-3a24009a9525bde9e4bfa8a99046b00d",
"5-df4a81cd21c75c71974d96e88a68fc2f"
],
"documentWasRemovedCompletely": false
}
Changelog
New features
- 0680c0ac feat(core): simple active tasks implementation
- c3fc43cc feat: use activeTasks error handling
- 9a83c11f feat(core): activeTasks remove reason argument
- 40dc6b37 feat(replicate): track live replications in activeTasks
- f5b6d35e feat(core): view indexing use activeTasks API
- d784b49a feat(replicate): replication uses activeTasks API
- 52a52495 feat: database compaction use activeTasks API
- ed0db363 feat(core): make activeTasks.list() return array
-
eaf9d52f feat(core): active tasks
created_at/updated_at
naming - 544eb77d feat(purge): add purge to core
- ec1b7872 chore(purge): remove only from purge tests
- 3445a012 feat(indexeddb): proof-of-concept purge method
-
e861d00f wip(indexeddb): stub
_purgeRev
method - 972ae331 wip(merge): findPathToLeaf, removeLeafFromTree
- 4e921ebd feat(merge): removeLeafFromTree return empty trees
- 3e3f7613 feat: make purge delete docs if tree is empty
- a8b5e00c feat(indexeddb): attachment purging
- 693ea5c1 feat(purge): handle missing doc, return something
- 774976a0 feat: on-update view purging
-
94ec8932 feat(core):
purged_infos_limit
support - ce8f8b30 [wip] Purge leaves from multiple roots
- 4252a0f0 docs(purge): show result object seperately
- b856173b chore(purge): add code comments
- d5f4250a chore(purge): remove unneeded logs and comments
- 2c0ddbb0 feat(purge): simplify implementation of removeLeafFromTree()
Bugfixes
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
- [ ] If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.