-
-
Couldn't load subscription status.
- Fork 126
merge dev to main (v2.18.0) #2219
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
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
📝 WalkthroughWalkthroughThis change introduces Angular v5 support to the TanStack Query plugin. It adds Angular-specific runtime hooks, extends the generator to handle Angular as a target, updates the build and postbuild scripts for Angular, and adds corresponding tests. The build configuration now includes Angular runtime as an entry point. Changes
Sequence Diagram(s)sequenceDiagram
participant AngularComponent
participant AngularRuntime
participant TanStackQueryClient
participant API
AngularComponent->>AngularRuntime: useModelQuery / useModelMutation(...)
AngularRuntime->>TanStackQueryClient: injectQuery / injectMutation(...)
TanStackQueryClient->>API: fetch/mutate data (with constructed query key)
API-->>TanStackQueryClient: returns data/result
TanStackQueryClient-->>AngularRuntime: provides query/mutation result
AngularRuntime-->>AngularComponent: returns hook result (data, status, etc.)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~40 minutes Possibly related PRs
Note 🔌 MCP (Model Context Protocol) integration is now available in Early Access!Pro users can now connect to remote MCP servers under the Integrations page to get reviews and chat conversations that understand additional development context. ✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
packages/plugins/tanstack-query/package.jsonis excluded by!**/*.jsonpnpm-lock.yamlis excluded by!**/pnpm-lock.yaml,!**/*.yaml
📒 Files selected for processing (5)
packages/plugins/tanstack-query/scripts/postbuild.js(1 hunks)packages/plugins/tanstack-query/src/generator.ts(8 hunks)packages/plugins/tanstack-query/src/runtime-v5/angular.ts(1 hunks)packages/plugins/tanstack-query/tests/plugin.test.ts(1 hunks)packages/plugins/tanstack-query/tsup-v5.config.ts(1 hunks)
⏰ 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). (5)
- GitHub Check: build-test (20.x)
- GitHub Check: OSSAR-Scan
- GitHub Check: build-test (20.x)
- GitHub Check: dependency-review
- GitHub Check: build-test (20.x)
🔇 Additional comments (13)
packages/plugins/tanstack-query/tsup-v5.config.ts (1)
4-4: LGTM!The Angular runtime entry point is correctly added to the build configuration, following the same pattern as other framework entries.
packages/plugins/tanstack-query/scripts/postbuild.js (1)
49-54: LGTM!The Angular package alias replacement follows the established pattern for other frameworks and correctly targets Angular runtime files.
packages/plugins/tanstack-query/tests/plugin.test.ts (1)
331-358: Test coverage looks comprehensive!The Angular test case properly validates the plugin's Angular integration with appropriate dependencies and component structure using Angular's signal-based patterns.
packages/plugins/tanstack-query/src/generator.ts (5)
24-24: LGTM!Angular is correctly added to the supported targets array.
44-47: Good version constraint validation!The check ensures Angular support is limited to v5, preventing potential compatibility issues.
232-232: LGTM!Angular correctly grouped with React and Vue for mutation type handling, as all three frameworks need the mutateAsync override.
606-610: LGTM!Angular-specific exports follow the established naming convention for context keys and providers.
674-680: LGTM!Angular imports correctly reference the v5 package and include all necessary TanStack Query types.
packages/plugins/tanstack-query/src/runtime-v5/angular.ts (5)
32-42: LGTM!The InjectionToken and provider function correctly implement Angular's dependency injection pattern for context management.
47-58: LGTM!The context retrieval properly handles optional injection with sensible defaults.
70-90: LGTM!The query hook correctly integrates with Angular's
injectQueryand properly constructs query keys with optimistic update support.
102-124: LGTM!The infinite query hook properly handles pagination with pageParam and correctly passes the initial page parameter.
138-207: LGTM!The mutation hook implementation is comprehensive with proper handling of:
- Different HTTP methods (POST, PUT, DELETE)
- Request body marshalling for non-DELETE operations
- Query invalidation and optimistic updates
- Integration with Angular's QueryClient via injection
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: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
README.md(1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
README.md
13-13: Images should have alternate text (alt text)
(MD045, no-alt-text)
⏰ 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). (8)
- GitHub Check: build-test (20.x)
- GitHub Check: OSSAR-Scan
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: build-test (20.x)
- GitHub Check: build-test (20.x)
- GitHub Check: dependency-review
- GitHub Check: OSSAR-Scan
- GitHub Check: Analyze (javascript-typescript)
No description provided.