Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix incoming handler issue #56

Merged

Conversation

hulkoba
Copy link
Contributor

@hulkoba hulkoba commented May 21, 2021

related issue: #8
closes #54

Transform-Pouch wraps the .bulkDocs() method of PouchDB in order to apply its incoming handler.
For most adapters this is fine, but PouchDB will use an adapter's ._put() method on calls to .put() if it has one.
PouchDB's HTTP adapter -- that is, the one that connects to CouchDB directly -- does specify a ._put() method, and as a result Transform-Pouch's incoming handler does not run when connecting directly to CouchDB.

This PR also

@garbados
Copy link
Collaborator

Hi @hulkoba , thanks for putting this together. Can you write a PR description and add a test to prove the desired functionality?

hulkoba added 3 commits July 2, 2021 11:16
to fix the tests which are failing because incoming is called twice for put and bulkDocs
@hulkoba hulkoba changed the title fix: incoming handler issue fix incoming handler issue Jul 2, 2021
@@ -38,7 +38,7 @@
"lie": "3.0.4",
"pouchdb-extend": "0.1.2",
"pouchdb-promise": "5.4.3",
"pouchdb-wrappers": "4.1.0",
"pouchdb-wrappers": "https://github.com/neighbourhoodie/pouchdb-wrappers.git#mergemaster",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a fix for #55. Maybe there will be an update soon

@hulkoba hulkoba force-pushed the fix_incoming_handler_issue branch from c5e7903 to d368a9f Compare July 5, 2021 10:23
@hulkoba hulkoba force-pushed the fix_incoming_handler_issue branch from 991d04f to 611767a Compare July 6, 2021 09:31
@garbados
Copy link
Collaborator

This looks good to me! Tests pass and everything.

@dheimoz
Copy link

dheimoz commented Jul 26, 2021

hey @nolanlawson , @tlvince @AdrianoFerrari any chance you could take a look?

Thanks.

@jcoglan jcoglan merged commit 611767a into pouchdb-community:master Aug 4, 2021
@jcoglan
Copy link
Collaborator

jcoglan commented Aug 4, 2021

This was merged as a result of us merging nh-refactor into master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

incoming handler does not run against CouchDB
4 participants