Releases: unnoq/orpc
v0.16.0
Partial support for any schema following Standard Schema (e.g. zod
, valibot
, ...), check oRPC Requirements for more infos.
🚀 Features
View changes on GitHub
v0.15.0
New package @orpc/vue-query
and @orpc/react-query
Give you more choices when integrate with TanStack query
const query = useQuery(orpc.getting.queryOptions())
const mutation = useMutation(orpc.getting.mutationOptions({
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: orpc.getting.key() })
}
}))
🚀 Features
- next:
- openapi:
- react-query:
- server, client:
- vue-query:
View changes on GitHub
v0.14.0
🚨 Breaking Changes 🚨
-
The procedure caller no longer accepts
FormData
directly. Please use the newcreateFormAction
for handlingFormData
. -
hooks
option forhandleFetchRequest
now rename toexecute
🚀 New Features 🚀
Introducing @orpc/next
, a dedicated package for Next.js! This package brings powerful new tools to enhance your development experience:
createFormAction
: Easily create procedure callers that acceptFormData
.createSafeAction
: Build actions with enhanced error-handling capabilities for the client.useSafeAction
: A React hook designed for actions created withcreateSafeAction
, providing more detailed error information.useAction
: A React hook for executing anyorpc
procedure or action, offering less detailed error information, ideal for simpler use cases.
🌟 Improvement 🌟
Any funtions like handleFetchRequest
createProcedureCaller
, createRouterCaller
, createSafeAction
, createFormAction
, ... now accepts hooks to help me intercept the process
const caller = createProcedureCaller({
procedure: getting,
execute: async (input, context, meta) => {
// do something
return await meta.next()
}
// onStart(state, context, meta)
// onSuccess(state, context, meta)
// onError(state, context, meta)
// onFinish(state, context, meta)
})
🚨 Breaking Changes
🐞 Bug Fixes
View changes on GitHub
v0.13.0
🚀 New Feature Alert: Lazy Router 🌟
Level up your serverless architecture with Lazy Routers now available in oRPC!
Defer loading router modules until needed, improving startup times and optimizing resource usage—perfect for large applications.
import { os } from '@orpc/server'
const router = os.router({
lazy: os.lazy(() => import('examples/server'))
})
// Use the lazy-loaded router as if it were a regular one
const output = await router.lazy.getting.name({ name: 'unnoq' })
Learn how it works and get started 👉 Read more here
🚀 Features
View changes on GitHub
v0.12.0
🚨 Breaking Changes Alert 🚨
We've revamped the Fetch handler APIs for a cleaner, more modular experience. Here's what you need to know:
What's Changed?
The new API lets you define handlers inline without global declarations. This simplifies your setup and keeps your bundle lightweight—especially useful for serverless environments.
import { createOpenAPIServerlessHandler } from '@orpc/openapi/fetch';
import { createORPCHandler, handleFetchRequest } from '@orpc/server/fetch';
export function fetch(request: Request) {
return handleFetchRequest({
router,
request,
prefix: '/api',
context: {},
handlers: [
createORPCHandler(),
createOpenAPIServerlessHandler(), // Or use createOpenAPIServerHandler
],
});
}
Key Benefits:
- No Global Handler Declaration: Handlers are now scoped to the function where they're used.
- Smaller Serverless Bundles: Bundle only the handlers you need for your use case.
- Future-Ready: This lays the groundwork for upcoming big features (stay tuned!). 🚀
If you're upgrading, make sure to update your fetch
handlers to use this new API format.
🚨 Breaking Changes
View changes on GitHub
v0.11.0
🎉 Big News! 🎉
The latest oRPC releases have achieved an up to 80% reduction in package size! 🚀
This means faster installations, leaner builds, and an overall smoother experience.
View changes on GitHub
v0.10.0
No significant changes
View changes on GitHub
v0.10.0-beta.1
No significant changes
View changes on GitHub
v0.9.0
No significant changes
View changes on GitHub
v0.9.0-beta.1
No significant changes