Skip to content

merge dev to main (v3.0.0-beta.29)#486

Merged
ymc9 merged 3 commits intomainfrom
dev
Dec 13, 2025
Merged

merge dev to main (v3.0.0-beta.29)#486
ymc9 merged 3 commits intomainfrom
dev

Conversation

@ymc9
Copy link
Member

@ymc9 ymc9 commented Dec 13, 2025

Summary by CodeRabbit

Release Notes - Version 3.0.0-beta.29

  • Chores

    • Bumped all packages to version 3.0.0-beta.29
    • Refactored internal type system for query options and result handling across ORM and client libraries
    • Converted schema definitions from object literals to class-based implementations
    • Enhanced test infrastructure for code generation
  • Bug Fixes

    • Fixed SQLite JSON iteration function usage for proper array/object filtering in queries

✏️ Tip: You can customize this high-level summary in your review settings.

github-actions bot and others added 3 commits December 13, 2025 14:28
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
* refactor(orm): simplify model results typing

* add missing dev dependency

* update

* update

* update
Copilot AI review requested due to automatic review settings December 13, 2025 09:09
@coderabbitai
Copy link

coderabbitai bot commented Dec 13, 2025

Walkthrough

This PR bumps the package version to 3.0.0-beta.29 and refactors the ORM type layer by replacing ClientOptions with a new QueryOptions type and renaming SimplifiedModelResult to SimplifiedResult/SimplifiedPlainResult. The Options generic is threaded through tanstack-query hooks, ORM client contracts, and generated test schemas. Schema definitions are restructured from object literals to class-based implementations. Test files remove unnecessary as any casts for stricter typing.

Changes

Cohort / File(s) Summary
Package Version Bumps (3.0.0-beta.28 → 3.0.0-beta.29)
package.json, packages/*/package.json, samples/*/package.json, tests/*/package.json
Version field incremented across ~30 workspace packages and test directories. No functional changes.
Core ORM Type Refactoring
packages/orm/src/client/options.ts, packages/orm/src/client/crud-types.ts, packages/orm/src/client/contract.ts
Introduced QueryOptions<Schema> and ToQueryOptions<T> types; replaced ClientOptions with QueryOptions throughout; renamed SimplifiedModelResult to SimplifiedResult and added SimplifiedPlainResult; updated AllModelOperations and ModelOperations to use new generic constraints; updated DefaultModelResult and auth-type composition to remove ClientOptions references.
TanStack Query Hook Signature Changes
packages/clients/tanstack-query/src/react.ts, packages/clients/tanstack-query/src/svelte.ts, packages/clients/tanstack-query/src/vue.ts
Added Options extends QueryOptions<Schema> generic parameter to ClientHooks, ModelQueryHooks, useClientQueries, and useModelQueries; updated all hook method signatures to use SimplifiedPlainResult<..., Options> instead of SimplifiedModelResult<..., ClientOptions>; propagated Options through mutation result types and query hook factories.
Generated Test Schema Type Aliases
packages/clients/tanstack-query/test/schemas/basic/input.ts, samples/*/zenstack/input.ts, tests/e2e/*/input.ts, tests/regression/*/input.ts, tests/runtimes/*/input.ts
Updated GetPayload type signatures across ~50 generated files: replaced Options extends $ClientOptions<$Schema> with Options extends $QueryOptions<$Schema> and return type from $SimplifiedModelResult<...> to $Result<...> (aliased SimplifiedPlainResult); imports updated to use QueryOptions instead of ClientOptions.
Schema Class Restructuring
packages/clients/tanstack-query/test/schemas/basic/schema-lite.ts, tests/e2e/orm/schemas/todo/schema.ts, tests/regression/test/issue-204/schema.ts
Replaced object-literal schema exports with class-based SchemaType implementing SchemaDef; moved provider, models, authType, plugins to class properties; exported instance created via new SchemaType().
ORM SQLite Dialect Update
packages/orm/src/client/crud/dialects/sqlite.ts
Replaced jsonb_each with json_each in two query builders for JSON array/object iteration in EXISTS predicates and filtering.
Test Script Enhancement
scripts/test-generate.ts
Updated generate function to accept options: string[] parameter; propagated options through CLI invocation by appending to command string.
Test Client Initialization
tests/e2e/orm/client-api/*.test.ts, tests/e2e/orm/plugin-infra/*.test.ts, tests/e2e/orm/policy/basic-schema-read.test.ts
Removed as any type casts from beforeEach assignments of createTestClient(schema) result across ~20 test files; relies on inferred typing instead.
Test Script Updates
tests/e2e/package.json, tests/regression/package.json
Version bumped; tests/e2e:test:generate script changed from tsx ../../scripts/test-generate.ts to tsx ../../scripts/test-generate.ts .; added build script to regression tests.
SDK Schema Generator
packages/sdk/src/ts-schema-generator.ts
Updated ModelGetPayload alias to return $Result<Schema, Model, Args, Options> instead of $SimplifiedModelResult<...>; replaced import of ClientOptions with QueryOptions and SimplifiedModelResult with SimplifiedPlainResult.
CLI and Better-Auth Package Updates
packages/cli/package.json, packages/auth-adapters/better-auth/package.json, packages/clients/tanstack-query/package.json
Version bumped; tanstack-query script changed from tests → test --lite-only and added @zenstackhq/cli to dependencies/devDependencies.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

  • High file spread: ~100 files modified across workspace, tests, and samples; many are homogeneous (version bumps, type-pattern updates), but mixed with structural changes (schema class refactoring, script enhancements) and core type logic changes.
  • Type-level complexity: Core ORM type refactoring in packages/orm/src/client/ affects the entire public type surface; QueryOptions/SimplifiedResult changes thread through tanstack-query, SDK, and all generated schemas—requires careful verification of type consistency across layers.
  • Structural changes: Schema class restructuring is a semantic change that affects initialization patterns; needs validation in test setup.
  • Potential interactions: SQLite dialect change (json_each vs jsonb_each) is isolated but requires SQL correctness verification; type cast removals in tests depend on proper return type inference from createTestClient.

Areas requiring extra attention during review:

  • Verify QueryOptions type definition (subset of ClientOptions) is sufficient for all use cases across ORM, SDK, and tanstack-query.
  • Validate that SimplifiedPlainResult return type signature matches the removed SimplifiedModelResult usages in all contexts.
  • Check schema class implementations maintain equivalent behavior to prior object-literal patterns (especially provider as const, authType, plugins field initialization).
  • Confirm json_each (SQLite JSON function) produces equivalent results to prior logic for EXISTS predicates and filtering across all query types.
  • Verify test type inference after as any cast removal does not introduce implicit any or type narrowing issues.
  • Spot-check one or two generated test schema files to ensure the type-alias pattern is correctly applied throughout.

Possibly related PRs

Poem

🐰 A hoppy refactor, type by type,
QueryOptions now lead the hike,
Schemas hop from plain to class,
SimplifiedResult takes its pass—
From beta.28 to beta.29, we rise! 🎉

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 54.55% 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 title clearly and accurately describes a version release merge from dev to main (v3.0.0-beta.29).
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev

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 Dec 13, 2025

Claude finished @ymc9's task —— View job


PR Review: v3.0.0-beta.29 Release

Review Progress:

  • Analyze major ORM client changes
  • Review type system improvements
  • Check test coverage and schema changes
  • Assess performance and security implications
  • Provide comprehensive feedback

🎯 Summary

This is a solid release that primarily focuses on type system improvements and ORM client enhancements. The changes appear well-structured and maintain backwards compatibility while introducing beneficial type safety improvements.

🔍 Key Changes Reviewed

✅ Type System Improvements (Commit ac4a68c)

  • New SimplifiedPlainResult type: Provides cleaner, more readable generated types
  • Enhanced type inference: Better developer experience with more precise return types
  • Consistent contract updates: All client methods now use simplified types across packages/orm/src/client/contract.ts
  • Schema generation: Updated ts-schema-generator.ts to emit simplified types in generated schemas

✅ Client Options Enhancement

  • New OmitOptions support: Added field-level omission capabilities in packages/orm/src/client/options.ts
  • Query-level omit override: Configurable omit behavior at query time
  • Better type safety: Enhanced options validation and type checking

✅ TanStack Query Integration

  • Updated client implementations: React, Svelte, and Vue clients updated to use new simplified types
  • Maintained API compatibility: No breaking changes to public interfaces
  • Improved type inference: Better developer experience in query hooks

🛡️ Security Assessment

SQL Injection Protection:

  • Proper parameter escaping in functions.ts:293-303
  • Clear documentation of $executeRawUnsafe and $queryRawUnsafe risks
  • String search pattern escaping for special characters

No security regressions detected

⚡ Performance Considerations

Type-only changes: Most modifications are compile-time improvements without runtime overhead
No database query changes: Core CRUD operations remain unchanged
Test coverage maintained: 220 test files ensure functionality preservation

🔧 Code Quality

Strengths:

  • Consistent naming: Clear type hierarchy with SimplifiedPlainResult
  • Proper TypeScript patterns: Good use of generics and type composition
  • Comprehensive documentation: Well-documented API methods with examples
  • Maintained backwards compatibility: No breaking changes to public APIs

Areas to Watch:

  • TODO items noted: Several performance optimizations pending (crud-types.ts:65, sqlite.ts:432)
  • Type complexity: Some complex type manipulations may impact compilation time
  • Generated code size: Schema files significantly updated but maintaining functionality

🧪 Testing & Compatibility

Test coverage: 220 test files maintained
Generated schemas updated: All test schemas regenerated consistently
E2E tests included: Real-world schemas (cal.com, formbricks, trigger.dev) tested
Runtime compatibility: Bun and edge-runtime schemas updated

📋 Minor Issues Identified

  1. SQLite mapping TODO (sqlite.ts:432): Missing @db.x attribute support - low priority
  2. Type performance (crud-types.ts:65): Discriminated union optimization deferred - acceptable
  3. Transaction optimization (delete.ts:24, update.ts:80): Simple operations using transactions - minor overhead

✅ Final Recommendation

APPROVED - This is a well-executed type system improvement that enhances developer experience without introducing security risks or breaking changes. The changes are focused, well-tested, and maintain the existing API surface.

Key Benefits:

  • Improved TypeScript developer experience
  • Better type inference and IDE support
  • Maintained backwards compatibility
  • Comprehensive test coverage

The PR is ready for merge to main for the v3.0.0-beta.29 release.

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: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
tests/e2e/orm/client-api/transaction.test.ts (1)

6-6: Fix the incorrect test suite description.

The test suite is described as "Client raw query tests" but this file contains transaction tests, not raw query tests. This appears to be a copy-paste error.

Apply this diff to correct the description:

-describe('Client raw query tests', () => {
+describe('Client transaction tests', () => {
🧹 Nitpick comments (4)
packages/clients/tanstack-query/test/schemas/basic/schema-lite.ts (1)

9-171: Consider adding readonly modifiers to schema properties.

The class properties (provider, models, authType, plugins) are not marked as readonly, which allows them to be reassigned at runtime (e.g., schema.authType = "Post"). For schema definitions that should remain immutable after instantiation, adding readonly would prevent accidental mutations and make the design intent clearer.

Note: Since this is a generated file, this suggestion applies to the code generator rather than this file directly.

Example:

 export class SchemaType implements SchemaDef {
-    provider = {
+    readonly provider = {
         type: "sqlite"
     } as const;
-    models = {
+    readonly models = {
         ...
     } as const;
-    authType = "User" as const;
-    plugins = {};
+    readonly authType = "User" as const;
+    readonly plugins = {};
 }
tests/e2e/orm/client-api/update.test.ts (1)

10-12: Good cleanup, but it’s still effectively any-typed.

Dropping the cast is nice, but since createTestClient returns Promise<any>, TS still won’t validate ClientContract<typeof schema> here. Consider typing createTestClient generically (e.g., Promise<ClientContract<TSchema>>) if the goal is stricter tests. Based on learnings, keep client API tests comprehensive.

packages/orm/src/client/options.ts (1)

148-156: Avoid duplicated Pick<..., 'omit'> to prevent drift.

Suggest centralizing the selected keys so QueryOptions and ToQueryOptions can’t diverge later:

 /**
  * Subset of client options relevant to query operations.
  */
-export type QueryOptions<Schema extends SchemaDef> = Pick<ClientOptions<Schema>, 'omit'>;
+type QueryOptionKeys = 'omit';
+export type QueryOptions<Schema extends SchemaDef> = Pick<ClientOptions<Schema>, QueryOptionKeys>;
 
 /**
  * Extract QueryOptions from ClientOptions
  */
-export type ToQueryOptions<T extends ClientOptions<any>> = Pick<T, 'omit'>;
+export type ToQueryOptions<T extends ClientOptions<any>> = Pick<T, QueryOptionKeys>;

Based on learnings, keeping this layer crisp helps with hook interception/customization surfaces downstream.

packages/orm/src/client/crud-types.ts (1)

124-132: Consider removing or updating commented-out code.

The commented-out DelegateUnionResult type at lines 124-132 references the old type signature pattern but has been updated to use QueryOptions. If this code is planned for future implementation, consider adding a TODO comment with context. If it's obsolete, consider removing it to reduce maintenance burden.

📜 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 fb96362 and ac4a68c.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (74)
  • package.json (1 hunks)
  • packages/auth-adapters/better-auth/package.json (1 hunks)
  • packages/cli/package.json (1 hunks)
  • packages/clients/tanstack-query/package.json (3 hunks)
  • packages/clients/tanstack-query/src/react.ts (4 hunks)
  • packages/clients/tanstack-query/src/svelte.ts (4 hunks)
  • packages/clients/tanstack-query/src/vue.ts (4 hunks)
  • packages/clients/tanstack-query/test/schemas/basic/input.ts (6 hunks)
  • packages/clients/tanstack-query/test/schemas/basic/schema-lite.ts (2 hunks)
  • packages/common-helpers/package.json (1 hunks)
  • packages/config/eslint-config/package.json (1 hunks)
  • packages/config/typescript-config/package.json (1 hunks)
  • packages/config/vitest-config/package.json (1 hunks)
  • packages/create-zenstack/package.json (1 hunks)
  • packages/language/package.json (1 hunks)
  • packages/orm/package.json (1 hunks)
  • packages/orm/src/client/contract.ts (16 hunks)
  • packages/orm/src/client/crud-types.ts (8 hunks)
  • packages/orm/src/client/crud/dialects/sqlite.ts (2 hunks)
  • packages/orm/src/client/options.ts (1 hunks)
  • packages/plugins/policy/package.json (1 hunks)
  • packages/schema/package.json (1 hunks)
  • packages/sdk/package.json (1 hunks)
  • packages/sdk/src/ts-schema-generator.ts (4 hunks)
  • packages/server/package.json (1 hunks)
  • packages/testtools/package.json (1 hunks)
  • packages/zod/package.json (1 hunks)
  • samples/next.js/package.json (1 hunks)
  • samples/next.js/zenstack/input.ts (3 hunks)
  • samples/orm/package.json (1 hunks)
  • samples/orm/zenstack/input.ts (4 hunks)
  • scripts/test-generate.ts (1 hunks)
  • tests/e2e/apps/rally/zenstack/input.ts (28 hunks)
  • tests/e2e/github-repos/formbricks/input.ts (36 hunks)
  • tests/e2e/github-repos/trigger.dev/input.ts (52 hunks)
  • tests/e2e/orm/client-api/aggregate.test.ts (1 hunks)
  • tests/e2e/orm/client-api/count.test.ts (1 hunks)
  • tests/e2e/orm/client-api/create-many-and-return.test.ts (1 hunks)
  • tests/e2e/orm/client-api/create-many.test.ts (1 hunks)
  • tests/e2e/orm/client-api/create.test.ts (1 hunks)
  • tests/e2e/orm/client-api/delete-many.test.ts (1 hunks)
  • tests/e2e/orm/client-api/delete.test.ts (1 hunks)
  • tests/e2e/orm/client-api/find.test.ts (1 hunks)
  • tests/e2e/orm/client-api/group-by.test.ts (1 hunks)
  • tests/e2e/orm/client-api/raw-query.test.ts (1 hunks)
  • tests/e2e/orm/client-api/transaction.test.ts (1 hunks)
  • tests/e2e/orm/client-api/undefined-values.test.ts (1 hunks)
  • tests/e2e/orm/client-api/update-many.test.ts (1 hunks)
  • tests/e2e/orm/client-api/update.test.ts (1 hunks)
  • tests/e2e/orm/plugin-infra/on-kysely-query.test.ts (1 hunks)
  • tests/e2e/orm/plugin-infra/on-query-hooks.test.ts (1 hunks)
  • tests/e2e/orm/policy/basic-schema-read.test.ts (1 hunks)
  • tests/e2e/orm/policy/policy-functions.test.ts (0 hunks)
  • tests/e2e/orm/schemas/auth-type/input.ts (2 hunks)
  • tests/e2e/orm/schemas/basic/input.ts (5 hunks)
  • tests/e2e/orm/schemas/default-auth/input.ts (4 hunks)
  • tests/e2e/orm/schemas/delegate/input.ts (8 hunks)
  • tests/e2e/orm/schemas/json/input.ts (2 hunks)
  • tests/e2e/orm/schemas/name-mapping/input.ts (3 hunks)
  • tests/e2e/orm/schemas/omit/input.ts (5 hunks)
  • tests/e2e/orm/schemas/petstore/input.ts (4 hunks)
  • tests/e2e/orm/schemas/todo/input.ts (6 hunks)
  • tests/e2e/orm/schemas/todo/schema.ts (2 hunks)
  • tests/e2e/orm/schemas/typed-json/input.ts (2 hunks)
  • tests/e2e/orm/schemas/typing/input.ts (7 hunks)
  • tests/e2e/package.json (1 hunks)
  • tests/regression/package.json (1 hunks)
  • tests/regression/test/issue-204/input.ts (2 hunks)
  • tests/regression/test/issue-204/schema.ts (4 hunks)
  • tests/regression/test/issue-422/input.ts (4 hunks)
  • tests/runtimes/bun/package.json (1 hunks)
  • tests/runtimes/bun/schemas/input.ts (3 hunks)
  • tests/runtimes/edge-runtime/package.json (1 hunks)
  • tests/runtimes/edge-runtime/schemas/input.ts (3 hunks)
💤 Files with no reviewable changes (1)
  • tests/e2e/orm/policy/policy-functions.test.ts
🧰 Additional context used
📓 Path-based instructions (1)
tests/e2e/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

E2E tests should validate real-world schema compatibility with established projects

Files:

  • tests/e2e/orm/policy/basic-schema-read.test.ts
  • tests/e2e/orm/client-api/delete.test.ts
  • tests/e2e/orm/client-api/find.test.ts
  • tests/e2e/orm/client-api/create-many-and-return.test.ts
  • tests/e2e/orm/plugin-infra/on-query-hooks.test.ts
  • tests/e2e/orm/client-api/transaction.test.ts
  • tests/e2e/orm/client-api/update.test.ts
  • tests/e2e/orm/client-api/raw-query.test.ts
  • tests/e2e/orm/client-api/update-many.test.ts
  • tests/e2e/orm/client-api/delete-many.test.ts
  • tests/e2e/orm/client-api/group-by.test.ts
  • tests/e2e/orm/client-api/count.test.ts
  • tests/e2e/orm/client-api/create.test.ts
  • tests/e2e/orm/client-api/create-many.test.ts
  • tests/e2e/orm/client-api/undefined-values.test.ts
  • tests/e2e/orm/client-api/aggregate.test.ts
  • tests/e2e/orm/plugin-infra/on-kysely-query.test.ts
  • tests/e2e/orm/schemas/todo/schema.ts
  • tests/e2e/orm/schemas/auth-type/input.ts
  • tests/e2e/github-repos/trigger.dev/input.ts
  • tests/e2e/orm/schemas/todo/input.ts
  • tests/e2e/orm/schemas/typed-json/input.ts
  • tests/e2e/orm/schemas/basic/input.ts
  • tests/e2e/orm/schemas/default-auth/input.ts
  • tests/e2e/orm/schemas/omit/input.ts
  • tests/e2e/orm/schemas/typing/input.ts
  • tests/e2e/orm/schemas/delegate/input.ts
  • tests/e2e/orm/schemas/petstore/input.ts
  • tests/e2e/orm/schemas/name-mapping/input.ts
  • tests/e2e/orm/schemas/json/input.ts
  • tests/e2e/github-repos/formbricks/input.ts
  • tests/e2e/apps/rally/zenstack/input.ts
🧠 Learnings (14)
📓 Common learnings
Learnt from: CR
Repo: zenstackhq/zenstack-v3 PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-26T01:55:04.540Z
Learning: Applies to packages/zenstackhq/orm/**/*.{ts,tsx} : Implement plugin hooks at ORM, Kysely, and entity mutation levels for query interception and customization
Learnt from: CR
Repo: zenstackhq/zenstack-v3 PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-26T01:55:04.540Z
Learning: Applies to packages/zenstackhq/orm/**/*.{ts,tsx} : Use Kysely as the query builder interface for low-level database queries, avoiding raw SQL when possible
Learnt from: CR
Repo: zenstackhq/zenstack-v3 PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-26T01:55:04.540Z
Learning: Applies to packages/zenstackhq/orm/**/*.test.{ts,tsx} : ORM package tests should include comprehensive client API tests and policy tests
📚 Learning: 2025-11-26T01:55:04.540Z
Learnt from: CR
Repo: zenstackhq/zenstack-v3 PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-26T01:55:04.540Z
Learning: Applies to packages/zenstackhq/orm/**/*.test.{ts,tsx} : ORM package tests should include comprehensive client API tests and policy tests

Applied to files:

  • tests/e2e/orm/policy/basic-schema-read.test.ts
  • tests/e2e/orm/client-api/delete.test.ts
  • tests/e2e/orm/client-api/find.test.ts
  • packages/orm/package.json
  • tests/e2e/orm/client-api/create-many-and-return.test.ts
  • tests/e2e/orm/plugin-infra/on-query-hooks.test.ts
  • tests/e2e/orm/client-api/transaction.test.ts
  • tests/e2e/orm/client-api/update.test.ts
  • tests/e2e/orm/client-api/raw-query.test.ts
  • tests/e2e/orm/client-api/update-many.test.ts
  • tests/e2e/orm/client-api/delete-many.test.ts
  • tests/e2e/orm/client-api/group-by.test.ts
  • tests/e2e/orm/client-api/count.test.ts
  • tests/e2e/orm/client-api/create.test.ts
  • tests/e2e/orm/client-api/create-many.test.ts
  • tests/e2e/orm/client-api/undefined-values.test.ts
  • tests/e2e/orm/client-api/aggregate.test.ts
  • tests/e2e/orm/plugin-infra/on-kysely-query.test.ts
  • tests/e2e/orm/schemas/auth-type/input.ts
  • packages/orm/src/client/contract.ts
  • tests/e2e/github-repos/trigger.dev/input.ts
  • tests/regression/test/issue-204/input.ts
  • tests/e2e/orm/schemas/todo/input.ts
  • tests/e2e/orm/schemas/typed-json/input.ts
  • tests/e2e/orm/schemas/basic/input.ts
  • packages/sdk/src/ts-schema-generator.ts
  • tests/runtimes/edge-runtime/schemas/input.ts
  • tests/e2e/orm/schemas/default-auth/input.ts
  • packages/orm/src/client/crud-types.ts
  • tests/runtimes/bun/schemas/input.ts
  • packages/clients/tanstack-query/test/schemas/basic/input.ts
  • tests/e2e/orm/schemas/omit/input.ts
  • tests/e2e/orm/schemas/typing/input.ts
  • tests/e2e/orm/schemas/delegate/input.ts
  • samples/orm/zenstack/input.ts
  • samples/next.js/zenstack/input.ts
  • tests/regression/test/issue-422/input.ts
  • tests/e2e/orm/schemas/petstore/input.ts
  • tests/e2e/orm/schemas/name-mapping/input.ts
  • tests/e2e/orm/schemas/json/input.ts
  • tests/e2e/github-repos/formbricks/input.ts
  • tests/e2e/apps/rally/zenstack/input.ts
📚 Learning: 2025-11-26T01:55:04.540Z
Learnt from: CR
Repo: zenstackhq/zenstack-v3 PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-26T01:55:04.540Z
Learning: Applies to tests/e2e/**/*.{ts,tsx} : E2E tests should validate real-world schema compatibility with established projects

Applied to files:

  • tests/e2e/orm/policy/basic-schema-read.test.ts
  • tests/e2e/orm/client-api/delete.test.ts
  • tests/e2e/orm/client-api/find.test.ts
  • tests/e2e/orm/client-api/create-many-and-return.test.ts
  • tests/e2e/package.json
  • tests/e2e/orm/plugin-infra/on-query-hooks.test.ts
  • tests/e2e/orm/client-api/transaction.test.ts
  • tests/e2e/orm/client-api/update.test.ts
  • tests/e2e/orm/client-api/raw-query.test.ts
  • tests/e2e/orm/client-api/update-many.test.ts
  • tests/e2e/orm/client-api/delete-many.test.ts
  • tests/e2e/orm/client-api/group-by.test.ts
  • tests/e2e/orm/client-api/count.test.ts
  • tests/e2e/orm/client-api/create.test.ts
  • tests/e2e/orm/client-api/create-many.test.ts
  • tests/e2e/orm/client-api/undefined-values.test.ts
  • tests/e2e/orm/client-api/aggregate.test.ts
  • tests/e2e/orm/plugin-infra/on-kysely-query.test.ts
  • tests/e2e/orm/schemas/todo/schema.ts
  • tests/e2e/orm/schemas/auth-type/input.ts
  • packages/clients/tanstack-query/test/schemas/basic/schema-lite.ts
  • tests/e2e/orm/schemas/todo/input.ts
  • tests/e2e/orm/schemas/typed-json/input.ts
  • tests/e2e/orm/schemas/basic/input.ts
  • tests/e2e/orm/schemas/default-auth/input.ts
  • tests/regression/test/issue-204/schema.ts
  • tests/runtimes/bun/schemas/input.ts
  • tests/e2e/orm/schemas/omit/input.ts
  • tests/e2e/orm/schemas/typing/input.ts
  • tests/e2e/orm/schemas/delegate/input.ts
  • tests/e2e/orm/schemas/petstore/input.ts
  • tests/e2e/orm/schemas/name-mapping/input.ts
  • tests/e2e/orm/schemas/json/input.ts
  • tests/e2e/github-repos/formbricks/input.ts
  • tests/e2e/apps/rally/zenstack/input.ts
📚 Learning: 2025-11-26T01:55:04.540Z
Learnt from: CR
Repo: zenstackhq/zenstack-v3 PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-26T01:55:04.540Z
Learning: Applies to **/*.zmodel : ZModel schema files should define database structure and policies that compile to TypeScript via `zenstack generate`

Applied to files:

  • packages/schema/package.json
  • packages/language/package.json
  • packages/zod/package.json
  • scripts/test-generate.ts
  • tests/e2e/orm/schemas/todo/schema.ts
  • tests/e2e/orm/schemas/auth-type/input.ts
  • packages/clients/tanstack-query/test/schemas/basic/schema-lite.ts
  • packages/orm/src/client/contract.ts
  • tests/e2e/github-repos/trigger.dev/input.ts
  • tests/regression/test/issue-204/input.ts
  • tests/e2e/orm/schemas/typed-json/input.ts
  • tests/e2e/orm/schemas/basic/input.ts
  • packages/sdk/src/ts-schema-generator.ts
  • tests/runtimes/edge-runtime/schemas/input.ts
  • tests/e2e/orm/schemas/default-auth/input.ts
  • packages/orm/src/client/crud-types.ts
  • tests/regression/test/issue-204/schema.ts
  • tests/runtimes/bun/schemas/input.ts
  • packages/clients/tanstack-query/test/schemas/basic/input.ts
  • tests/e2e/orm/schemas/omit/input.ts
  • tests/e2e/orm/schemas/typing/input.ts
  • tests/e2e/orm/schemas/delegate/input.ts
  • samples/orm/zenstack/input.ts
  • samples/next.js/zenstack/input.ts
  • tests/e2e/orm/schemas/petstore/input.ts
  • tests/e2e/orm/schemas/name-mapping/input.ts
  • tests/e2e/orm/schemas/json/input.ts
  • tests/e2e/github-repos/formbricks/input.ts
  • tests/e2e/apps/rally/zenstack/input.ts
📚 Learning: 2025-11-26T01:55:04.540Z
Learnt from: CR
Repo: zenstackhq/zenstack-v3 PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-26T01:55:04.540Z
Learning: Applies to packages/zenstackhq/orm/**/*.{ts,tsx} : Implement plugin hooks at ORM, Kysely, and entity mutation levels for query interception and customization

Applied to files:

  • tests/e2e/orm/client-api/delete.test.ts
  • packages/orm/package.json
  • tests/e2e/orm/client-api/create-many-and-return.test.ts
  • tests/e2e/orm/plugin-infra/on-query-hooks.test.ts
  • tests/e2e/orm/client-api/update.test.ts
  • tests/e2e/orm/client-api/raw-query.test.ts
  • packages/orm/src/client/options.ts
  • tests/e2e/orm/client-api/delete-many.test.ts
  • tests/e2e/orm/client-api/count.test.ts
  • tests/e2e/orm/client-api/create.test.ts
  • tests/e2e/orm/client-api/create-many.test.ts
  • tests/e2e/orm/client-api/undefined-values.test.ts
  • tests/e2e/orm/plugin-infra/on-kysely-query.test.ts
  • packages/orm/src/client/crud/dialects/sqlite.ts
  • tests/e2e/orm/schemas/auth-type/input.ts
  • packages/orm/src/client/contract.ts
  • tests/e2e/github-repos/trigger.dev/input.ts
  • tests/regression/test/issue-204/input.ts
  • tests/e2e/orm/schemas/todo/input.ts
  • tests/e2e/orm/schemas/typed-json/input.ts
  • tests/e2e/orm/schemas/basic/input.ts
  • packages/sdk/src/ts-schema-generator.ts
  • tests/runtimes/edge-runtime/schemas/input.ts
  • packages/clients/tanstack-query/src/react.ts
  • tests/e2e/orm/schemas/default-auth/input.ts
  • packages/orm/src/client/crud-types.ts
  • tests/runtimes/bun/schemas/input.ts
  • packages/clients/tanstack-query/test/schemas/basic/input.ts
  • packages/clients/tanstack-query/src/svelte.ts
  • packages/clients/tanstack-query/src/vue.ts
  • tests/e2e/orm/schemas/omit/input.ts
  • tests/e2e/orm/schemas/typing/input.ts
  • tests/e2e/orm/schemas/delegate/input.ts
  • samples/orm/zenstack/input.ts
  • samples/next.js/zenstack/input.ts
  • tests/regression/test/issue-422/input.ts
  • tests/e2e/orm/schemas/petstore/input.ts
  • tests/e2e/orm/schemas/name-mapping/input.ts
  • tests/e2e/orm/schemas/json/input.ts
  • tests/e2e/github-repos/formbricks/input.ts
  • tests/e2e/apps/rally/zenstack/input.ts
📚 Learning: 2025-11-26T01:55:04.540Z
Learnt from: CR
Repo: zenstackhq/zenstack-v3 PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-26T01:55:04.540Z
Learning: Applies to packages/zenstackhq/orm/**/*.{ts,tsx} : Use Kysely as the query builder interface for low-level database queries, avoiding raw SQL when possible

Applied to files:

  • tests/e2e/orm/client-api/find.test.ts
  • packages/orm/package.json
  • tests/e2e/orm/plugin-infra/on-query-hooks.test.ts
  • tests/e2e/orm/client-api/raw-query.test.ts
  • packages/orm/src/client/options.ts
  • tests/e2e/orm/plugin-infra/on-kysely-query.test.ts
  • packages/orm/src/client/crud/dialects/sqlite.ts
  • tests/e2e/orm/schemas/auth-type/input.ts
  • packages/orm/src/client/contract.ts
  • tests/e2e/github-repos/trigger.dev/input.ts
  • tests/regression/test/issue-204/input.ts
  • tests/e2e/orm/schemas/todo/input.ts
  • tests/e2e/orm/schemas/typed-json/input.ts
  • tests/e2e/orm/schemas/basic/input.ts
  • packages/sdk/src/ts-schema-generator.ts
  • tests/runtimes/edge-runtime/schemas/input.ts
  • packages/clients/tanstack-query/src/react.ts
  • tests/e2e/orm/schemas/default-auth/input.ts
  • packages/orm/src/client/crud-types.ts
  • tests/runtimes/bun/schemas/input.ts
  • packages/clients/tanstack-query/test/schemas/basic/input.ts
  • packages/clients/tanstack-query/src/svelte.ts
  • packages/clients/tanstack-query/src/vue.ts
  • tests/e2e/orm/schemas/omit/input.ts
  • tests/e2e/orm/schemas/typing/input.ts
  • tests/e2e/orm/schemas/delegate/input.ts
  • samples/orm/zenstack/input.ts
  • samples/next.js/zenstack/input.ts
  • tests/regression/test/issue-422/input.ts
  • tests/e2e/orm/schemas/petstore/input.ts
  • tests/e2e/orm/schemas/name-mapping/input.ts
  • tests/e2e/orm/schemas/json/input.ts
  • tests/e2e/github-repos/formbricks/input.ts
  • tests/e2e/apps/rally/zenstack/input.ts
📚 Learning: 2025-11-26T01:55:04.540Z
Learnt from: CR
Repo: zenstackhq/zenstack-v3 PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-26T01:55:04.540Z
Learning: Applies to ide/vscode/**/{package.json,version.ts} : The VSCode IDE extension package should maintain a different version from other packages to comply with VSCode Marketplace requirements

Applied to files:

  • packages/config/typescript-config/package.json
  • package.json
📚 Learning: 2025-11-26T01:55:04.540Z
Learnt from: CR
Repo: zenstackhq/zenstack-v3 PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-26T01:55:04.540Z
Learning: Applies to tests/**/type*.{ts,tsx} : Ensure TypeScript inference and type coverage are validated through type coverage tests

Applied to files:

  • tests/e2e/orm/client-api/undefined-values.test.ts
  • packages/clients/tanstack-query/package.json
📚 Learning: 2025-11-26T01:55:04.540Z
Learnt from: CR
Repo: zenstackhq/zenstack-v3 PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-26T01:55:04.540Z
Learning: Applies to **/*.zmodel : Always run `zenstack generate` after modifying ZModel schemas

Applied to files:

  • scripts/test-generate.ts
📚 Learning: 2025-11-26T01:55:04.540Z
Learnt from: CR
Repo: zenstackhq/zenstack-v3 PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-26T01:55:04.540Z
Learning: Applies to packages/zenstackhq/cli/**/*.test.{ts,tsx} : CLI package tests should focus on action-specific tests for each command

Applied to files:

  • packages/clients/tanstack-query/package.json
📚 Learning: 2025-11-26T01:55:04.540Z
Learnt from: CR
Repo: zenstackhq/zenstack-v3 PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-26T01:55:04.540Z
Learning: Use Turbo for build orchestration and run `pnpm build`, `pnpm watch`, `pnpm lint`, and `pnpm test` for development tasks

Applied to files:

  • packages/clients/tanstack-query/package.json
📚 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/todo/schema.ts
  • packages/clients/tanstack-query/test/schemas/basic/schema-lite.ts
  • tests/regression/test/issue-204/schema.ts
📚 Learning: 2025-11-26T01:55:04.540Z
Learnt from: CR
Repo: zenstackhq/zenstack-v3 PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-26T01:55:04.540Z
Learning: Use `pnpm` with workspaces for package management, pinned to version `pnpm10.12.1`

Applied to files:

  • package.json
📚 Learning: 2025-10-21T16:04:56.292Z
Learnt from: ymc9
Repo: zenstackhq/zenstack-v3 PR: 319
File: packages/runtime/src/client/crud/dialects/base-dialect.ts:745-747
Timestamp: 2025-10-21T16:04:56.292Z
Learning: In packages/runtime/src/client/crud/dialects/base-dialect.ts, it's intentional that buildCursorFilter applies default ordering (via makeDefaultOrderBy fallback) while buildOrderBy does not. This ensures cursor-based pagination always has stable ordering for correctness, while regular queries remain unordered unless explicitly specified. This design is to be consistent with Prisma's pagination requirements.

Applied to files:

  • packages/orm/src/client/crud-types.ts
🧬 Code graph analysis (20)
tests/e2e/orm/client-api/create-many-and-return.test.ts (1)
packages/testtools/src/client.ts (1)
  • createTestClient (101-248)
tests/e2e/orm/client-api/update.test.ts (1)
packages/testtools/src/client.ts (1)
  • createTestClient (101-248)
tests/e2e/orm/client-api/raw-query.test.ts (1)
packages/testtools/src/client.ts (1)
  • createTestClient (101-248)
packages/orm/src/client/options.ts (1)
packages/schema/src/schema.ts (1)
  • SchemaDef (11-19)
tests/e2e/orm/client-api/create.test.ts (1)
packages/testtools/src/client.ts (1)
  • createTestClient (101-248)
tests/e2e/orm/client-api/create-many.test.ts (1)
packages/testtools/src/client.ts (1)
  • createTestClient (101-248)
scripts/test-generate.ts (2)
packages/sdk/src/ts-schema-generator.ts (1)
  • generate (64-78)
packages/cli/src/utils/exec-utils.ts (1)
  • execSync (7-16)
tests/e2e/orm/schemas/todo/schema.ts (3)
tests/regression/test/issue-204/schema.ts (2)
  • SchemaType (9-60)
  • schema (61-61)
tests/e2e/orm/schemas/basic/schema.ts (2)
  • SchemaType (9-286)
  • schema (287-287)
packages/schema/src/schema.ts (1)
  • SchemaDef (11-19)
packages/orm/src/client/contract.ts (3)
packages/schema/src/schema.ts (1)
  • GetModels (121-121)
packages/orm/src/client/options.ts (2)
  • ToQueryOptions (156-156)
  • QueryOptions (151-151)
packages/orm/src/client/crud-types.ts (2)
  • SimplifiedPlainResult (256-261)
  • DefaultModelResult (52-82)
tests/regression/test/issue-204/input.ts (3)
packages/clients/tanstack-query/test/schemas/basic/input.ts (1)
  • FooGetPayload (90-90)
tests/e2e/orm/schemas/auth-type/input.ts (1)
  • FooGetPayload (30-30)
tests/e2e/orm/schemas/json/input.ts (1)
  • FooGetPayload (30-30)
tests/e2e/orm/schemas/todo/input.ts (6)
tests/e2e/apps/rally/zenstack/input.ts (2)
  • SpaceGetPayload (270-270)
  • UserGetPayload (50-50)
packages/clients/tanstack-query/test/schemas/basic/input.ts (1)
  • UserGetPayload (30-30)
samples/next.js/zenstack/input.ts (1)
  • UserGetPayload (30-30)
samples/orm/zenstack/input.ts (1)
  • UserGetPayload (30-30)
tests/e2e/orm/schemas/basic/input.ts (1)
  • UserGetPayload (30-30)
tests/e2e/orm/schemas/default-auth/input.ts (1)
  • UserGetPayload (30-30)
packages/clients/tanstack-query/src/react.ts (5)
packages/clients/tanstack-query/src/vue.ts (3)
  • ModelQueryHooks (127-206)
  • ModelQueryOptions (87-89)
  • ModelQueryResult (91-91)
packages/orm/src/client/crud-types.ts (2)
  • SimplifiedResult (247-254)
  • SimplifiedPlainResult (256-261)
packages/schema/src/schema.ts (2)
  • SchemaDef (11-19)
  • GetModels (121-121)
packages/clients/tanstack-query/src/utils/types.ts (1)
  • TrimDelegateModelOperations (28-32)
packages/common-helpers/src/lower-case-first.ts (1)
  • lowerCaseFirst (1-3)
tests/regression/test/issue-204/schema.ts (3)
packages/clients/tanstack-query/test/schemas/basic/schema-lite.ts (2)
  • SchemaType (9-171)
  • schema (172-172)
tests/e2e/orm/schemas/todo/schema.ts (2)
  • SchemaType (9-395)
  • schema (396-396)
packages/schema/src/schema.ts (1)
  • SchemaDef (11-19)
packages/clients/tanstack-query/test/schemas/basic/input.ts (3)
samples/orm/zenstack/input.ts (2)
  • UserGetPayload (30-30)
  • PostGetPayload (70-70)
tests/e2e/github-repos/formbricks/input.ts (1)
  • UserGetPayload (510-510)
tests/e2e/orm/schemas/basic/input.ts (2)
  • UserGetPayload (30-30)
  • PostGetPayload (50-50)
packages/clients/tanstack-query/src/svelte.ts (5)
packages/orm/src/client/options.ts (1)
  • QueryOptions (151-151)
packages/clients/tanstack-query/src/react.ts (6)
  • ClientHooks (141-143)
  • ModelQueryHooks (147-261)
  • ModelQueryOptions (96-96)
  • ModelQueryResult (98-98)
  • useClientQueries (266-279)
  • useModelQueries (284-389)
packages/orm/src/client/crud-types.ts (2)
  • SimplifiedResult (247-254)
  • SimplifiedPlainResult (256-261)
packages/schema/src/schema.ts (2)
  • SchemaDef (11-19)
  • GetModels (121-121)
packages/clients/tanstack-query/src/utils/types.ts (1)
  • TrimDelegateModelOperations (28-32)
tests/e2e/orm/schemas/typing/input.ts (16)
packages/clients/tanstack-query/test/schemas/basic/input.ts (2)
  • UserGetPayload (30-30)
  • PostGetPayload (50-50)
samples/next.js/zenstack/input.ts (2)
  • UserGetPayload (30-30)
  • PostGetPayload (50-50)
tests/e2e/apps/rally/zenstack/input.ts (1)
  • UserGetPayload (50-50)
tests/e2e/github-repos/formbricks/input.ts (2)
  • UserGetPayload (510-510)
  • TagGetPayload (150-150)
tests/e2e/github-repos/trigger.dev/input.ts (1)
  • UserGetPayload (30-30)
tests/e2e/orm/schemas/default-auth/input.ts (2)
  • UserGetPayload (30-30)
  • ProfileGetPayload (50-50)
tests/e2e/orm/schemas/delegate/input.ts (1)
  • UserGetPayload (30-30)
tests/e2e/orm/schemas/name-mapping/input.ts (2)
  • UserGetPayload (30-30)
  • PostGetPayload (50-50)
tests/e2e/orm/schemas/omit/input.ts (2)
  • UserGetPayload (30-30)
  • PostGetPayload (50-50)
tests/e2e/orm/schemas/petstore/input.ts (1)
  • UserGetPayload (30-30)
tests/e2e/orm/schemas/todo/input.ts (1)
  • UserGetPayload (70-70)
tests/e2e/orm/schemas/typed-json/input.ts (1)
  • UserGetPayload (30-30)
tests/regression/test/issue-422/input.ts (2)
  • UserGetPayload (50-50)
  • ProfileGetPayload (70-70)
tests/runtimes/bun/schemas/input.ts (2)
  • UserGetPayload (30-30)
  • PostGetPayload (50-50)
tests/runtimes/edge-runtime/schemas/input.ts (1)
  • PostGetPayload (50-50)
tests/e2e/github-repos/cal.com/input.ts (1)
  • ProfileGetPayload (210-210)
tests/e2e/orm/schemas/delegate/input.ts (14)
packages/clients/tanstack-query/test/schemas/basic/input.ts (1)
  • UserGetPayload (30-30)
samples/orm/zenstack/input.ts (1)
  • UserGetPayload (30-30)
tests/e2e/apps/rally/zenstack/input.ts (2)
  • UserGetPayload (50-50)
  • CommentGetPayload (230-230)
tests/e2e/github-repos/formbricks/input.ts (1)
  • UserGetPayload (510-510)
tests/e2e/orm/schemas/basic/input.ts (2)
  • UserGetPayload (30-30)
  • CommentGetPayload (70-70)
tests/e2e/orm/schemas/default-auth/input.ts (1)
  • UserGetPayload (30-30)
tests/e2e/orm/schemas/name-mapping/input.ts (1)
  • UserGetPayload (30-30)
tests/e2e/orm/schemas/omit/input.ts (1)
  • UserGetPayload (30-30)
tests/e2e/orm/schemas/petstore/input.ts (1)
  • UserGetPayload (30-30)
tests/e2e/orm/schemas/todo/input.ts (1)
  • UserGetPayload (70-70)
tests/e2e/orm/schemas/typed-json/input.ts (1)
  • UserGetPayload (30-30)
tests/e2e/orm/schemas/typing/input.ts (1)
  • UserGetPayload (30-30)
tests/regression/test/issue-422/input.ts (1)
  • UserGetPayload (50-50)
tests/runtimes/bun/schemas/input.ts (1)
  • UserGetPayload (30-30)
tests/regression/test/issue-422/input.ts (15)
tests/e2e/apps/rally/zenstack/input.ts (2)
  • SessionGetPayload (90-90)
  • UserGetPayload (50-50)
tests/e2e/github-repos/cal.com/input.ts (2)
  • SessionGetPayload (730-730)
  • ProfileGetPayload (210-210)
packages/clients/tanstack-query/test/schemas/basic/input.ts (1)
  • UserGetPayload (30-30)
samples/next.js/zenstack/input.ts (1)
  • UserGetPayload (30-30)
samples/orm/zenstack/input.ts (2)
  • UserGetPayload (30-30)
  • ProfileGetPayload (50-50)
tests/e2e/github-repos/formbricks/input.ts (1)
  • UserGetPayload (510-510)
tests/e2e/orm/schemas/default-auth/input.ts (2)
  • UserGetPayload (30-30)
  • ProfileGetPayload (50-50)
tests/e2e/orm/schemas/delegate/input.ts (1)
  • UserGetPayload (30-30)
tests/e2e/orm/schemas/name-mapping/input.ts (1)
  • UserGetPayload (30-30)
tests/e2e/orm/schemas/omit/input.ts (1)
  • UserGetPayload (30-30)
tests/e2e/orm/schemas/petstore/input.ts (1)
  • UserGetPayload (30-30)
tests/e2e/orm/schemas/todo/input.ts (1)
  • UserGetPayload (70-70)
tests/e2e/orm/schemas/typed-json/input.ts (1)
  • UserGetPayload (30-30)
tests/e2e/orm/schemas/typing/input.ts (2)
  • UserGetPayload (30-30)
  • ProfileGetPayload (70-70)
tests/runtimes/bun/schemas/input.ts (1)
  • UserGetPayload (30-30)
tests/e2e/orm/schemas/json/input.ts (3)
packages/clients/tanstack-query/test/schemas/basic/input.ts (1)
  • FooGetPayload (90-90)
tests/e2e/orm/schemas/auth-type/input.ts (1)
  • FooGetPayload (30-30)
tests/regression/test/issue-204/input.ts (1)
  • FooGetPayload (30-30)
tests/e2e/github-repos/formbricks/input.ts (16)
tests/e2e/github-repos/cal.com/input.ts (5)
  • WebhookGetPayload (610-610)
  • MembershipGetPayload (330-330)
  • ApiKeyGetPayload (650-650)
  • AccountGetPayload (710-710)
  • UserGetPayload (170-170)
tests/e2e/orm/schemas/typing/input.ts (2)
  • TagGetPayload (90-90)
  • UserGetPayload (30-30)
tests/e2e/github-repos/trigger.dev/input.ts (3)
  • DataMigrationGetPayload (250-250)
  • ProjectGetPayload (190-190)
  • UserGetPayload (30-30)
tests/e2e/apps/rally/zenstack/input.ts (2)
  • AccountGetPayload (30-30)
  • UserGetPayload (50-50)
packages/clients/tanstack-query/test/schemas/basic/input.ts (1)
  • UserGetPayload (30-30)
samples/next.js/zenstack/input.ts (1)
  • UserGetPayload (30-30)
samples/orm/zenstack/input.ts (1)
  • UserGetPayload (30-30)
tests/e2e/orm/schemas/basic/input.ts (1)
  • UserGetPayload (30-30)
tests/e2e/orm/schemas/default-auth/input.ts (1)
  • UserGetPayload (30-30)
tests/e2e/orm/schemas/delegate/input.ts (1)
  • UserGetPayload (30-30)
tests/e2e/orm/schemas/name-mapping/input.ts (1)
  • UserGetPayload (30-30)
tests/e2e/orm/schemas/omit/input.ts (1)
  • UserGetPayload (30-30)
tests/e2e/orm/schemas/petstore/input.ts (1)
  • UserGetPayload (30-30)
tests/e2e/orm/schemas/todo/input.ts (1)
  • UserGetPayload (70-70)
tests/e2e/orm/schemas/typed-json/input.ts (1)
  • UserGetPayload (30-30)
tests/regression/test/issue-422/input.ts (1)
  • UserGetPayload (50-50)
⏰ 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: Agent
  • GitHub Check: build-test (20.x, sqlite)
  • GitHub Check: build-test (20.x, postgresql)
  • GitHub Check: claude-review

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 merges dev to main for v3.0.0-beta.29, introducing API refinements and bug fixes. The key changes focus on:

  1. Renaming ClientOptions to QueryOptions for query-specific operations
  2. Introducing SimplifiedPlainResult as a cleaner alternative to SimplifiedModelResult
  3. Fixing SQLite JSON function calls from jsonb_each to json_each
  4. Reordering type parameters in ModelResult and related types for better consistency

Reviewed changes

Copilot reviewed 74 out of 78 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/orm/src/client/options.ts Added QueryOptions type as a subset of ClientOptions
packages/orm/src/client/crud-types.ts Renamed SimplifiedModelResult to SimplifiedPlainResult, reordered type parameters
packages/orm/src/client/contract.ts Updated to use QueryOptions and SimplifiedPlainResult
packages/orm/src/client/crud/dialects/sqlite.ts Fixed jsonb_each to json_each for SQLite compatibility
packages/sdk/src/ts-schema-generator.ts Updated code generator to use new type names
scripts/test-generate.ts Added support for passing options to CLI
All input.ts files Regenerated with new ClientOptions→QueryOptions and SimplifiedModelResult→SimplifiedPlainResult
All schema.ts files Regenerated with class-based pattern (SchemaType class)
All package.json files Version bumped to 3.0.0-beta.29
pnpm-lock.yaml Updated dependency references
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

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

@ymc9 ymc9 added this pull request to the merge queue Dec 13, 2025
Merged via the queue into main with commit d35b939 Dec 13, 2025
15 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.

1 participant