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

chore: export network utils #3032

Merged
merged 4 commits into from
Oct 8, 2024

Conversation

enesozturk
Copy link
Contributor

@enesozturk enesozturk commented Oct 8, 2024

Description

Export defineChain util function so users can get benefit of type strict custom network objects.

Type of change

  • Chore (non-breaking change that addresses non-functional tasks, maintenance, or code quality improvements)
  • 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)

Associated Issues

For Linear issues: Closes APKT-xxx
For GH issues: closes #...

Showcase (Optional)

If there is a UI change include the screenshots with before and after state.
If new feature is being introduced, include the link to demo recording.

Checklist

  • Code in this PR is covered by automated tests (Unit tests, E2E tests)
  • My changes generate no new warnings
  • I have reviewed my own code
  • I have filled out all required sections
  • I have tested my changes on the preview link
  • Approver of this PR confirms that the changes are tested on the preview link

Copy link

changeset-bot bot commented Oct 8, 2024

🦋 Changeset detected

Latest commit: b23ff65

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

Copy link

vercel bot commented Oct 8, 2024

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

Name Status Preview Updated (UTC)
appkit-laboratory ✅ Ready (Inspect) Visit Preview Oct 8, 2024 0:04am
web3modal-gallery ✅ Ready (Inspect) Visit Preview Oct 8, 2024 0:04am

Copy link
Contributor

github-actions bot commented Oct 8, 2024

Coverage Report for Coverage

Status Category Percentage Covered / Total
🔵 Lines 321.55000000000007% 4410 / 19232
🔵 Statements 321.55000000000007% 4410 / 19232
🔵 Functions 343.60999999999996% 346 / 1029
🔵 Branches 380.2% 636 / 1326
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
packages/appkit/src/networks/index.ts 100% 100% 100% 100%
Generated in workflow #6663 for commit b23ff65 by the Vitest Coverage Report Action

Copy link
Contributor

github-actions bot commented Oct 8, 2024

♻️ Vite-Size ♻️

Size Difference

Size (kb) Gzip (kb)
Total Diff. 0 0

Current Size

Name Size (kb) Gzip (kb)
assets/index-XWC1J5l2.js 1894.006 540.659
assets/index.js 9.642 3.15
assets/index2.js 11.588 3.21
assets/w3m-modal.js 7.504 2.656
assets/noble-curves.js 31.941 12.779
assets/2.21.4_bufferutil.js 2.789 1.328
assets/index3.js 102.251 29.116
assets/index4.js 304.393 87.286
assets/hooks.module.js 74.286 25.525
index.html 0.329 0.238
Total Size 2438.729 705.947

Base Size

Name Size (kb) Gzip (kb)
assets/index-XWC1J5l2.js 1894.006 540.659
assets/index.js 9.642 3.15
assets/index2.js 11.588 3.21
assets/w3m-modal.js 7.504 2.656
assets/noble-curves.js 31.941 12.779
assets/2.21.4_bufferutil.js 2.789 1.328
assets/index3.js 102.251 29.116
assets/index4.js 304.393 87.286
assets/hooks.module.js 74.286 25.525
index.html 0.329 0.238
Total Size 2438.729 705.947

@@ -2,5 +2,8 @@
export * from 'viem/chains'
export * from './solana/index.js'

// -- Utils ------------------------------------------------------------------
export * from './utils.js'
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we export only what's needed? or is it all needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since there is only one module + since it's easier to not miss new added utils, this would make sense to export from utils file directly

@enesozturk enesozturk merged commit 2b1d72a into main Oct 8, 2024
17 checks passed
@enesozturk enesozturk deleted the chore/export-define-chain-method-in-networks branch October 8, 2024 12:25
@github-actions github-actions bot mentioned this pull request Oct 8, 2024
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.

3 participants