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

Adjust Fetch Polyfill #18

Closed
sxzz opened this issue Apr 7, 2023 · 4 comments
Closed

Adjust Fetch Polyfill #18

sxzz opened this issue Apr 7, 2023 · 4 comments
Labels
proposal Proposal
Milestone

Comments

@sxzz
Copy link
Contributor

sxzz commented Apr 7, 2023

Fetch API now is already supported by modern browsers and Node.js >= 18.

For browsers, we can completely remove the polyfills.

For the node version (cjs and esm), we can replace fetch-undici (which is deprecated) with undici. They're the same but undici is the latest one. Also, we can also completely remove polyfills after 2023-09-11 (Which is the EOL of Node 16).

/cc @Songkeys

@sxzz sxzz added the proposal Proposal label Apr 7, 2023
@Songkeys
Copy link
Member

Songkeys commented Apr 7, 2023

fetch-undici is not deprecated yet. It's the isomorphic exports of fetch. We can directly use undici but have to bundle it correctly for browser.

I agree we can remove it, actually even before v16 EOL. Let's do it in the next version (v1).

@sxzz
Copy link
Contributor Author

sxzz commented Apr 7, 2023

Oh, there are actually two similar libraries undici-fetch and fetch-undici. I was wrong about these two.

@sxzz
Copy link
Contributor Author

sxzz commented Apr 7, 2023

Is there a reason to do it in the next major version? Since for 0.x.x, we can release breaking changes in a minor version.

@Songkeys
Copy link
Member

Songkeys commented Apr 7, 2023

We can but we don't have to since it doesn't improve what matters a lot. I'm thinking about starting v1 very soon. 0.19.x might be the last major version. But yes, we can.

This was referenced Apr 12, 2023
@sxzz sxzz closed this as completed in a113274 Apr 14, 2023
@sxzz sxzz added this to the 1.0 milestone May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal Proposal
Projects
None yet
Development

No branches or pull requests

2 participants