-
Notifications
You must be signed in to change notification settings - Fork 74
fix(react-query): update peerDependency, @tanstack/react-query to version 4.40.0 and deprecate old options #1639
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
…e old options - Updated dependencies for @tanstack/react-query and related packages to version 4.40.0 in pnpm-lock.yaml and pnpm-workspace.yaml. - Adjusted peer dependencies in package.json to reflect the new version. - Deprecated certain options and types in the react-query-4 package to align with the latest API changes. - Updated tests to accommodate changes in type expectations and removed unused imports. Co-authored-by: halfstack <61955474+ha1fstack@users.noreply.github.com>
🦋 Changeset detectedLatest commit: 9d2e076 The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
People can be co-author:
|
Size Change: -1.05 kB (-1.65%) Total Size: 62.8 kB
ℹ️ View Unchanged
|
… usePrefetchQuery tests - Changed import statements in PrefetchQuery.test-d.tsx and usePrefetchQuery.test-d.tsx to source queryOptions from @tanstack/react-query instead of local files. - This aligns the tests with the updated package structure following the recent dependency updates.
…tack/react-query - Removed the local import of queryOptions and replaced it with the import from @tanstack/react-query to ensure consistency with the updated package structure.
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.
The day has finally come when it is officially supported. It's a historic day. 그동안의 여정의 결과, 멋있습니다. 계속 킵고잉하시죠!! Suspensive!
* @deprecated Use `queryOptions` from \@tanstack/react-query@^4.40.0 | ||
* @example |
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.
* @deprecated Use `queryOptions` from \@tanstack/react-query@^4.40.0 | |
* @example | |
* @deprecated Use `queryOptions` from \@tanstack/react-query@^4.40.0 | |
* @see (If a migration guide becomes available later.) | |
* @example |
this is a suggestion
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.
Amazing work as always, thank you for prompt update!
const [ | ||
query1, | ||
query2, | ||
// query3 | ||
] = useQueries({ | ||
queries: [ | ||
query.options1(), | ||
{ ...query.options2() }, | ||
queryOptions({ | ||
queryKey: [...queryKey, 4] as const, | ||
queryFn: () => Promise.resolve({ field: 'success' }), | ||
select: (data) => { | ||
expectTypeOf(data).toEqualTypeOf<{ field: string }>() | ||
return data.field | ||
}, | ||
}), | ||
// queryOptions({ | ||
// queryKey: [...queryKey, 4] as const, | ||
// queryFn: () => Promise.resolve({ field: 'success' }), | ||
// select: (data) => { | ||
// expectTypeOf(data).toEqualTypeOf<{ field: string }>() | ||
// return data.field | ||
// }, | ||
// }), | ||
], | ||
}) | ||
expectTypeOf(query1).toEqualTypeOf<UseQueryResult<{ field: string }>>() | ||
expectTypeOf(query1.data).toEqualTypeOf<{ field: string } | undefined>() | ||
expectTypeOf(query2).toEqualTypeOf<UseQueryResult<{ field: string }>>() | ||
expectTypeOf(query2.data).toEqualTypeOf<{ field: string } | undefined>() | ||
expectTypeOf(query3).toEqualTypeOf<UseQueryResult<string>>() | ||
expectTypeOf(query3.data).toEqualTypeOf<string | undefined>() | ||
// expectTypeOf(query3).toEqualTypeOf<UseQueryResult<string>>() | ||
// expectTypeOf(query3.data).toEqualTypeOf<string | undefined>() |
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.
Any reason for commenting out instead of removing it?
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.
PeerDep @tanstack/react-query to version 4.40.0 and deprecate old options
@ha1fstack (issue reporter), could you review these changes, please?
Next thing to do: TanStack/query#9334
After several years of polishing the Suspensive React Query interface — from raising the first issue to this PR and finally merging into TanStack Query v4 — it feels like we’re nearing the end of a long journey of Suspensive React Query. 감성적이게 되는 날입니다 🥲
PR Checklist