Closed brandongregoryscott closed 1 year ago
Alright, looks like npm pack --dry-run
and yarn pack --dry-run
work a little differently. npm pack --dry-run
was showing the correct size / file listing...
➜ evergreen git:(master) ✗ npm pack && ls -l evergreen-ui-7.0.0.tgz
npm notice === Tarball Details ===
npm notice name: evergreen-ui
npm notice version: 7.0.0
npm notice filename: evergreen-ui-7.0.0.tgz
npm notice package size: 1.2 MB
npm notice unpacked size: 6.6 MB
npm notice shasum: e792bac5e2028cc61286040bcd3ba04f2172cd04
npm notice integrity: sha512-SLUpPAixFVnqk[...]D5yHn2zBCFbPQ==
npm notice total files: 1764
npm notice
evergreen-ui-7.0.0.tgz
-rw-r--r-- 1 Brandon staff 1203132 Jan 17 20:35 evergreen-ui-7.0.0.tgz
However, yarn pack --dry-run
generates a much different tarball:
➜ evergreen git:(master) yarn pack --dry-run
yarn pack v1.22.17
success Wrote tarball to "/Users/Brandon/oss/fork/evergreen/evergreen-ui-v7.0.0.tgz".
✨ Done in 10.16s.
➜ evergreen git:(master) ✗ ls -l evergreen-ui-v7.0.0.tgz
-rw-r--r-- 1 Brandon staff 81265232 Jan 17 20:32 evergreen-ui-v7.0.0.tgz
The .tgz generated by yarn is almost 81 MB, while the npm generated by npm is the expected size - 1.2 MB. I think this change is from the addition of the !**/*.test.js
and !**/*.stories.js
lines in package.json > files
This was certainly not the intended effect, so I'll open up a PR to remove those!
Related: probably need to look into https://github.com/ai/size-limit/ and updating our configuration to catch something like this in the future 😓
It looks like something is incorrectly getting packaged up now, there's no way the distribution should be 500MB / ~5.6k files.
https://www.npmjs.com/package/evergreen-ui?activeTab=versions
It looks like the V7 pre-release package is also the same size:
https://www.npmjs.com/package/evergreen-ui/v/7.0.0 https://www.npmjs.com/package/evergreen-ui/v/7.0.0-0