chore: upgrade to ENSv2 (Universal Resolver) - #1586
Conversation
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@Dhaiwat10 is attempting to deploy a commit to the pro-components Team on Vercel. A member of the Team first needs to authorize it. |
|
📝 WalkthroughWalkthroughviem 依赖版本在根目录及四个子包的 package.json 中从 ^2.33.2 升级到 ^2.35.0。wagmi 包同时更新了 peerDependencies 中 viem 的最低版本要求从 >=2.0.0 升级至 >=2.35.0。 Changesviem 依赖版本升级
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request updates the viem dependency to version ^2.35.0 across multiple packages in the repository. A review comment suggests changing the version range for viem in the peerDependencies of packages/wagmi/package.json from >=2.35.0 to ^2.35.0 to ensure consistency with other package configurations and to protect against potential breaking changes in future major versions.
| "peerDependencies": { | ||
| "@tanstack/react-query": "^5.51.11", | ||
| "viem": ">=2.0.0", | ||
| "viem": ">=2.35.0", |
There was a problem hiding this comment.
The version range for viem in peerDependencies uses >=2.35.0, which is inconsistent with the ^2.35.0 range used in devDependencies (line 55) and other packages in this PR. To ensure consistency and protect against potential breaking changes in future major versions of viem, it is recommended to use ^2.35.0 here as well.
| "viem": ">=2.35.0", | |
| "viem": "^2.35.0", |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/wagmi/package.json (1)
60-60: 为viem的 peer 依赖范围增加主版本上限当前 Line 60 的
>=2.35.0会接受 viem 的主版本升级。建议改为>=2.35.0 <3以防止未来主版本变更引入破坏性 API 更新。建议修改
- "viem": ">=2.35.0", + "viem": ">=2.35.0 <3",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/wagmi/package.json` at line 60, 更新 packages/wagmi/package.json 中对依赖 "viem" 的范围,当前写法 ">=2.35.0" 会允许主版本升级,改为限定主版本上限 ">=2.35.0 <3"(即将 "viem" 的 peer 依赖范围从 ">=2.35.0" 更改为 ">=2.35.0 <3")以避免未来 viem 的主版本引入破坏性变更。
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@packages/wagmi/package.json`:
- Line 60: 更新 packages/wagmi/package.json 中对依赖 "viem" 的范围,当前写法 ">=2.35.0"
会允许主版本升级,改为限定主版本上限 ">=2.35.0 <3"(即将 "viem" 的 peer 依赖范围从 ">=2.35.0" 更改为 ">=2.35.0
<3")以避免未来 viem 的主版本引入破坏性变更。
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 7fc952a8-f7f8-4acb-9827-61aba344fc4b
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (5)
package.jsonpackages/eth-web3js/package.jsonpackages/ethers-v5/package.jsonpackages/ethers/package.jsonpackages/wagmi/package.json

💡 Background and solution
Hey! I'm Dhaiwat from DevRel at ENS Labs, and I'm working with library maintainers across the ecosystem to get them ready for ENSv2.
This PR routes ENS resolution in
@ant-design/web3-wagmithrough the Universal Resolver (ENSv2) instead of the legacy ENS registry. The only ENS resolution call sites in this repo areuseEnsNameanduseEnsAvatarinpackages/wagmi/src/wagmi-provider/config-provider.tsx. Wagmi inherits its ENS support from itsviempeer, and viem first shipped Universal Resolver support in2.35.0, so the load-bearing change is making sure consumers of@ant-design/web3-wagmicannot install a viem older than that.viempeer dependency inpackages/wagmi/package.jsonis tightened from>=2.0.0to>=2.35.0. Without this, a downstream consumer could install an older viem and silently fall back to legacy ENS resolution, bypassing the Universal Resolver and CCIP-Read.viemdev/runtime dependency is bumped from^2.33.2to^2.35.0inpackages/wagmi,packages/eth-web3js,packages/ethers,packages/ethers-v5, and the workspace root, so CI and local development run against the ENSv2 path.2.48.8..resolveName,.lookupAddress, or.getResolvercall sites in the repo. The ethers adapters inpackages/ethersandpackages/ethers-v5only construct providers and do not perform ENS lookups themselves..eth.ens.*call sites.web3is a peer of@ant-design/web3-eth-web3js, but ENS resolution in that adapter is delegated to the wagmi provider.You can read more about ENSv2 readiness here: https://docs.ens.domains/web/ensv2-readiness
🔗 Related issue link
n/a — happy to open one if you want me to!