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

Switch HTTP Adapters to use fetch #6944

Closed
daleharvey opened this Issue Dec 17, 2017 · 8 comments

Comments

Projects
None yet
5 participants
@daleharvey
Member

daleharvey commented Dec 17, 2017

Requirement for #5322

Now that browsers have implemented the fetch api with cancellation, switch to using that in the http adapters, this removes all of pouchdb-ajax dependency.

We will try to avoid polyfilling it, ie 11 is the only major holdout and people can polyfill themselves for that.

@daleharvey daleharvey referenced this issue Dec 17, 2017

Closed

PouchDB 7.0 #6946

8 of 8 tasks complete

nolanlawson added a commit that referenced this issue Jan 7, 2018

nolanlawson added a commit that referenced this issue Jan 7, 2018

@loic

This comment has been minimized.

Contributor

loic commented Jan 17, 2018

What's the plan on Node / pouchdb-server? I'm especially concerned about the cookies story.

daleharvey added a commit that referenced this issue Jan 31, 2018

daleharvey added a commit that referenced this issue Feb 2, 2018

daleharvey added a commit that referenced this issue Feb 2, 2018

daleharvey added a commit that referenced this issue Feb 2, 2018

@Magellol

This comment has been minimized.

Magellol commented Feb 5, 2018

@daleharvey

browsers have implemented the fetch api with cancellation

Didn't know fetch was cancellable natively. Are we sure about that, I wouldn't think native promises are cancellable in any way. Do you have a link to some documentation?

@daleharvey

This comment has been minimized.

Member

daleharvey commented Feb 5, 2018

Yup https://developers.google.com/web/updates/2017/09/abortable-fetch, I have a working implementation @ #7059

@gr2m

This comment has been minimized.

Contributor

gr2m commented Feb 5, 2018

what do you plan to use for the fetch implementation in Node?

@daleharvey

This comment has been minimized.

Member

daleharvey commented Feb 6, 2018

The WIP is using node-fetch

@ptitjes

This comment has been minimized.

Contributor

ptitjes commented Feb 6, 2018

@daleharvey I did not follow your latest developments so I ask. Does dropping cookie support on Node.js will make tests/component/test.ajax.js fail ? (I don't see it failing yet in CI on you WIP.)

Do you have any ideas yet about what actions we will have to take for authentication plugins, and other plugins that requires to share cookies with PouchDB itself, to still work with PouchDB 7.0 ?

@daleharvey

This comment has been minimized.

Member

daleharvey commented Feb 6, 2018

Yeh I don't think we can drop that test / cookies working out of the box, was assuming that there would be a working fetch + cookies module in mode but we may need to fix / write one ourselves, will probably leave it last. But plugin authors should mostly only need to service from Ajax to fetch

daleharvey added a commit that referenced this issue Feb 21, 2018

daleharvey added a commit that referenced this issue Feb 21, 2018

daleharvey added a commit that referenced this issue Feb 21, 2018

daleharvey added a commit that referenced this issue Feb 21, 2018

daleharvey added a commit that referenced this issue Feb 22, 2018

daleharvey added a commit that referenced this issue Feb 22, 2018

@daleharvey

This comment has been minimized.

Member

daleharvey commented Feb 22, 2018

@daleharvey daleharvey closed this Feb 22, 2018

daleharvey added a commit that referenced this issue Mar 19, 2018

daleharvey added a commit that referenced this issue Mar 19, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment