fix(vue-query): export queryOptions declaration types - #11098
ousamabenyounes wants to merge 1 commit into
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: TanStack/query/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughQuery Core and Vue Query now re-export supporting types from their package roots. New type-level tests check these exports, and a changeset records patch releases for both packages. ChangesQuery options supporting public types
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to The supporting types are available through the package roots, and no actionable merge risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@packages/vue-query/src/queryOptions.ts`:
- Around line 68-71: Update QueryOptionsDataTag so its queryKey property
preserves the reactive MaybeRefOrGetter<TQueryKey> shape while retaining the
DataTag<TQueryKey, TQueryFnData, TError> metadata. Keep the existing omission
and tagging behavior unchanged, ensuring refs and getters remain valid in the
returned options type.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 668e95eb-d1d5-4dcf-8b09-09a6b78764aa
📒 Files selected for processing (5)
.changeset/calm-vue-query-options.mdpackages/query-core/src/index.tspackages/vue-query/src/__tests__/queryOptions.test-d.tspackages/vue-query/src/index.tspackages/vue-query/src/queryOptions.ts
722169c to
0f59482
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Re-export the helper types that the public queryOptions signature depends on but that were unreachable from the package roots: ShallowOption and MaybeRefOrGetter from @tanstack/vue-query, and QueryBehavior, RetryValue, RetryDelayValue from @tanstack/query-core. The declaration-emit / name collision core of TanStack#11042 was already fixed by TanStack#11224; this completes the remaining unexported-supporting-types part. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0f59482 to
d8e00a7
Compare
|
Rebased onto Verified locally: new |
🎯 Changes
Completes the remaining part of #11042. The declaration-emit / name-collision core was already fixed on
mainby #11224 (*WithDataTagreturn types +QueryKeyWithDataTag), so this PR was rebased and reduced to the piece #11224 did not deliver: the supporting types that the publicqueryOptionssignature references are now re-exported from the package roots.@tanstack/vue-query: exportShallowOptionandMaybeRefOrGetter.@tanstack/query-core: exportQueryBehavior,RetryValue,RetryDelayValue.The earlier competing
QueryOptionsDataTagdesign and theuseQueryexport renames were dropped: they conflicted irreconcilably with the merged*WithDataTagdesign and would have reintroduced a name collision. No runtime code changes; type-only, additive re-exports.Fixes #11042
✅ Test verification (RED → GREEN)
Added
publicTypeExports.test-d.tsto both packages asserting the new symbols are reachable from the package root (vitest --typecheck).RED — on the reduced branch with the two re-export lines removed:
GREEN — with the re-exports:
Also green locally:
test:types(query-core, vue-query, across TS 5.7–7.0),test:eslint(both), and prettier--checkon the diff.🚀 Release Impact
patchfor@tanstack/query-coreand@tanstack/vue-query).Summary by CodeRabbit
New Features
Tests