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.
This PR remove the dependency of form-data package
FormData
exists built in to NodeJS now in v18+ now.Both
got
andnode-fetch
support encoding a spec'edFormData
themself now, and theform-data
package is now considered as legacy bynode-fetch
andgot
s standards.form-data
haven't been updated for a long while and it lacks many methods and don't really follow the specification.node-fetch
ships with a polyfilled FormData and ways to get Blob/File like objects backed up by the filesystem that is read lazily when needed (thanks to thefetch-blob
package). The native FormData provided by NodeJS themself do also support Blob / File like objects and dosen't need to be strictly the same instances ofglobalThis.Blob
sonode-fetch
can now also export the nativeFormData
when it's available.This might be a little bit of topic but i think you should strive towards eventually being able to replace
node-fetch
andgot
with built in features provided by NodeJS themself to have fewer dependencies. a long term goal and a granular replacement would be to:got
fornode-fetch
node-fetch
forUndici
when dropping support for NodeJS v16.8Undici
for built in Fetch when dropping support for NodeJS v18fetch-blob/from.js
for native fn when NodeJS adds a feature to get blob/files backed up by the file system