Skip to content

feat: re-export renamed v1 APIs as deprecated aliases - #1758

Merged
dinwwwh merged 2 commits into
middleapi:mainfrom
dinwwwh:claude/reexport-deprecated-v1-apis-35b9d5
Jul 31, 2026
Merged

feat: re-export renamed v1 APIs as deprecated aliases#1758
dinwwwh merged 2 commits into
middleapi:mainfrom
dinwwwh:claude/reexport-deprecated-v1-apis-35b9d5

Conversation

@dinwwwh

@dinwwwh dinwwwh commented Jul 31, 2026

Copy link
Copy Markdown
Member

Code written against v1 breaks on v2 for a set of APIs that were only renamed, not changed — the import fails with "no exported member" and gives no hint at the new name. This adds deprecated aliases for those, so v1 code keeps compiling and the IDE points at the current name via @deprecated.

…APIs as deprecated aliases

Adds deprecated aliases so code written against v1 keeps compiling after the
v2 renames, with @deprecated pointing at the current name.

APIs that were experimental in v1 are excluded, as are renames where the
replacement is a redesign rather than a rename.
@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
orpc Ready Ready Preview Jul 31, 2026 7:18am

@dinwwwh dinwwwh changed the title feat(client,contract,next,pinia-colada,server): re-export renamed v1 APIs as deprecated aliases feat: re-export renamed v1 APIs as deprecated aliases Jul 31, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jul 31, 2026

Copy link
Copy Markdown
More templates

@orpc/ai-sdk

npm i https://pkg.pr.new/@orpc/ai-sdk@1758

@orpc/arktype

npm i https://pkg.pr.new/@orpc/arktype@1758

@orpc/bun

npm i https://pkg.pr.new/@orpc/bun@1758

@orpc/client

npm i https://pkg.pr.new/@orpc/client@1758

@orpc/cloudflare

npm i https://pkg.pr.new/@orpc/cloudflare@1758

@orpc/contract

npm i https://pkg.pr.new/@orpc/contract@1758

@orpc/experimental-effect

npm i https://pkg.pr.new/@orpc/experimental-effect@1758

@orpc/evlog

npm i https://pkg.pr.new/@orpc/evlog@1758

@orpc/json-schema

npm i https://pkg.pr.new/@orpc/json-schema@1758

@orpc/nest

npm i https://pkg.pr.new/@orpc/nest@1758

@orpc/next

npm i https://pkg.pr.new/@orpc/next@1758

@orpc/openapi

npm i https://pkg.pr.new/@orpc/openapi@1758

@orpc/opentelemetry

npm i https://pkg.pr.new/@orpc/opentelemetry@1758

@orpc/pinia-colada

npm i https://pkg.pr.new/@orpc/pinia-colada@1758

@orpc/pino

npm i https://pkg.pr.new/@orpc/pino@1758

@orpc/publisher

npm i https://pkg.pr.new/@orpc/publisher@1758

@orpc/ratelimit

npm i https://pkg.pr.new/@orpc/ratelimit@1758

@orpc/server

npm i https://pkg.pr.new/@orpc/server@1758

@orpc/shared

npm i https://pkg.pr.new/@orpc/shared@1758

@orpc/swr

npm i https://pkg.pr.new/@orpc/swr@1758

@orpc/tanstack-query

npm i https://pkg.pr.new/@orpc/tanstack-query@1758

@orpc/trpc

npm i https://pkg.pr.new/@orpc/trpc@1758

@orpc/valibot

npm i https://pkg.pr.new/@orpc/valibot@1758

@orpc/zod

npm i https://pkg.pr.new/@orpc/zod@1758

commit: 38b34d6

@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@codspeed-hq

codspeed-hq Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 25 untouched benchmarks


Comparing dinwwwh:claude/reexport-deprecated-v1-apis-35b9d5 (38b34d6) with main (46bd033)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (c2bca33) during the generation of this report, so 46bd033 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes — 28 deprecated re-exports across 11 barrel files in @orpc/client, @orpc/contract, @orpc/next, @orpc/pinia-colada, and @orpc/server.

  • Deprecated aliases for every v1 API that was purely renamed (not reworked) in v2, each carrying a @deprecated JSDoc pointing to the replacement name
  • Cross-entrypoint alias for BodyLimitPlugin re-exported from @orpc/server/fetch and @orpc/server/node to match its v1 location, with the deprecation message pointing to @orpc/server/plugins
  • Deliberate exclusions for experimental_* APIs and SimpleCsrfProtectionHandlerPlugin where v2 changed behaviour, not just the name

All 28 source exports verified at their respective modules. pnpm lint (0 warnings), pnpm type:check, and the full test suite (2772 tests) pass.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes since the prior pullfrog review (986e3ac) — one commit (38b34d6 "improve") removing two deprecated type aliases.

  • Removed MergedCurrentContext from @orpc/server, narrowing the alias set
  • Removed FormAction from @orpc/next, narrowing the alias set

Both removals look like corrections — pruning aliases that weren't actual v1 API names.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@dinwwwh
dinwwwh merged commit 7480727 into middleapi:main Jul 31, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant