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

Replacing form-data with native FormData of Node 18 #1644

Merged
merged 5 commits into from
Mar 24, 2024
Merged

Conversation

RobinTail
Copy link
Owner

@RobinTail RobinTail commented Mar 24, 2024

Needed for #1617
Related to form-data/form-data#558

Using the native Node 18+ FormData (using it in tests).
It turned out that in version 18.0.0 (only), FormData::set and ::append() do not take the MIME type of the Blob into account, and it's an empty string, which always lead to application/octet-stream instead of actual MIME type.

Blob::type is readonly via getter-only approach, so there is no way to hack it.
So I disabled the MIME type check for Node 18.0.0 test.

@RobinTail RobinTail added dependencies Pull requests that update a dependency file refactoring The better way to achieve the same result labels Mar 24, 2024
@RobinTail RobinTail added the external bug it's a bug, but in a dependency label Mar 24, 2024
Copy link

coveralls-official bot commented Mar 24, 2024

Coverage Status

coverage: 100.0%. remained the same
when pulling 56941ca on no-form-data
into aadf5ad on master.

@RobinTail RobinTail marked this pull request as ready for review March 24, 2024 12:55
@RobinTail RobinTail merged commit aff96b7 into master Mar 24, 2024
12 checks passed
@RobinTail RobinTail deleted the no-form-data branch March 24, 2024 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file external bug it's a bug, but in a dependency refactoring The better way to achieve the same result
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant