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

Tracking: Replacing polyfill dependencies with node.js native APIs #56

Closed
5 tasks done
jasnell opened this issue Sep 24, 2021 · 2 comments
Closed
5 tasks done

Tracking: Replacing polyfill dependencies with node.js native APIs #56

jasnell opened this issue Sep 24, 2021 · 2 comments
Labels
enhancement New feature or request fixed-in-next Fixed in next release

Comments

@jasnell
Copy link
Member

jasnell commented Sep 24, 2021

Just opening this as a way of tracking which polyfill dependencies can soon be replaced with official node.js apis...

  • @mrbbot/node-fetch --> https://github.com/nodejs/undici
  • @peculiar/webcrypto --> Node.js core WebCrypto impl
  • event-target-shim --> Node.js core EventTarget impl
  • formdata-node --> We should implement FormData in Node.js core
  • web-streams-polyfill --> Node.js core Web Streams impl
@mrbbot
Copy link
Contributor

mrbbot commented Sep 24, 2021

Nice! 🎉 Thanks for collating these all together.

Lots of these have been implemented in version 2. 🙂

I was planning on making Node 16 required for the next major version which should be released around the same time it becomes the Active LTS. Was considering making a @miniflare/compat package that hooked into the require of built-ins to replace them with these polyfill dependencies, but I'm not sure the extra maintainence work is worth it, especially as this is primarily a development tool, so the Node version people use should be more flexible.

@mrbbot mrbbot added the enhancement New feature or request label Sep 27, 2021
@mrbbot mrbbot added the fixed-in-next Fixed in next release label Oct 19, 2021
@mrbbot
Copy link
Contributor

mrbbot commented Oct 27, 2021

Hey! 👋 The first pre-release of Miniflare 2 has just been released, which replaces all these polyfill dependencies with the equivalent Node.js native APIs. The full changelog is here and it can be installed with npm i miniflare@next -D.

@mrbbot mrbbot closed this as completed Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fixed-in-next Fixed in next release
Projects
None yet
Development

No branches or pull requests

2 participants