fix(examples): use webpack in Next.js examples for StackBlitz compatibility#11110
fix(examples): use webpack in Next.js examples for StackBlitz compatibility#11110MaNaN1803 wants to merge 3 commits into
Conversation
📝 WalkthroughWalkthroughNext.js development scripts explicitly select Webpack. Vue Query’s ChangesNext.js Webpack development scripts
Vue Query reactive query inputs
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Caller
participant QueryClient
participant cloneDeepUnref
participant QueryCore
Caller->>QueryClient: provide filters or options
QueryClient->>QueryClient: evaluate function-based input
QueryClient->>cloneDeepUnref: unwrap reactive value
cloneDeepUnref-->>QueryClient: plain query input
QueryClient->>QueryCore: invalidate or fetch with unwrapped input
Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Checkov (3.3.8)examples/react/auto-refetching/package.jsonTraceback (most recent call last): examples/react/infinite-query-with-max-pages/package.jsonTraceback (most recent call last): examples/react/load-more-infinite-scroll/package.jsonTraceback (most recent call last):
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.
🧹 Nitpick comments (1)
packages/vue-query/src/queryClient.ts (1)
197-226: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd regression coverage for callable reactive inputs.
Please add runtime and type-level tests in
packages/vue-query/src/__tests__/queryClient.test.tscovering function-basedfilters,options, nested refs,queryKeygetters, andrefetchTypebehavior. These overloads introduce both a new public type contract and a new normalization path.Also applies to: 296-330
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/vue-query/src/queryClient.ts` around lines 197 - 226, Add regression coverage in queryClient.test.ts for invalidateQueries, exercising callable filters and options with nested refs, queryKey getters, and refetchType behavior at runtime. Add type-level assertions confirming these function-based inputs satisfy the new invalidateQueries overloads and preserve the public contract.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@packages/vue-query/src/queryClient.ts`:
- Around line 197-226: Add regression coverage in queryClient.test.ts for
invalidateQueries, exercising callable filters and options with nested refs,
queryKey getters, and refetchType behavior at runtime. Add type-level assertions
confirming these function-based inputs satisfy the new invalidateQueries
overloads and preserve the public contract.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 6c914438-e201-4b86-928a-5af200a3336a
📒 Files selected for processing (12)
examples/react/auto-refetching/package.jsonexamples/react/infinite-query-with-max-pages/package.jsonexamples/react/load-more-infinite-scroll/package.jsonexamples/react/nextjs-app-prefetching/package.jsonexamples/react/nextjs/package.jsonexamples/react/optimistic-updates-cache/package.jsonexamples/react/optimistic-updates-ui/package.jsonexamples/react/pagination/package.jsonexamples/react/prefetching/package.jsonintegrations/react-next-15/package.jsonintegrations/react-next-16/package.jsonpackages/vue-query/src/queryClient.ts
Fixes #11063. StackBlitz WebContainers currently do not support the native bindings required for Turbopack (the default in Next.js 15+). This updates all Next.js examples to use the --webpack flag in their dev scripts so the interactive sandboxes in the docs run without crashing.
Summary by CodeRabbit
New Features
Developer Experience