Skip to content

Ensure query-devtools lists Solid peer dependencies#10457

Open
Gujiassh wants to merge 2 commits intoTanStack:mainfrom
Gujiassh:fix/solid-query-client-memo
Open

Ensure query-devtools lists Solid peer dependencies#10457
Gujiassh wants to merge 2 commits intoTanStack:mainfrom
Gujiassh:fix/solid-query-client-memo

Conversation

@Gujiassh
Copy link
Copy Markdown

@Gujiassh Gujiassh commented Apr 12, 2026

Summary

  • add the Solid runtime dependencies as peers for @tanstack/query-devtools so TypeScript consumers can resolve solid-js and its primitives
  • keep the existing devDependencies so the package still builds locally

Testing

  • pnpm --filter @tanstack/query-devtools test:types:tscurrent (fails: tsc cannot resolve @tanstack/query-test-utils inside this workspace)

Summary by CodeRabbit

  • Chores

    • Added peer dependency specifications to the query devtools package to ensure compatibility with the Solid.js ecosystem.
  • Behavior Change

    • Query client resolution now prefers an explicitly provided client and falls back to context; a clear runtime error is thrown if no client is available, improving configuration feedback.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 12, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3d7b92ee-1f34-4f28-a751-99f2cf2d3f4e

📥 Commits

Reviewing files that changed from the base of the PR and between 9e97512 and c4a95db.

📒 Files selected for processing (1)
  • packages/solid-query/src/useBaseQuery.ts

📝 Walkthrough

Walkthrough

Added a peerDependencies section to packages/query-devtools/package.json and changed useBaseQuery to prefer an explicit queryClient option over context, falling back to QueryClientContext and throwing if none provided.

Changes

Cohort / File(s) Summary
Package Dependencies
packages/query-devtools/package.json
Added a peerDependencies block declaring Solid.js ecosystem packages: solid-js, @kobalte/core, multiple @solid-primitives/* packages, @tanstack/match-sorter-utils, clsx, goober, and solid-transition-group with semver ranges.
Query client resolution
packages/solid-query/src/useBaseQuery.ts
Changed client resolution logic: prefer options.queryClient if provided, else use QueryClientContext via useContext; throw 'No QueryClient set, use QueryClientProvider to set one' when neither is available. Removed previous useQueryClient(queryClient?.()) dependency.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hopped through code with nimble paws,
Placed peers in rows and followed laws,
A client chosen, tidy and clear,
No more guessing, spring is near! 🌱

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description provides summary and testing information but uses a non-standard format that doesn't follow the repository's template structure. Restructure the description to match the template: use '## 🎯 Changes' section, include the '✅ Checklist' with required items, and specify '🚀 Release Impact' with changeset information.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding peer dependencies to query-devtools for Solid packages.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant