Skip to content

fix: move zod to dependencies (fixes #260)#261

Merged
dohaki merged 1 commit intomasterfrom
fix/zod-runtime-dep
Apr 27, 2026
Merged

fix: move zod to dependencies (fixes #260)#261
dohaki merged 1 commit intomasterfrom
fix/zod-runtime-dep

Conversation

@dohaki
Copy link
Copy Markdown
Collaborator

@dohaki dohaki commented Apr 27, 2026

Summary

  • Move zod from devDependencies to dependencies in packages/sdk/package.json so consumers' build tools can resolve it.
  • The SDK imports zod at runtime from src/api/{suggested-fees,swap-approval,available-routes,validators}.ts. Since 0.5.0 these imports surface in the published dist/, breaking consumers (e.g. Vite/Rollup) without zod transitively in their tree.
  • Adds a patch changeset.

Fixes #260.

Test plan

  • pnpm install succeeds and updates the lockfile.
  • pnpm --filter @across-protocol/app-sdk build succeeds.
  • Verify a downstream Vite app without zod in its tree builds against a locally packed tarball.

🤖 Generated with Claude Code

The SDK imports zod at runtime in api/ modules, but it was only
declared as a devDependency. Consumers without zod transitively
in their tree failed at build with "Rollup failed to resolve
import \"zod\"". Fixes #260.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 27, 2026

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

Project Deployment Actions Updated (UTC)
toolkit-example Ready Ready Preview, Comment Apr 27, 2026 8:43am

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 27, 2026

🦋 Changeset detected

Latest commit: d0a6693

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

This PR includes changesets to release 1 package
Name Type
@across-protocol/app-sdk 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
Copy Markdown
Collaborator

@gsteenkamp89 gsteenkamp89 left a comment

Choose a reason for hiding this comment

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

Nice thanks @dohaki

@dohaki dohaki merged commit 76a569d into master Apr 27, 2026
3 checks passed
@dohaki dohaki deleted the fix/zod-runtime-dep branch April 27, 2026 08:55
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.

Build fails with unresolved zod import after upgrading to 0.5.0

3 participants