code-connect
code-connect copied to clipboard
Zod v4 Compatibility Support
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
- Upgrade Code Connect's Zod dependency to v4
- Provide dual compatibility for both v3 and v4
- 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
Thanks for the report @TakutoAndo0401! Will discuss this with the team and aim to include in our next release.