Conversation
…, 'SolidInfiniteQueryOptions', and 'SolidMutationOptions'
📝 WalkthroughWalkthroughThe PR removes the "Solid" prefix from three exported option type names in the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
View your CI Pipeline Execution ↗ for commit 8d47051
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version Preview1 package(s) bumped directly, 23 bumped as dependents. 🟩 Patch bumps
|
size-limit report 📦
|
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/solid-query/src/types.ts (1)
47-58:⚠️ Potential issue | 🟠 MajorPublic type removals are breaking; add deprecated aliases for one release cycle.
Dropping
SolidQueryOptions,SolidInfiniteQueryOptions, andSolidMutationOptionswill break existing imports for consumers immediately.Compatibility bridge suggestion
export interface QueryOptions< TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, > extends UseBaseQueryOptions< TQueryFnData, TError, TData, TQueryFnData, TQueryKey > {} +/** `@deprecated` Use QueryOptions instead. */ +export type SolidQueryOptions< + TQueryFnData = unknown, + TError = DefaultError, + TData = TQueryFnData, + TQueryKey extends QueryKey = QueryKey, +> = QueryOptions<TQueryFnData, TError, TData, TQueryKey>export interface InfiniteQueryOptions< TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown, > extends OmitKeyof< @@ suspense?: boolean } +/** `@deprecated` Use InfiniteQueryOptions instead. */ +export type SolidInfiniteQueryOptions< + TQueryFnData = unknown, + TError = DefaultError, + TData = TQueryFnData, + TQueryKey extends QueryKey = QueryKey, + TPageParam = unknown, +> = InfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>export interface MutationOptions< TData = unknown, TError = DefaultError, TVariables = void, TOnMutateResult = unknown, > extends OmitKeyof< MutationObserverOptions<TData, TError, TVariables, TOnMutateResult>, '_defaulted' > {} +/** `@deprecated` Use MutationOptions instead. */ +export type SolidMutationOptions< + TData = unknown, + TError = DefaultError, + TVariables = void, + TOnMutateResult = unknown, +> = MutationOptions<TData, TError, TVariables, TOnMutateResult>Also applies to: 90-120, 143-151
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/solid-query/src/types.ts` around lines 47 - 58, Public type aliases were removed causing breaking imports; restore deprecated aliases for one release cycle by adding type aliases that point to the new names: create SolidQueryOptions = QueryOptions (and SolidInfiniteQueryOptions = InfiniteQueryOptions, SolidMutationOptions = MutationOptions) in the same module (types.ts) so consumers keep working; mark them as deprecated with a comment JSDoc `@deprecated` and ensure names exactly match SolidQueryOptions, SolidInfiniteQueryOptions, SolidMutationOptions to maintain compatibility.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@packages/solid-query/src/types.ts`:
- Around line 47-58: Public type aliases were removed causing breaking imports;
restore deprecated aliases for one release cycle by adding type aliases that
point to the new names: create SolidQueryOptions = QueryOptions (and
SolidInfiniteQueryOptions = InfiniteQueryOptions, SolidMutationOptions =
MutationOptions) in the same module (types.ts) so consumers keep working; mark
them as deprecated with a comment JSDoc `@deprecated` and ensure names exactly
match SolidQueryOptions, SolidInfiniteQueryOptions, SolidMutationOptions to
maintain compatibility.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: a8a7a7de-2924-47e6-a7f8-6d01bde9c389
📒 Files selected for processing (10)
.changeset/five-lizards-camp.mdpackages/solid-query/src/__tests__/mutationOptions.test-d.tsxpackages/solid-query/src/__tests__/useQueries.test-d.tsxpackages/solid-query/src/__tests__/useQueries.test.tsxpackages/solid-query/src/index.tspackages/solid-query/src/infiniteQueryOptions.tspackages/solid-query/src/mutationOptions.tspackages/solid-query/src/queryOptions.tspackages/solid-query/src/types.tspackages/solid-query/src/useQueries.ts
🎯 Changes
Remove
Solidprefix from option types:SolidQueryOptions→QueryOptionsSolidInfiniteQueryOptions→InfiniteQueryOptionsSolidMutationOptions→MutationOptionsWhy
In TanStack Query, adapters that need framework-specific reactivity wrapping define two layers of option types:
QueryOptions,MutationOptions) — the plain options objectUseQueryOptions,UseMutationOptions) — wraps the pure type with framework reactivity (Accessorfor Solid,MaybeRef/MaybeRefDeepfor Vue)Adapters without wrapping (react-query, preact-query, svelte-query, angular-query) define only the hook type directly.
vue-query already follows this pattern without a framework prefix:
QueryOptions→UseQueryOptions = MaybeRef<...>MutationOptions→UseMutationOptions = MaybeRefDeep<MutationOptions> | () => ...solid-query was the only adapter using a framework prefix (
SolidQueryOptions,SolidInfiniteQueryOptions,SolidMutationOptions). This PR removes the prefix for consistency.✅ Checklist
pnpm run test:pr.🚀 Release Impact