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: move @tanstack/react-query to peerDependencies for fix react-query context error #697

Merged
merged 5 commits into from
Mar 26, 2024

Conversation

yutingzhao1991
Copy link
Collaborator

[中文版模板 / Chinese template]

📝 Git Commit Message Convention

@tanstack/react-query 和 wagmi 一样应该是 peerDependencies,wagmi 中 peerDependencies 依赖了 @tanstack/react-query,wagmi 是 peerDependencies,@tanstack/react-query 应该也是 peerDependencies。不然构建工具打包的时候可能会重复构建多次 @tanstack/react-query,导致 context 不对。

issue 中出现的问题就是因为虽然在 @ant-design/web3-wagmi 中我们初始化并提供了 queryClient,但是在 wagmi 中使用的 react-query context 和 @ant-design/web3-wagmi 中的并不是同一个,所以会报没有初始化 queryClient。

🔗 Related issue link

close #501

Copy link

changeset-bot bot commented Mar 26, 2024

🦋 Changeset detected

Latest commit: 3e4fa79

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

This PR includes changesets to release 1 package
Name Type
@ant-design/web3-wagmi 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

Copy link

vercel bot commented Mar 26, 2024

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

Name Status Preview Comments Updated (UTC)
ant-design-web3 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 26, 2024 3:42am

Copy link

github-actions bot commented Mar 26, 2024

Copy link

codecov bot commented Mar 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (6ddd53e) to head (3e4fa79).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #697   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          651       651           
  Lines        17769     17769           
  Branches      1113      1113           
=========================================
  Hits         17769     17769           

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

docs/course/dev-connect.md Outdated Show resolved Hide resolved
docs/course/dev-connect.zh-CN.md Outdated Show resolved Hide resolved
docs/course/dev-connect.md Outdated Show resolved Hide resolved
packages/wagmi/package.json Outdated Show resolved Hide resolved
@jeasonstudio
Copy link
Collaborator

同理 viem@2.x 是否也应该改成 peerDependencies
https://wagmi.sh/react/getting-started#manual-installation

@yutingzhao1991
Copy link
Collaborator Author

同理 viem@2.x 是否也应该改成 peerDependencies https://wagmi.sh/react/getting-started#manual-installation

嗯,viem 也应该用户自己安装,文档里面加上了。另外我们的仓库里面直接依赖 wagmi 就行,我把 viem 的依赖去掉了。

@yutingzhao1991 yutingzhao1991 merged commit 176299c into main Mar 26, 2024
12 checks passed
@yutingzhao1991 yutingzhao1991 deleted the fix/react-query branch March 26, 2024 04:32
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.

Local environment development @ tanstack/react query dependency error
4 participants