Skip to content
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

Why did you use exact versions of common dependencies such us BN.js #14

Open
serjout opened this issue Nov 9, 2017 · 6 comments
Open

Comments

@serjout
Copy link

serjout commented Nov 9, 2017

In package.json for all dependencies defined exact version. It is actuall for all ethjs-* libs and produce unoptimized code in client bundle.

What is reason for this?

@SilentCicero
Copy link
Member

SilentCicero commented Nov 9, 2017 via email

@serjout
Copy link
Author

serjout commented Nov 10, 2017

Every stable and production ready lib should follows semver convention. If you wary about unexpected bugs, you can write tests for critical code parts.

In current situation my client bundle contains >3 different copy of BN.js. And this copies are compatible via semver convention. It is not good, cause increase bundle size and time to parse and execute code.

But thank you for your answer.

@serjout serjout changed the title Why did you use exact versions of common dependencies such ua BN.js Why did you use exact versions of common dependencies such us BN.js Nov 10, 2017
@SilentCicero
Copy link
Member

SilentCicero commented Nov 10, 2017 via email

@SilentCicero
Copy link
Member

@serjout any idea on what modules we can clean that up pretty easily.

@olegdeezus
Copy link

Now I tell you cool story, folks. There is one different reason. bn.js@4.11.6 has misspelling at line 53 - "require('buf' + 'fer')" instead of "require('buffer')". It is not a quite big problem, but not in my case. ethjs-abi is in dependencies tree of my project. But it runs on react-native, which use babel for resolving dependencies. And babel can not resolve dynamic require strings. So, I received error. And I need greater version of bn.js

@SilentCicero
Copy link
Member

SilentCicero commented Jan 11, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants