-
-
Notifications
You must be signed in to change notification settings - Fork 12
refactor: rename runtime package to orm #332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThis pull request systematically renames the public package identifier from Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~18 minutes This is a large-scale refactoring with highly homogeneous changes—the same rename pattern ( Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this 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 renames the @zenstackhq/runtime package to @zenstackhq/orm to better reflect its purpose as an ORM engine. The refactoring updates all import statements, package references, and documentation across the entire codebase to use the new package name.
Key changes:
- Package renamed from
@zenstackhq/runtimeto@zenstackhq/ormin package.json files - All import statements updated from
@zenstackhq/runtimeto@zenstackhq/orm - Documentation and comments updated to reference "ORM" instead of "runtime"
Reviewed Changes
Copilot reviewed 99 out of 147 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/orm/package.json | Updated package name and description from runtime to orm |
| packages/*/package.json | Updated dependencies from @zenstackhq/runtime to @zenstackhq/orm |
| **/*.ts | Updated import statements to reference @zenstackhq/orm |
| packages/sdk/src/ts-schema-generator.ts | Updated generated code to import from @zenstackhq/orm |
| packages/cli/src/actions/*.ts | Updated CLI templates and messages to reference @zenstackhq/orm |
| README.md | Updated installation instructions and references |
| CLAUDE.md | Updated documentation to reflect orm package naming |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Claude finished @ymc9's task —— View job PR Review: Package Rename from
|
There was a problem hiding this 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
♻️ Duplicate comments (3)
tests/e2e/orm/schemas/petstore/input.ts (1)
9-10: LGTM; follows the package rename. See earlier script for repo-wide checks.tests/regression/test/issue-204/input.ts (1)
9-10: LGTM; consistent with rename. See earlier script for residuals.samples/blog/zenstack/input.ts (1)
9-10: LGTM; import source moved to@zenstackhq/orm.
🧹 Nitpick comments (1)
samples/blog/README.md (1)
24-32: Confirm export and consider consistency.Ensure
ZenStackClientis exported from@zenstackhq/orm. Consider usingcreateClientconsistently across the README to avoid two patterns unless both are intentionally documented.Run the script in my earlier comment to verify exports, or confirm intent to document both APIs.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (99)
CLAUDE.md(2 hunks)README.md(2 hunks)packages/cli/package.json(1 hunks)packages/cli/src/actions/generate.ts(1 hunks)packages/cli/src/actions/init.ts(1 hunks)packages/cli/src/actions/templates.ts(1 hunks)packages/cli/test/ts-schema-gen.test.ts(1 hunks)packages/create-zenstack/src/index.ts(1 hunks)packages/orm/package.json(1 hunks)packages/plugins/policy/package.json(1 hunks)packages/plugins/policy/src/column-collector.ts(1 hunks)packages/plugins/policy/src/expression-evaluator.ts(1 hunks)packages/plugins/policy/src/expression-transformer.ts(2 hunks)packages/plugins/policy/src/functions.ts(1 hunks)packages/plugins/policy/src/plugin.ts(1 hunks)packages/plugins/policy/src/policy-handler.ts(2 hunks)packages/plugins/policy/src/types.ts(1 hunks)packages/plugins/policy/src/utils.ts(1 hunks)packages/sdk/src/ts-schema-generator.ts(7 hunks)packages/server/package.json(1 hunks)packages/server/src/api/rpc/index.ts(1 hunks)packages/server/src/express/middleware.ts(1 hunks)packages/server/src/types.ts(1 hunks)packages/server/test/api/rpc.test.ts(1 hunks)packages/tanstack-query/package.json(1 hunks)packages/tanstack-query/src/react.ts(1 hunks)packages/testtools/package.json(1 hunks)packages/testtools/src/client.ts(1 hunks)packages/testtools/src/project.ts(1 hunks)packages/testtools/src/vitest-ext.ts(1 hunks)packages/zod/package.json(1 hunks)packages/zod/src/index.ts(1 hunks)packages/zod/src/types.ts(1 hunks)samples/blog/README.md(2 hunks)samples/blog/main.ts(1 hunks)samples/blog/package.json(1 hunks)samples/blog/zenstack/input.ts(1 hunks)samples/blog/zenstack/models.ts(1 hunks)samples/blog/zenstack/schema.ts(1 hunks)tests/e2e/orm/client-api/aggregate.test.ts(1 hunks)tests/e2e/orm/client-api/computed-fields.test.ts(2 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/default-values.test.ts(1 hunks)tests/e2e/orm/client-api/delegate.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/filter.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/name-mapping.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/client-api/upsert.test.ts(1 hunks)tests/e2e/orm/client-api/utils.ts(1 hunks)tests/e2e/orm/plugin-infra/entity-mutation-hooks.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/crud/create.test.ts(1 hunks)tests/e2e/orm/policy/migrated/client-extensions.test.ts(1 hunks)tests/e2e/orm/policy/migrated/multi-field-unique.test.ts(1 hunks)tests/e2e/orm/policy/migrated/todo-sample.test.ts(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/delegate/typecheck.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)tests/e2e/orm/schemas/typing/typecheck.ts(1 hunks)tests/e2e/package.json(1 hunks)tests/regression/package.json(1 hunks)tests/regression/test/issue-204/input.ts(1 hunks)tests/regression/test/issue-204/models.ts(1 hunks)tests/regression/test/issue-204/schema.ts(1 hunks)tests/regression/test/v2-migrated/issue-1135.test.ts(1 hunks)tests/regression/test/v2-migrated/issue-1763.test.ts(1 hunks)tests/regression/test/v2-migrated/issue-1857.test.ts(1 hunks)tests/regression/test/v2-migrated/issue-1894.test.ts(1 hunks)tests/regression/test/v2-migrated/issue-1991.test.ts(1 hunks)tests/regression/test/v2-migrated/issue-1994.test.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
{packages,samples,tests}/**
📄 CodeRabbit inference engine (CLAUDE.md)
Place packages only under
packages/,samples/, ortests/
Files:
tests/e2e/orm/client-api/aggregate.test.tspackages/plugins/policy/package.jsonpackages/tanstack-query/package.jsonpackages/testtools/src/vitest-ext.tspackages/server/package.jsontests/e2e/orm/plugin-infra/on-query-hooks.test.tstests/e2e/orm/schemas/typing/typecheck.tstests/e2e/orm/client-api/upsert.test.tstests/e2e/orm/client-api/update.test.tstests/e2e/orm/policy/crud/create.test.tspackages/cli/test/ts-schema-gen.test.tssamples/blog/package.jsontests/e2e/orm/client-api/filter.test.tspackages/plugins/policy/src/functions.tspackages/plugins/policy/src/policy-handler.tspackages/testtools/src/client.tspackages/create-zenstack/src/index.tstests/regression/test/v2-migrated/issue-1763.test.tstests/e2e/orm/schemas/todo/schema.tspackages/plugins/policy/src/expression-transformer.tspackages/orm/package.jsonpackages/server/test/api/rpc.test.tstests/e2e/package.jsontests/regression/test/v2-migrated/issue-1994.test.tstests/e2e/orm/schemas/petstore/schema.tstests/e2e/orm/policy/migrated/multi-field-unique.test.tstests/regression/test/v2-migrated/issue-1857.test.tstests/e2e/orm/client-api/find.test.tstests/regression/test/v2-migrated/issue-1135.test.tstests/regression/package.jsonpackages/plugins/policy/src/types.tstests/e2e/orm/plugin-infra/entity-mutation-hooks.test.tstests/e2e/orm/client-api/default-values.test.tstests/e2e/orm/client-api/transaction.test.tspackages/zod/package.jsontests/e2e/orm/client-api/update-many.test.tspackages/plugins/policy/src/expression-evaluator.tspackages/server/src/express/middleware.tstests/e2e/orm/client-api/delete-many.test.tstests/e2e/orm/policy/migrated/client-extensions.test.tstests/e2e/orm/schemas/delegate/models.tspackages/sdk/src/ts-schema-generator.tssamples/blog/zenstack/schema.tspackages/testtools/package.jsontests/e2e/orm/client-api/computed-fields.test.tstests/e2e/orm/schemas/basic/input.tssamples/blog/zenstack/models.tstests/e2e/orm/client-api/name-mapping.test.tstests/e2e/orm/client-api/delete.test.tssamples/blog/main.tstests/e2e/orm/client-api/raw-query.test.tstests/e2e/orm/schemas/petstore/models.tstests/e2e/orm/client-api/count.test.tspackages/zod/src/index.tspackages/plugins/policy/src/column-collector.tstests/e2e/orm/schemas/todo/input.tstests/e2e/orm/plugin-infra/on-kysely-query.test.tssamples/blog/README.mdpackages/plugins/policy/src/plugin.tstests/e2e/orm/schemas/typing/schema.tspackages/zod/src/types.tstests/regression/test/v2-migrated/issue-1991.test.tstests/e2e/orm/policy/migrated/todo-sample.test.tspackages/cli/src/actions/generate.tstests/e2e/orm/schemas/delegate/typecheck.tspackages/plugins/policy/src/utils.tstests/e2e/orm/schemas/name-mapping/input.tstests/e2e/orm/client-api/undefined-values.test.tspackages/cli/src/actions/init.tstests/e2e/orm/schemas/basic/models.tspackages/cli/package.jsontests/e2e/orm/schemas/name-mapping/schema.tstests/regression/test/issue-204/schema.tstests/e2e/orm/client-api/create.test.tspackages/testtools/src/project.tstests/e2e/orm/schemas/delegate/schema.tstests/e2e/orm/policy/basic-schema-read.test.tstests/regression/test/v2-migrated/issue-1894.test.tstests/e2e/orm/client-api/delegate.test.tstests/regression/test/issue-204/input.tstests/e2e/orm/schemas/basic/schema.tspackages/cli/src/actions/templates.tstests/e2e/orm/schemas/petstore/input.tstests/e2e/orm/client-api/create-many-and-return.test.tstests/e2e/orm/schemas/name-mapping/models.tspackages/server/src/types.tstests/e2e/orm/client-api/group-by.test.tspackages/server/src/api/rpc/index.tssamples/blog/zenstack/input.tstests/e2e/orm/client-api/create-many.test.tstests/e2e/orm/client-api/utils.tstests/e2e/orm/schemas/todo/models.tspackages/tanstack-query/src/react.tstests/regression/test/issue-204/models.tstests/e2e/orm/schemas/typing/models.tstests/e2e/orm/schemas/delegate/input.tstests/e2e/orm/schemas/typing/input.ts
tests/e2e/**
📄 CodeRabbit inference engine (CLAUDE.md)
End-to-end tests must live under
tests/e2e/
Files:
tests/e2e/orm/client-api/aggregate.test.tstests/e2e/orm/plugin-infra/on-query-hooks.test.tstests/e2e/orm/schemas/typing/typecheck.tstests/e2e/orm/client-api/upsert.test.tstests/e2e/orm/client-api/update.test.tstests/e2e/orm/policy/crud/create.test.tstests/e2e/orm/client-api/filter.test.tstests/e2e/orm/schemas/todo/schema.tstests/e2e/package.jsontests/e2e/orm/schemas/petstore/schema.tstests/e2e/orm/policy/migrated/multi-field-unique.test.tstests/e2e/orm/client-api/find.test.tstests/e2e/orm/plugin-infra/entity-mutation-hooks.test.tstests/e2e/orm/client-api/default-values.test.tstests/e2e/orm/client-api/transaction.test.tstests/e2e/orm/client-api/update-many.test.tstests/e2e/orm/client-api/delete-many.test.tstests/e2e/orm/policy/migrated/client-extensions.test.tstests/e2e/orm/schemas/delegate/models.tstests/e2e/orm/client-api/computed-fields.test.tstests/e2e/orm/schemas/basic/input.tstests/e2e/orm/client-api/name-mapping.test.tstests/e2e/orm/client-api/delete.test.tstests/e2e/orm/client-api/raw-query.test.tstests/e2e/orm/schemas/petstore/models.tstests/e2e/orm/client-api/count.test.tstests/e2e/orm/schemas/todo/input.tstests/e2e/orm/plugin-infra/on-kysely-query.test.tstests/e2e/orm/schemas/typing/schema.tstests/e2e/orm/policy/migrated/todo-sample.test.tstests/e2e/orm/schemas/delegate/typecheck.tstests/e2e/orm/schemas/name-mapping/input.tstests/e2e/orm/client-api/undefined-values.test.tstests/e2e/orm/schemas/basic/models.tstests/e2e/orm/schemas/name-mapping/schema.tstests/e2e/orm/client-api/create.test.tstests/e2e/orm/schemas/delegate/schema.tstests/e2e/orm/policy/basic-schema-read.test.tstests/e2e/orm/client-api/delegate.test.tstests/e2e/orm/schemas/basic/schema.tstests/e2e/orm/schemas/petstore/input.tstests/e2e/orm/client-api/create-many-and-return.test.tstests/e2e/orm/schemas/name-mapping/models.tstests/e2e/orm/client-api/group-by.test.tstests/e2e/orm/client-api/create-many.test.tstests/e2e/orm/client-api/utils.tstests/e2e/orm/schemas/todo/models.tstests/e2e/orm/schemas/typing/models.tstests/e2e/orm/schemas/delegate/input.tstests/e2e/orm/schemas/typing/input.ts
**/schema.ts
📄 CodeRabbit inference engine (CLAUDE.md)
The generated TypeScript schema should be named
schema.ts
Files:
tests/e2e/orm/schemas/todo/schema.tstests/e2e/orm/schemas/petstore/schema.tssamples/blog/zenstack/schema.tstests/e2e/orm/schemas/typing/schema.tstests/e2e/orm/schemas/name-mapping/schema.tstests/regression/test/issue-204/schema.tstests/e2e/orm/schemas/delegate/schema.tstests/e2e/orm/schemas/basic/schema.ts
🧠 Learnings (2)
📚 Learning: 2025-09-04T12:38:14.150Z
Learnt from: CR
PR: zenstackhq/zenstack-v3#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-04T12:38:14.150Z
Learning: Always run `zenstack generate` after modifying ZModel schemas
Applied to files:
README.md
📚 Learning: 2025-10-21T16:09:31.218Z
Learnt from: ymc9
PR: zenstackhq/zenstack-v3#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:
packages/zod/src/index.ts
🧬 Code graph analysis (1)
packages/cli/src/actions/templates.ts (1)
packages/create-zenstack/src/templates.ts (1)
STARTER_MAIN_TS(29-58)
⏰ 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). (3)
- GitHub Check: build-test (20.x, sqlite)
- GitHub Check: build-test (20.x, postgresql)
- GitHub Check: claude-review
🔇 Additional comments (102)
tests/e2e/orm/client-api/group-by.test.ts (1)
1-1: Import rename correctly applied.The import statement has been properly updated to reflect the package rename from
@zenstackhq/runtimeto@zenstackhq/orm. TheClientContracttype is correctly used throughout the test file.tests/e2e/orm/client-api/default-values.test.ts (1)
2-3: LGTM! Import paths correctly updated.The import paths have been correctly updated from
@zenstackhq/runtimeto@zenstackhq/orm, aligning with the PR objective. All imported symbols remain in use throughout the test file, and no functional changes were introduced.tests/e2e/orm/client-api/computed-fields.test.ts (1)
105-105: LGTM! Package rename applied correctly.Both import statements in the embedded test snippets have been successfully updated from
@zenstackhq/runtimeto@zenstackhq/orm, aligning with the PR's package rename objective. The test logic remains unchanged.Also applies to: 172-172
packages/cli/test/ts-schema-gen.test.ts (1)
1-1: LGTM! Import path updated correctly.The import path has been correctly updated from
@zenstackhq/runtime/schemato@zenstackhq/orm/schema, consistent with the package rename. All usages ofExpressionUtilsthroughout the test file remain valid.tests/e2e/orm/plugin-infra/entity-mutation-hooks.test.ts (1)
1-1: LGTM! Import path correctly updated.The import statement has been successfully updated from
@zenstackhq/runtimeto@zenstackhq/orm, aligning with the package rename objective of this PR.tests/e2e/orm/schemas/basic/models.ts (1)
9-9: LGTM! Import path correctly updated to reflect the package rename.The import statement has been properly updated from
@zenstackhq/runtimeto@zenstackhq/orm, which aligns with the PR objective. Since this is a generated file, this confirms that the ZenStack CLI generator has been updated correctly to reference the new package name.tests/e2e/orm/schemas/typing/typecheck.ts (1)
1-1: LGTM! Import updated correctly.The import source has been properly updated from
@zenstackhq/runtimeto@zenstackhq/orm, aligning with the package rename objective.tests/e2e/orm/policy/crud/create.test.ts (2)
1-370: File path and imports align with package rename PR objective.The file path has correctly been updated from
tests/e2e/runtime/...totests/e2e/orm/..., and the imports continue to reference the testtools package as expected. The test cases themselves remain unchanged and correctly exercise policy create functionality.
1-2: No issues found — codebase does not enforce consistent import ordering.The sampled test files show inconsistent import ordering patterns:
create.test.tsfollows internal→external→local, whilecount.test.tsmixes external, internal, and local imports throughout. Since the codebase does not consistently apply any ordering convention, the import order in the file under review is acceptable.tests/e2e/orm/client-api/utils.ts (1)
1-1: Import statement is correctly updated and properly resolves.Verification confirms the package rename from
@zenstackhq/runtimeto@zenstackhq/ormis complete and consistent:
- No remaining
@zenstackhq/runtimereferences in the codebaseClientContractis properly exported frompackages/ormviaexport * from './contract'- Package dependencies updated across 10 package.json files
The import will resolve correctly at runtime.
packages/plugins/policy/src/column-collector.ts (1)
1-1: Package rename correctly applied; refactoring is complete.The import path has been successfully updated from
@zenstackhq/runtimeto@zenstackhq/orm. Verification confirms no stale references to the old package name remain in the codebase.packages/plugins/policy/src/expression-evaluator.ts (1)
3-13: LGTM! Package import path correctly updated.The import path has been correctly updated from
@zenstackhq/runtime/schemato@zenstackhq/orm/schema, consistent with the package rename objective.packages/plugins/policy/src/expression-transformer.ts (1)
2-28: All package migration verified and complete.Verification confirms zero remaining references to
@zenstackhq/runtimeacross the codebase, with 116 successful references to the new@zenstackhq/ormpackage. The target file atpackages/plugins/policy/src/expression-transformer.tscorrectly imports from@zenstackhq/ormand@zenstackhq/orm/schemawith no mixed or outdated imports.tests/e2e/orm/client-api/undefined-values.test.ts (1)
2-2: LGTM! Import path updated correctly and verified.The import path has been successfully updated from
@zenstackhq/runtimeto@zenstackhq/orm. Verification confirms thatClientContractis properly exported through the package's export chain:@zenstackhq/orm→src/index.ts→src/client/index.ts→src/client/contract.ts.tests/e2e/orm/schemas/petstore/models.ts (1)
9-9: LGTM! Generated import path correctly updated.The auto-generated file correctly reflects the package rename from
@zenstackhq/runtimeto@zenstackhq/orm.tests/e2e/orm/policy/basic-schema-read.test.ts (1)
2-2: LGTM! Import path correctly updated.The import source for
ClientContracthas been successfully migrated to the renamed ORM package.tests/regression/test/v2-migrated/issue-1991.test.ts (1)
30-30: LGTM! Test fixture import path correctly updated.The import path in the test's source file fixture has been properly updated to reference the renamed ORM package.
samples/blog/zenstack/schema.ts (1)
8-8: LGTM! Generated schema imports correctly updated.The auto-generated schema file correctly updates the import path from
@zenstackhq/runtime/schemato@zenstackhq/orm/schema, preserving the subpath structure.tests/e2e/orm/policy/migrated/todo-sample.test.ts (1)
2-2: LGTM! Import path correctly updated.The type import for
ClientContracthas been successfully migrated to the renamed ORM package.tests/e2e/orm/client-api/update-many.test.ts (1)
1-1: LGTM! Import path correctly updated.The import source has been properly updated to reference the renamed ORM package.
tests/regression/test/v2-migrated/issue-1857.test.ts (1)
22-22: LGTM! Test fixture import path correctly updated.The import path in the test's extra source file has been properly migrated to the renamed ORM package.
samples/blog/package.json (1)
17-17: LGTM! Dependency correctly updated.The package dependency has been successfully migrated from
@zenstackhq/runtimeto@zenstackhq/ormwhile preserving the workspace protocol. Verification confirms no remaining references to the old package exist anywhere in the codebase.tests/regression/test/v2-migrated/issue-1135.test.ts (1)
34-34: LGTM! Clean package rename.The import path update from
@zenstackhq/runtimeto@zenstackhq/ormis consistent with the PR's refactoring objective.tests/e2e/orm/client-api/name-mapping.test.ts (1)
3-3: LGTM! Import path correctly updated.The
ClientContracttype import now references the new@zenstackhq/ormpackage.tests/e2e/orm/plugin-infra/on-query-hooks.test.ts (1)
1-1: LGTM! Package import correctly updated.Both
definePluginandClientContractnow import from@zenstackhq/ormas expected.tests/e2e/orm/policy/migrated/multi-field-unique.test.ts (1)
2-2: LGTM! Error type import updated correctly.The
QueryErrorimport now references the new ORM package location.packages/create-zenstack/src/index.ts (1)
70-70: LGTM! Scaffolding dependency correctly updated.New projects created with
create-zenstackwill now install@zenstackhq/orm@nextinstead of the old runtime package.packages/zod/src/types.ts (1)
1-1: LGTM! Schema type imports updated correctly.The schema type imports now reference
@zenstackhq/orm/schemamaintaining the same subpath structure.tests/e2e/orm/schemas/typing/schema.ts (1)
8-8: LGTM! Generated schema file updated correctly.The generated schema now imports from
@zenstackhq/orm/schema, confirming the code generator has been properly updated.tests/regression/test/v2-migrated/issue-1994.test.ts (1)
56-56: LGTM! Test fixture import updated correctly.The
ZenStackClientimport in the test's source fixture now references@zenstackhq/orm.tests/e2e/orm/policy/migrated/client-extensions.test.ts (1)
1-1: LGTM! Import path correctly updated.The import statement has been properly updated to use
@zenstackhq/orminstead of@zenstackhq/runtime, maintaining the same API surface.tests/regression/test/v2-migrated/issue-1763.test.ts (1)
27-27: LGTM! Test fixture import correctly updated.The embedded test code now imports
ZenStackClientfrom@zenstackhq/orm, aligning with the package rename.tests/regression/test/v2-migrated/issue-1894.test.ts (1)
29-29: LGTM! Test fixture import correctly updated.The embedded test code import has been properly updated to reference
@zenstackhq/orm.tests/e2e/orm/client-api/transaction.test.ts (1)
2-2: LGTM! Type import correctly updated.The
ClientContracttype import has been properly migrated to@zenstackhq/orm.tests/e2e/orm/schemas/basic/schema.ts (1)
8-8: LGTM! Generated schema imports correctly updated.The generated schema file now imports from
@zenstackhq/orm/schema. This confirms the code generation tooling has been properly updated to reference the renamed package.packages/server/src/express/middleware.ts (1)
1-2: LGTM! Type imports correctly updated.Both
ClientContractandSchemaDeftype imports have been properly migrated to@zenstackhq/orm, maintaining type safety while reflecting the package rename.tests/e2e/package.json (1)
18-18: LGTM! Package dependency correctly updated.The dependency reference has been properly updated from
@zenstackhq/runtimeto@zenstackhq/ormwith the workspace protocol maintained.packages/cli/package.json (1)
52-52: LGTM! DevDependency correctly updated.The devDependency has been properly updated to reference
@zenstackhq/orminstead of@zenstackhq/runtime.samples/blog/main.ts (1)
2-2: LGTM! Package rename applied correctly.The import source has been correctly updated from
@zenstackhq/runtimeto@zenstackhq/orm, consistent with the PR's objective to rename the runtime package.packages/zod/src/index.ts (1)
1-1: LGTM! Schema import path updated correctly.The type imports have been correctly updated from
@zenstackhq/runtime/schemato@zenstackhq/orm/schema, maintaining the same subpath structure.tests/regression/package.json (1)
17-17: LGTM! Dependency renamed correctly.The devDependency has been correctly updated from
@zenstackhq/runtimeto@zenstackhq/orm, maintaining the workspace protocol.tests/e2e/orm/client-api/upsert.test.ts (1)
1-1: LGTM! Test import updated correctly.The type import for
ClientContracthas been correctly updated from@zenstackhq/runtimeto@zenstackhq/orm.tests/e2e/orm/schemas/petstore/schema.ts (1)
8-8: LGTM! Generated schema import updated correctly.The import in this generated file has been correctly updated from
@zenstackhq/runtime/schemato@zenstackhq/orm/schema, ensuring generated code uses the renamed package.samples/blog/zenstack/models.ts (1)
9-9: LGTM! Generated models import updated correctly.The type imports in this generated file have been correctly updated from
@zenstackhq/runtimeto@zenstackhq/orm.tests/e2e/orm/schemas/delegate/typecheck.ts (1)
1-1: LGTM! Client import updated correctly.The import for
ZenStackClienthas been correctly updated from@zenstackhq/runtimeto@zenstackhq/orm.packages/tanstack-query/package.json (1)
28-28: LGTM! Package dependency renamed correctly.The dependency has been correctly updated from
@zenstackhq/runtimeto@zenstackhq/orm, maintaining the workspace protocol.packages/plugins/policy/src/utils.ts (1)
1-2: LGTM! Import sources correctly updated to ORM package.The imports have been consistently updated from the runtime package to the ORM package, maintaining the same type signatures and module structure.
README.md (2)
50-50: LGTM! Documentation correctly references ORM runtime.The migration note has been updated to explicitly reference "ZenStack v3's ORM runtime" for clarity.
80-80: LGTM! Installation command updated to ORM package.The installation instruction now correctly references
@zenstackhq/orm@nextinstead of the old runtime package name.packages/plugins/policy/package.json (1)
41-41: LGTM! Dependency correctly updated to ORM package.The plugin's dependency has been properly migrated from the runtime package to the ORM package while maintaining the workspace reference.
tests/e2e/orm/plugin-infra/on-kysely-query.test.ts (1)
1-1: LGTM! Test import correctly updated to ORM package.The ClientContract type import has been properly migrated to the ORM package without affecting test logic or behavior.
packages/testtools/package.json (1)
36-36: LGTM! Test tooling dependency correctly updated.The testtools package dependency has been properly migrated to the ORM package while maintaining the workspace reference.
packages/server/src/types.ts (1)
1-2: LGTM! Server type imports correctly updated to ORM package.Both ClientContract and SchemaDef imports have been properly migrated from the runtime package to the ORM package, maintaining all type definitions unchanged.
packages/tanstack-query/src/react.ts (1)
8-9: LGTM! TanStack Query type imports correctly updated to ORM package.All type imports have been properly migrated from the runtime package to the ORM package, including both core types and schema-related types.
packages/zod/package.json (1)
28-28: LGTM! Zod package dependency correctly updated.The dependency has been properly migrated from the runtime package to the ORM package while maintaining the workspace reference.
packages/plugins/policy/src/types.ts (1)
1-2: LGTM! Import paths correctly updated to ORM package.The import sources have been systematically updated from
@zenstackhq/runtimeto@zenstackhq/orm, aligning with the package rename. Type definitions remain unchanged.packages/orm/package.json (1)
2-4: LGTM! Package metadata correctly updated.The package name and description have been updated to reflect the rename from "runtime" to "orm". All other package configurations remain unchanged.
packages/server/package.json (1)
55-55: LGTM! Dependency correctly updated to ORM package.The workspace dependency has been updated from
@zenstackhq/runtimeto@zenstackhq/orm, maintaining consistency with the package rename.tests/e2e/orm/schemas/delegate/schema.ts (1)
8-8: LGTM! Generated schema file correctly imports from ORM package.The import path for
SchemaDefandExpressionUtilshas been updated to@zenstackhq/orm/schema, consistent with the package rename. As this is an auto-generated file, the change reflects correct code generation logic.tests/e2e/orm/schemas/typing/input.ts (1)
9-10: LGTM! Generated input types correctly import from ORM package.Both import statements have been updated to source types from
@zenstackhq/orm, including all Args types, Input types, and result types. The generated type aliases remain structurally unchanged.packages/sdk/src/ts-schema-generator.ts (3)
121-121: LGTM! Schema generator correctly updated to emit ORM imports.The import string literal has been updated to generate imports from
@zenstackhq/orm/schemaforSchemaDefandExpressionUtilstypes.
1119-1143: LGTM! Model generator correctly updated to emit ORM imports.The generator now creates import statements sourcing
ModelResultandTypeDefResultfrom@zenstackhq/orm, ensuring all generated models.ts files reference the renamed package.
1292-1362: LGTM! Input type generator correctly updated to emit ORM imports.All import generation logic has been updated to source Args types, Input types, and result types from
@zenstackhq/orm. This ensures generated input.ts files consistently reference the renamed package across all type imports.tests/e2e/orm/schemas/typing/models.ts (1)
9-9: LGTM! Generated models file correctly imports from ORM package.The import statement has been updated to source
ModelResultandTypeDefResultfrom@zenstackhq/orm, consistent with the package rename. All exported type aliases remain unchanged.CLAUDE.md (3)
36-36: LGTM! Documentation correctly updated to reference ORM package.The Core Components section now correctly identifies the package as
@zenstackhq/orm, aligning with the package rename.
57-57: LGTM! Package Dependencies section correctly updated.The section heading now references "ORM" instead of "Runtime", maintaining consistency with the package rename.
64-64: LGTM! Testing Strategy section correctly updated.The reference to "ORM package" replaces the previous "runtime package" terminology, completing the documentation update.
samples/blog/README.md (1)
81-92: LGTM: import path renamed correctly.tests/e2e/orm/schemas/delegate/models.ts (1)
9-16: All exported model types are valid.Verification confirms that
Video,RatedVideo,Image, andGalleryare all defined in the schema. TheModelResultimport and subsequent type exports are correct.tests/e2e/orm/schemas/basic/input.ts (1)
9-10: Rename to@zenstackhq/ormis complete and consistent across the codebase. No leftover@zenstackhq/runtimeimports remain, allpackage.jsonfiles correctly reference the new package, and required exports exist in the ORM source. The changes in the file under review align with the completed migration.tests/e2e/orm/schemas/delegate/input.ts (1)
9-10: LGTM! Import path correctly updated.The generated type imports are correctly updated to reference
@zenstackhq/orminstead of@zenstackhq/runtime, aligning with the package rename objective.tests/e2e/orm/client-api/create-many.test.ts (1)
2-2: LGTM! Import correctly updated.The
ClientContracttype import is correctly updated to reference the@zenstackhq/ormpackage.tests/e2e/orm/client-api/update.test.ts (1)
2-2: LGTM! Import correctly updated.The
ClientContracttype import is correctly updated to reference the@zenstackhq/ormpackage.tests/e2e/orm/client-api/count.test.ts (1)
2-2: LGTM! Import correctly updated.The
ClientContracttype import is correctly updated to reference the@zenstackhq/ormpackage.tests/e2e/orm/schemas/name-mapping/schema.ts (1)
8-8: LGTM! Schema import correctly updated.The generated schema file correctly imports
SchemaDefandExpressionUtilsfrom@zenstackhq/orm/schema, aligning with the package rename.tests/e2e/orm/client-api/aggregate.test.ts (1)
1-1: LGTM! Import correctly updated.The
ClientContracttype import is correctly updated to reference the@zenstackhq/ormpackage.packages/cli/src/actions/templates.ts (1)
29-29: LGTM! Template import correctly updated.The starter template correctly imports
ZenStackClientfrom@zenstackhq/orm, ensuring new projects generated by the CLI use the renamed package.tests/e2e/orm/schemas/name-mapping/models.ts (1)
9-9: LGTM! Import correctly updated.The generated models file correctly imports
ModelResultfrom@zenstackhq/orm, aligning with the package rename.packages/plugins/policy/src/policy-handler.ts (1)
2-20: LGTM! Import paths correctly updated.The import statements have been systematically updated from
@zenstackhq/runtimeto@zenstackhq/ormand from@zenstackhq/runtime/schemato@zenstackhq/orm/schema. This aligns with the PR objective to rename the runtime package to orm.packages/plugins/policy/src/plugin.ts (1)
1-2: LGTM! Import paths correctly updated.The type imports have been updated to reference the new
@zenstackhq/ormpackage and its/schemasubmodule, consistent with the package rename.tests/e2e/orm/client-api/delete-many.test.ts (1)
2-2: LGTM! Test import correctly updated.The
ClientContracttype import has been updated to the new@zenstackhq/ormpackage.tests/regression/test/issue-204/schema.ts (1)
8-8: LGTM! Generated schema import correctly updated.The
SchemaDeftype import has been updated to reference@zenstackhq/orm/schema. Since this is a generated file, the change reflects the correct update in the code generation templates.tests/e2e/orm/client-api/create.test.ts (1)
1-1: LGTM! Test import correctly updated.The
ClientContracttype import has been updated to the new@zenstackhq/ormpackage.tests/e2e/orm/client-api/filter.test.ts (1)
2-2: LGTM! Test import correctly updated.The
ClientContracttype import has been updated to the new@zenstackhq/ormpackage.packages/testtools/src/vitest-ext.ts (1)
1-1: LGTM! Error class imports correctly updated.The error class imports (
InputValidationError,NotFoundError,RejectedByPolicyError) have been updated to reference the new@zenstackhq/ormpackage.packages/cli/src/actions/generate.ts (1)
33-45: LGTM! Example code correctly updated.The example code shown to users after code generation has been updated to import
ZenStackClientfrom@zenstackhq/orminstead of@zenstackhq/runtime. This ensures users see the correct package name in the CLI output.tests/e2e/orm/client-api/delete.test.ts (1)
2-2: LGTM! Clean import path update.The import has been correctly updated to use the new ORM package name, aligning with the PR's objective to rename the runtime package to orm.
packages/cli/src/actions/init.ts (1)
16-16: LGTM! Package dependency correctly updated.The initialization now installs the ORM package instead of the runtime package, maintaining it as a production dependency (dev: false).
tests/e2e/orm/schemas/todo/schema.ts (1)
8-8: LGTM! Generated schema import correctly updated.The schema definition now imports from the ORM package's schema subpath, consistent with the package rename.
packages/server/test/api/rpc.test.ts (1)
1-2: LGTM! Test imports correctly updated.Both
ClientContractandSchemaDefimports have been updated to reference the ORM package, aligning with the package rename.tests/e2e/orm/client-api/raw-query.test.ts (1)
2-2: LGTM! Import path correctly updated.The
ClientContracttype import now uses the ORM package, consistent with the package rename.packages/testtools/src/project.ts (1)
24-24: LGTM! Test project configuration updated.The symlink setup now references the ORM package instead of runtime, ensuring test projects correctly link to the renamed package.
tests/e2e/orm/client-api/delegate.test.ts (1)
3-3: LGTM! Import updated to ORM package.The
ClientContracttype import correctly references the renamed ORM package.tests/e2e/orm/client-api/create-many-and-return.test.ts (1)
1-1: LGTM! Import correctly updated.The
ClientContracttype import now references the ORM package, completing the systematic rename from runtime to orm.packages/server/src/api/rpc/index.ts (1)
2-9: LGTM! Import sources correctly updated.The import paths have been successfully migrated from
@zenstackhq/runtimeto@zenstackhq/orm, aligning with the package rename. No functional changes introduced.tests/regression/test/issue-204/models.ts (1)
9-9: LGTM! Auto-generated file correctly updated.The import source has been properly updated to
@zenstackhq/orm. As this is an auto-generated file, the change confirms that the code generator has been correctly updated to reference the renamed package.tests/e2e/orm/schemas/todo/input.ts (1)
9-10: LGTM! Auto-generated imports correctly updated.The import sources for all ORM argument types and utility types have been properly migrated to
@zenstackhq/orm. The extensive type exports (FindManyArgs, CreateArgs, etc.) remain unchanged, confirming a clean package rename.packages/plugins/policy/src/functions.ts (1)
2-3: LGTM! Plugin imports correctly migrated.The import sources for
ZModelFunction,ZModelFunctionContext,CRUD, andQueryUtilshave been properly updated to@zenstackhq/orm. The policy handler implementation remains functionally unchanged.packages/testtools/src/client.ts (1)
4-5: LGTM! Test tooling imports correctly updated.The import sources for
ZenStackClient,ClientContract,ClientOptions, andSchemaDefhave been properly migrated to the ORM package. Test client creation functions remain functionally unchanged.tests/e2e/orm/client-api/find.test.ts (1)
2-3: LGTM! Test imports correctly updated.The import sources for
ClientContract,InputValidationError, andNotFoundErrorhave been properly migrated to@zenstackhq/orm. All test logic remains unchanged and will continue to function correctly with the renamed package.tests/e2e/orm/schemas/todo/models.ts (1)
9-9: LGTM! Auto-generated model types correctly updated.The import source for
ModelResulthas been properly updated to@zenstackhq/orm. As an auto-generated file, this confirms the code generator is correctly referencing the renamed package for all model type exports.tests/e2e/orm/schemas/name-mapping/input.ts (1)
9-10: LGTM! Auto-generated input types correctly updated.The import sources for all argument types and utility types have been properly migrated to
@zenstackhq/orm. The comprehensive type exports for User and Post models remain intact, confirming a successful package rename.
Summary by CodeRabbit
Chores
@zenstackhq/runtimeto@zenstackhq/ormacross all dependencies and internal references.Documentation
@zenstackhq/orm.