Closed a11rew closed 2 years ago
Hi @a11rew.
At DePay we have long dependency chains for our npm packages. Having intermediates like depay-web3-mock enforcing it's own version in our final libraries causes problems down the road for us. A peer dependency still points out the immediate next step without enforcing anything:
yarn add depay-web3-blockchains
It should have given you a warning upon installation of depay-web3-mock that you're missing that dependency.
We rather live with an additional step at this point over having depay-web3-mock fix a version in final npm packages which would endup with e.g. 2 versions for depay-web3-blockchains otherwise.
The classic npm multiversion dilemma: https://nodejs.org/en/blog/npm/peer-dependencies/
Best Sebastian
Fair, thanks @spape
Absolutely love the library btw, would PRs adding Typescript type definitions be welcome? @spape
Yes, we are open to add Typescript definitions - Thank you 🙏
have added it to the installation instruction: https://github.com/DePayFi/web3-mock#quickstart
🙏 thanks again
Awesome!
depay-web3-blockchains
is currently listed as a [peer & dev]-dependency. It is not installed along withdepay-web3-mock
and throws a missing module error on import.Error repro:
Save for me missing something, it should be listed in the package's dependencies