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

fix: fixes zod parsed abi's assignability to Abi #192

Merged
merged 7 commits into from
Oct 3, 2023
Merged

fix: fixes zod parsed abi's assignability to Abi #192

merged 7 commits into from
Oct 3, 2023

Conversation

Raiden1411
Copy link
Collaborator

@Raiden1411 Raiden1411 commented Oct 2, 2023

Description

Fixes (#189)

Additional Information

  • I read the contributing guide
  • I added documentation related to the changes made.
  • I added or updated tests related to the changes made.

Your ENS/address:


PR-Codex overview

This PR focuses on fixing an issue with Zod's parsed ABIs not being assignable to the Abi type.

Detailed summary

  • Fixed the issue where Zod's parsed ABIs were not assignable to the Abi type.
  • Updated the module setting in tsconfig.base.json to "NodeNext".
  • Added new tests in zod.test-d.ts to ensure Zod types are assignable to Abi.
  • Updated the AbiEventParameter type in zod.ts to include the stateMutability property.
  • Updated the build scripts in package.json to use the --moduleResolution node10 flag.
  • Updated the typesVersions field in package.json to include specific paths for types.

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

@changeset-bot
Copy link

changeset-bot bot commented Oct 2, 2023

🦋 Changeset detected

Latest commit: f26b63f

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

@commit-lint
Copy link

commit-lint bot commented Oct 2, 2023

Bug Fixes

  • fixes zod parsed abi's assignability to Abi (0edab06)
  • build errors on latest (90a10c1)

Chore

Tests

Contributors

Raiden1411, tmm

Commit-Lint commands

You can trigger Commit-Lint actions by commenting on this PR:

  • @Commit-Lint merge patch will merge dependabot PR on "patch" versions (X.X.Y - Y change)
  • @Commit-Lint merge minor will merge dependabot PR on "minor" versions (X.Y.Y - Y change)
  • @Commit-Lint merge major will merge dependabot PR on "major" versions (Y.Y.Y - Y change)
  • @Commit-Lint merge disable will desactivate merge dependabot PR
  • @Commit-Lint review will approve dependabot PR
  • @Commit-Lint stop review will stop approve dependabot PR

@vercel
Copy link

vercel bot commented Oct 2, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
abitype ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 3, 2023 3:48pm

@github-actions
Copy link
Contributor

github-actions bot commented Oct 2, 2023

Size Change: +35 B (0%)

Total Size: 48.4 kB

Filename Size Change
dist/cjs/zod.js 2.08 kB +18 B (+1%)
dist/esm/zod.js 1.91 kB +17 B (+1%)
ℹ️ View Unchanged
Filename Size
dist/cjs/abi.js 123 B
dist/cjs/config.js 126 B
dist/cjs/errors.js 577 B
dist/cjs/human-readable/errors/abiItem.js 537 B
dist/cjs/human-readable/errors/abiParameter.js 804 B
dist/cjs/human-readable/errors/signature.js 420 B
dist/cjs/human-readable/errors/splitParameters.js 404 B
dist/cjs/human-readable/errors/struct.js 338 B
dist/cjs/human-readable/formatAbi.js 294 B
dist/cjs/human-readable/formatAbiItem.js 420 B
dist/cjs/human-readable/formatAbiParameter.js 487 B
dist/cjs/human-readable/formatAbiParameters.js 313 B
dist/cjs/human-readable/parseAbi.js 348 B
dist/cjs/human-readable/parseAbiItem.js 439 B
dist/cjs/human-readable/parseAbiParameter.js 470 B
dist/cjs/human-readable/parseAbiParameters.js 527 B
dist/cjs/human-readable/runtime/cache.js 616 B
dist/cjs/human-readable/runtime/signatures.js 782 B
dist/cjs/human-readable/runtime/structs.js 1.03 kB
dist/cjs/human-readable/runtime/utils.js 2.13 kB
dist/cjs/human-readable/types/signatures-test-d.js 440 B
dist/cjs/human-readable/types/signatures.js 127 B
dist/cjs/human-readable/types/structs.js 127 B
dist/cjs/human-readable/types/utils.js 124 B
dist/cjs/index.js 743 B
dist/cjs/narrow.js 169 B
dist/cjs/regex.js 362 B
dist/cjs/test.js 597 B
dist/cjs/test/abis.js 5.93 kB
dist/cjs/test/human-readable.js 3.6 kB
dist/cjs/types.js 124 B
dist/cjs/utils.js 124 B
dist/cjs/version.js 149 B
dist/esm/abi.js 62 B
dist/esm/config.js 65 B
dist/esm/errors.js 524 B
dist/esm/human-readable/errors/abiItem.js 454 B
dist/esm/human-readable/errors/abiParameter.js 674 B
dist/esm/human-readable/errors/signature.js 339 B
dist/esm/human-readable/errors/splitParameters.js 345 B
dist/esm/human-readable/errors/struct.js 282 B
dist/esm/human-readable/formatAbi.js 214 B
dist/esm/human-readable/formatAbiItem.js 339 B
dist/esm/human-readable/formatAbiParameter.js 405 B
dist/esm/human-readable/formatAbiParameters.js 230 B
dist/esm/human-readable/parseAbi.js 267 B
dist/esm/human-readable/parseAbiItem.js 353 B
dist/esm/human-readable/parseAbiParameter.js 383 B
dist/esm/human-readable/parseAbiParameters.js 436 B
dist/esm/human-readable/runtime/cache.js 554 B
dist/esm/human-readable/runtime/signatures.js 572 B
dist/esm/human-readable/runtime/structs.js 948 B
dist/esm/human-readable/runtime/utils.js 2.04 kB
dist/esm/human-readable/types/signatures-test-d.js 367 B
dist/esm/human-readable/types/signatures.js 69 B
dist/esm/human-readable/types/structs.js 66 B
dist/esm/human-readable/types/utils.js 64 B
dist/esm/index.js 345 B
dist/esm/narrow.js 97 B
dist/esm/regex.js 284 B
dist/esm/test.js 298 B
dist/esm/test/abis.js 5.8 kB
dist/esm/test/human-readable.js 3.49 kB
dist/esm/types.js 64 B
dist/esm/utils.js 64 B
dist/esm/version.js 82 B

compressed-size-action

@codecov
Copy link

codecov bot commented Oct 2, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (77fe09a) 99.90% compared to head (f26b63f) 99.90%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #192   +/-   ##
=======================================
  Coverage   99.90%   99.90%           
=======================================
  Files          21       21           
  Lines        2048     2055    +7     
  Branches      325      325           
=======================================
+ Hits         2046     2053    +7     
  Misses          2        2           
Files Coverage Δ
src/zod.ts 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

.changeset/chilled-buckets-dance.md Outdated Show resolved Hide resolved
@tmm tmm merged commit 998fc3c into main Oct 3, 2023
15 checks passed
@tmm tmm deleted the fix/189 branch October 3, 2023 15:49
@github-actions github-actions bot mentioned this pull request Oct 3, 2023
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

2 participants