web3.js
web3.js copied to clipboard
web3-eth-accounts: Update to latest version of uuid package
This change updates to the latest version of uuid, to fix an issue with Math.random() (displayed in a warning on install). Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
Type of change
- [x] Bug fix (non-breaking change which fixes an issue)
Checklist:
- [x] I have selected the correct base branch.
- [x] I have performed a self-review of my own code.
- [x] I have commented my code, particularly in hard-to-understand areas.
- [ ] I have made corresponding changes to the documentation.
- [x] My changes generate no new warnings.
- [ ] Any dependent changes have been merged and published in downstream modules.
- [x] I ran
npm run dtslint
with success and extended the tests and types if necessary. - [x] I ran
npm run test:unit
with success. - [x] I ran
npm run test:cov
and my test cases cover all the lines and branches of the added code. - [ ] I ran
npm run build
and testeddist/web3.min.js
in a browser. - [ ] I have tested my code on the live network.
- [ ] I have checked the Deploy Preview and it looks correct.
- [ ] I have updated the
CHANGELOG.md
file in the root folder.
Because the web3-eth-accounts
module uses uuid
with the random
option, it appears to be unaffected by the issue described in my commit message. However it doesn't hurt to update the dependency and prevent a potentially misleading warning message from appearing.
@jdevcs Done, btw, should the dist files be generated in an npm prepack
stage instead of committed to version control?
@jdevcs Done, btw, should the dist files be generated in an
npm prepack
stage instead of committed to version control?
Thanks @LucianBuzzo , We dnt commit dist files in feature, bug fix or lib-update PRs.
@spacesailor24 @luu-alex Review/approval for uuid lib update.
Pull Request Test Coverage Report for Build 3003772251
- 0 of 0 changed or added relevant lines in 0 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage decreased (-0.01%) to 74.504%
Totals | |
---|---|
Change from base Build 3001839430: | -0.01% |
Covered Lines: | 3274 |
Relevant Lines: | 4140 |
💛 - Coveralls
Hey thank you for this PR :) from what it seems in the codebase we only use uuid
once. It does look like the method is affected by the version upgrade but it is not breaking.
Perhaps adding a unit testcase using uuid.v4()
with the attribute random as an arg wouldn't hurt. Thoughts?
Also updating the changelog and detailing the change
@LucianBuzzo please merge down 1.x branch into your branch and fix merge conflicts. Thanks
This PR has been automatically marked as stale beacause it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.