Skip to content
This repository has been archived by the owner on Apr 6, 2020. It is now read-only.

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

Merged
merged 1 commit into from
Feb 6, 2019

Conversation

holgerd77
Copy link
Member

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.

@holgerd77 holgerd77 requested review from s1na and danjm February 6, 2019 11:55
@coveralls
Copy link

Coverage Status

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

Copy link
Contributor

@s1na s1na left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!
One suggestion is to put the source files in the dir src/, have a fake build script which simply copies the files to dist/, and in package.json set files: ["dist"], to make what is exported explicit and make it consistent with other projects, until we use babel or typescript here.

If you think it's out of scope of this PR we can postpone.

@holgerd77
Copy link
Member Author

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.

@holgerd77 holgerd77 merged commit c5dcbbc into master Feb 6, 2019
@holgerd77 holgerd77 deleted the remove-tests-from-dist branch February 6, 2019 12:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants