Skip to content

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

Merged
RobinTail merged 5 commits intomasterfrom
no-form-data
Mar 24, 2024
Merged

Replacing form-data with native FormData of Node 18#1644
RobinTail merged 5 commits intomasterfrom
no-form-data

Conversation

@RobinTail
Copy link
Copy Markdown
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
@coveralls-official
Copy link
Copy Markdown

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
@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.

1 participant