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

deps: replace raw-body with native approach #90

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SuperchupuDev
Copy link

@SuperchupuDev SuperchupuDev commented Jun 23, 2024

raw-body was used in a way that it only converted the request to a Buffer. This PR replaces usage of raw-body with a less complex, native approach, removing not just the 11 dependencies that came with raw-body, but also undici's only subdependency (that was gone after updating undici). 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 size

Code I ran to test

https://runkit.com/embed/4hcq12gepy26

image

@jpbberry jpbberry self-requested a review June 23, 2024 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant