ethereumjs / ethereumjs-block

Project is in active development and has been moved to the EthereumJS VM monorepo.
https://github.com/ethereumjs/ethereumjs-vm/tree/master/packages/block
Mozilla Public License 2.0
42 stars 49 forks source link

Fix package size issue (post-added to v2.2.0 release from #65) #66

Closed holgerd77 closed 5 years ago

holgerd77 commented 5 years ago

Just realized that npm package includes both tests and docs folder leading to huge bundle sizes. I would like to post-add this to the release (haven't published yet) since this is not really acceptable, so I have also added this to the CHANGELOG and will npm publish with this merged.

Here is the output before/after:

npm notice 📦  ethereumjs-block@2.2.0
npm notice === Tarball Contents ===
npm notice 1.7kB   package.json
npm notice 679B    .travis.yml
npm notice 4.6kB   CHANGELOG.md
npm notice 1.9kB   from-rpc.js
npm notice 1.1kB   header-from-rpc.js
npm notice 9.1kB   header.js
npm notice 8.2kB   index.js
npm notice 1.1kB   karma.conf.js
npm notice 16.7kB  LICENSE
npm notice 1.3kB   README.md
npm notice 652B    docs/fromRpc.md
npm notice 7.9kB   docs/index.md
npm notice 342.8kB tests/bcBlockGasLimitTest.json
npm notice 3.9kB   tests/block.js
npm notice 3.1kB   tests/difficulty.js
npm notice 777.7kB tests/difficultyByzantium.json
npm notice 777.9kB tests/difficultyConstantinople.json
npm notice 777.8kB tests/difficultyFrontier.json
npm notice 777.7kB tests/difficultyHomestead.json
npm notice 777.7kB tests/difficultyMainNetwork.json
npm notice 777.7kB tests/difficultyRopstenByzantium.json
npm notice 777.7kB tests/difficultyRopstenConstantinople.json
npm notice 485B    tests/from-rpc.js
npm notice 1.5kB   tests/genesishashestest.json
npm notice 3.5kB   tests/header.js
npm notice 97B     tests/index.js
npm notice 5.9kB   tests/testdata-from-rpc.json
npm notice 10.3kB  tests/testdata.json
npm notice 15.6kB  tests/testdata2.json
npm notice === Tarball Details ===
npm notice name:          ethereumjs-block
npm notice version:       2.2.0
npm notice package size:  702.8 kB
npm notice unpacked size: 5.9 MB
npm notice shasum:        ddfe22d5cf276faa618cc6f7dce4db799b9a4911
npm notice integrity:     sha512-5MEaSglFyeOC0[...]OpW5V95pmHpEg==
npm notice total files:   29
npm notice
npm notice 📦  ethereumjs-block@2.2.0
npm notice === Tarball Contents ===
npm notice 1.7kB  package.json
npm notice 4.6kB  CHANGELOG.md
npm notice 1.9kB  from-rpc.js
npm notice 1.1kB  header-from-rpc.js
npm notice 9.1kB  header.js
npm notice 8.2kB  index.js
npm notice 1.1kB  karma.conf.js
npm notice 16.7kB LICENSE
npm notice 1.3kB  README.md
npm notice === Tarball Details ===
npm notice name:          ethereumjs-block
npm notice version:       2.2.0
npm notice filename:      ethereumjs-block-2.2.0.tgz
npm notice package size:  13.7 kB
npm notice unpacked size: 45.8 kB
npm notice shasum:        750c8d978600714a6e5dafae34f898de16c84166
npm notice integrity:     sha512-RQUF9Px/WvRzJ[...]7Iuz9nXF14z5w==
npm notice total files:   9
npm notice

Again: quick review would be good.

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 73.818% when pulling c899dc02237c2b1a5a88607c0d89846e28d32dab on remove-tests-from-dist into b8a3fbfd41586cdb3ec0e4fabc1062d7f2350c4a on master.

holgerd77 commented 5 years ago

Yes, let's please postpone since the super-top priority right now is to get the Petersburg releases out in time. Stuff like this will be addressed with the TypeScript transition anyhow.