v1.7.0
Safe Client docs
If you often use safe for error handling, createSafeClient can simplify your code by automatically wrapping all procedure calls with safe. It works with both server-side and client-side clients.
import { createSafeClient } from '@orpc/client'
const safeClient = createSafeClient(client)
const [error, data] = await safeClient.doSomething({ id: '123' })
Smart Coercion Plugin docs
Automatically converts input values to match schema types without manually defining coercion logic. This plugin can support almost any standard schema.
import { OpenAPIHandler } from '@orpc/openapi/fetch'
import {
experimental_SmartCoercionPlugin as SmartCoercionPlugin
} from '@orpc/json-schema'
const handler = new OpenAPIHandler(router, {
plugins: [
new SmartCoercionPlugin({
schemaConverters: [
new ZodToJsonSchemaConverter(), // <-- if you use Zod
new ValibotToJsonSchemaConverter(), // <-- if you use Valibot
new ArkTypeToJsonSchemaConverter(), // <-- if you use ArkType
],
})
]
})
Promote stable
aws lambda, websocket, message port, zod 4 converter now stable
🚀 Features
- client:
- Safe client - by @Copilot in https://github.com/middleapi/orpc/issues/751 (25279)
- json-schema:
- Smart coercion plugin for any standard schema - by @dinwwwh in https://github.com/middleapi/orpc/issues/748 (e5e26)
- standard-server-aws-lambda:
- Promote to stable - by @dinwwwh in https://github.com/middleapi/orpc/issues/762 (c84c8)
- standard-server-peer:
- Promote to stable - by @dinwwwh in https://github.com/middleapi/orpc/issues/766 (4f419)
- zod:
- Better support zod@4.x.x - by @dinwwwh in https://github.com/middleapi/orpc/issues/760 (53096)
- Promote zod4 converter to stable - by @dinwwwh in https://github.com/middleapi/orpc/issues/763 (9cd4e)
- Promote zod4 registries to stable - by @dinwwwh (1207d)
🐞 Bug Fixes
- server: Add missing export for utils in standard adapter - by @dinwwwh (29120)
- trpc: Add missing exports - by @dinwwwh (c465e)