Skip to content

fix(server): make callable extension type augmentation work in published builds - #1755

Merged
dinwwwh merged 1 commit into
middleapi:mainfrom
keithf123r:fix/callable-extension-type-augmentation
Jul 30, 2026
Merged

fix(server): make callable extension type augmentation work in published builds#1755
dinwwwh merged 1 commit into
middleapi:mainfrom
keithf123r:fix/callable-extension-type-augmentation

Conversation

@keithf123r

Copy link
Copy Markdown
Contributor

Problem

import '@orpc/server/extensions/callable' works at runtime, but in the published package .callable() fails type-checking:

Property 'callable' does not exist on type 'DecoratedProcedure<...>'

Root cause

The source augments declare module '../procedure-decorated', which declaration bundling rewrites to declare module "../index". That extensionless path resolves to dist/index.d.ts, while consumers get their types from dist/index.d.mts via the exports map — so the augmentation merges into a module the consumer never uses.

The monorepo never sees this because dev exports point at src.

Fix

Augment declare module '@orpc/server' instead, matching every other extension in the repo (next, effect, openapi). The bare specifier survives bundling and resolves to the same entry the consumer imports.

Verification

  • pnpm test and pnpm type:check pass
  • The built dist works

@vercel

vercel Bot commented Jul 30, 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 30, 2026 1:14pm

@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

  • callable.ts module augmentation fix — Changes the module augmentation target from a relative path (../procedure-decorated) to the bare package specifier (@orpc/server), matching the pattern used by every other extension (@orpc/effect, @orpc/next, @orpc/openapi).

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

@pkg-pr-new

pkg-pr-new Bot commented Jul 30, 2026

Copy link
Copy Markdown
More templates

@orpc/ai-sdk

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

@orpc/arktype

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

@orpc/bun

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

@orpc/client

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

@orpc/cloudflare

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

@orpc/contract

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

@orpc/experimental-effect

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

@orpc/evlog

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

@orpc/json-schema

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

@orpc/nest

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

@orpc/next

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

@orpc/openapi

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

@orpc/opentelemetry

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

@orpc/pinia-colada

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

@orpc/pino

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

@orpc/publisher

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

@orpc/ratelimit

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

@orpc/server

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

@orpc/shared

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

@orpc/swr

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

@orpc/tanstack-query

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

@orpc/trpc

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

@orpc/valibot

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

@orpc/zod

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

commit: 0e3aa36

@codecov

codecov Bot commented Jul 30, 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 30, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 25 untouched benchmarks


Comparing keithf123r:fix/callable-extension-type-augmentation (0e3aa36) with main (21251bb)

Open in CodSpeed

@dinwwwh
dinwwwh merged commit 10e1e0e into middleapi:main Jul 30, 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.

2 participants