Skip to content

Conversation

@ymc9
Copy link
Member

@ymc9 ymc9 commented Oct 31, 2025

Summary by CodeRabbit

  • Breaking Changes

    • Removed SWR plugin support
  • Chores

    • Updated pnpm from 10.12.1 to 10.20.0
    • Upgraded Zod from 3.25.0 to 4.1.0 (major version)
  • Bug Fixes

    • Improved validation error handling for decimal values with enhanced issue mapping and error reporting

Copilot AI review requested due to automatic review settings October 31, 2025 22:22
@coderabbitai
Copy link

coderabbitai bot commented Oct 31, 2025

Warning

Rate limit exceeded

@ymc9 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 1 minutes and 13 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between b69a71b and 84931a6.

📒 Files selected for processing (2)
  • packages/orm/src/client/crud/validator/utils.ts (3 hunks)
  • packages/orm/src/utils/zod-utils.ts (1 hunks)

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

This PR upgrades Zod from v3 to v4, updates validator type annotations from ZodSchema to ZodType, modifies error handling in decimal validation utilities, updates the package manager to [email protected], and reformats test schema files with double-quoted strings and consolidated imports.

Changes

Cohort / File(s) Summary
Configuration & Package Updates
BREAKINGCHANGES.md, package.json, packages/orm/package.json, packages/server/package.json, packages/zod/package.json, pnpm-workspace.yaml
Updated Zod from ~3.25.0 to ^4.1.0 across packages; updated pnpm from 10.12.1 to 10.20.0; narrowed workspace zod constraint to ^4.0.0 only; added SWR plugin removal to breaking changes
ORM Validator Type & Logic Updates
packages/orm/src/client/crud/validator/index.ts
Changed all validator function return types and internal schemas from ZodSchema to ZodType; updated imports to remove ZodSchema; added explicit any typing to refine callback parameters
ORM Validator Error Handling
packages/orm/src/client/crud/validator/utils.ts
Modified decimal validation error transformation to map error.issues into tailored Zod issues (too_small/too_big) with metadata; updated applyValidation refine options type inference and renamed error parameter from message to error
Test Utilities
packages/testtools/src/vitest-ext.ts
Changed error message matching to be case-insensitive by converting both expected and actual messages to lowercase
Test Schema Files (basic, delegate, name-mapping, petstore, todo, typing)
tests/e2e/orm/schemas/\*/input.ts, tests/e2e/orm/schemas/\*/models.ts, tests/e2e/orm/schemas/\*/schema.ts
Consolidated imports into single-line statements; reformatted type aliases and string literals from single quotes to double quotes; flattened multi-line payload type definitions to single-line declarations

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Zod v4 compatibility: Verify that the type change from ZodSchema to ZodType is compatible with Zod v4 API and doesn't break downstream validation behavior
  • Decimal validation error mapping: The custom error transformation logic in addDecimalValidation should be tested to ensure decimal constraints (gt, gte, lt, lte) produce correct error messages with proper metadata
  • Refine options type inference: Confirm that the inferred Parameters<typeof schema.refine>[1] type correctly captures refine callback options and that the messageerror renaming aligns with Zod v4 API
  • Case-insensitive error matching: Ensure the lowercase comparison in expectErrorMessages doesn't mask legitimate test failures

Possibly related PRs

Poem

🐰 From schema to schema, the quotes change their dress,
Double-quoted elegance, nothing less!
Zod hops from three to four with graceful stride,
Types refined, errors caught—our validators guide.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "chore: require zod4 or above" accurately describes the primary objective of this changeset. The pull request demonstrates a comprehensive upgrade from Zod v3 to v4 across the codebase, with the most significant change being the update to pnpm-workspace.yaml that constrains zod to ^4.0.0 (removing support for ^3.25.0). Supporting changes include: bumping zod dependencies in multiple package.json files from ~3.25.0 to ^4.1.0, updating type annotations from ZodSchema to ZodType in validator code, modifying error handling patterns for zod4 compatibility, and reformatting code (quote styles) to comply with zod4 requirements. The title is concise, specific, and clearly communicates the breaking change in dependency constraints.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@claude
Copy link

claude bot commented Oct 31, 2025

Claude finished @ymc9's task —— View job


PR Review: Zod 4 Migration

Reviewing this Zod 4 migration PR for code quality, bugs, performance, security, and test coverage.

Todo List

  • Analyze dependency updates and breaking changes
  • Review validator logic changes in ORM package
  • Check test schema updates for correctness
  • Evaluate performance and security implications
  • Provide comprehensive feedback and recommendations

Review Summary

This PR successfully migrates ZenStack to require Zod 4+, with mostly automated test file regeneration accounting for the large line count changes (1639 additions, 2675 deletions).

Critical Finding: Use of Deprecated z.strictObject()

⚠️ Major Issue: The codebase extensively uses z.strictObject() which is deprecated in Zod 4. Found 42 instances in packages/orm/src/client/crud/validator/index.ts.

Files needing updates:

  • packages/orm/src/client/crud/validator/index.ts (42 occurrences)

Example fix needed:

// Old (deprecated in Zod 4)
z.strictObject(fields)

// New (Zod 4 compatible)  
z.object(fields).strict()

Other Findings

Good:

  • Breaking changes properly documented
  • All package.json files consistently updated to Zod ^4.1.0
  • Test schemas appropriately regenerated with cleaner type imports
  • No security concerns identified
  • Performance should be similar or improved with Zod 4

⚠️ Minor:

  • Large test file changes make it harder to review the actual logic changes
  • Consider running tests to verify validator behavior hasn't changed

Recommendations

  1. Fix the strictObject deprecation - This should be addressed before merging as it may cause runtime warnings
  2. Run comprehensive tests to ensure validator behavior is unchanged
  3. Consider running linting to catch any other Zod 4 compatibility issues

The migration is well-structured but needs the deprecation fix to be complete.


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 upgrades Zod from version 3.25.x to version 4.1.x and makes necessary code adjustments to accommodate breaking changes in Zod v4's API. The changes include:

  • Updating package dependencies to use Zod ^4.1.0
  • Modifying code to handle Zod v4 API changes (e.g., error?.issues instead of error?.errors, options.error instead of options.message)
  • Reformatting generated test schema files to use double quotes consistently
  • Updating error message comparison to be case-insensitive
  • Documenting the SWR plugin removal as a breaking change

Reviewed Changes

Copilot reviewed 27 out of 28 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pnpm-workspace.yaml Updated Zod version constraint from ^3.25.0 || ^4.0.0 to ^4.0.0
packages/orm/src/client/crud/validator/utils.ts Fixed Zod v4 API compatibility issues with error handling and validation
packages/orm/src/client/crud/validator/index.ts Updated imports and type annotations for Zod v4 compatibility
packages/testtools/src/vitest-ext.ts Made error message comparison case-insensitive
packages/*/package.json Updated Zod dev dependencies to ^4.1.0
tests/e2e/orm/schemas/*/schema.ts Reformatted generated schema files with double quotes
BREAKINGCHANGES.md Documented SWR plugin removal
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
packages/orm/src/client/crud/validator/index.ts (1)

1375-1375: Consider updating to ZodType for consistency.

Line 1375 still uses z.ZodSchema, while similar declarations elsewhere in the file (lines 833, 1110, 1132, 1141, 1260) have been updated to ZodType. For consistency with the Zod v4 migration, consider updating this as well.

-        let schema: z.ZodSchema = z.strictObject({
+        let schema: ZodType = z.strictObject({
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f9cbedc and b69a71b.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (27)
  • BREAKINGCHANGES.md (1 hunks)
  • package.json (1 hunks)
  • packages/orm/package.json (1 hunks)
  • packages/orm/src/client/crud/validator/index.ts (8 hunks)
  • packages/orm/src/client/crud/validator/utils.ts (2 hunks)
  • packages/server/package.json (1 hunks)
  • packages/testtools/src/vitest-ext.ts (1 hunks)
  • packages/zod/package.json (1 hunks)
  • pnpm-workspace.yaml (1 hunks)
  • tests/e2e/orm/schemas/basic/input.ts (1 hunks)
  • tests/e2e/orm/schemas/basic/models.ts (1 hunks)
  • tests/e2e/orm/schemas/basic/schema.ts (1 hunks)
  • tests/e2e/orm/schemas/delegate/input.ts (1 hunks)
  • tests/e2e/orm/schemas/delegate/models.ts (1 hunks)
  • tests/e2e/orm/schemas/delegate/schema.ts (1 hunks)
  • tests/e2e/orm/schemas/name-mapping/input.ts (1 hunks)
  • tests/e2e/orm/schemas/name-mapping/models.ts (1 hunks)
  • tests/e2e/orm/schemas/name-mapping/schema.ts (1 hunks)
  • tests/e2e/orm/schemas/petstore/input.ts (1 hunks)
  • tests/e2e/orm/schemas/petstore/models.ts (1 hunks)
  • tests/e2e/orm/schemas/petstore/schema.ts (1 hunks)
  • tests/e2e/orm/schemas/todo/input.ts (1 hunks)
  • tests/e2e/orm/schemas/todo/models.ts (1 hunks)
  • tests/e2e/orm/schemas/todo/schema.ts (1 hunks)
  • tests/e2e/orm/schemas/typing/input.ts (1 hunks)
  • tests/e2e/orm/schemas/typing/models.ts (1 hunks)
  • tests/e2e/orm/schemas/typing/schema.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
{packages,samples,tests}/**

📄 CodeRabbit inference engine (CLAUDE.md)

Place packages only under packages/, samples/, or tests/

Files:

  • packages/testtools/src/vitest-ext.ts
  • tests/e2e/orm/schemas/delegate/schema.ts
  • packages/orm/package.json
  • tests/e2e/orm/schemas/petstore/schema.ts
  • tests/e2e/orm/schemas/petstore/input.ts
  • packages/zod/package.json
  • tests/e2e/orm/schemas/todo/models.ts
  • tests/e2e/orm/schemas/basic/schema.ts
  • tests/e2e/orm/schemas/name-mapping/models.ts
  • packages/orm/src/client/crud/validator/utils.ts
  • tests/e2e/orm/schemas/typing/input.ts
  • tests/e2e/orm/schemas/name-mapping/input.ts
  • tests/e2e/orm/schemas/typing/schema.ts
  • tests/e2e/orm/schemas/basic/input.ts
  • packages/orm/src/client/crud/validator/index.ts
  • tests/e2e/orm/schemas/delegate/input.ts
  • tests/e2e/orm/schemas/todo/schema.ts
  • packages/server/package.json
  • tests/e2e/orm/schemas/name-mapping/schema.ts
  • tests/e2e/orm/schemas/todo/input.ts
  • tests/e2e/orm/schemas/petstore/models.ts
  • tests/e2e/orm/schemas/basic/models.ts
  • tests/e2e/orm/schemas/delegate/models.ts
  • tests/e2e/orm/schemas/typing/models.ts
tests/e2e/**

📄 CodeRabbit inference engine (CLAUDE.md)

End-to-end tests must live under tests/e2e/

Files:

  • tests/e2e/orm/schemas/delegate/schema.ts
  • tests/e2e/orm/schemas/petstore/schema.ts
  • tests/e2e/orm/schemas/petstore/input.ts
  • tests/e2e/orm/schemas/todo/models.ts
  • tests/e2e/orm/schemas/basic/schema.ts
  • tests/e2e/orm/schemas/name-mapping/models.ts
  • tests/e2e/orm/schemas/typing/input.ts
  • tests/e2e/orm/schemas/name-mapping/input.ts
  • tests/e2e/orm/schemas/typing/schema.ts
  • tests/e2e/orm/schemas/basic/input.ts
  • tests/e2e/orm/schemas/delegate/input.ts
  • tests/e2e/orm/schemas/todo/schema.ts
  • tests/e2e/orm/schemas/name-mapping/schema.ts
  • tests/e2e/orm/schemas/todo/input.ts
  • tests/e2e/orm/schemas/petstore/models.ts
  • tests/e2e/orm/schemas/basic/models.ts
  • tests/e2e/orm/schemas/delegate/models.ts
  • tests/e2e/orm/schemas/typing/models.ts
**/schema.ts

📄 CodeRabbit inference engine (CLAUDE.md)

The generated TypeScript schema should be named schema.ts

Files:

  • tests/e2e/orm/schemas/delegate/schema.ts
  • tests/e2e/orm/schemas/petstore/schema.ts
  • tests/e2e/orm/schemas/basic/schema.ts
  • tests/e2e/orm/schemas/typing/schema.ts
  • tests/e2e/orm/schemas/todo/schema.ts
  • tests/e2e/orm/schemas/name-mapping/schema.ts
pnpm-workspace.yaml

📄 CodeRabbit inference engine (CLAUDE.md)

Use pnpm workspaces for the monorepo

Files:

  • pnpm-workspace.yaml
package.json

📄 CodeRabbit inference engine (CLAUDE.md)

Pin the repository package manager to [email protected] via the packageManager field

Files:

  • package.json
🧠 Learnings (5)
📚 Learning: 2025-09-04T12:38:14.150Z
Learnt from: CR
Repo: zenstackhq/zenstack-v3 PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-09-04T12:38:14.150Z
Learning: Applies to **/schema.ts : The generated TypeScript schema should be named `schema.ts`

Applied to files:

  • tests/e2e/orm/schemas/delegate/schema.ts
  • tests/e2e/orm/schemas/petstore/schema.ts
  • tests/e2e/orm/schemas/petstore/input.ts
  • tests/e2e/orm/schemas/todo/models.ts
  • tests/e2e/orm/schemas/basic/schema.ts
  • tests/e2e/orm/schemas/name-mapping/models.ts
  • tests/e2e/orm/schemas/name-mapping/input.ts
  • tests/e2e/orm/schemas/typing/schema.ts
  • packages/orm/src/client/crud/validator/index.ts
  • tests/e2e/orm/schemas/todo/schema.ts
  • tests/e2e/orm/schemas/name-mapping/schema.ts
  • tests/e2e/orm/schemas/petstore/models.ts
  • tests/e2e/orm/schemas/basic/models.ts
  • tests/e2e/orm/schemas/delegate/models.ts
  • tests/e2e/orm/schemas/typing/models.ts
📚 Learning: 2025-10-21T16:09:31.218Z
Learnt from: ymc9
Repo: zenstackhq/zenstack-v3 PR: 319
File: packages/runtime/src/client/executor/zenstack-query-executor.ts:63-72
Timestamp: 2025-10-21T16:09:31.218Z
Learning: In ZenStack, TypeDefs can be inherited by models. When a TypeDef contains fields with `map` attributes, those mapped field names need to be processed by the QueryNameMapper since they become part of the inheriting model's schema. Therefore, when checking if a schema has mapped names (e.g., in `schemaHasMappedNames`), both `schema.models` and `schema.typeDefs` must be inspected for `@map` and `map` attributes.

Applied to files:

  • tests/e2e/orm/schemas/delegate/schema.ts
  • tests/e2e/orm/schemas/petstore/schema.ts
  • tests/e2e/orm/schemas/basic/schema.ts
  • tests/e2e/orm/schemas/name-mapping/models.ts
  • tests/e2e/orm/schemas/typing/schema.ts
  • tests/e2e/orm/schemas/todo/schema.ts
  • tests/e2e/orm/schemas/name-mapping/schema.ts
📚 Learning: 2025-09-04T12:38:14.150Z
Learnt from: CR
Repo: zenstackhq/zenstack-v3 PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-09-04T12:38:14.150Z
Learning: Applies to pnpm-workspace.yaml : Use pnpm workspaces for the monorepo

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-09-04T12:38:14.150Z
Learnt from: CR
Repo: zenstackhq/zenstack-v3 PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-09-04T12:38:14.150Z
Learning: Applies to **/schema.zmodel : Name ZModel schema files `schema.zmodel`

Applied to files:

  • packages/orm/src/client/crud/validator/index.ts
📚 Learning: 2025-09-04T12:38:14.150Z
Learnt from: CR
Repo: zenstackhq/zenstack-v3 PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-09-04T12:38:14.150Z
Learning: Applies to package.json : Pin the repository package manager to `pnpm10.12.1` via the `packageManager` field

Applied to files:

  • package.json
🧬 Code graph analysis (11)
tests/e2e/orm/schemas/delegate/schema.ts (1)
packages/orm/src/schema/expression.ts (1)
  • ExpressionUtils (16-120)
tests/e2e/orm/schemas/petstore/schema.ts (1)
packages/orm/src/schema/expression.ts (1)
  • ExpressionUtils (16-120)
tests/e2e/orm/schemas/todo/models.ts (5)
tests/e2e/orm/schemas/basic/models.ts (1)
  • User (10-10)
tests/e2e/orm/schemas/delegate/models.ts (1)
  • User (10-10)
tests/e2e/orm/schemas/name-mapping/models.ts (1)
  • User (10-10)
tests/e2e/orm/schemas/petstore/models.ts (1)
  • User (10-10)
tests/e2e/orm/schemas/typing/models.ts (1)
  • User (10-10)
tests/e2e/orm/schemas/basic/schema.ts (1)
packages/orm/src/schema/expression.ts (1)
  • ExpressionUtils (16-120)
tests/e2e/orm/schemas/name-mapping/models.ts (5)
tests/e2e/orm/schemas/basic/models.ts (2)
  • User (10-10)
  • Post (11-11)
tests/e2e/orm/schemas/delegate/models.ts (1)
  • User (10-10)
tests/e2e/orm/schemas/petstore/models.ts (1)
  • User (10-10)
tests/e2e/orm/schemas/todo/models.ts (1)
  • User (12-12)
tests/e2e/orm/schemas/typing/models.ts (2)
  • User (10-10)
  • Post (11-11)
packages/orm/src/client/crud/validator/utils.ts (1)
packages/orm/src/client/crud/validator/index.ts (1)
  • schema (59-61)
tests/e2e/orm/schemas/typing/schema.ts (1)
packages/orm/src/schema/expression.ts (1)
  • ExpressionUtils (16-120)
tests/e2e/orm/schemas/delegate/input.ts (1)
tests/e2e/orm/schemas/basic/input.ts (40)
  • UserFindManyArgs (11-11)
  • UserFindUniqueArgs (12-12)
  • UserFindFirstArgs (13-13)
  • UserCreateArgs (14-14)
  • UserCreateManyArgs (15-15)
  • UserCreateManyAndReturnArgs (16-16)
  • UserUpdateArgs (17-17)
  • UserUpdateManyArgs (18-18)
  • UserUpdateManyAndReturnArgs (19-19)
  • UserUpsertArgs (20-20)
  • UserDeleteArgs (21-21)
  • UserDeleteManyArgs (22-22)
  • UserCountArgs (23-23)
  • UserAggregateArgs (24-24)
  • UserGroupByArgs (25-25)
  • UserWhereInput (26-26)
  • UserSelect (27-27)
  • UserInclude (28-28)
  • UserOmit (29-29)
  • UserGetPayload (30-30)
  • CommentFindManyArgs (51-51)
  • CommentFindUniqueArgs (52-52)
  • CommentFindFirstArgs (53-53)
  • CommentCreateArgs (54-54)
  • CommentCreateManyArgs (55-55)
  • CommentCreateManyAndReturnArgs (56-56)
  • CommentUpdateArgs (57-57)
  • CommentUpdateManyArgs (58-58)
  • CommentUpdateManyAndReturnArgs (59-59)
  • CommentUpsertArgs (60-60)
  • CommentDeleteArgs (61-61)
  • CommentDeleteManyArgs (62-62)
  • CommentCountArgs (63-63)
  • CommentAggregateArgs (64-64)
  • CommentGroupByArgs (65-65)
  • CommentWhereInput (66-66)
  • CommentSelect (67-67)
  • CommentInclude (68-68)
  • CommentOmit (69-69)
  • CommentGetPayload (70-70)
tests/e2e/orm/schemas/todo/schema.ts (1)
packages/orm/src/schema/expression.ts (1)
  • ExpressionUtils (16-120)
tests/e2e/orm/schemas/name-mapping/schema.ts (1)
packages/orm/src/schema/expression.ts (1)
  • ExpressionUtils (16-120)
tests/e2e/orm/schemas/typing/models.ts (5)
tests/e2e/orm/schemas/basic/models.ts (3)
  • User (10-10)
  • Post (11-11)
  • Profile (13-13)
tests/e2e/orm/schemas/delegate/models.ts (1)
  • User (10-10)
tests/e2e/orm/schemas/name-mapping/models.ts (2)
  • User (10-10)
  • Post (11-11)
tests/e2e/orm/schemas/petstore/models.ts (1)
  • User (10-10)
tests/e2e/orm/schemas/todo/models.ts (1)
  • User (12-12)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Cleanup artifacts
  • GitHub Check: build-test (20.x, sqlite)
  • GitHub Check: build-test (20.x, postgresql)
  • GitHub Check: claude-review
🔇 Additional comments (29)
packages/testtools/src/vitest-ext.ts (1)

22-32: No action needed — case-insensitive matching is justified for Zod v4 compatibility.

Zod v4 changed the built-in error-message formatting including wording and casing as part of error-unification. The case-insensitive comparison on line 24 is a reasonable and pragmatic approach for the test utilities to handle these breaking changes between v3 and v4 error message formats. The implementation is correct and this is appropriate for test infrastructure code.

packages/orm/package.json (1)

100-100: LGTM! Zod v4 upgrade is correctly applied.

The devDependency upgrade to ^4.1.0 aligns with the PR objective and allows for future patch and minor updates within the v4 line.

packages/zod/package.json (1)

34-34: LGTM! Zod v4 devDependency upgrade is consistent.

The upgrade to ^4.1.0 aligns with the workspace-wide migration to Zod v4.

pnpm-workspace.yaml (1)

7-7: LGTM! Workspace constraint correctly enforces Zod v4.

This change drops Zod v3 support and enforces ^4.0.0 workspace-wide, aligning with the PR objective to require Zod 4 or above.

tests/e2e/orm/schemas/delegate/models.ts (1)

8-16: Auto-generated formatting changes look correct.

These quote formatting changes are consistent with the code generator's output. No semantic changes detected.

packages/server/package.json (1)

152-152: LGTM! Zod v4 devDependency upgrade is consistent.

The upgrade to ^4.1.0 aligns with the workspace-wide migration to Zod v4.

tests/e2e/orm/schemas/typing/models.ts (1)

8-21: LGTM! Auto-generated changes include formatting and new Status export.

The formatting changes and new Status type export are consistent with the code generator's output. The addition of the Status export aligns with the schema's enum definitions.

tests/e2e/orm/schemas/name-mapping/schema.ts (1)

8-87: LGTM! Auto-generated formatting changes are consistent.

All changes are quote style formatting (single to double quotes) with no semantic modifications to the schema structure. This is expected output from the code generator.

tests/e2e/orm/schemas/petstore/schema.ts (1)

1-157: LGTM! Formatting updates align with project standards.

This auto-generated schema file has been reformatted with double-quoted string literals throughout, maintaining identical semantics and structure. The changes are purely cosmetic and consistent with the project-wide quote standardization effort.

tests/e2e/orm/schemas/basic/schema.ts (1)

1-285: LGTM! Consistent formatting updates.

Auto-generated schema file reformatted with double-quoted string literals. No semantic changes to the schema structure, models, fields, or relationships.

tests/e2e/orm/schemas/name-mapping/models.ts (1)

8-11: LGTM! Import and type alias formatting updated.

The import paths and generic type parameters have been reformatted to use double quotes. Public API surface (type names and signatures) remains unchanged.

tests/e2e/orm/schemas/typing/schema.ts (1)

1-343: LGTM! Formatting updates with consistent quote style.

Auto-generated schema file updated with double-quoted string literals throughout. The import addition of OperandExpression and all structural elements remain semantically identical.

tests/e2e/orm/schemas/delegate/schema.ts (1)

1-465: LGTM! Consistent formatting normalization.

Auto-generated schema file with string literal quote standardization. All model definitions, fields, relations, and discriminator logic remain functionally identical.

tests/e2e/orm/schemas/petstore/input.ts (1)

8-70: LGTM! Import consolidation and formatting improvements.

The imports have been consolidated into fewer lines, and all type aliases are reformatted with double-quoted string literals. Public API surface remains unchanged—all type names and generic parameters are identical.

tests/e2e/orm/schemas/basic/input.ts (1)

8-90: LGTM! Consolidated imports and consistent formatting.

Imports consolidated and type aliases reformatted with double quotes. Public type definitions for User, Post, Comment, and Profile remain functionally identical.

packages/orm/src/client/crud/validator/utils.ts (2)

174-194: LGTM! Correct Zod v4 error issue transformation.

The error handling has been properly updated for Zod v4:

  • Changed from error?.errors to error?.issues (Zod v4 standard)
  • Transforms numeric validation errors into proper Zod issue objects with too_small/too_big codes
  • Includes all required metadata: minimum/maximum, inclusive, type, and preserves original messages

The issue structure aligns with Zod v4's unified error handling approach.


279-282: LGTM! Proper Zod v4 API update.

The options type and field name have been correctly updated for Zod v4:

  • Uses Parameters<typeof schema.refine>[1] for type-safe options inference
  • Renames message to error, aligning with Zod v4's unified error customization API

This matches the Zod v4 documentation's unified error parameter approach.

tests/e2e/orm/schemas/basic/models.ts (1)

1-16: Generated file - formatting changes look correct.

This file is auto-generated by ZenStack CLI. The changes are purely formatting updates (single to double quotes) with no functional impact. No review needed.

tests/e2e/orm/schemas/delegate/input.ts (1)

1-150: Generated file - import consolidation and formatting changes are correct.

This file is auto-generated by ZenStack CLI. The changes consolidate imports and update quote styles without affecting functionality.

packages/orm/src/client/crud/validator/index.ts (3)

5-5: Correct Zod v4 migration: ZodSchema removed from imports.

The removal of ZodSchema from imports aligns with Zod v4, where ZodType is the primary type. This change is consistent throughout the file.


1390-1390: Explicit any type annotation is consistent with existing patterns.

The addition of (value: any) is consistent with other refinement callbacks in this file (e.g., lines 483, 1208, 1223, 1469, 1476). While any reduces type safety, it's appropriate here since the refinement validates the structure at runtime.


1417-1417: Explicit any type annotation is consistent with existing patterns.

The addition of (value: any) matches the pattern used elsewhere in the file for refinement callbacks.

BREAKINGCHANGES.md (1)

5-5: Documentation update looks good.

The addition of "SWR plugin is removed" to the breaking changes list is clear and consistent with the existing format.

tests/e2e/orm/schemas/name-mapping/input.ts (1)

1-50: Generated file - formatting changes are correct.

This file is auto-generated by ZenStack CLI. The changes are formatting updates (import consolidation and quote style) with no functional impact.

tests/e2e/orm/schemas/todo/models.ts (1)

1-14: Generated file - quote style changes are correct.

This file is auto-generated by ZenStack CLI. The changes are purely formatting (single to double quotes) with no functional impact.

tests/e2e/orm/schemas/todo/schema.ts (1)

1-396: Generated file - quote style changes are correct.

This file is auto-generated by ZenStack CLI. The changes convert all single quotes to double quotes throughout the schema definition, with no functional impact.

tests/e2e/orm/schemas/petstore/models.ts (1)

1-12: Generated file - formatting changes are correct.

This file is auto-generated by ZenStack CLI. The changes are formatting updates (quote style) with no functional impact.

tests/e2e/orm/schemas/typing/input.ts (1)

1-130: LGTM! Auto-generated formatting updates.

The changes are purely cosmetic formatting updates from the ZenStack CLI code generator: consolidated imports, double-quoted strings, and single-line type aliases. No functional changes to the API surface.

tests/e2e/orm/schemas/todo/input.ts (1)

1-110: LGTM! Auto-generated formatting updates.

The changes are purely cosmetic formatting updates from the ZenStack CLI code generator: consolidated imports, double-quoted strings, and single-line type aliases. No functional changes to the API surface.

@claude
Copy link

claude bot commented Oct 31, 2025

Claude Code is working…

I'll analyze this and get back to you.

View job run

@claude
Copy link

claude bot commented Oct 31, 2025

Claude Code is working…

I'll analyze this and get back to you.

View job run

@ymc9 ymc9 merged commit 7826da3 into dev Oct 31, 2025
4 of 5 checks passed
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.

2 participants