feat: remove our dependency on undici
#442
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🧰 Changes
While pulling our latest release of this library into our main app I was having a lot of problems with Webpack trying to compile in
undici
into our frontend code because of the logic we've got here if the File API isn't present. Well much to my surprise Node began exposing this back in 18.13.01.By removing
undici
completely and usingFile
innode:buffer
folks who use Webpack (especiallyapi
users) will be able to add a fallback for it2:Though this requires pinning our minimum Node 18 release at 18.13.0 instead of just 18.* I'm iffy on considering this a breaking change because Node 18.13.0 was released by in January and everyone, including us, who are using 18 should be past it by now. We may want to also pin
@readme/api-core
andapi
to>=18.13.0
though because they, well at leastapi-core
, use this library.Footnotes
https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V18.md#2023-01-05-version-18130-hydrogen-lts-danielleadams ↩
Something they've likely already had to do for the
Blob
polyfill we are using out of it ifglobal.Blob
isn't present. ↩