deps: replace raw-body
with native approach
#90
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.
raw-body
was used in a way that it only converted the request to a Buffer. This PR replaces usage ofraw-body
with a less complex, native approach, removing not just the 11 dependencies that came withraw-body
, but alsoundici
's only subdependency (that was gone after updatingundici
). As such this PR lowers the amount of transitive dependencies in this package from 13 down to one (1).I've tested that this approach and the way
raw-body
was used both give the same output, making this a free ~40% decrease in total bundle sizeCode I ran to test
https://runkit.com/embed/4hcq12gepy26