-
Notifications
You must be signed in to change notification settings - Fork 118
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
Compatibility with PouchDB 7 #254
Compatibility with PouchDB 7 #254
Conversation
There are some issues in the tests:
|
Can we use the We recently found out that we needed to overrule a signup request when logged in as a non-admin user to be able to prevent credentials from being included. I don't really see a way of doing this with your setup. If we switched to |
@jlami good point. I was already using the fetch from However, I did some digging and turns out, if you use Unfortunately this PR won't work until there's a new version of PouchDB released; this fix in particular is absolutely necessary. |
I made a PR to |
Any updates on this? |
Thank you @leonid-shevtsov. Sorry for the very late merge... |
No worries! Thank you so much for merging. |
I've seen #238, but it looked abandoned, and there was refactoring seemingly unrelated to PouchDB 7. I figured it's easier to start over. Sorry about that.
pouchdb-ajax
andpouchdb-promise
pouchdb-memory
build withpouchdb-browser
andpouchdb-node
.db.fetch
, and not any other instance offetch
(such as an additional polyfill, or even imported frompouchdb-fetch
). This will let this plugin cooperate with other plugins that might customizefetch
behavior. So:pouchdb-fetch
package, since it's baked intopouchdb-browser
and other builds.fetch
works with promises naturally, it's more appropriate to define the API in terms of promises as well. So to support the callback style, I've defined atoCallback
helper which does roughly the opposite oftoPromise
and enables both the promise and the callback API styles.fetchJSON
- a wrapper aroundfetch
that receives and returns JSONs. Then I've looked and, of course,pouchdb-adapter-http
has a very similar function, but it's private. Perhaps some day we can extract and reuse it.Needless to say, this changeset is not compatible with PouchDB 6 anymore.