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

Consider alternatives to http-assert (including none at all) #1778

Closed
wojtekmaj opened this issue Sep 25, 2023 · 4 comments
Closed

Consider alternatives to http-assert (including none at all) #1778

wojtekmaj opened this issue Sep 25, 2023 · 4 comments

Comments

@wojtekmaj
Copy link

wojtekmaj commented Sep 25, 2023

http-assert targets very old Node.js version (0.8) and thus includes bloated deep-equal dependency that can be, for example, replaced with a much smaller alternative dequal. http-assert itself is just a few lines really so I would argue copying these lines over and replacing deep-equal with dequal would be beneficial, improving install size and install time.

@siakc
Copy link

siakc commented Dec 23, 2023

Why the sizes listed in npm differs this much with packagephobia?

@wojtekmaj
Copy link
Author

Quoting their README:

The "install size" is the size your hard drive will report after running npm install. This includes the package, all of the dependencies, and its dependency's dependencies...and so on.

@siakc
Copy link

siakc commented Dec 25, 2023

Size on disk:
deep-equal: 3.2M
dequal: 60K

@iwanofski
Copy link

Installation size isn't necessarily a metric Koa is tracking or cares too much about. A clean install of Koa is sub 2mb which in "node_modules theory" is considered negligible. For this reason alone http-assert will not be replaced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants