-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
Question: is yarn size fair comparison with npm? #987
Comments
Hey, thanks! The |
Ah yes, thank you, I hadn't spotted the use of
What I believe is happening is that yarn now always copies the latest version of This means all native dependencies will appear to be ~4MB larger with yarn compared with npm. I'm unsure what, if anything, should be done about this. |
Also note Yarn 3 is used now, not Yarn 2 But maybe I should switch to Yarn 1 which seems to follow npm behavior a little more closely. Trying it out here: |
Hmm, something does seem wrong because uploading I'l try switching to Yarn 1 or to pnpm and see if that is more accurate. I would like to continue using npm but they no longer support programatic access so I was stuck on npm 6. |
Yarn 1 (left) installs fewer dependencies than Yarn 3 (right) 🤔 {
"private": true,
"dependencies": {
"sharp": "^0.30.7"
}
} I tried switching to Yarn 1 in #988 but it fails to install |
I finally had to upgrade Take a look again and let me know if there are any problems with the measurement for |
https://packagephobia.com/result?p=sharp looks good, thank you Steven. |
Hi Steven, thanks as always for this useful tool.
I noticed an increase in the reported installation size of the sharp package from 20.2MB to 24.3MB between v0.30.4 and v0.30.5 - see https://packagephobia.com/result?p=sharp
This didn't seem quite right to me, so I had a quick look at the commits and noticed you switched from npm to yarn via #959 around the same time.
It looks like the increase in reported disk usage is due to now including yarn's extra cache data in the calculations. Perhaps this should be removed to ensure a fair comparison with the previous use of npm?
Here's a worked example:
The text was updated successfully, but these errors were encountered: