-
Notifications
You must be signed in to change notification settings - Fork 762
feat(formdata): use formdata-node to handle form data #2154
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
Conversation
This PR will fail unless new releases of formdata-node is released with my change. Also formdata-node requires at least Node.js@12.4.x to be installed. |
This remove use of isomorphic-form-data. Refs #2008
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@char0n Was this tested in (npm link) SwaggerUI and with "Try It Out"? We previously tried to migrate to formdata-node
and deprecate use of isomorphic-fetch
, but had to roll it back. That said, this PR seems cover additional considerations.
- Node 12.4 requirement: Ok, no issue from CI perspective.
- What is preventing use of
node-fetch@3
in this PR?
Yes it has. I've tested manually and run SwaggerUI tests on locally linked swagger-client. Technically this PR brings no change to the SwaggerUI. This is due to following reasons:
Yes additional things needed to be done to successfully integrate formdata-node. Author of the library helped me understand the complexities and reasons between formdata-node vs form-data vs node-fetch (v2 vs v3)
No issue, minimal version in workflows haves been bumped to 12.4.x
node-fetch@3 is still in beta and not ready for production use. I assume they'll release first stable during one or two months. |
Co-authored-by: Tim Lai <timothy.lai@gmail.com>
…nto char0n/formdata
Not to mention that since 3.0.0-beta.10 node-fetch requires native ESM support, which means that you can't use it unless you get rid of CJS in your package, or unless you can use dynamic |
Yeah, that'll be fun ;] We already use ESM in 99% places and transpile to CJS, so it shouldn't be that much of a hassle. |
Ok let's go for a merge and release! |
🎉 This PR is included in version 3.14.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
## [3.14.1](v3.14.0...v3.14.1) (2021-07-27) ### Bug Fixes * **package:** add additional mappings for browser field ([db0cd91](db0cd91)), closes [#2154](#2154)
Notable changes in this PR
This PR is a preparation for using node-fetch@3.x which uses formdata-node for FormData API operations and not the obscure form-data library which is not spec-compliant and causes various issues.
Refs #2008