Repository navigation
patch: typescript 5.9 support - #6877
Conversation
|
π Deployed to the trpc-pr-6877 environment in trpc-sse-and-websockets
|
WalkthroughAll changes in this pull request update the TypeScript dependency version from Changes
Sequence Diagram(s)No sequence diagram generated as the changes are limited to dependency version updates, configuration, and minor type/code adjustments without changes to control flow or features. Estimated code review effortπ― 2 (Simple) | β±οΈ ~8 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changesNo out-of-scope changes detected. Suggested labels
Suggested reviewers
Poem
Note β‘οΈ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. π Recent review detailsConfiguration used: CodeRabbit UI π Files selected for processing (4)
β Files skipped from review due to trivial changes (1)
π§ Files skipped from review as they are similar to previous changes (2)
π§° Additional context usedπ§ Learnings (3)π Common learningsπ Learning: in the trpc monorepo, packages/tests and packages/upgrade don't need main/module/types fields in the...Applied to files:
π Learning: the cli options `trpcfile` and `trpcimportname` in `packages/upgrade/src/bin/cli.ts` are temporary a...Applied to files:
β° Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (20)
π Additional comments (1)
β¨ Finishing Touches
π§ͺ Generate unit tests
πͺ§ TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
The latest updates on your projects. Learn more about Vercel for Git βοΈ
|
There was a problem hiding this comment.
Actionable comments posted: 1
π Outside diff range comments (1)
examples/fastify-server/package.json (1)
28-38: Pipeline is red βpnpm-lock.yamlmust be refreshed after this dev-dependency change.The TypeScript upgrade itself is fine, but the lockfile mismatch (see GitHub Actions logs) prevents installs with the
--frozen-lockfileflag. Regenerate and commit the lockfile so downstream consumers get a reproducible install.
β»οΈ Duplicate comments (8)
examples/minimal-react/server/package.json (1)
20-20: Same concern applies here β see earlier commentexamples/.test/diagnostics-big-router/package.json (1)
26-26: Same concern applies here β see earlier commentexamples/minimal-content-types/client/package.json (1)
24-24: Same concern applies here β see earlier commentexamples/.test/ssg-infinite-serialization/package.json (1)
32-32: Same concern applies here β see earlier commentexamples/lambda-url/package.json (1)
26-27: Same TypeScript 5.9 bump as aboveThe earlier comment applies here as well.
examples/.test/ssg/package.json (1)
32-33: Same TypeScript 5.9 bump as aboveThe earlier comment applies here as well.
www/og-image/package.json (1)
20-21: Same TypeScript 5.9 bump as aboveThe earlier comment applies here as well.
examples/tanstack-start/package.json (1)
43-44: Same TypeScript 5.9 bump as aboveThe earlier comment applies here as well.
π§Ή Nitpick comments (3)
examples/.experimental/next-app-dir/package.json (1)
34-34: Move TypeScript todevDependenciesto avoid shipping the compiler in production
typescriptis only needed at build time. Keeping it underdependenciesincreases the runtime install footprint for this example without any benefit. Consider moving it to the existingdevDependenciesblock.- "trpc-api": "link:./src/trpc", - "typescript": "^5.9.2", + "trpc-api": "link:./src/trpc" ... "devDependencies": { "@playwright/test": "^1.50.1", "start-server-and-test": "^1.12.0", "wait-port": "^1.0.1", + "typescript": "^5.9.2" },packages/tanstack-react-query/package.json (1)
75-75: Optionally tighten the peer range
peerDependencies.typescriptstill reads">=5.7.2".
If the package is only verified against β₯5.9, consider raising the lower bound:- "typescript": ">=5.7.2" + "typescript": ">=5.9.0"Not mandatory, but it makes expectations explicit for consumers.
examples/next-prisma-starter/package.json (1)
64-65: Check plugin parity with the new TypeScript major.TypeScript jumps from 5.8 β 5.9, but
@typescript-eslintstays at8.31.1(Nov-2023). That plugin tracks TS internals quite closely; mixing an old plugin with a new compiler can surface false-positives or missed diagnostics. Consider upgrading the whole trio (typescript,@typescript-eslint/*,eslint) together.- "@typescript-eslint": "^8.31.1", + "@typescript-eslint": "^8.59.0",
π Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
β Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
π Files selected for processing (40)
examples/.experimental/next-app-dir/package.json(1 hunks)examples/.test/diagnostics-big-router/package.json(1 hunks)examples/.test/internal-types-export/package.json(1 hunks)examples/.test/ssg-infinite-serialization/package.json(1 hunks)examples/.test/ssg/package.json(1 hunks)examples/bun/package.json(1 hunks)examples/cloudflare-workers/package.json(1 hunks)examples/express-minimal/package.json(1 hunks)examples/express-server/package.json(1 hunks)examples/fastify-server/package.json(1 hunks)examples/lambda-api-gateway/package.json(1 hunks)examples/lambda-url/package.json(1 hunks)examples/lazy-load/package.json(1 hunks)examples/minimal-content-types/client/package.json(1 hunks)examples/minimal-content-types/server/package.json(1 hunks)examples/minimal-react/client/package.json(1 hunks)examples/minimal-react/server/package.json(1 hunks)examples/minimal/package.json(1 hunks)examples/next-big-router/package.json(1 hunks)examples/next-edge-runtime/package.json(1 hunks)examples/next-formdata/package.json(1 hunks)examples/next-minimal-starter/package.json(1 hunks)examples/next-prisma-starter/package.json(1 hunks)examples/next-prisma-todomvc/package.json(1 hunks)examples/next-prisma-websockets-starter/package.json(1 hunks)examples/next-sse-chat/package.json(1 hunks)examples/soa/package.json(1 hunks)examples/standalone-server/package.json(1 hunks)examples/tanstack-start/package.json(1 hunks)examples/vercel-edge-runtime/package.json(1 hunks)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)packages/tests/package.json(1 hunks)packages/upgrade/package.json(1 hunks)www/og-image/package.json(1 hunks)www/package.json(1 hunks)
π§° Additional context used
π§ Learnings (4)
π Common learnings
Learnt from: barelyhuman
PR: trpc/trpc#6530
File: packages/upgrade/src/bin/cli.ts:218-222
Timestamp: 2025-02-19T20:31:52.088Z
Learning: The CLI options `trpcFile` and `trpcImportName` in `packages/upgrade/src/bin/cli.ts` are temporary and planned to be removed in favor of using automatically discovered references from the TypeScript program.
Learnt from: juliusmarminge
PR: trpc/trpc#6262
File: examples/minimal-react/client/package.json:16-17
Timestamp: 2025-02-12T16:56:46.960Z
Learning: In examples and codemods targeting future versions, dependencies may intentionally use upcoming versions (e.g., React v19) or `next` tags, even if those versions haven't been officially released yet.
Learnt from: juliusmarminge
PR: trpc/trpc#6789
File: packages/tanstack-react-query/tsdown.config.ts:1-24
Timestamp: 2025-06-09T14:01:20.033Z
Learning: In the tRPC monorepo, packages/tests and packages/upgrade don't need main/module/types fields in their package.json because tests is not distributed and upgrade just exposes a binary.
π Learning: in examples and codemods targeting future versions, dependencies may intentionally use upcoming vers...
Learnt from: juliusmarminge
PR: trpc/trpc#6262
File: examples/minimal-react/client/package.json:16-17
Timestamp: 2025-02-12T16:56:46.960Z
Learning: In examples and codemods targeting future versions, dependencies may intentionally use upcoming versions (e.g., React v19) or `next` tags, even if those versions haven't been officially released yet.
Applied to files:
examples/next-minimal-starter/package.jsonexamples/minimal-react/client/package.jsonexamples/lazy-load/package.jsonexamples/minimal-content-types/client/package.jsonexamples/.test/diagnostics-big-router/package.jsonexamples/cloudflare-workers/package.jsonexamples/lambda-api-gateway/package.jsonexamples/.experimental/next-app-dir/package.jsonexamples/express-server/package.jsonexamples/.test/ssg-infinite-serialization/package.jsonexamples/minimal-content-types/server/package.jsonexamples/standalone-server/package.jsonexamples/fastify-server/package.jsonexamples/.test/internal-types-export/package.jsonexamples/next-prisma-todomvc/package.jsonpackages/next/package.jsonexamples/minimal-react/server/package.jsonexamples/lambda-url/package.jsonexamples/tanstack-start/package.jsonexamples/next-prisma-starter/package.jsonexamples/bun/package.jsonpackages/upgrade/package.jsonexamples/vercel-edge-runtime/package.jsonexamples/.test/ssg/package.jsonexamples/next-formdata/package.jsonexamples/next-edge-runtime/package.jsonexamples/soa/package.jsonpackages/tests/package.jsonexamples/next-sse-chat/package.jsonwww/package.jsonpackages/react-query/package.jsonwww/og-image/package.jsonpackages/client/package.jsonpackage.jsonexamples/minimal/package.jsonexamples/express-minimal/package.jsonexamples/next-big-router/package.jsonpackages/tanstack-react-query/package.jsonexamples/next-prisma-websockets-starter/package.jsonpackages/server/package.json
π Learning: in the trpc monorepo, packages/tests and packages/upgrade don't need main/module/types fields in the...
Learnt from: juliusmarminge
PR: trpc/trpc#6789
File: packages/tanstack-react-query/tsdown.config.ts:1-24
Timestamp: 2025-06-09T14:01:20.033Z
Learning: In the tRPC monorepo, packages/tests and packages/upgrade don't need main/module/types fields in their package.json because tests is not distributed and upgrade just exposes a binary.
Applied to files:
examples/next-minimal-starter/package.jsonexamples/minimal-react/client/package.jsonexamples/lazy-load/package.jsonexamples/minimal-content-types/client/package.jsonexamples/.test/diagnostics-big-router/package.jsonexamples/cloudflare-workers/package.jsonexamples/lambda-api-gateway/package.jsonexamples/.experimental/next-app-dir/package.jsonexamples/express-server/package.jsonexamples/.test/ssg-infinite-serialization/package.jsonexamples/minimal-content-types/server/package.jsonexamples/standalone-server/package.jsonexamples/fastify-server/package.jsonexamples/.test/internal-types-export/package.jsonexamples/next-prisma-todomvc/package.jsonpackages/next/package.jsonexamples/minimal-react/server/package.jsonexamples/lambda-url/package.jsonexamples/tanstack-start/package.jsonexamples/next-prisma-starter/package.jsonexamples/bun/package.jsonpackages/upgrade/package.jsonexamples/vercel-edge-runtime/package.jsonexamples/.test/ssg/package.jsonexamples/next-formdata/package.jsonexamples/next-edge-runtime/package.jsonexamples/soa/package.jsonpackages/tests/package.jsonexamples/next-sse-chat/package.jsonwww/package.jsonpackages/react-query/package.jsonwww/og-image/package.jsonpackages/client/package.jsonpackage.jsonexamples/minimal/package.jsonexamples/express-minimal/package.jsonexamples/next-big-router/package.jsonpackages/tanstack-react-query/package.jsonexamples/next-prisma-websockets-starter/package.jsonpackages/server/package.json
π Learning: the cli options `trpcfile` and `trpcimportname` in `packages/upgrade/src/bin/cli.ts` are temporary a...
Learnt from: barelyhuman
PR: trpc/trpc#6530
File: packages/upgrade/src/bin/cli.ts:218-222
Timestamp: 2025-02-19T20:31:52.088Z
Learning: The CLI options `trpcFile` and `trpcImportName` in `packages/upgrade/src/bin/cli.ts` are temporary and planned to be removed in favor of using automatically discovered references from the TypeScript program.
Applied to files:
examples/minimal-content-types/client/package.jsonexamples/.experimental/next-app-dir/package.jsonexamples/.test/internal-types-export/package.jsonexamples/next-prisma-todomvc/package.jsonpackages/next/package.jsonexamples/next-prisma-starter/package.jsonexamples/bun/package.jsonpackages/upgrade/package.jsonpackages/tests/package.jsonwww/package.jsonpackages/client/package.jsonpackage.jsonpackages/tanstack-react-query/package.jsonexamples/next-prisma-websockets-starter/package.jsonpackages/server/package.json
πͺ GitHub Actions: main
examples/fastify-server/package.json
[error] 1-1: pnpm install failed due to outdated lockfile. The pnpm-lock.yaml is not up to date with package.json dependencies. Run 'pnpm install --no-frozen-lockfile' to update the lockfile.
package.json
[error] 1-1: pnpm install failed due to outdated lockfile. The pnpm-lock.yaml is not up to date with package.json dependencies. Run 'pnpm install --no-frozen-lockfile' to update the lockfile.
πͺ GitHub Actions: autofix.ci
examples/fastify-server/package.json
[error] 1-1: pnpm install failed due to outdated lockfile. The pnpm-lock.yaml is not up to date with package.json dependencies. Run 'pnpm install --no-frozen-lockfile' to update the lockfile.
package.json
[error] 1-1: pnpm install failed due to outdated lockfile. The pnpm-lock.yaml is not up to date with package.json dependencies. Run 'pnpm install --no-frozen-lockfile' to update the lockfile.
β° Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Analyze (typescript)
π Additional comments (28)
packages/tests/package.json (1)
36-37: Workspace TS alignment confirmed
rg --json '"typescript":\s*"\^[0-5]\.[0-8]\.'returned no matches, so no^5.8.xentries remain in anypackage.json.- In
pnpm-lock.yaml, only transitive dependencies still pin[email protected]; the root resolution fortypescriptis correctly5.9.2.All packages now depend on
^5.9.2and the lockfileβs direct TypeScript entry is at 5.9.2. No further action required.examples/next-prisma-websockets-starter/package.json (1)
77-78: Type-check All Workspaces with TS 5.9Due to TS 5.9βs stricter DOM typings (see #6875), please verify that every workspaceβboth packages and examplesβstill compiles without errors under the new version. For example:
- From repo root:
pnpm -r exec --filter "{packages/**,examples/**}" tsc --noEmit- Or individually in each example/package:
cd examples/next-prisma-websockets-starter pnpm exec tsc --noEmitEnsure no new type errors remain before merging.
examples/next-big-router/package.json (2)
29-29: TypeScript 5.9 bump looks goodThe version alignment to
^5.9.2matches the repo-wide upgrade and keeps the example in sync with the core packages. No further action needed here.
1-33: No stray TypeScript 5.8 references found
I ran the RG search across allpackage.jsonfiles and confirmed there are no remaining"typescript": "5.8.x"entries.examples/next-prisma-todomvc/package.json (1)
48-48: Version bump confirmedThe dev dependency is correctly updated to
^5.9.2; everything else remains unchanged.examples/soa/package.json (1)
20-20: TS 5.9 adoption acknowledged
typescriptis upgraded indevDependencies, consistent with the repo-wide move. Looks good.examples/minimal/package.json (1)
24-24: Upgrade aligns with global tooling versionsThe minimal example now targets
typescript@^5.9.2, matching the rest of the codebase.examples/bun/package.json (1)
23-23: Lockfile refreshed after TypeScript bumpAll devDependencies now target TypeScript ^5.9.2 and the pnpm-lock.yaml has been updated accordinglyβno further action needed. π
www/package.json (1)
106-106: OK, but re-run docs TS build once locks are updatedDocusaurusβ TS build occasionally caches types; after upgrading to 5.9, do a clean build (
pnpm docs:build && pnpm docs:serve) to catch any latent 5.9-specific type regressions.examples/lambda-api-gateway/package.json (1)
27-27: Upgrade looks goodServerless + esbuild work fine on TS 5.9. No further action required.
packages/client/package.json (1)
128-128: Dev-only upgrade aligns with peer range
peerDependencies.typescriptstill uses>=5.7.2, which is acceptable; projects stuck on 5.8 continue to work while we dog-food 5.9 internally.packages/react-query/package.json (1)
116-116: Consistent with rest of monorepoNo further changes neededβtsdown & test suites should compile under 5.9 once locks are refreshed.
packages/server/package.json (1)
218-220: Confirm build-tool chain is ready for the 5.9 compiler
[email protected], ESLintβs@typescript-eslint/*plugins (pulled via the monorepo presets), and any TS-powered generators must tolerate the 5.9 compiler API. A silent peer-range mismatch there will surface only at publish time.Please run the full workspace build once with Node β₯18 to ensure nothing crashes on the new
typescriptmajor bump.examples/minimal-content-types/server/package.json (1)
18-21: Version bump looks goodExample keeps in sync with the repoβs compiler baseline.
examples/minimal-react/client/package.json (1)
23-25: TS 5.9 upgrade approvedNo conflicting dev tooling in this example; the bump is safe.
examples/lazy-load/package.json (1)
22-24: LGTMThe lazy-load example now compiles against the new baseline. β
examples/next-formdata/package.json (1)
28-31: Consistent compiler version across examplesChange aligns this Next.js example with the monorepoβs TypeScript target.
examples/next-minimal-starter/package.json (1)
27-27: Synchronise the lock-file after the TS bump
typescriptwas bumped to^5.9.2, but the CI failed becausepnpm-lock.yamlwasnβt regenerated.
Runpnpm install --no-frozen-lockfileand commit the updated lock-file to keep the workspace consistent.examples/cloudflare-workers/package.json (1)
21-21: Remember to updatepnpm-lock.yamlLike the other example packages, this version bump requires a fresh lock-file; otherwise installs with
--frozen-lockfilewill fail.packages/upgrade/package.json (1)
38-38: Double-check why TypeScript is a runtime dependency
packages/upgradelists TypeScript underdependencies(notdevDependencies).
That makes sense only if the CLI invokes the TS compiler API at runtime.
Please verify this is still required; otherwise move it todevDependenciesto avoid shipping an extra 90 MB to end users.examples/express-server/package.json (1)
35-36: LGTM β version bump only.No downstream tooling here is tightly coupled to the TS compiler, so this looks safe.
examples/standalone-server/package.json (1)
34-35: LGTM β version bump aligns with repo-wide policy.Nothing else in the dev tool-chain should break with 5.9.
examples/.test/internal-types-export/package.json (1)
14-15: Confirm tsdown support for TS 5.9.
[email protected]bundles its own TypeScript instance. Make sure its transitive dependency tree has already been cut for 5.9; otherwise code-gen may still use an older compiler and drift from the new type-checker.examples/next-edge-runtime/package.json (1)
26-27: LGTM β upgrade only.Edge-runtime example relies on Next.js compilation which already bundles its own TS; local
typescriptis only for lint & type-check, so this bump is low-risk.examples/vercel-edge-runtime/package.json (1)
21-21: TypeScript bump looks good β remember to regenerate the lock-file.The version bump to 5.9.2 is correct, but CI is currently failing because
pnpm-lock.yamlis out-of-date. Runpnpm install --no-frozen-lockfileand commit the updated lockfile to unblock the pipeline.examples/express-minimal/package.json (1)
35-35: LGTM β no further action needed here.packages/next/package.json (1)
139-139: Dev-dependency bump is fine, peer range can stay unchanged.
peerDependencies.typescriptis still>=5.7.2, which encompasses 5.9.x, so no peer change is necessary.examples/next-sse-chat/package.json (1)
45-45: LGTM β consistent with the repository-wide 5.9.2 upgrade.
| "tsx": "^4.19.3", | ||
| "turbo": "^2.5.4", | ||
| "typescript": "^5.8.2", | ||
| "typescript": "^5.9.2", |
There was a problem hiding this comment.
CI is failing β regenerate and commit pnpm-lock.yaml
The root lock-file is out of sync after bumping to ^5.9.2, causing all GitHub Actions jobs to error out.
Run the following to fix it:
#!/bin/bash
pnpm install --no-frozen-lockfile # rewrite lock-file
rg --no-heading -n '"typescript": "[^5.9]' package.json pnpm-lock.yaml || echo "β All TypeScript refs β₯5.9"
git add pnpm-lock.yamlThe ripgrep check ensures no stale 5.8.x references remain.
π€ Prompt for AI Agents
In package.json at line 74, after updating the TypeScript version to ^5.9.2, the
pnpm-lock.yaml file is out of sync causing CI failures. To fix this, run 'pnpm
install --no-frozen-lockfile' to regenerate the lock file, verify no older
TypeScript versions remain using ripgrep, and then commit the updated
pnpm-lock.yaml file to the repository.
@trpc/client
@trpc/next
@trpc/react-query
@trpc/server
@trpc/tanstack-react-query
@trpc/upgrade
commit: |
| * Sets the request's body. | ||
| */ | ||
| body?: FormData | string | null | Uint8Array | Blob | File; | ||
| body?: FormData | string | null | Uint8Array<ArrayBuffer> | Blob | File; |
|
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. |
Closes #6875
π― Changes
Adds support for typescript 5.9
β Checklist
Summary by CodeRabbit