Skip to content

chore: add TanStack Query ><= 5.79.2 Compatibility Layer#339

Merged
radist2s merged 5 commits into
mainfrom
feat/new-tanstack-querysupport
Jun 5, 2025
Merged

chore: add TanStack Query ><= 5.79.2 Compatibility Layer#339
radist2s merged 5 commits into
mainfrom
feat/new-tanstack-querysupport

Conversation

@radist2s

@radist2s radist2s commented Jun 5, 2025

Copy link
Copy Markdown
Collaborator

This PR introduces a compatibility layer that provides seamless support for both legacy and current versions of TanStack Query, ensuring backward compatibility while enabling users to leverage the latest features. This is a backported mini-version of the compatibility improvements.

Key Changes

  • Enhanced Version Support: Added compatibility layer to support both old and new TanStack Query versions
  • Updated Type Imports: Added UseSuspenseInfiniteQueryOptions to the type imports from @openapi-qraft/tanstack-query-react-types
  • Refined Generic Parameters: Optimized generic type parameters in UseSuspenseInfiniteQueryOptions for better compatibility
  • Backward Compatibility: Maintained full backward compatibility for users who prefer to stay on TanStack Query version 5.79.2 or earlier

Benefits

  • Flexible Migration Path: Users experiencing issues upgrading TanStack Query can simply update OpenAPI Qraft to the latest version and continue using client generation without any breaking changes
  • No Forced Updates: Users can choose whether to update TanStack Query or not - both scenarios are fully supported
  • Future-Proof: Compatibility is maintained for all future releases within the current major version for both new and legacy TanStack Query versions

Migration

No breaking changes - existing code continues to work as before. Users can update OpenAPI Qraft independently of their TanStack Query version.

@changeset-bot

changeset-bot Bot commented Jun 5, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e45cdda

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@openapi-qraft/tanstack-query-react-plugin Patch
@openapi-qraft/tanstack-query-react-types Patch
@openapi-qraft/react Patch
@openapi-qraft/cli Patch
@openapi-qraft/plugin Patch
@openapi-qraft/openapi-typescript-plugin Patch

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

@radist2s radist2s force-pushed the feat/new-tanstack-querysupport branch 3 times, most recently from 8b960fc to 82620eb Compare June 5, 2025 23:24
@radist2s radist2s force-pushed the feat/new-tanstack-querysupport branch from eb122fe to 3ea5cfe Compare June 5, 2025 23:31
@radist2s radist2s changed the title chore: add TanStack Query UseSuspenseInfiniteQueryOptions compatibility layer chore: add TanStack Query <=> 5.79.2 Compatibility Layer Jun 5, 2025
@radist2s radist2s changed the title chore: add TanStack Query <=> 5.79.2 Compatibility Layer chore: add TanStack Query ><= 5.79.2 Compatibility Layer Jun 5, 2025
@radist2s radist2s marked this pull request as ready for review June 5, 2025 23:41
radist2s added 3 commits June 6, 2025 03:43
…from `@tanstack/react-query` to `@openapi-qraft/tanstack-query-react-types` and optimized generic parameters order for better compatibility with TanStack Query versions 5.79.2 and earlier.
@radist2s radist2s force-pushed the feat/new-tanstack-querysupport branch from 7e82813 to e45cdda Compare June 5, 2025 23:43
@radist2s radist2s enabled auto-merge June 5, 2025 23:44
@radist2s radist2s merged commit 9eccac6 into main Jun 5, 2025
13 checks passed
@radist2s radist2s deleted the feat/new-tanstack-querysupport branch June 5, 2025 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant