buttermilk icon indicating copy to clipboard operation
buttermilk copied to clipboard

[email protected] package size increase

Open dr-js opened this issue 6 years ago • 5 comments

The .tgz file size increased from 76.4 kB to 719.3 kB

Is some extra website code packed under dist/?

npm notice 1.0MB  dist/app.c328ef1a.js
npm notice 1.7MB  dist/app.c328ef1a.map
npm notice 8.1kB  dist/home.fc46b7b9.js
npm notice 303B   dist/home.fc46b7b9.map
npm notice 79B    dist/index.html

Noticed from: https://packagephobia.now.sh/[email protected]


a diff between $ npm pack [email protected] $ npm pack [email protected] output:

@@ -1,31 +1,33 @@
-npm notice package: [email protected]
+npm notice package: [email protected]
 npm notice === Tarball Contents ===
 npm notice 0      package
 npm notice 1.1kB  LICENSE
-npm notice 14.1kB README.md
+npm notice 14.7kB README.md
 npm notice 0      dist
-npm notice 1.6kB  package.json
+npm notice 1.8kB  package.json

-npm notice 0      site
+npm notice 1.0MB  dist/app.c328ef1a.js
+npm notice 1.7MB  dist/app.c328ef1a.map

-npm notice 21.1kB dist/cjs.js
-npm notice 30.6kB dist/cjs.js.map
-npm notice 9.3kB  dist/cjs.min.js
-npm notice 25.8kB dist/cjs.min.js.map
+npm notice 16.4kB dist/cjs.js
+npm notice 26.6kB dist/cjs.js.map
+npm notice 7.4kB  dist/cjs.min.js
+npm notice 22.2kB dist/cjs.min.js.map

-npm notice 20.8kB dist/es.js
-npm notice 30.6kB dist/es.js.map
-npm notice 9.0kB  dist/es.min.js
-npm notice 25.8kB dist/es.min.js.map
+npm notice 16.0kB dist/es.js
+npm notice 26.6kB dist/es.js.map
+npm notice 7.0kB  dist/es.min.js
+npm notice 22.2kB dist/es.min.js.map

+npm notice 8.1kB  dist/home.fc46b7b9.js
+npm notice 303B   dist/home.fc46b7b9.map
+npm notice 79B    dist/index.html

-npm notice 21.6kB dist/standalone.js
-npm notice 32.3kB dist/standalone.js.map
-npm notice 8.0kB  dist/standalone.min.js
-npm notice 25.7kB dist/standalone.min.js.map
+npm notice 16.8kB dist/standalone.js
+npm notice 27.9kB dist/standalone.js.map
+npm notice 5.9kB  dist/standalone.min.js
+npm notice 22.1kB dist/standalone.min.js.map

-npm notice 0      site/.next
-npm notice 0      site/.next/dist

 npm notice === Tarball Details ===
 npm notice name:          buttermilk
-npm notice version:       1.1.2
-npm notice filename:      buttermilk-1.1.2.tgz
+npm notice version:       2.0.0
+npm notice filename:      buttermilk-2.0.0.tgz
-npm notice package size:  76.4 kB
+npm notice package size:  719.3 kB
-npm notice unpacked size: 277.2 kB
+npm notice unpacked size: 3.0 MB
-npm notice shasum:        e704ada0d0384570dfe3f5c7dd3a020f534794d3
-npm notice integrity:     sha512-ZY2gM6TEVqBBg[...]Lx/4uzsrg/1Kw==
+npm notice shasum:        f55bdff0de2af1c9b2b3a1051657632fac86abf5
+npm notice integrity:     sha512-wM3O1cSPHmARZ[...]NdTFoQ/c8OQ3g==
-npm notice total files:   20
+npm notice total files:   22

dr-js avatar May 31 '19 03:05 dr-js

No idea what’s going on in your project, but buttermilk is quite small. https://bundlephobia.com/[email protected]

On Thu, May 30, 2019 at 10:17 PM Dr [email protected] wrote:

The .tgz file size increased from 76.4 kB to 719.3 kB

Is some extra website code packed under dist/?

npm notice 1.0MB dist/app.c328ef1a.js npm notice 1.7MB dist/app.c328ef1a.map npm notice 8.1kB dist/home.fc46b7b9.js npm notice 303B dist/home.fc46b7b9.map npm notice 79B dist/index.html

Noticed from: https://packagephobia.now.sh/[email protected]

a diff between $ npm pack [email protected] $ npm pack [email protected] output:

@@ -1,31 +1,33 @@-npm notice package: [email protected]+npm notice package: [email protected] npm notice === Tarball Contents === npm notice 0 package npm notice 1.1kB LICENSE-npm notice 14.1kB README.md+npm notice 14.7kB README.md npm notice 0 dist-npm notice 1.6kB package.json+npm notice 1.8kB package.json -npm notice 0 site+npm notice 1.0MB dist/app.c328ef1a.js+npm notice 1.7MB dist/app.c328ef1a.map -npm notice 21.1kB dist/cjs.js-npm notice 30.6kB dist/cjs.js.map-npm notice 9.3kB dist/cjs.min.js-npm notice 25.8kB dist/cjs.min.js.map+npm notice 16.4kB dist/cjs.js+npm notice 26.6kB dist/cjs.js.map+npm notice 7.4kB dist/cjs.min.js+npm notice 22.2kB dist/cjs.min.js.map -npm notice 20.8kB dist/es.js-npm notice 30.6kB dist/es.js.map-npm notice 9.0kB dist/es.min.js-npm notice 25.8kB dist/es.min.js.map+npm notice 16.0kB dist/es.js+npm notice 26.6kB dist/es.js.map+npm notice 7.0kB dist/es.min.js+npm notice 22.2kB dist/es.min.js.map +npm notice 8.1kB dist/home.fc46b7b9.js+npm notice 303B dist/home.fc46b7b9.map+npm notice 79B dist/index.html -npm notice 21.6kB dist/standalone.js-npm notice 32.3kB dist/standalone.js.map-npm notice 8.0kB dist/standalone.min.js-npm notice 25.7kB dist/standalone.min.js.map+npm notice 16.8kB dist/standalone.js+npm notice 27.9kB dist/standalone.js.map+npm notice 5.9kB dist/standalone.min.js+npm notice 22.1kB dist/standalone.min.js.map -npm notice 0 site/.next-npm notice 0 site/.next/dist

npm notice === Tarball Details === npm notice name: buttermilk-npm notice version: 1.1.2-npm notice filename: buttermilk-1.1.2.tgz+npm notice version: 2.0.0+npm notice filename: buttermilk-2.0.0.tgz-npm notice package size: 76.4 kB+npm notice package size: 719.3 kB-npm notice unpacked size: 277.2 kB+npm notice unpacked size: 3.0 MB-npm notice shasum: e704ada0d0384570dfe3f5c7dd3a020f534794d3-npm notice integrity: sha512-ZY2gM6TEVqBBg[...]Lx/4uzsrg/1Kw==+npm notice shasum: f55bdff0de2af1c9b2b3a1051657632fac86abf5+npm notice integrity: sha512-wM3O1cSPHmARZ[...]NdTFoQ/c8OQ3g==-npm notice total files: 20+npm notice total files: 22

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/probablyup/buttermilk/issues/15?email_source=notifications&email_token=AAELFVWPULKB4OEWI7WXJD3PYCKGBA5CNFSM4HRRPCTKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GW3RUAA, or mute the thread https://github.com/notifications/unsubscribe-auth/AAELFVVQL35AY36IROIXYBLPYCKGBANCNFSM4HRRPCTA .

quantizor avatar May 31 '19 08:05 quantizor

bundlephobia only checks the files linked in the main field in package.json.

The size increase is at the .tgz level, this should affect package download & node_module size, but should not affect webpack usage.

From https://registry.npmjs.org/buttermilk:

tarball: "https://registry.npmjs.org/buttermilk/-/buttermilk-1.1.2.tgz"
unpackedSize: 277172
...
tarball: "https://registry.npmjs.org/buttermilk/-/buttermilk-2.0.0.tgz"
unpackedSize: 2984310

Maybe try download the tarball, or check the content difference at:

dr-js avatar May 31 '19 09:05 dr-js

Gotcha, probably the "files" array in package.json needs to be added/updated.

quantizor avatar Aug 20 '19 17:08 quantizor

It looks like both the src and site build steps output to the dist folder. Obviously dist should only contain the library code since you don't need to ship the site with the npm module.

nerdstep avatar Aug 21 '19 17:08 nerdstep

Thanks Justin, looking into it now

quantizor avatar Oct 20 '19 18:10 quantizor