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

add __PURE__ annotations to source code #687

Merged
merged 6 commits into from Jun 11, 2023
Merged

Conversation

jeetiss
Copy link
Contributor

@jeetiss jeetiss commented Jun 9, 2023

this is the second part of


PR-Codex overview

This PR adds /*#__PURE__*/ annotations for better tree-shaking and makes other minor changes like using Array.from instead of spread syntax.

Detailed summary

  • Added /*#__PURE__*/ annotations for better tree-shaking
  • Replaced spread syntax with Array.from
  • Wrapped defineBlock, defineTransactionReceipt, defineTransactionRequest, and defineTransaction in /*#__PURE__*/
  • Wrapped Map and TextEncoder in /*#__PURE__*/
  • Added formatters object to celo chain definition

The following files were skipped due to too many changes: src/chains.ts

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@changeset-bot
Copy link

changeset-bot bot commented Jun 9, 2023

🦋 Changeset detected

Latest commit: da66f26

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Jun 9, 2023

@jeetiss is attempting to deploy a commit to the wagmi Team on Vercel.

A member of the Team first needs to authorize it.

@jeetiss jeetiss mentioned this pull request Jun 9, 2023
@codecov
Copy link

codecov bot commented Jun 9, 2023

Codecov Report

Merging #687 (1403d2c) into main (fe259a0) will decrease coverage by 4.88%.
The diff coverage is 91.24%.

❗ Current head 1403d2c differs from pull request most recent head da66f26. Consider uploading reports for the commit da66f26 to get more accurate results

@@            Coverage Diff             @@
##             main     #687      +/-   ##
==========================================
- Coverage   99.86%   94.98%   -4.88%     
==========================================
  Files         250      246       -4     
  Lines       23761    23575     -186     
  Branches     2051     1741     -310     
==========================================
- Hits        23728    22393    -1335     
- Misses         31     1170    +1139     
- Partials        2       12      +10     
Impacted Files Coverage Δ
src/chains.ts 93.22% <90.00%> (-6.78%) ⬇️
src/utils/encoding/toBytes.ts 96.35% <100.00%> (-3.65%) ⬇️
src/utils/encoding/toHex.ts 99.12% <100.00%> (-0.88%) ⬇️
src/utils/formatters/block.ts 100.00% <100.00%> (ø)
src/utils/formatters/transaction.ts 100.00% <100.00%> (ø)
src/utils/formatters/transactionReceipt.ts 100.00% <100.00%> (ø)
src/utils/formatters/transactionRequest.ts 100.00% <100.00%> (ø)
src/utils/observe.ts 100.00% <100.00%> (ø)
src/utils/promise/createBatchScheduler.ts 100.00% <100.00%> (ø)
src/utils/promise/withCache.ts 100.00% <100.00%> (ø)
... and 1 more

... and 51 files with indirect coverage changes

Copy link
Collaborator

@fubhy fubhy left a comment

Choose a reason for hiding this comment

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

LGTM!

@fubhy
Copy link
Collaborator

fubhy commented Jun 10, 2023

Good catch with the removeComments flag.

@jxom
Copy link
Member

jxom commented Jun 11, 2023

download (4)

@jxom jxom merged commit a274ab3 into wevm:main Jun 11, 2023
10 of 13 checks passed
@github-actions github-actions bot mentioned this pull request Jun 11, 2023
@jeetiss jeetiss deleted the pure-annotations branch June 11, 2023 09:08
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

Successfully merging this pull request may close these issues.

None yet

3 participants