Skip to content

chore: @trpc/upgrade with queryOptions API codemod #6262

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

Merged
merged 248 commits into from
Feb 17, 2025

Conversation

juliusmarminge
Copy link
Member

@juliusmarminge juliusmarminge commented Nov 22, 2024

Closes #

🎯 Changes

✅ Checklist

  • I have followed the steps listed in the Contributing guide.
  • If necessary, I have added documentation related to the changes made.
  • I have added or updated the tests related to the changes made.

Summary by CodeRabbit

  • New Features

    • Enhanced integration with TanStack React Query for a more streamlined and type-safe data fetching/mutation experience.
    • Introduced a new CLI upgrade tool to simplify project migrations.
  • Documentation

    • Launched updated guides covering migration, setup, and usage of the new integration.
    • Refreshed website content and announcements, including new blog posts and author profiles.
  • Chores

    • Updated dependencies and refactored core code to improve maintainability and overall performance.

KATT
KATT previously approved these changes Feb 17, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (5)
www/blog/2025-02-17-new-tanstack-react-query-integration.mdx (5)

26-26: Enhance Punctuation for Clarity in the Introductory Text.
The sentence starting with "With this new client we're removing a layer of abstraction..." would benefit from additional commas for better readability. For example, consider the following diff:

-With this new client we're removing a layer of abstraction which is a common source of confusion for new users, and instead providing a more direct way to work with TanStack React Query which will feel immediately familiar to those who are following TanStack's own [documentation](https://tanstack.com/query/latest).
+With this new client, we're removing a layer of abstraction, which is a common source of confusion for new users, and instead providing a more direct way to work with TanStack React Query which will feel immediately familiar to those who are following TanStack's own [documentation](https://tanstack.com/query/latest).

Additionally, consider improving the second sentence to insert commas around the phrase "of course":

-It also means we need less tRPC documentation to explain it, though we of course have [documentation to get you started](/docs/client/tanstack-react-query/setup).
+It also means we need less tRPC documentation to explain it, though, of course, we have [documentation to get you started](/docs/client/tanstack-react-query/setup).
🧰 Tools
🪛 LanguageTool

[typographical] ~26-~26: It appears that a comma is missing.
Context: ...Jerry' // [...] } ``` With this new client we're removing a layer of abstraction w...

(DURING_THAT_TIME_COMMA)


[typographical] ~26-~26: Consider adding two commas here.
Context: ...C documentation to explain it, though we of course have [documentation to get you started]...

(OF_COURSE_COMMA)


32-37: Refine “Maintainability” Bullet Point Wording.
In the "Maintainability" bullet (line 34), the phrase "new features which get added to QueryClient" can be improved for formality. Consider using “are added” instead:

-...particularly new features which get added to QueryClient from time to time.
+...particularly new features which are added to QueryClient from time to time.
🧰 Tools
🪛 LanguageTool

[style] ~34-~34: The verb “get” can be informal. Consider replacing it with a form of “to be”.
Context: ... Query, particularly new features which get added to QueryClient from time to time. By us...

(GET_USED_ARE_USED)


[uncategorized] ~35-~35: Possible missing comma found.
Context: ... message excited to use this client. Of course not everyone is sold on the client righ...

(AI_HYDRA_LEO_MISSING_COMMA)


32-37: Improve Comma Usage in the “Feedback” Bullet Point.
In the "Feedback" bullet (line 35), adding a comma after "Of course" would improve clarity. For example:

-Of course not everyone is sold on the client right now, so we'll be keeping the classic client around
+Of course, not everyone is sold on the client right now, so we'll be keeping the classic client around
🧰 Tools
🪛 LanguageTool

[style] ~34-~34: The verb “get” can be informal. Consider replacing it with a form of “to be”.
Context: ... Query, particularly new features which get added to QueryClient from time to time. By us...

(GET_USED_ARE_USED)


[uncategorized] ~35-~35: Possible missing comma found.
Context: ... message excited to use this client. Of course not everyone is sold on the client righ...

(AI_HYDRA_LEO_MISSING_COMMA)


38-43: Clarify Compound Sentence in “What’s happening…” Section.
At line 39, inserting a comma before “and we’ll consider it stable” will better separate the independent clauses. For instance:

-...it won't receive any significant new features and we'll consider it stable.
+...it won't receive any significant new features, and we'll consider it stable.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~39-~39: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...n't receive any significant new features and we'll consider it stable. We still rec...

(COMMA_COMPOUND_SENTENCE)


44-51: Refine Migration Section Wording.
In the “How do I migrate?” section (line 45), consider replacing “is going to be maintained” with “will be maintained” for a more definitive tone:

-While the classic client is going to be maintained for a long time to come, we recommend new projects start with the new client...
+While the classic client will be maintained for a long time to come, we recommend new projects start with the new client...
🧰 Tools
🪛 LanguageTool

[style] ~45-~45: Use ‘will’ instead of ‘going to’ if the following action is certain.
Context: ...do I migrate? While the classic client is going to be maintained for a long time to come, ...

(GOING_TO_WILL)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 37de070 and 9fde153.

📒 Files selected for processing (1)
  • www/blog/2025-02-17-new-tanstack-react-query-integration.mdx (1 hunks)
🧰 Additional context used
🪛 LanguageTool
www/blog/2025-02-17-new-tanstack-react-query-integration.mdx

[typographical] ~26-~26: It appears that a comma is missing.
Context: ...Jerry' // [...] } ``` With this new client we're removing a layer of abstraction w...

(DURING_THAT_TIME_COMMA)


[typographical] ~26-~26: Consider adding two commas here.
Context: ...C documentation to explain it, though we of course have [documentation to get you started]...

(OF_COURSE_COMMA)


[style] ~34-~34: The verb “get” can be informal. Consider replacing it with a form of “to be”.
Context: ... Query, particularly new features which get added to QueryClient from time to time. By us...

(GET_USED_ARE_USED)


[uncategorized] ~35-~35: Possible missing comma found.
Context: ... message excited to use this client. Of course not everyone is sold on the client righ...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~39-~39: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...n't receive any significant new features and we'll consider it stable. We still rec...

(COMMA_COMPOUND_SENTENCE)


[style] ~45-~45: Use ‘will’ instead of ‘going to’ if the following action is certain.
Context: ...do I migrate? While the classic client is going to be maintained for a long time to come, ...

(GOING_TO_WILL)

⏰ Context from checks skipped due to timeout of 90000ms (20)
  • GitHub Check: e2e-legacy-node (next-prisma-todomvc, 20.x)
  • GitHub Check: E2E-tests (fastify-server)
  • GitHub Check: E2E-tests (express-server)
  • GitHub Check: e2e-legacy-node (next-prisma-todomvc, 18.x)
  • GitHub Check: E2E-tests (express-minimal)
  • GitHub Check: e2e-legacy-node (next-prisma-websockets-starter, 20.x)
  • GitHub Check: Release using pkg.pr.new
  • GitHub Check: E2E-tests (cloudflare-workers)
  • GitHub Check: e2e-legacy-node (next-prisma-websockets-starter, 18.x)
  • GitHub Check: E2E-tests (.test/ssg)
  • GitHub Check: e2e-legacy-node (next-prisma-starter, 20.x)
  • GitHub Check: Test a monorepo using built declaration files
  • GitHub Check: E2E-tests (.test/internal-types-export)
  • GitHub Check: e2e-legacy-node (next-prisma-starter, 18.x)
  • GitHub Check: E2E-tests (Bun) (bun, ubuntu-latest)
  • GitHub Check: E2E-tests (.test/diagnostics-big-router)
  • GitHub Check: E2E-tests (.experimental/next-app-dir)
  • GitHub Check: E2E-tests (Deno) (deno-deploy)
  • GitHub Check: test
  • GitHub Check: Lint and auto-fix
🔇 Additional comments (3)
www/blog/2025-02-17-new-tanstack-react-query-integration.mdx (3)

1-5: Front Matter is well structured.
The YAML front matter correctly provides the slug, title, and authors.


7-8: Introduction Content Looks Good.
The introductory paragraph clearly announces the new TanStack React Query integration.


11-24: Code Snippet Demonstrates New API Usage.
The TSX code snippet is clear and accurately illustrates the usage of useQuery with the new queryOptions API.

@juliusmarminge juliusmarminge merged commit 6627c5a into next Feb 17, 2025
44 checks passed
@juliusmarminge juliusmarminge deleted the query-optoins-codemod branch February 17, 2025 22:43
Copy link

This pull request has been locked because we are very unlikely to see comments on closed issues. If you think, this PR is still necessary, create a new one with the same branch. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants