-
-
Notifications
You must be signed in to change notification settings - Fork 11
merge dev to main (v3.0.0-beta.18) #369
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
* feat(tanstack): migrate vue query * addressing PR comments * fix infinite query
Co-authored-by: ymc9 <[email protected]>
* feat(tanstack): migrate svelte query * fix hooks typing * addressing PR comments
* fix(tanstack): improve mutation mutateAsync typing * simplify typing
|
Warning Rate limit exceeded@ymc9 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 17 minutes and 8 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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. 📒 Files selected for processing (11)
Note Other AI code review bot(s) detectedCodeRabbit 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. WalkthroughVersion bumped across the monorepo (3.0.0-beta.17 to 3.0.0-beta.18). Added Vue and Svelte client integrations for TanStack Query alongside React. Refactored React client to use new generic ClientHooks and ModelQueryHooks types. Simplified internal fetcher signature by removing checkReadBack parameter. Added type utilities for delegate model operation filtering. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~35 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (2 passed)
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 |
|
Claude finished @ymc9's task —— View job PR Review: v3.0.0-beta.18 ReleaseReview Checklist:
🔍 Review SummaryThis is a significant release that adds multi-framework support to the TanStack Query package, expanding from React-only to include Svelte and Vue implementations. The changes are well-structured and maintain consistency across frameworks. ✅ Positive FindingsArchitecture & Design
Code Quality
Enhanced Functionality
|
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 bumps the package version from 3.0.0-beta.17 to 3.0.0-beta.18 across all packages and adds support for Vue and Svelte in the TanStack Query client.
- Version bump across all workspace packages to
3.0.0-beta.18 - Added Vue and Svelte support to
@zenstackhq/tanstack-querypackage - Refactored common code to improve maintainability and remove unused parameters
Reviewed Changes
Copilot reviewed 32 out of 33 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
Multiple package.json files |
Version bump from 3.0.0-beta.17 to 3.0.0-beta.18 |
pnpm-workspace.yaml |
Added Vue (3.5.22) and Svelte (5.43.3) to catalog |
pnpm-lock.yaml |
Updated lockfile with new dependencies and version changes |
packages/orm/src/client/contract.ts |
Extracted delegate model operations list to named type for reusability |
packages/clients/tanstack-query/src/utils/types.ts |
Added TrimDelegateModelOperations helper type |
packages/clients/tanstack-query/src/utils/common.ts |
Simplified fetcher function signature by removing unused parameter |
packages/clients/tanstack-query/src/react.ts |
Refactored to use new type helpers and cleaned up mutation calls |
packages/clients/tanstack-query/src/vue.ts |
New Vue 3 integration implementation |
packages/clients/tanstack-query/src/svelte.ts |
New Svelte integration implementation |
packages/clients/tanstack-query/tsup.config.ts |
Added vue and svelte entry points |
packages/clients/tanstack-query/package.json |
Added exports, dependencies, and peer dependencies for Vue and Svelte |
| Test files | Added comprehensive typing tests for Vue and Svelte integrations |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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: 2
📜 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 (32)
package.json(1 hunks)packages/cli/package.json(1 hunks)packages/clients/tanstack-query/package.json(4 hunks)packages/clients/tanstack-query/src/react.ts(11 hunks)packages/clients/tanstack-query/src/svelte.ts(1 hunks)packages/clients/tanstack-query/src/utils/common.ts(2 hunks)packages/clients/tanstack-query/src/utils/types.ts(2 hunks)packages/clients/tanstack-query/src/vue.ts(1 hunks)packages/clients/tanstack-query/test/react-typing-test.ts(1 hunks)packages/clients/tanstack-query/test/svelte-typing-test.ts(1 hunks)packages/clients/tanstack-query/test/vue-typing-test.ts(1 hunks)packages/clients/tanstack-query/tsup.config.ts(1 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/dialects/sql.js/package.json(1 hunks)packages/language/package.json(1 hunks)packages/orm/package.json(1 hunks)packages/orm/src/client/contract.ts(1 hunks)packages/plugins/policy/package.json(1 hunks)packages/schema/package.json(1 hunks)packages/sdk/package.json(1 hunks)packages/server/package.json(1 hunks)packages/testtools/package.json(1 hunks)packages/zod/package.json(1 hunks)pnpm-workspace.yaml(1 hunks)samples/next.js/package.json(1 hunks)samples/orm/package.json(1 hunks)tests/e2e/package.json(1 hunks)tests/regression/package.json(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (9)
packages/clients/tanstack-query/test/svelte-typing-test.ts (1)
packages/clients/tanstack-query/src/svelte.ts (1)
useClientQueries(212-217)
packages/orm/src/client/contract.ts (1)
packages/schema/src/schema.ts (3)
SchemaDef(10-18)GetModels(109-109)IsDelegateModel(264-267)
packages/clients/tanstack-query/src/utils/types.ts (2)
packages/schema/src/schema.ts (3)
SchemaDef(10-18)GetModels(109-109)IsDelegateModel(264-267)packages/orm/src/client/contract.ts (1)
OperationsIneligibleForDelegateModels(798-798)
packages/clients/tanstack-query/test/react-typing-test.ts (1)
packages/clients/tanstack-query/src/react.ts (1)
useClientQueries(257-262)
packages/clients/tanstack-query/test/vue-typing-test.ts (1)
packages/clients/tanstack-query/src/vue.ts (1)
useClientQueries(201-206)
packages/clients/tanstack-query/src/utils/common.ts (1)
packages/common-helpers/src/lower-case-first.ts (1)
lowerCaseFirst(1-3)
packages/clients/tanstack-query/src/vue.ts (3)
packages/clients/tanstack-query/src/utils/common.ts (9)
DEFAULT_QUERY_ENDPOINT(11-11)ExtraQueryOptions(101-106)ExtraMutationOptions(81-96)getQueryKey(171-181)makeUrl(202-214)fetcher(128-150)marshal(183-190)setupInvalidation(225-246)setupOptimisticUpdate(304-348)packages/schema/src/schema.ts (2)
SchemaDef(10-18)GetModels(109-109)packages/orm/src/client/crud-types.ts (16)
SelectIncludeOmit(453-457)ModelResult(135-179)FindArgs(648-664)CreateArgs(677-682)BatchResult(201-201)UpdateArgs(815-821)UpdateManyAndReturnArgs(828-834)UpsertArgs(842-849)DeleteArgs(961-966)DeleteManyArgs(968-971)CountArgs(977-982)CountResult(988-998)AggregateArgs(1004-1018)AggregateResult(1044-1072)GroupByArgs(1091-1108)GroupByResult(1110-1144)
packages/clients/tanstack-query/src/svelte.ts (3)
packages/clients/tanstack-query/src/utils/common.ts (9)
DEFAULT_QUERY_ENDPOINT(11-11)ExtraQueryOptions(101-106)ExtraMutationOptions(81-96)makeUrl(202-214)getQueryKey(171-181)fetcher(128-150)marshal(183-190)setupInvalidation(225-246)setupOptimisticUpdate(304-348)packages/schema/src/schema.ts (2)
SchemaDef(10-18)GetModels(109-109)packages/common-helpers/src/lower-case-first.ts (1)
lowerCaseFirst(1-3)
packages/clients/tanstack-query/src/react.ts (5)
packages/clients/tanstack-query/src/svelte.ts (3)
ModelMutationModelResult(112-124)ModelMutationResult(110-110)ModelMutationOptions(107-108)packages/schema/src/schema.ts (2)
SchemaDef(10-18)GetModels(109-109)packages/orm/src/client/crud-types.ts (17)
SelectIncludeOmit(453-457)ModelResult(135-179)FindUniqueArgs(669-671)FindArgs(648-664)CreateArgs(677-682)CreateManyArgs(684-684)CreateManyAndReturnArgs(686-692)UpdateArgs(815-821)UpdateManyArgs(823-826)UpdateManyAndReturnArgs(828-834)UpsertArgs(842-849)DeleteArgs(961-966)DeleteManyArgs(968-971)CountArgs(977-982)Subset(505-507)AggregateArgs(1004-1018)GroupByArgs(1091-1108)packages/clients/tanstack-query/src/utils/types.ts (1)
TrimDelegateModelOperations(24-28)packages/clients/tanstack-query/src/utils/common.ts (4)
fetcher(128-150)getQueryKey(171-181)makeUrl(202-214)ExtraMutationOptions(81-96)
⏰ 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 (34)
samples/orm/package.json (1)
3-3: Version bump consistent with release.tests/e2e/package.json (1)
3-3: Version bump consistent with release.packages/common-helpers/package.json (1)
3-3: Version bump consistent with release.package.json (1)
3-3: Version bump consistent with release.packages/config/eslint-config/package.json (1)
3-3: Version bump consistent with release.packages/sdk/package.json (1)
3-3: Version bump consistent with release.packages/create-zenstack/package.json (1)
3-3: Version bump consistent with release.packages/zod/package.json (1)
3-3: Version bump consistent with release.packages/schema/package.json (1)
3-3: Version bump consistent with release.The version increment aligns with the coordinated release across the monorepo.
packages/server/package.json (1)
3-3: Version bump consistent with release.The version increment aligns with the coordinated release across the monorepo.
tests/regression/package.json (1)
3-3: Version bump consistent with release.The version increment aligns with the coordinated release across the monorepo.
packages/language/package.json (1)
4-4: Version bump consistent with release.The version increment aligns with the coordinated release across the monorepo.
packages/config/typescript-config/package.json (1)
3-3: Version bump consistent with release.The version increment aligns with the coordinated release across the monorepo.
packages/config/vitest-config/package.json (1)
4-4: Version bump consistent with release.The version increment aligns with the coordinated release across the monorepo.
packages/orm/package.json (1)
3-3: Version bump consistent with release.The version increment aligns with the coordinated release across the monorepo.
packages/testtools/package.json (1)
3-3: Version bump consistent with release.The version increment aligns with the coordinated release across the monorepo.
samples/next.js/package.json (1)
3-3: LGTM! Version bump aligns with release.The version update from 3.0.0-beta.17 to 3.0.0-beta.18 is consistent with the PR objective.
packages/cli/package.json (1)
6-6: LGTM! Version bump aligns with release.The version update from 3.0.0-beta.17 to 3.0.0-beta.18 is consistent with the PR objective.
packages/plugins/policy/package.json (1)
3-3: LGTM! Version bump aligns with release.The version update from 3.0.0-beta.17 to 3.0.0-beta.18 is consistent with the PR objective.
packages/dialects/sql.js/package.json (1)
3-3: LGTM! Version bump aligns with release.The version update from 3.0.0-beta.17 to 3.0.0-beta.18 is consistent with the PR objective.
packages/orm/src/client/contract.ts (1)
798-804: LGTM! Excellent refactoring to improve type reusability.Extracting the inline union type into
OperationsIneligibleForDelegateModelsmakes the code more maintainable and enables reuse across the codebase. The behavior ofModelOperationsremains unchanged while improving the DRY principle.pnpm-workspace.yaml (1)
27-28: LGTM! Dependencies added for Vue and Svelte integrations.The addition of Vue 3.5.22 and Svelte 5.43.3 to the catalog supports the new TanStack Query client integrations for these frameworks.
packages/clients/tanstack-query/tsup.config.ts (1)
6-7: LGTM! Build configuration updated for new framework integrations.The addition of Vue and Svelte entry points is consistent with the existing React configuration and enables proper bundling for the new framework integrations.
packages/clients/tanstack-query/src/utils/types.ts (2)
1-2: LGTM! Necessary imports for delegate model filtering.The imports provide the type utilities needed for the new
TrimDelegateModelOperationshelper.
24-28: LGTM! Well-designed utility type for delegate model operation filtering.The
TrimDelegateModelOperationsutility provides a clean, reusable way to conditionally filter out operations that are ineligible for delegate models across different framework integrations (React, Vue, Svelte).packages/clients/tanstack-query/src/react.ts (9)
39-41: LGTM! Imports support new generic type system.The new imports (
SelectIncludeOmit,Subset,TrimDelegateModelOperations) are properly utilized in the refactored type definitions and delegate model operation filtering.Also applies to: 60-60
85-85: LGTM! Better JSDoc link format.The updated deprecation tag now uses JSDoc link syntax, enabling IDE navigation to
QuerySettingsProvider.
124-138: LGTM! New type wrappers enhance type safety.The
ModelMutationModelResultcorrectly refinesmutateAsynctyping with generic overloads for better inference, andClientHooksprovides a clean mapping from model names to their respective hooks. Both types align with the Vue/Svelte equivalents introduced in this release.
140-252: LGTM! Comprehensive type definitions with performance trade-off.The refactored
ModelQueryHooksprovides strongly-typed hooks for all CRUD and aggregate operations, wrapped withTrimDelegateModelOperationsto properly filter operations for delegate models. The manual type definitions (vs. mapped types) trade maintainability for TypeScript compilation performance, as noted in the comment.
257-261: LGTM! Return type updated to new ClientHooks wrapper.The function signature correctly reflects the new
ClientHooks<Schema>return type while preserving the existing implementation logic.
312-345: LGTM! Mutation calls simplified with centralized error handling.All
useInternalMutationcalls now omit thecheckReadBackparameter, as this logic has been moved into thefetcherfunction itself (seecommon.tslines 127-149 where it handles "cannot-read-back" errors internally). This is a cleaner abstraction.
390-390: LGTM! Fetcher calls match simplified signature.All
fetcherinvocations correctly use the new three-parameter signature (url,options,customFetch), with thecheckReadBackflag removed. The fetcher now handles "cannot-read-back" errors internally.Also applies to: 413-413, 439-439, 464-464
424-431: LGTM! Improved formatting and defensive default.The multi-line type annotation enhances readability, and the default
getNextPageParamprovides safe fallback behavior when options are omitted.
483-505: LGTM! Significant simplification of mutation logic.The
useInternalMutationsignature is cleaner with the genericCparameter andcheckReadBacklogic removed. The fetcher now handles "cannot-read-back" responses internally, returningundefinedautomatically. Invalidation and optimistic update setup remain intact, properly using logging fromuseHooksContext.
|
I'll analyze this and get back to you. |

Summary by CodeRabbit
New Features
Chores