Skip to content

Issues/6554 #6577

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Issues/6554 #6577

wants to merge 10 commits into from

Conversation

KATT
Copy link
Member

@KATT KATT commented Mar 1, 2025

Closes #6554

🎯 Changes

p turbo --filter=trpc-tanstack-router-bug-repro build

βœ… 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

Summary by CodeRabbit

  • Refactor

    • Enhanced module export structures across various packages by integrating explicit TypeScript type definitions for both ESM and CommonJS formats. This improvement refines type-checking and streamlines the developer experience.
  • New Features

    • Introduced new TypeScript files demonstrating TRPC setup with a query client, providing ready-to-use configurations for improved data management workflows.
    • Added a new package.json and tsconfig.json for the TRPC integration example project, specifying dependencies and compiler options.
    • Included a new entry in the GitHub Actions workflow for end-to-end testing of the TRPC integration example project.
  • Chores

    • Updated VSCode settings to change the visibility of ignored files in the explorer view.

@KATT KATT requested a review from a team as a code owner March 1, 2025 11:08
Copy link

vercel bot commented Mar 1, 2025

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
next-prisma-starter βœ… Ready (Inspect) Visit Preview Mar 1, 2025 8:02pm
og-image βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Mar 1, 2025 8:02pm
www ❌ Failed (Inspect) Mar 1, 2025 8:02pm

Copy link
Contributor

coderabbitai bot commented Mar 1, 2025

Warning

Rate limit exceeded

@KATT has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 8 minutes and 42 seconds before requesting another review.

βŒ› How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 04bfa0c and 2635238.

β›” Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
πŸ“’ Files selected for processing (6)
  • examples/.test/trpc-tanstack-router-bug-repro/package.json (1 hunks)
  • packages/client/package.json (1 hunks)
  • packages/next/package.json (1 hunks)
  • packages/react-query/package.json (1 hunks)
  • packages/server/package.json (1 hunks)
  • packages/tanstack-react-query/package.json (1 hunks)

Walkthrough

The changes update the export definitions across multiple package.json files by replacing flat string mappings with nested objects that include a types property for TypeScript definitions. Additionally, the export type signature and implementation in the entrypoint generation script have been updated. New example files have been added to demonstrate TRPC and TanStack Query integration via a TRPC options proxy.

Changes

File(s) Change Summary
packages/client/package.json, packages/next/package.json, packages/react-query/package.json, packages/server/package.json, packages/tanstack-react-query/package.json Restructured the exports field to use nested objects for import, require, and default that now include a types key pointing to TypeScript definition files.
scripts/entrypoints.ts Updated the type signature and implementation for the exports property, replacing direct string assignments with objects that include both types and default keys.
examples/.test/trpc-tanstack-router-bug-repro/ (all files: index-workaround.ts, index.ts, package.json, tsconfig.json) Added a new example project demonstrating TRPC options proxy integration with the TanStack Query client, including configuration and TypeScript setup.

Sequence Diagram(s)

sequenceDiagram
    participant E as Example (index.ts)
    participant QC as QueryClient
    participant TR as createTRPCOptionsProxy

    E->>QC: Initialize QueryClient instance
    E->>TR: Call createTRPCOptionsProxy({ client: null, queryClient: QC })
    TR-->>E: Return configured TRPC Options Proxy
Loading

Possibly related PRs

Suggested labels

♻️ autoupdate

Poem

I'm a rabbit with a joyful hop,
Skipping through code that can’t be stopped.
Exports now shine with types so clear,
A TypeScript treat, my whiskers cheer!
With every change, I bound anewβ€”
Carrots and code, a perfect brew!
πŸ₯•πŸ‡ Happy coding from me to you!


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❀️ Share
πŸͺ§ Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@railway-app railway-app bot temporarily deployed to trpc-pr-6577 March 1, 2025 11:08 Destroyed
Copy link

railway-app bot commented Mar 1, 2025

πŸš… Deployed to the trpc-pr-6577 environment in trpc-sse-and-websockets

Service Status Web Updated (UTC)
next-sse-chat 😴 Sleeping (View Logs) Web Jul 14, 2025 at 4:08 am
next-prisma-websockets-starter 😴 Sleeping (View Logs) Jun 13, 2025 at 5:47 am

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: 1

πŸ“œ Review details

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

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between a715445 and c4943c9.

β›” Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
πŸ“’ Files selected for processing (7)
  • .github/workflows/release-tmp.yml (1 hunks)
  • packages/client/package.json (1 hunks)
  • packages/next/package.json (1 hunks)
  • packages/react-query/package.json (1 hunks)
  • packages/server/package.json (1 hunks)
  • packages/tanstack-react-query/package.json (1 hunks)
  • scripts/entrypoints.ts (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (19)
  • GitHub Check: E2E-tests (tanstack-start)
  • GitHub Check: E2E-tests (standalone-server)
  • GitHub Check: E2E-tests (soa)
  • GitHub Check: E2E-tests (next-prisma-websockets-starter)
  • GitHub Check: E2E-tests (next-prisma-todomvc)
  • GitHub Check: E2E-tests (next-prisma-starter)
  • GitHub Check: E2E-tests (next-minimal-starter)
  • GitHub Check: E2E-tests (next-formdata)
  • GitHub Check: E2E-tests (minimal-react)
  • GitHub Check: E2E-tests (fastify-server)
  • GitHub Check: E2E-tests (express-server)
  • GitHub Check: E2E-tests (express-minimal)
  • GitHub Check: E2E-tests (cloudflare-workers)
  • GitHub Check: E2E-tests (.test/ssg)
  • GitHub Check: E2E-tests (.test/internal-types-export)
  • GitHub Check: E2E-tests (.test/diagnostics-big-router)
  • GitHub Check: E2E-tests (.experimental/next-app-dir)
  • GitHub Check: test
  • GitHub Check: Lint and auto-fix
πŸ”‡ Additional comments (37)
.github/workflows/release-tmp.yml (1)

8-8: Looks good!
Using issues/6554 for the release workflow trigger aligns with the PR reference.

packages/tanstack-react-query/package.json (1)

27-38: Export field enhancements are well-structured.
This nested object approach with explicit type references is in line with Node’s recommended package exports pattern and improves TypeScript support.

scripts/entrypoints.ts (3)

10-24: New nested export types look good.
Defining explicit import, require, and default objects with separate types fields ensures compatibility with various module resolution strategies and improves type declarations.


56-69: Top-level export redefinition is consistent.
Providing a well-defined import, require, and default with corresponding .d.ts, .mjs, and .js references clarifies the module entry points.


104-115: Dynamic exports setup is well-structured.
Assigning import, require, and default with separate type definitions ensures each entrypoint provides proper TypeScript declarations for different module systems.

packages/client/package.json (7)

34-45: Enhance TypeScript type exposure on the main export.
The changes in the main export block now include a "types" attribute for the import, require, and default keys. This improvement provides better TypeScript support and clarity when users import the package. Please verify that the file paths (i.e. "./dist/index.d.ts") are valid in your build output.


48-59: Add TypeScript definitions for the httpBatchLink export.
The export for ./links/httpBatchLink now includes a "types" entry that points to the appropriate TypeScript file. This change helps consumers get type definitions automatically.


61-73: Improve type safety for the httpLink export.
Defining a "types" key in both the import and require properties ensures that users get the correct TypeScript definitions when importing httpLink.


75-87: Enhance loggerLink export with explicit type definitions.
The changes correctly add a "types" property to the loggerLink export. This is beneficial for TypeScript users and maintains consistency with other exports.


89-101: Include TypeScript definitions in the splitLink export.
The updated structure now provides a "types" entry alongside the default entry. This contributes to improved type safety and module discoverability.


103-115: Strengthen WS Link export with type definitions.
The "types" key added in the wsLink/wsLink export ensures that TypeScript consumers can enjoy proper type annotations, matching the consistency across all module exports.


117-129: Explicitly export TypeScript definitions for unstable internals.
Including "types": "./dist/unstable-internals.ts" in all the export variants ensures consistency and better integration with TypeScript.

packages/server/package.json (15)

27-38: Enhance main export with TypeScript support in the server package.
The main export now includes a "types" key for each export variant. This addition improves type checking, but please double-check the generated d.ts file location.


40-52: Add TypeScript definitions for the AWS Lambda adapter.
The changes for ./adapters/aws-lambda now expose a "types" property pointing to the TypeScript definition file, ensuring that serverless adapter users have proper type information.


54-66: Integrate TypeScript support for the Express adapter.
Providing "types": "./dist/adapters/express.ts" in all the export variants keeps the export structure consistent and improves usage in TypeScript projects.


68-80: Improve Fastify adapter export by including types.
The updated export for ./adapters/fastify now contains a "types" key with a clear path to the TS file, aligning with the broader project goal for better type support.


82-94: Ensure type definitions for the Fetch adapter are exported.
The change introduces "types": "./dist/adapters/fetch/index.ts" properly for the fetch adapter. This adjustment is consistent with the new export structure and aids TypeScript integration.


96-108: Add TypeScript definitions for the Next-app-dir adapter.
The export for ./adapters/next-app-dir now includes the "types" property, which helps consumers with proper type definition imports.


110-122: Integrate TypeScript support for the Next adapter export.
The updated "types": "./dist/adapters/next.ts" along with proper default file paths ensures consistency and enhances developer experience.


124-136: Expose TypeScript definitions in the Node HTTP adapter.
The inclusion of a "types" key for the ./adapters/node-http export ensures that users relying on Node HTTP have access to the updated types.


138-150: Enhance the Standalone adapter export with type definitions.
Adding "types": "./dist/adapters/standalone.ts" provides clarity and improves type inference for users of the standalone adapter.


152-164: Strengthen the WS adapter export with precise type definitions.
The new structure for ./adapters/ws now consistently exposes a "types" property, further standardizing the export layout across adapters.


166-178: Add TypeScript definitions for the HTTP export.
The ./http export now contains the "types" key, which is essential for ensuring that all users, regardless of their runtime environment, have clear type paths.


180-192: Integrate type support in the Observable export.
Exposing "types": "./dist/observable/index.ts" in the observable export reinforces consistency and type safety in the server package.


194-206: Include TypeScript definitions for the RPC export.
Ensuring that the RPC export now has a "types" key helps TypeScript users benefit from accurate type definitions when integrating RPC functionalities.


208-220: Provide explicit type definitions for the Shared export.
The modifications add a "types" property for the ./shared export which aids in development by ensuring correct type resolution.


222-234: Expose TypeScript types for unstable-core-do-not-import.
Including the "types" key here completes the pattern across all exports and ensures that even experimental modules have accompanying type definitions.

packages/react-query/package.json (4)

27-40: Enhance main export with TypeScript type definitions in the React Query package.
The restructuring of the main export now includes a "types" key, benefiting consumers by providing direct access to type definitions alongside the module code.


41-54: Add TypeScript support for the RSC export.
The export for "./rsc" now includes a "types" entry pointing to the TypeScript file, which should improve type checking for users of this module.


55-68: Integrate explicit type definitions in the Server export.
Updating the "./server" export to include "types": "./dist/server/index.ts" aligns with the project-wide improvements for TypeScript support and consistency.


69-81: Provide TypeScript definitions for the Shared export.
By adding a "types" key for the "./shared" export, the changes make it easier for developers to get the correct type information when importing shared modules.

packages/next/package.json (6)

32-47: Enhance main export with comprehensive type declarations.
The main export now includes a nested structure with "types" fields across import, require, and default keys. This improvement helps improve module resolution for TypeScript consumers.


48-60: Add TypeScript definitions for the app-dir client export.
The "./app-dir/client" export is now updated to include a "types" key, ensuring that type definitions are properly exposed to users.


62-75: Integrate type support in the NextCache link export.
For the "./app-dir/links/nextCache" export, adding "types": "./dist/app-dir/links/nextCache.ts" ensures that the correct type information is available for end users.


76-89: Provide TypeScript definitions for the Next HTTP link export.
The update for "./app-dir/links/nextHttp" now includes the "types" property, which is consistent with other exports and improves type safety.


90-103: Add explicit type definitions for the app-dir server export.
The "./app-dir/server" export now contains a "types" key, supporting enhanced TypeScript integration for this module.


104-117: Expose TypeScript types for the SSR prepass export.
Including the "types" attribute in the "./ssrPrepass" export ensures that server-side rendering tools receive the necessary type information, keeping the export consistent with the new format.

@@ -76,10 +99,20 @@ export async function generateEntrypoints(rawInputs: string[]) {
// write this entrypoint to the package.json exports field
const esm = './dist/' + pathWithoutSrc.replace(/\.(ts|tsx)$/, '.mjs');
const cjs = './dist/' + pathWithoutSrc.replace(/\.(ts|tsx)$/, '.js');
const types = './dist/' + pathWithoutSrc.replace(/\.(ts|tsx)$/, '.ts');
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Critical: Reference the compiled .d.ts file instead of the source .ts.
Currently, the script points types to ./dist/.../file.ts, which likely does not exist post-compilation. Update it to .d.ts to reference the compiled type definitions.

Apply this fix:

- const types = './dist/' + pathWithoutSrc.replace(/\.(ts|tsx)$/, '.ts');
+ const types = './dist/' + pathWithoutSrc.replace(/\.(ts|tsx)$/, '.d.ts');
πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const types = './dist/' + pathWithoutSrc.replace(/\.(ts|tsx)$/, '.ts');
const types = './dist/' + pathWithoutSrc.replace(/\.(ts|tsx)$/, '.d.ts');

Copy link

pkg-pr-new bot commented Mar 1, 2025

Open in Stackblitz

@trpc/client

npm i https://pkg.pr.new/trpc/trpc/@trpc/client@6577

@trpc/next

npm i https://pkg.pr.new/trpc/trpc/@trpc/next@6577

@trpc/server

npm i https://pkg.pr.new/trpc/trpc/@trpc/server@6577

@trpc/react-query

npm i https://pkg.pr.new/trpc/trpc/@trpc/react-query@6577

@trpc/tanstack-react-query

npm i https://pkg.pr.new/trpc/trpc/@trpc/tanstack-react-query@6577

@trpc/upgrade

npm i https://pkg.pr.new/trpc/trpc/@trpc/upgrade@6577

commit: 2635238

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: 1

🧹 Nitpick comments (1)
examples/.test/trpc-tanstack-router-bug-repro/index-workaround.ts (1)

5-5: Simplify type casting approach

The double type casting (as unknown as TQueryClient) is unnecessarily complex and could hide type incompatibilities.

Consider simplifying to:

- const queryClient = (new QueryClient()) as unknown as TQueryClient;
+ const queryClient = new QueryClient() as TQueryClient;
πŸ“œ Review details

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

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between c4943c9 and aac8a8d.

β›” Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
πŸ“’ Files selected for processing (4)
  • examples/.test/trpc-tanstack-router-bug-repro/index-workaround.ts (1 hunks)
  • examples/.test/trpc-tanstack-router-bug-repro/index.ts (1 hunks)
  • examples/.test/trpc-tanstack-router-bug-repro/package.json (1 hunks)
  • examples/.test/trpc-tanstack-router-bug-repro/tsconfig.json (1 hunks)
βœ… Files skipped from review due to trivial changes (2)
  • examples/.test/trpc-tanstack-router-bug-repro/tsconfig.json
  • examples/.test/trpc-tanstack-router-bug-repro/package.json
🧰 Additional context used
πŸͺ› Biome (1.9.4)
examples/.test/trpc-tanstack-router-bug-repro/index-workaround.ts

[error] 2-2: Import attributes cannot be used with a type-only import.

The type-only import is defined here.

(syntax/correctness/noTypeOnlyImportAttributes)

⏰ Context from checks skipped due to timeout of 90000ms (20)
  • GitHub Check: E2E-tests (fastify-server)
  • GitHub Check: e2e-legacy-node (next-prisma-todomvc, 20.x)
  • GitHub Check: E2E-tests (express-server)
  • GitHub Check: e2e-legacy-node (next-prisma-todomvc, 18.x)
  • GitHub Check: E2E-tests (express-minimal)
  • GitHub Check: Release using pkg.pr.new
  • GitHub Check: e2e-legacy-node (next-prisma-websockets-starter, 20.x)
  • 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: E2E-tests (.test/internal-types-export)
  • GitHub Check: Test a monorepo using built declaration files
  • GitHub Check: e2e-legacy-node (next-prisma-starter, 18.x)
  • GitHub Check: E2E-tests (.test/diagnostics-big-router)
  • GitHub Check: E2E-tests (Bun) (bun, ubuntu-latest)
  • 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)
examples/.test/trpc-tanstack-router-bug-repro/index-workaround.ts (1)

7-10: Avoid using null as any for client property

Using null as any bypasses TypeScript's type checking and can lead to runtime errors.

If this is a workaround for a specific issue (as the filename suggests), consider adding a comment explaining why this approach is necessary. If possible, provide a more type-safe alternative.

examples/.test/trpc-tanstack-router-bug-repro/index.ts (2)

1-9: Code duplication with index-workaround.ts

This file implements nearly identical functionality to index-workaround.ts. Consider documenting the purpose of having two similar files or consolidating them.

Are both files needed for demonstrating different aspects of the bug? If so, adding comments explaining the differences would improve clarity.


7-7: Avoid using null as any for client property

Using null as any bypasses TypeScript's type checking and can lead to runtime errors.

If this is intentional for a bug reproduction, consider adding a comment explaining the issue being demonstrated. For example:

// Using null client to reproduce issue #6554 with TRPC and TanStack Router integration
client: null as any,

Comment on lines 1 to 10
import {QueryClient} from "@tanstack/react-query";
import type {QueryClient as TQueryClient} from "@tanstack/react-query" with {'resolution-mode': 'require'};
import {createTRPCOptionsProxy} from "@trpc/tanstack-react-query";

const queryClient = (new QueryClient()) as unknown as TQueryClient;

const trpc = createTRPCOptionsProxy({
client: null as any,
queryClient,
});
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix TypeScript import attribute usage

The import attribute {'resolution-mode': 'require'} cannot be used with a type-only import on line 2. This is causing a Biome error.

Apply this fix:

- import type {QueryClient as TQueryClient} from "@tanstack/react-query" with {'resolution-mode': 'require'};
+ import type {QueryClient as TQueryClient} from "@tanstack/react-query";
πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import {QueryClient} from "@tanstack/react-query";
import type {QueryClient as TQueryClient} from "@tanstack/react-query" with {'resolution-mode': 'require'};
import {createTRPCOptionsProxy} from "@trpc/tanstack-react-query";
const queryClient = (new QueryClient()) as unknown as TQueryClient;
const trpc = createTRPCOptionsProxy({
client: null as any,
queryClient,
});
import {QueryClient} from "@tanstack/react-query";
import type {QueryClient as TQueryClient} from "@tanstack/react-query";
import {createTRPCOptionsProxy} from "@trpc/tanstack-react-query";
const queryClient = (new QueryClient()) as unknown as TQueryClient;
const trpc = createTRPCOptionsProxy({
client: null as any,
queryClient,
});
🧰 Tools
πŸͺ› Biome (1.9.4)

[error] 2-2: Import attributes cannot be used with a type-only import.

The type-only import is defined here.

(syntax/correctness/noTypeOnlyImportAttributes)

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 (1)
.github/workflows/main.yml (1)

79-79: YAML Indentation Issue in New Test Directory Entry
The new directory entry .test/trpc-tanstack-router-bug-repro is indented with 12 spaces, yet the YAML linter expects an indentation of 10 spaces on this line. Please adjust the indentation to conform with the expected format and resolve the linting warning.

🧰 Tools
πŸͺ› YAMLlint (1.35.1)

[warning] 79-79: wrong indentation: expected 10 but found 12

(indentation)

πŸ“œ Review details

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

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between c43ccf0 and 04bfa0c.

β›” Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
πŸ“’ Files selected for processing (3)
  • .github/workflows/main.yml (1 hunks)
  • .vscode/settings.json (1 hunks)
  • examples/.test/trpc-tanstack-router-bug-repro/package.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • examples/.test/trpc-tanstack-router-bug-repro/package.json
🧰 Additional context used
πŸͺ› YAMLlint (1.35.1)
.github/workflows/main.yml

[warning] 79-79: wrong indentation: expected 10 but found 12

(indentation)

⏰ Context from checks skipped due to timeout of 90000ms (19)
  • GitHub Check: E2E-tests (express-server)
  • GitHub Check: E2E-tests (express-minimal)
  • GitHub Check: E2E-tests (cloudflare-workers)
  • GitHub Check: e2e-legacy-node (next-prisma-todomvc, 20.x)
  • GitHub Check: E2E-tests (.test/ssg)
  • GitHub Check: e2e-legacy-node (next-prisma-todomvc, 18.x)
  • GitHub Check: E2E-tests (.test/trpc-tanstack-router-bug-repro)
  • GitHub Check: e2e-legacy-node (next-prisma-websockets-starter, 20.x)
  • GitHub Check: E2E-tests (.test/internal-types-export)
  • GitHub Check: E2E-tests (.test/diagnostics-big-router)
  • GitHub Check: Release using pkg.pr.new
  • GitHub Check: e2e-legacy-node (next-prisma-websockets-starter, 18.x)
  • GitHub Check: Test a monorepo using built declaration files
  • GitHub Check: E2E-tests (.experimental/next-app-dir)
  • GitHub Check: e2e-legacy-node (next-prisma-starter, 20.x)
  • GitHub Check: e2e-legacy-node (next-prisma-starter, 18.x)
  • GitHub Check: E2E-tests (Bun) (bun, ubuntu-latest)
  • GitHub Check: E2E-tests (Deno) (deno-deploy)
  • GitHub Check: test
πŸ”‡ Additional comments (1)
.vscode/settings.json (1)

32-32: Verify Explorer Exclusion Setting Change
The setting "explorer.excludeGitIgnore": false will now make files and directories normally ignored by Git visible in the VSCode explorer. Please confirm that this change is intentional, as it may lead to increased clutter in the file explorer view.

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.

bug: Type incompatibility between @trpc/tanstack-react-query and @tanstack/react-query
1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy