web3.js
web3.js copied to clipboard
[DRAFT] implements setImmediate and remove its polyfill
Description
Implements setImmediate and remove its polyfills.
By the way, the setImmediate polyfills was added only inside web3-eth. But setImmediate was used in both web3-eth and web3-utils.
Type of change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
Checklist:
- [ ] I have selected the correct base branch.
- [ ] I have performed a self-review of my own code.
- [ ] I have commented my code, particularly in hard-to-understand areas.
- [ ] I have made corresponding changes to the documentation.
- [ ] My changes generate no new warnings.
- [ ] Any dependent changes have been merged and published in downstream modules.
- [ ] I ran
npm run lintwith success and extended the tests and types if necessary. - [ ] I ran
npm run test:unitwith success. - [ ] I ran
npm run test:coverageand my test cases cover all the lines and branches of the added code. - [ ] I ran
npm run buildand testeddist/web3.min.jsin 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.mdfile in the root folder. - [ ] I have linked Issue(s) with this PR in "Linked Issues" menu.
Deploying with
Cloudflare Pages
| Latest commit: |
40dd093
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://b098d855.web3-js-docs.pages.dev |
| Branch Preview URL: | https://implement-setimmediate.web3-js-docs.pages.dev |
Bundle Stats
Hey there, this message comes from a github action that helps you and reviewers to understand how these changes affect the size of this project's bundle.
As this PR is updated, I'll keep you updated on how the bundle size is impacted.
Total
| Asset | Old size | New size | Diff | Diff % |
|---|---|---|---|---|
| Total | 591 KB | 590 KB | -1.24 KB | -0.21% |
View detailed bundle breakdown
Added
No assets were added
Removed
No assets were removed
Bigger
No assets were bigger
Smaller
No assets were smaller
Unchanged
| Asset | Old size | New size | Diff | Diff % |
|---|---|---|---|---|
| web3.min.js | 573 KB | 572 KB | -1.24 KB | -0.22% |
| ../lib/commonjs/index.d.ts | 8.63 KB | 8.63 KB | 0 | 0.00% |
| ../lib/commonjs/accounts.d.ts | 3.89 KB | 3.89 KB | 0 | 0.00% |
| ../lib/commonjs/types.d.ts | 2.45 KB | 2.45 KB | 0 | 0.00% |
| ../lib/commonjs/web3.d.ts | 1.14 KB | 1.14 KB | 0 | 0.00% |
| ../lib/commonjs/abi.d.ts | 999 bytes | 999 bytes | 0 | 0.00% |
| ../lib/commonjs/eth.exports.d.ts | 280 bytes | 280 bytes | 0 | 0.00% |
| ../lib/commonjs/providers.exports.d.ts | 148 bytes | 148 bytes | 0 | 0.00% |
| ../lib/commonjs/version.d.ts | 60 bytes | 60 bytes | 0 | 0.00% |
Codecov Report
Merging #6624 (40dd093) into 4.x (0c67cc6) will decrease coverage by
1.08%. Report is 51 commits behind head on 4.x. The diff coverage is12.50%.
Additional details and impacted files
@@ Coverage Diff @@
## 4.x #6624 +/- ##
==========================================
- Coverage 91.46% 90.39% -1.08%
==========================================
Files 214 215 +1
Lines 8155 8263 +108
Branches 2193 2222 +29
==========================================
+ Hits 7459 7469 +10
- Misses 696 794 +98
| Flag | Coverage Δ | |
|---|---|---|
| UnitTests | 90.39% <12.50%> (-1.08%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Components | Coverage Δ | |
|---|---|---|
| web3 | ∅ <ø> (∅) |
|
| web3-core | ∅ <ø> (∅) |
|
| web3-errors | ∅ <ø> (∅) |
|
| web3-eth | ∅ <ø> (∅) |
|
| web3-eth-abi | ∅ <ø> (∅) |
|
| web3-eth-accounts | ∅ <ø> (∅) |
|
| web3-eth-contract | ∅ <ø> (∅) |
|
| web3-eth-ens | ∅ <ø> (∅) |
|
| web3-eth-iban | ∅ <ø> (∅) |
|
| web3-eth-personal | ∅ <ø> (∅) |
|
| web3-net | ∅ <ø> (∅) |
|
| web3-providers-http | ∅ <ø> (∅) |
|
| web3-providers-ipc | ∅ <ø> (∅) |
|
| web3-providers-ws | ∅ <ø> (∅) |
|
| web3-rpc-methods | ∅ <ø> (∅) |
|
| web3-utils | ∅ <ø> (∅) |
|
| web3-validator | ∅ <ø> (∅) |
Benchmark
| Benchmark suite | Current: 40dd093b13d0d52eb8b10dce84805bffccf6e0d9 | Previous: 6c075dba3fefa27c833e5c71bf91319ac2466b0b | Ratio |
|---|---|---|---|
processingTx |
9268 ops/sec (±3.98%) |
9301 ops/sec (±4.81%) |
1.00 |
processingContractDeploy |
39504 ops/sec (±7.97%) |
39129 ops/sec (±7.62%) |
0.99 |
processingContractMethodSend |
19289 ops/sec (±5.69%) |
19443 ops/sec (±5.19%) |
1.01 |
processingContractMethodCall |
39340 ops/sec (±5.05%) |
38971 ops/sec (±6.34%) |
0.99 |
abiEncode |
44288 ops/sec (±6.67%) |
44252 ops/sec (±6.92%) |
1.00 |
abiDecode |
31069 ops/sec (±6.66%) |
30419 ops/sec (±8.89%) |
0.98 |
sign |
1648 ops/sec (±1.23%) |
1656 ops/sec (±4.08%) |
1.00 |
verify |
373 ops/sec (±0.75%) |
373 ops/sec (±0.78%) |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
This PR has been automatically marked as stale because 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.