Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@MiroslavPetrik
Copy link
Member

No description provided.

Copy link

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 upgrades the project from Zod v3 to Zod v4, updating API usage throughout the codebase to align with the new version's breaking changes.

Key Changes:

  • Updated Zod package version from 3.25.76 to 4.1.12
  • Replaced deprecated Schema["_output"] type accessors with z.output<Schema> utility type
  • Updated error message parameter from required_error to error across field definitions
  • Updated Zod issue codes (e.g., invalid_literalinvalid_value)

Reviewed Changes

Copilot reviewed 23 out of 24 changed files in this pull request and generated no comments.

Show a summary per file
File Description
package.json Updated Zod dependency from v3.25.76 to v4.1.12 in devDependencies and peerDependencies
src/fields/zod-field/zodField.ts Replaced Schema["_output"] with z.output<Schema> type helper
src/fields/zod-field/Docs.mdx Updated documentation to use z.output<Schema> type helper
src/hooks/use-multiselect-field-props/useMultiSelectFieldProps.tsx Removed ArrayCardinality import and updated type extraction to use z.infer<Value>
src/fields/string-field/stringField.ts Changed required_error parameter to error in z.string()
src/fields/number-field/numberField.ts Changed required_error parameter to error in z.number()
src/fields/date-field/dateField.ts Changed required_error parameter to error in z.date()
src/fields/boolean-field/booleanField.ts Changed required_error parameter to error in z.boolean()
src/fields/checkbox-field/checkboxField.ts Changed errorMap to error and updated issue code from invalid_literal to invalid_value
src/fields/list-field/listField.ts Replaced ZodAny with ZodObject, updated z.any() to z.object(), and changed error parameter syntax
src/fields/array-field/arrayField.ts Removed ArrayCardinality type parameter from ZodArray types
src/fields/files-field/filesField.ts Changed z.instanceof(File) to z.file()
src/components/select/Select.test.tsx Updated type extraction from schema["_output"] to z.output<typeof schema>
src/components/select/Select.stories.tsx Changed required_error parameter to error in z.object()
src/components/radio-group/RadioGroup.stories.tsx Changed required_error parameter to error in z.object()
Multiple test files Updated expected error messages to match Zod v4 format
src/fields/array-field/stringArrayField.test-d.ts Commented out test for non-empty array type, updated optional field type expectation
src/fields/files-field/filesField.test-d.ts Updated FilesField submit value type from [File, ...File[]] to File[]

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Oct 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.42%. Comparing base (8e42ceb) to head (8a96b27).
⚠️ Report is 2 commits behind head on next.

Additional details and impacted files
@@           Coverage Diff           @@
##             next     #129   +/-   ##
=======================================
  Coverage   80.42%   80.42%           
=======================================
  Files          39       39           
  Lines         332      332           
  Branches       61       61           
=======================================
  Hits          267      267           
  Misses         55       55           
  Partials       10       10           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@MiroslavPetrik MiroslavPetrik merged commit c5ccdc7 into next Oct 24, 2025
3 checks passed
github-actions bot pushed a commit that referenced this pull request Oct 24, 2025
# [6.0.0-next.1](v5.4.0...v6.0.0-next.1) (2025-10-24)

* Zod 4 ([#129](#129)) ([c5ccdc7](c5ccdc7))

### BREAKING CHANGES

* zod4 is now being used

* fix story
@github-actions
Copy link

🎉 This PR is included in version 6.0.0-next.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

MiroslavPetrik added a commit that referenced this pull request Oct 24, 2025
* Zod 4 (#129)

* fix(primitive-fields): update to zod4

* fix(array-fields): update types, don't use tuples

* feat(zod): up to 4

BREAKING CHANGE zod4 is now being used

* fix story

* chore(release): 6.0.0-next.1

# [6.0.0-next.1](v5.4.0...v6.0.0-next.1) (2025-10-24)

* Zod 4 ([#129](#129)) ([c5ccdc7](c5ccdc7))

### BREAKING CHANGES

* zod4 is now being used

* fix story

---------

Co-authored-by: semantic-release-bot <[email protected]>
@MiroslavPetrik MiroslavPetrik deleted the zod-4 branch October 24, 2025 19:57
github-actions bot pushed a commit that referenced this pull request Oct 24, 2025
# [6.0.0](v5.4.0...v6.0.0) (2025-10-24)

* Next ([#131](#131)) ([58e800f](58e800f)), closes [#129](#129)

### BREAKING CHANGES

* zod4 is now being used

* fix story

* chore(release): 6.0.0-next.1

# [6.0.0-next.1](v5.4.0...v6.0.0-next.1) (2025-10-24)

* Zod 4 ([#129](#129)) ([c5ccdc7](c5ccdc7))

### BREAKING CHANGES

* zod4 is now being used

* fix story
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants