Skip to content

fix multiple react contexts caused by peer dependency duplicates#73

Merged
elenamik merged 12 commits into
mainfrom
feature/peer-deps
Sep 29, 2025
Merged

fix multiple react contexts caused by peer dependency duplicates#73
elenamik merged 12 commits into
mainfrom
feature/peer-deps

Conversation

@elenamik

Copy link
Copy Markdown
Contributor
  • fix peer deps
  • tweak deps
  • lock file
  • fix app errors
  • peer dep battle
  • peer dep battle
  • resolve peer deps

Pull Request

Checklist

  • If this PR changes a package, I’ve added an entry to .changesets (see CONTRIBUTING.md)

Description

@changeset-bot

changeset-bot Bot commented Sep 29, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ac5ff24

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

This PR includes changesets to release 3 packages
Name Type
@valence-protocol/domain-clients-core Minor
@valence-protocol/domain-modal-react Major
@valence-protocol/domain-clients-react Major

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

vercel Bot commented Sep 29, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
valence-ts-example Ready Ready Preview Sep 29, 2025 10:26pm

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @elenamik, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily addresses issues related to multiple React contexts arising from duplicate peer dependencies across the monorepo. By standardizing dependency versions through explicit peerDependencies and overrides, and refining build configurations, the changes aim to create a more stable and predictable dependency environment. The example application has also been updated to reflect these changes and integrate @tanstack/react-query more seamlessly, ensuring a robust foundation for future development.

Highlights

  • Peer Dependency Resolution: Multiple package.json files across the monorepo have been updated to specify exact versions for peer dependencies, including @cosmjs/*, react, react-dom, wagmi, viem, graz, gill, and @tanstack/react-query. A new overrides section has been added to the root package.json to enforce consistent versions for critical dependencies, aiming to prevent duplicate React contexts and other dependency-related issues.
  • React Query Integration: The example application's README.md and package.json now reflect the explicit installation and usage of @tanstack/react-query. The AppProviders component in the example app has been updated to include a ReactQueryProvider, indicating its integration into the application's context structure.
  • Build Configuration Enhancements: The tsup.config.ts files for domain-clients-react and domain-modal-react packages have been modified to dynamically exclude all peer dependencies from their bundles. This ensures that peer dependencies are correctly managed by the consuming application, reducing bundle size and potential conflicts.
  • Example Application Refinements: Minor adjustments have been made within the apps/domain-clients-example to improve functionality and address linting issues. This includes adding dark mode styles, updating useEffect and useCallback dependency arrays, commenting out a getSolanaSplBalance call, and adding eslint-disable-next-line directives where appropriate.
  • Styling and Theming: Dark mode styles have been introduced in apps/domain-clients-example/src/app/globals.css to enhance the user experience. Additionally, packages/domain-modal-react/tailwind.config.js now includes a prefix for Tailwind CSS classes, helping to avoid styling conflicts.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request focuses on resolving peer dependency issues across the monorepo, primarily by updating dependency versions and using pnpm's overrides feature. The changes also include build configuration improvements to automatically handle peer dependencies as external, which is a great enhancement. My review includes a couple of suggestions for improving code clarity and fixing a typo in the documentation.

Comment thread README.md
Comment thread apps/domain-clients-example/src/components/solana/SolanaOps.tsx
@elenamik elenamik merged commit b84d219 into main Sep 29, 2025
3 of 5 checks passed
@elenamik elenamik deleted the feature/peer-deps branch September 29, 2025 22:24
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.

1 participant