Skip to content

Conversation

@Ansonhkg
Copy link
Collaborator

@Ansonhkg Ansonhkg commented Oct 16, 2025

WHAT

We have a viem version conflicts because the viem version we bundled in the SDK is not the same as the one wagmi is using internally. To fix this, we need to move viem from dependencies into peerDependencies for @lit-protocol/auth, auth-helpers, lit-client, and networks packages, so consumers will supply their own compatible viem versions.

  • (❗️Note) This PR contains a minor changeset

FIX

SyntaxError: The requested module 'viem/actions' does not provide an export named 'sendCallsSync'
image
  • This will also fix the type mismatch error from Viem that users have to cast :any atm.

TEST

Snapshots are published for the following packages:

🦋  New tag:  @lit-protocol/[email protected]
🦋  New tag:  @lit-protocol/[email protected]
🦋  New tag:  @lit-protocol/[email protected]
🦋  New tag:  @lit-protocol/[email protected]
🦋  New tag:  @lit-protocol/[email protected]
🦋  New tag:  @lit-protocol/[email protected]
🦋  New tag:  @lit-protocol/[email protected]
🦋  New tag:  @lit-protocol/[email protected]

Relevant PRs and Issues

Copilot AI review requested due to automatic review settings October 16, 2025 15:46
@Ansonhkg Ansonhkg added 🐞 Bug Fix Something isn't working v8 | Naga labels Oct 16, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the viem dependency management by moving viem from direct dependencies to peerDependencies across four key packages. This allows consuming applications to manage their own viem version while ensuring compatibility.

  • Moved viem from dependencies to peerDependencies in four packages
  • Changed viem version constraint from exact (2.29.4) to compatible (^2.29.4)
  • Maintained existing peerDependencies structure where applicable

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
packages/networks/package.json Moved viem from dependencies to new peerDependencies section
packages/lit-client/package.json Moved viem from dependencies to new peerDependencies section
packages/auth/package.json Moved viem from dependencies to existing peerDependencies section
packages/auth-helpers/package.json Moved viem from dependencies to new peerDependencies section

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

"@noble/hashes": "^1.8.0"
},
"peerDependencies": {
"viem": "^2.29.4"
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

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

The version constraint changed from exact version '2.29.4' to compatible version '^2.29.4'. This allows patch and minor version updates which could introduce breaking changes in viem's API. Consider using a more restrictive constraint like '~2.29.4' to only allow patch updates, or document the supported viem version range.

Suggested change
"viem": "^2.29.4"
"viem": "~2.29.4"

Copilot uses AI. Check for mistakes.
"zod": "3.24.3"
},
"peerDependencies": {
"viem": "^2.29.4"
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

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

The version constraint changed from exact version '2.29.4' to compatible version '^2.29.4'. This allows patch and minor version updates which could introduce breaking changes in viem's API. Consider using a more restrictive constraint like '~2.29.4' to only allow patch updates, or document the supported viem version range.

Suggested change
"viem": "^2.29.4"
"viem": "~2.29.4"

Copilot uses AI. Check for mistakes.
"peerDependencies": {
"tslib": "^2.3.0"
"tslib": "^2.3.0",
"viem": "^2.29.4"
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

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

The version constraint changed from exact version '2.29.4' to compatible version '^2.29.4'. This allows patch and minor version updates which could introduce breaking changes in viem's API. Consider using a more restrictive constraint like '~2.29.4' to only allow patch updates, or document the supported viem version range.

Suggested change
"viem": "^2.29.4"
"viem": "~2.29.4"

Copilot uses AI. Check for mistakes.
"@ethersproject/transactions": "5.7.0"
},
"peerDependencies": {
"viem": "^2.29.4"
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

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

The version constraint changed from exact version '2.29.4' to compatible version '^2.29.4'. This allows patch and minor version updates which could introduce breaking changes in viem's API. Consider using a more restrictive constraint like '~2.29.4' to only allow patch updates, or document the supported viem version range.

Suggested change
"viem": "^2.29.4"
"viem": "~2.29.4"

Copilot uses AI. Check for mistakes.
@Ansonhkg Ansonhkg added the Minor label Oct 17, 2025
@Ansonhkg Ansonhkg self-assigned this Oct 18, 2025
…ckages which should include the `sendCallsSync` function what wagmi is looking for.

Snapshot published:
🦋  New tag:  @lit-protocol/[email protected]
🦋  New tag:  @lit-protocol/[email protected]
🦋  New tag:  @lit-protocol/[email protected]
🦋  New tag:  @lit-protocol/[email protected]
🦋  New tag:  @lit-protocol/[email protected]
🦋  New tag:  @lit-protocol/[email protected]
🦋  New tag:  @lit-protocol/[email protected]
🦋  New tag:  @lit-protocol/[email protected]
@Ansonhkg
Copy link
Collaborator Author

New snapshots published:

🦋  New tag:  @lit-protocol/auth@0.0.0-20251020130647
🦋  New tag:  @lit-protocol/auth-helpers@0.0.0-20251020130647
🦋  New tag:  @lit-protocol/auth-services@0.0.0-20251020130647
🦋  New tag:  @lit-protocol/constants@0.0.0-20251020130647
🦋  New tag:  @lit-protocol/contracts@0.0.0-20251020130647
🦋  New tag:  @lit-protocol/e2e@0.0.0-20251020130647
🦋  New tag:  @lit-protocol/lit-client@0.0.0-20251020130647
🦋  New tag:  @lit-protocol/networks@0.0.0-20251020130647

@Ansonhkg
Copy link
Collaborator Author

New snapshots published:

🦋  New tag:  @lit-protocol/auth@0.0.0-20251020130647
🦋  New tag:  @lit-protocol/auth-helpers@0.0.0-20251020130647
🦋  New tag:  @lit-protocol/auth-services@0.0.0-20251020130647
🦋  New tag:  @lit-protocol/constants@0.0.0-20251020130647
🦋  New tag:  @lit-protocol/contracts@0.0.0-20251020130647
🦋  New tag:  @lit-protocol/e2e@0.0.0-20251020130647
🦋  New tag:  @lit-protocol/lit-client@0.0.0-20251020130647
🦋  New tag:  @lit-protocol/networks@0.0.0-20251020130647

This has been tested by customer and is now working:
#958 (comment)

@Ansonhkg Ansonhkg merged commit 8ba4b2a into naga Oct 20, 2025
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 Bug Fix Something isn't working Minor v8 | Naga

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants