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(cli): generated chain key type #1736

Merged
merged 1 commit into from
Jan 27, 2023
Merged

fix(cli): generated chain key type #1736

merged 1 commit into from
Jan 27, 2023

Conversation

tmm
Copy link
Member

@tmm tmm commented Jan 26, 2023

Description

Fix generated address object key type so it's alway a number. (Won't be a number in JS Object.keys still, which is fine. Just need it to be for type inference.)

Additional Information

Your ENS/address: awkweb.eth

@changeset-bot
Copy link

changeset-bot bot commented Jan 26, 2023

🦋 Changeset detected

Latest commit: dd77b9c

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

This PR includes changesets to release 1 package
Name Type
@wagmi/cli Patch

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 Jan 26, 2023

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

Name Status Preview Comments Updated
wagmi ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 26, 2023 at 11:51PM (UTC)

@tmm tmm force-pushed the tmm/cli-generated-chain-type branch from 40d0bf9 to dd77b9c Compare January 26, 2023 23:47
Comment on lines -5 to +9
"build": "pnpm -r --filter '@wagmi/chains' build && pnpm -r --filter '@wagmi/core' build && pnpm -r --filter './packages/**' --filter './references/packages/**' build",
"build": "pnpm --filter '@wagmi/chains' build && pnpm --filter '@wagmi/core' build && pnpm -r --filter './packages/**' --filter './references/**' --filter '!./packages/core' --filter '!./references/**/chains' build",
"changeset:release": "pnpm build && changeset publish",
"changeset:version": "changeset version && pnpm install --lockfile-only",
"cjs:release": "node -r esbuild-register ./scripts/cjs.ts",
"dev": "pnpm -r --filter '@wagmi/chains' build && pnpm -r --filter '@wagmi/connectors' --filter './packages/**' dev",
"dev": "pnpm --filter '@wagmi/chains' build && pnpm -r --filter './packages/**' --filter './references/**' --filter '!./references/**/chains' dev",
Copy link
Member Author

Choose a reason for hiding this comment

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

Cleaned up these scripts. Have some dependencies that pnpm is able to map out correctly with topo sort so handling it here.

@@ -68,7 +68,7 @@
},
"dependencies": {
"@ethersproject/address": "^5.7.0",
"@wagmi/chains": "^0.2.0",
"@wagmi/chains": "workspace:../../references/packages/chains",
Copy link
Member Author

Choose a reason for hiding this comment

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

Use workspace version instead of pinned

/^\s*"(\d)":/gm,
'$1:',
)
JSON.stringify(resolvedAddress, null, 2).replace(/"(\d*)":/gm, '$1:')
Copy link
Member Author

Choose a reason for hiding this comment

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

regex i used before only worked for single digits 🤦‍♂️

this one is much better: https://regexr.com/7700l

@tmm tmm requested a review from jxom January 26, 2023 23:51
@jxom jxom merged commit 7c43e43 into main Jan 27, 2023
@jxom jxom deleted the tmm/cli-generated-chain-type branch January 27, 2023 00:04
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.

2 participants