code-connect icon indicating copy to clipboard operation
code-connect copied to clipboard

Zod v4 Compatibility Support

Open TakutoAndo0401 opened this issue 4 months ago • 1 comments

Problem Description

Our project uses Zod v4.0.17, but Figma Code Connect currently depends on Zod v3, causing compatibility issues that prevent us from using Code Connect in our design system.

Current Situation

  • Project Zod version: 4.0.17
  • Code Connect Zod version: v3.x

Requested Feature

Update Figma Code Connect to support Zod v4, or provide compatibility layer to work with projects using Zod v4.

Use Case

We maintain a large-scale design system with Feature-Sliced Design architecture and extensive API schema validation using Zod v4. Code Connect would significantly improve our design-development workflow, but the Zod version incompatibility prevents adoption.

Proposed Solutions

  1. Upgrade Code Connect's Zod dependency to v4
  2. Provide dual compatibility for both v3 and v4
  3. Use Zod's subpath imports (zod/v3) for backward compatibility

Additional Context

  • Zod v4 includes backward compatibility features via subpath imports
  • Many other libraries in the ecosystem are migrating to v4
  • This would benefit other projects facing similar compatibility issues

Environment

  • Node.js: v22
  • Package manager: pnpm
  • Framework: Next.js 15, React 19
  • TypeScript: v5

TakutoAndo0401 avatar Aug 22 '25 09:08 TakutoAndo0401

Thanks for the report @TakutoAndo0401! Will discuss this with the team and aim to include in our next release.

slees-figma avatar Aug 26 '25 10:08 slees-figma