🚨 Breaking Changes in Builder 🚨
The builder has been rewritten with breaking changes. Please review the following updates:
.confighas been removed. Use.$route,.$meta, and.$configinstead..contexthas been renamed to.$context..contracthas been removed. Use the newimplementfunction instead.- New
.$route: Help you config initial route - New
.$config: Help you config validation behavior (docs later) - New
.metaand.$meta: Similar to.route, but for customizable metadata. - Builders now have a smaller bundle size.
🌟 Introducing the New Implementer 🌟
The new implement function fully replaces the old .contract. It is designed exclusively for Contract-First development, preventing accidental access to APIs that are not contract-compliant.
Example Usage
const os = implement(contract); // Fully replaces `os` export from @orpc/server
os.router({
ping: os.ping.handler(() => 'pong'),
});This update ensures stricter contract adherence while improving maintainability and performance.
🚨 Breaking Changes
- contract:
- contract, server:
- server: