🧙♀️ Move Fast and Break Nothing. End-to-end typesafe APIs made easy.
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
chore: remove overzealous destructuring (#6930) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - New Features - None - Documentation - Revised coding guidelines: nuanced destructuring rules and front-matter now include .md/.mdx. - Unified resolver/middleware examples to use a single opts parameter. - Blog example: added tracing middleware and a span meta tag. - Fixed Next.js TypeScript docs link. - Refactor - Standardized example servers and code samples to opts-based callbacks without behavior changes. - Tests - Updated test suites to opts-based handlers; no behavioral changes. - Chores - Added rules enforcing pnpm usage and running tests without watch mode. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> | 9 个月前 | |
ci(example): fix Playwright e2e ffmpeg failures (#7412) ## 🎯 Changes Five E2E jobs were failing because Playwright video capture still required the managed `ffmpeg` binary after CI stopped installing Playwright browsers. - **Playwright CI config** - Disable video recording for CI runs in the affected browser examples. - Keep local `next-prisma-starter` video recording behavior unchanged. ```ts video: process.env.CI ? 'off' : 'on', ``` ## ✅ Checklist - [ ] I have followed the steps listed in the [Contributing guide](https://github.com/trpc/trpc/blob/main/CONTRIBUTING.md). - [ ] If necessary, I have added documentation related to the changes made. - [ ] I have added or updated the tests related to the changes made. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> | 11 天前 | |
chore: Add superset config (#7284) Closes # ## 🎯 Changes What changes are made in this PR? Is it a feature or a bug fix? <!-- Note: once you create a Pull request, we will automatically fix auto-fixable lint issues in your branch --> ## ✅ Checklist - [ ] I have followed the steps listed in the [Contributing guide](https://github.com/trpc/trpc/blob/main/CONTRIBUTING.md). - [ ] If necessary, I have added documentation related to the changes made. - [ ] I have added or updated the tests related to the changes made. | 3 个月前 | |
refactor: swap rollup with native rolldown (using tsdown) (#6789) | 1 年前 | |
feat: Tanstack Intent Skills (#7252) - **Add package** - **Add generated skills and artifacts** - **docs: add AI agents installation instructions across multiple README files** Closes # ## 🎯 Changes What changes are made in this PR? Is it a feature or a bug fix? <!-- Note: once you create a Pull request, we will automatically fix auto-fixable lint issues in your branch --> ## ✅ Checklist - [ ] I have followed the steps listed in the [Contributing guide](https://github.com/trpc/trpc/blob/main/CONTRIBUTING.md). - [ ] If necessary, I have added documentation related to the changes made. - [ ] I have added or updated the tests related to the changes made. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * AI agent support: one-step install for tRPC "skills" to assist code generation. * **Documentation** * Many new and expanded skill guides plus a generated domain/skill catalog; AI Agents tips inserted across READMEs and docs. * **Chores** * Added an intent CLI/runtime dependency, package metadata for a CLI entry, updated gitignore, and CI workflows to validate and check skills. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> | 3 个月前 | |
ci(example): fix Playwright e2e ffmpeg failures (#7412) ## 🎯 Changes Five E2E jobs were failing because Playwright video capture still required the managed `ffmpeg` binary after CI stopped installing Playwright browsers. - **Playwright CI config** - Disable video recording for CI runs in the affected browser examples. - Keep local `next-prisma-starter` video recording behavior unchanged. ```ts video: process.env.CI ? 'off' : 'on', ``` ## ✅ Checklist - [ ] I have followed the steps listed in the [Contributing guide](https://github.com/trpc/trpc/blob/main/CONTRIBUTING.md). - [ ] If necessary, I have added documentation related to the changes made. - [ ] I have added or updated the tests related to the changes made. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> | 11 天前 | |
v11.18.0 | 14 天前 | |
chore(monorepo): remove versions from private workspaces (#7306) <!-- CURSOR_AGENT_PR_BODY_BEGIN --> Closes # ## 🎯 Changes Remove the redundant `version` field from private/non-published workspace packages. Update `scripts/version.ts` because it previously assumed every package in `packages/*` declared a local `version`. Once private workspaces like `@trpc/tests` stop carrying that field, the script still needs a version source for pinning `@trpc/*` dependencies, so it now falls back to the repo version from `lerna.json`. ## ✅ Checklist - [x] I have followed the steps listed in the [Contributing guide](https://github.com/trpc/trpc/blob/main/CONTRIBUTING.md). - [ ] If necessary, I have added documentation related to the changes made. - [ ] I have added or updated the tests related to the changes made. <!-- CURSOR_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-380a6de9-6b07-4dd3-a317-09fbfa8949f0"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-380a6de9-6b07-4dd3-a317-09fbfa8949f0"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated package version management configuration across example projects and the build system. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Cursor Agent <cursoragent@cursor.com> | 2 个月前 | |
feat(openapi): Add server url support (#7411) Closes # ## 🎯 Changes Adds ServerURLs support to OpenAPI support <!-- Note: once you create a Pull request, we will automatically fix auto-fixable lint issues in your branch --> ## ✅ Checklist - [ ] I have followed the steps listed in the [Contributing guide](https://github.com/trpc/trpc/blob/main/CONTRIBUTING.md). - [ ] If necessary, I have added documentation related to the changes made. - [ ] I have added or updated the tests related to the changes made. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a CLI option to configure the OpenAPI server base URL * OpenAPI document generation now accepts an optional servers configuration * **Documentation** * Updated docs and examples to show server URL usage, including quick-start/programmatic examples * **Tests** * Added tests for CLI server URL handling * Added tests for servers behavior in document generation <!-- end of auto-generated comment: release notes by coderabbit.ai --> | 17 天前 | |
feat: OpenAPI Cyclic Types support (#7283) * Drops the depth limit of 20, and significantly hardens cyclic-type support for both inference and Zod * Support zod.lazy via Standard Schema fallback * Strip symbols from output (no more weird async generator output until we can do that right) * Add more comprehensive types for the OpenAPI doc from the official package (now a dependency) and apply some patches to these types because they're slightly outdated * Fixes several issues with gathering schema descriptions, such as consuming jsdoc comments from node_modules types ## 🎯 Changes What changes are made in this PR? Is it a feature or a bug fix? <!-- Note: once you create a Pull request, we will automatically fix auto-fixable lint issues in your branch --> ## ✅ Checklist - [ ] I have followed the steps listed in the [Contributing guide](https://github.com/trpc/trpc/blob/main/CONTRIBUTING.md). - [ ] If necessary, I have added documentation related to the changes made. - [ ] I have added or updated the tests related to the changes made. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Enhanced OpenAPI 3.1 typing and schema generation; added generated typed clients, SDK, SSE client, and utility helpers for query/path/body serialization. * **Bug Fixes** * Fixed recursive/schema generation: removed depth truncation, improved $ref resolution, preserved non-empty component schemas and nested descriptions. * **Tests** * Added comprehensive tests covering recursive, mutual, nullable and edge-case schema generation and OpenAPI structure. * **Documentation** * README TODO updated; added plan for z.lazy() handling and async-generator investigation. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> | 3 个月前 | |
feat(server + client): add support for server-sent events (SSE) (#5713) | 1 年前 | |
chore: Add cache checks for openapi router fixtures (#7296) Closes # ## 🎯 Changes What changes are made in this PR? Is it a feature or a bug fix? <!-- Note: once you create a Pull request, we will automatically fix auto-fixable lint issues in your branch --> ## ✅ Checklist - [ ] I have followed the steps listed in the [Contributing guide](https://github.com/trpc/trpc/blob/main/CONTRIBUTING.md). - [ ] If necessary, I have added documentation related to the changes made. - [ ] I have added or updated the tests related to the changes made. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * CI now fails if generated OpenAPI test fixtures are out of date. * Test tooling adds per-router on-disk caching to skip unnecessary regeneration and speed workflows. * Test watcher now retriggers when package metadata changes. * Git ignore updated to exclude cached test artifacts. * **Documentation** * Cleaned and standardized generated doc comments/descriptions in OpenAPI test outputs. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> | 3 个月前 | |
Update dependabot-approve.yml (#2865) | 3 年前 | |
chore: simplify ci (#6905) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Reworked build/dev/type-checking to package-scoped parallel scripts, removed legacy codegen generator and a large generated test, updated CI to run new type checks, and added Prisma hoist exclusions. * **Removed** * Deleted the experimental TanStack Start example and its tests/configs/artifacts; simplified an example to use direct DB client access. * **New Features** * Added an API Reference (auto-generated) sidebar category in docs. * **Bug Fixes** * Fixed font preconnect crossOrigin for more reliable font loading. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> | 9 个月前 | |
chore(upgrade): Node 24, vitest 4 (#7200) Closes # ## 🎯 Changes What changes are made in this PR? Is it a feature or a bug fix? <!-- Note: once you create a Pull request, we will automatically fix auto-fixable lint issues in your branch --> ## ✅ Checklist - [ ] I have followed the steps listed in the [Contributing guide](https://github.com/trpc/trpc/blob/main/CONTRIBUTING.md). - [ ] If necessary, I have added documentation related to the changes made. - [ ] I have added or updated the tests related to the changes made. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated Node.js requirement to 24.x across configs and toolchain; upgraded Vitest-related packages and several dev devDependencies (including jsdom and jest-dom). * **Bug Fixes** * Fixed cookie header handling to prevent duplication when sending responses. * Standardized abort-related error messages reported in streaming scenarios. * **Tests** * Adjusted tests and snapshots, added a Node test environment directive, enabled project-based Vitest runs and mock restoration, and tweaked a FormData-related test. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Nick-Lucas <8896153+Nick-Lucas@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> | 3 个月前 | |
feat: Support OpenAPI json generation for any tRPC appRouter (#7231) To see the RFC+Discussion: https://github.com/trpc/trpc/discussions/7239#discussion-9644098 ## 🎯 Changes What changes are made in this PR? Is it a feature or a bug fix? Adds a TypeScript-compiler-driven OpenAPI 3.1 document generator to @trpc/openapi. The generator resolves fully-computed types (what the vanilla client proxy sees) rather than raw mapped/generic types, and emits a standards-compliant JSON spec, possible for use with any generator or consumer of such a document This diff is big and it mostly doesn't matter because it's testing code which you can ignore! Focus on: * packages/openapi/src/generate.ts * packages/openapi/test/generate.test.ts * examples/openapi-codegen (based on the minimal example) * The versions script has been updating to publish this package as `11.12.0-alpha` and update the version number of releases ## ✅ Checklist - [ ] I have followed the steps listed in the [Contributing guide](https://github.com/trpc/trpc/blob/main/CONTRIBUTING.md). - [ ] If necessary, I have added documentation related to the changes made. - [ ] I have added or updated the tests related to the changes made. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added OpenAPI generation for tRPC routers: generate OpenAPI 3.1 specs from tRPC AppRouter via `generateOpenAPIDocument()` function or CLI. * Added CLI tool with options for custom export names, titles, and versions. * Added integration with hey-api client generator to produce typed REST clients from generated specs. * Added helper to configure hey-api clients with data transformers (e.g., superjson). * **Documentation** * Added guide for OpenAPI/REST client generation workflow. * **Examples** * Added example project demonstrating end-to-end OpenAPI codegen and client usage. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Nick-Lucas <8896153+Nick-Lucas@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> | 3 个月前 | |
chore(upgrade): Node 24, vitest 4 (#7200) Closes # ## 🎯 Changes What changes are made in this PR? Is it a feature or a bug fix? <!-- Note: once you create a Pull request, we will automatically fix auto-fixable lint issues in your branch --> ## ✅ Checklist - [ ] I have followed the steps listed in the [Contributing guide](https://github.com/trpc/trpc/blob/main/CONTRIBUTING.md). - [ ] If necessary, I have added documentation related to the changes made. - [ ] I have added or updated the tests related to the changes made. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated Node.js requirement to 24.x across configs and toolchain; upgraded Vitest-related packages and several dev devDependencies (including jsdom and jest-dom). * **Bug Fixes** * Fixed cookie header handling to prevent duplication when sending responses. * Standardized abort-related error messages reported in streaming scenarios. * **Tests** * Adjusted tests and snapshots, added a Node test environment directive, enabled project-based Vitest runs and mock restoration, and tweaked a FormData-related test. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Nick-Lucas <8896153+Nick-Lucas@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> | 3 个月前 | |
chore: pruned some never-used code (#3487) | 3 年前 | |
patch: typescript 5.9 support (#6877) Closes #6875 ## 🎯 Changes Adds support for typescript 5.9 ## ✅ Checklist - [ ] I have followed the steps listed in the [Contributing guide](https://github.com/trpc/trpc/blob/main/CONTRIBUTING.md). - [ ] If necessary, I have added documentation related to the changes made. - [ ] I have added or updated the tests related to the changes made. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated the TypeScript dependency version from ^5.8.2 to ^5.9.2 across all example projects and packages. * Simplified and improved test and type-checking scripts across multiple packages. * Added a new type-checking job to the GitHub Actions workflow for pull requests. * Enhanced test setup to suppress specific React warnings for cleaner test output. * **Bug Fixes** * Adjusted type definitions to support broader binary data formats in request bodies. * Improved type safety with enhanced type predicates for content type checks. <!-- end of auto-generated comment: release notes by coderabbit.ai --> | 10 个月前 | |
chore: next merge 2023 03 05 (#3926) | 3 年前 | |
docs: sponsors sync | 2 个月前 | |
update security policy to support only >9.x.x (#3526) | 3 年前 | |
feat: Support OpenAPI json generation for any tRPC appRouter (#7231) To see the RFC+Discussion: https://github.com/trpc/trpc/discussions/7239#discussion-9644098 ## 🎯 Changes What changes are made in this PR? Is it a feature or a bug fix? Adds a TypeScript-compiler-driven OpenAPI 3.1 document generator to @trpc/openapi. The generator resolves fully-computed types (what the vanilla client proxy sees) rather than raw mapped/generic types, and emits a standards-compliant JSON spec, possible for use with any generator or consumer of such a document This diff is big and it mostly doesn't matter because it's testing code which you can ignore! Focus on: * packages/openapi/src/generate.ts * packages/openapi/test/generate.test.ts * examples/openapi-codegen (based on the minimal example) * The versions script has been updating to publish this package as `11.12.0-alpha` and update the version number of releases ## ✅ Checklist - [ ] I have followed the steps listed in the [Contributing guide](https://github.com/trpc/trpc/blob/main/CONTRIBUTING.md). - [ ] If necessary, I have added documentation related to the changes made. - [ ] I have added or updated the tests related to the changes made. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added OpenAPI generation for tRPC routers: generate OpenAPI 3.1 specs from tRPC AppRouter via `generateOpenAPIDocument()` function or CLI. * Added CLI tool with options for custom export names, titles, and versions. * Added integration with hey-api client generator to produce typed REST clients from generated specs. * Added helper to configure hey-api clients with data transformers (e.g., superjson). * **Documentation** * Added guide for OpenAPI/REST client generation workflow. * **Examples** * Added example project demonstrating end-to-end OpenAPI codegen and client usage. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Nick-Lucas <8896153+Nick-Lucas@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> | 3 个月前 | |
feat: Support OpenAPI json generation for any tRPC appRouter (#7231) To see the RFC+Discussion: https://github.com/trpc/trpc/discussions/7239#discussion-9644098 ## 🎯 Changes What changes are made in this PR? Is it a feature or a bug fix? Adds a TypeScript-compiler-driven OpenAPI 3.1 document generator to @trpc/openapi. The generator resolves fully-computed types (what the vanilla client proxy sees) rather than raw mapped/generic types, and emits a standards-compliant JSON spec, possible for use with any generator or consumer of such a document This diff is big and it mostly doesn't matter because it's testing code which you can ignore! Focus on: * packages/openapi/src/generate.ts * packages/openapi/test/generate.test.ts * examples/openapi-codegen (based on the minimal example) * The versions script has been updating to publish this package as `11.12.0-alpha` and update the version number of releases ## ✅ Checklist - [ ] I have followed the steps listed in the [Contributing guide](https://github.com/trpc/trpc/blob/main/CONTRIBUTING.md). - [ ] If necessary, I have added documentation related to the changes made. - [ ] I have added or updated the tests related to the changes made. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added OpenAPI generation for tRPC routers: generate OpenAPI 3.1 specs from tRPC AppRouter via `generateOpenAPIDocument()` function or CLI. * Added CLI tool with options for custom export names, titles, and versions. * Added integration with hey-api client generator to produce typed REST clients from generated specs. * Added helper to configure hey-api clients with data transformers (e.g., superjson). * **Documentation** * Added guide for OpenAPI/REST client generation workflow. * **Examples** * Added example project demonstrating end-to-end OpenAPI codegen and client usage. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Nick-Lucas <8896153+Nick-Lucas@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> | 3 个月前 | |
v11.18.0 | 14 天前 | |
chore: upgrade pnpm to 10.33.1 (#7350) <!-- CURSOR_AGENT_PR_BODY_BEGIN --> Closes # ## 🎯 Changes - upgrade the monorepo's pnpm version pins to `10.33.1` - align shared/example GitHub workflows that explicitly install pnpm so CI uses the same version everywhere ## ✅ Checklist - [x] I have followed the steps listed in the [Contributing guide](https://github.com/trpc/trpc/blob/main/CONTRIBUTING.md). - [ ] If necessary, I have added documentation related to the changes made. - [ ] I have added or updated the tests related to the changes made. <!-- CURSOR_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-ab4ac50b-4d8d-494a-a625-994417a932a4"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-ab4ac50b-4d8d-494a-a625-994417a932a4"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Fixed an issue where the CLI would fail to write output when the destination directory didn't exist. * **Chores** * Updated package manager to pnpm 10.33.1. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> | 2 个月前 | |
v11.18.0 | 14 天前 | |
feat: add formdata and octet stream support (#5665) --------- Co-authored-by: KATT <alexander@n1s.se> | 2 年前 | |
feat(docs): revamp docs content for 2026, more framework agnostic, improved Next.js docs (#7193) Closes # ## 🎯 Changes * Ralphed a first pass cleaning up the docs, stripping out Next.js from the general sections, and fleshing out the dedicated Next.js docs * add separate Next.js pages and app router docs * revamp introductory section of docs to be more linear and simple * significant revisions for grammar and phrasing * Ensure all (v11) code examples are compiled with twoslash ## ✅ Checklist - [ ] I have followed the steps listed in the [Contributing guide](https://github.com/trpc/trpc/blob/main/CONTRIBUTING.md). - [ ] If necessary, I have added documentation related to the changes made. - [ ] I have added or updated the tests related to the changes made. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Reorganized Next.js docs into App Router vs Pages Router, added Server Actions and setup guides; expanded many docs with richer, runnable, type-aware server/client examples and migration/update guidance. * **Chores** * Added permanent redirects for moved docs, removed site announcement banner, updated Prettier handling for docs, and added a gitignore rule for a new top-level directory (.claude/). <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> | 3 个月前 | |
chore: ci tweaks (#6903) parallise typecheck and build <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * CI updated so type checking runs independently and in parallel with builds on pull requests, speeding up feedback. * Task pipeline adjusted to remove build as a prerequisite for type checking, enabling earlier execution. * Build configuration now enforces strict null checks, improving reliability by catching issues earlier. * Monorepo task filters updated to use path-based targeting for build/dev scripts; no user-facing behavior changes. <!-- end of auto-generated comment: release notes by coderabbit.ai --> | 10 个月前 | |
feat: Support OpenAPI json generation for any tRPC appRouter (#7231) To see the RFC+Discussion: https://github.com/trpc/trpc/discussions/7239#discussion-9644098 ## 🎯 Changes What changes are made in this PR? Is it a feature or a bug fix? Adds a TypeScript-compiler-driven OpenAPI 3.1 document generator to @trpc/openapi. The generator resolves fully-computed types (what the vanilla client proxy sees) rather than raw mapped/generic types, and emits a standards-compliant JSON spec, possible for use with any generator or consumer of such a document This diff is big and it mostly doesn't matter because it's testing code which you can ignore! Focus on: * packages/openapi/src/generate.ts * packages/openapi/test/generate.test.ts * examples/openapi-codegen (based on the minimal example) * The versions script has been updating to publish this package as `11.12.0-alpha` and update the version number of releases ## ✅ Checklist - [ ] I have followed the steps listed in the [Contributing guide](https://github.com/trpc/trpc/blob/main/CONTRIBUTING.md). - [ ] If necessary, I have added documentation related to the changes made. - [ ] I have added or updated the tests related to the changes made. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added OpenAPI generation for tRPC routers: generate OpenAPI 3.1 specs from tRPC AppRouter via `generateOpenAPIDocument()` function or CLI. * Added CLI tool with options for custom export names, titles, and versions. * Added integration with hey-api client generator to produce typed REST clients from generated specs. * Added helper to configure hey-api clients with data transformers (e.g., superjson). * **Documentation** * Added guide for OpenAPI/REST client generation workflow. * **Examples** * Added example project demonstrating end-to-end OpenAPI codegen and client usage. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Nick-Lucas <8896153+Nick-Lucas@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> | 3 个月前 | |
chore: simplify ci (#6905) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Reworked build/dev/type-checking to package-scoped parallel scripts, removed legacy codegen generator and a large generated test, updated CI to run new type checks, and added Prisma hoist exclusions. * **Removed** * Deleted the experimental TanStack Start example and its tests/configs/artifacts; simplified an example to use direct DB client access. * **New Features** * Added an API Reference (auto-generated) sidebar category in docs. * **Bug Fixes** * Fixed font preconnect crossOrigin for more reliable font loading. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> | 9 个月前 | |
chore: upgrade pnpm to 10.33.1 (#7350) <!-- CURSOR_AGENT_PR_BODY_BEGIN --> Closes # ## 🎯 Changes - upgrade the monorepo's pnpm version pins to `10.33.1` - align shared/example GitHub workflows that explicitly install pnpm so CI uses the same version everywhere ## ✅ Checklist - [x] I have followed the steps listed in the [Contributing guide](https://github.com/trpc/trpc/blob/main/CONTRIBUTING.md). - [ ] If necessary, I have added documentation related to the changes made. - [ ] I have added or updated the tests related to the changes made. <!-- CURSOR_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-ab4ac50b-4d8d-494a-a625-994417a932a4"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-ab4ac50b-4d8d-494a-a625-994417a932a4"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Fixed an issue where the CLI would fail to write output when the destination directory didn't exist. * **Chores** * Updated package manager to pnpm 10.33.1. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> | 2 个月前 |
以下内容由 AI 翻译,如有问题请 点此提交 issue 反馈
简介
tRPC 让您无需编写模式或生成代码,即可轻松构建和使用完全类型安全的 API。
特性
- ✅ 经过充分测试,可用于生产环境。
- 🧙♂️ 客户端输入、输出和错误均具备完整的静态类型安全与自动补全功能。
- 🐎 流畅的开发体验 - 无需代码生成、无运行时冗余、无构建流水线。
- 🍃 轻量级 - tRPC 零依赖,客户端占用空间极小。
- 🐻 易于集成到现有项目中。
- 🔋 内置常用适配器 - 支持 React.js/Next.js/Express.js/Fastify。(但 tRPC 并非仅绑定 React,还有许多社区适配器适用于其他库)
- 🥃 支持订阅功能。
- ⚡️ 请求批处理 - 可自动将同时发出的请求合并为一个
- 👀 ./examples 文件夹中提供了不少示例
快速开始
我们提供了一些示例,您可以用它们来体验 tRPC 或快速搭建新项目。例如,如果您需要一个 Next.js 应用,可以使用全栈 Next.js 示例:
使用全栈 Next.js 示例快速开始:
# yarn
yarn create next-app --example https://github.com/trpc/trpc --example-path examples/next-prisma-starter trpc-prisma-starter
# npm
npx create-next-app --example https://github.com/trpc/trpc --example-path examples/next-prisma-starter trpc-prisma-starter
# pnpm
pnpm create next-app --example https://github.com/trpc/trpc --example-path examples/next-prisma-starter trpc-prisma-starter
# bun
bunx create-next-app --example https://github.com/trpc/trpc --example-path examples/next-prisma-starter trpc-prisma-starter
# deno
deno init --npm next-app --example https://github.com/trpc/trpc --example-path examples/next-prisma-starter trpc-prisma-starter
👉 请查看 tRPC.io 上的完整文档。👈
AI 代理
如果您使用 AI 编码代理(Claude Code、Cursor、Windsurf 等),请安装 tRPC 技能以获得更好的代码生成效果:
npx @tanstack/intent@latest install
星标历史
核心团队
您想参与贡献吗?在提交 issue 或 PR 之前,请先阅读贡献指南,以便了解分支策略和本地开发环境。如果您需要更多指导或有其他问题,欢迎通过Discord与我们交流!
项目负责人
负责 API 设计决策并在开发中扮演最积极角色的人员
Alex / KATT |
Julius Marminge |
Nick Lucas |
活跃贡献者
积极通过提交 PR 和代码审查来帮助改进代码库的人员
![]() Matthieu Hocquart |
特别鸣谢
通过代码、文档、社区建设及其他宝贵努力为 tRPC 做出卓越贡献的个人
Theo Browne |
Sachin Raja |
赞助商
如果您喜欢使用 tRPC 并希望支持我们,欢迎通过 GitHub Sponsors 给予我们一些鼓励!
🥈 银牌赞助商
Greptile |
CodeRabbit |
![]() SerpApi |
😻 小额支持者
所有贡献者 ✨

