Skip to content

Releases: unnoq/orpc

v0.16.0

12 Dec 12:16
Compare
Choose a tag to compare

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

12 Dec 01:48
Compare
Choose a tag to compare

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

    View changes on GitHub

v0.14.0

08 Dec 13:07
Compare
Choose a tag to compare

🚨 Breaking Changes 🚨

  • The procedure caller no longer accepts FormData directly. Please use the new createFormAction for handling FormData.

  • hooks option for handleFetchRequest now rename to execute

🚀 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 accept FormData.
  • createSafeAction: Build actions with enhanced error-handling capabilities for the client.
  • useSafeAction: A React hook designed for actions created with createSafeAction, providing more detailed error information.
  • useAction: A React hook for executing any orpc 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

  • server: New hooks options for handleFetchRequest  -  by @unnoq (d137c)

   🐞 Bug Fixes

  • server: InferRouterInputs & InferRouterOutputs not work with lazy router  -  by @unnoq (64276)
    View changes on GitHub

v0.13.0

06 Dec 12:54
Compare
Choose a tag to compare

🚀 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

02 Dec 12:40
Compare
Choose a tag to compare

🚨 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

01 Dec 13:08
Compare
Choose a tag to compare

🎉 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

01 Dec 01:35
Compare
Choose a tag to compare

No significant changes

    View changes on GitHub

v0.10.0-beta.1

01 Dec 01:33
Compare
Choose a tag to compare
v0.10.0-beta.1 Pre-release
Pre-release

No significant changes

    View changes on GitHub

v0.9.0

01 Dec 00:33
Compare
Choose a tag to compare

No significant changes

    View changes on GitHub

v0.9.0-beta.1

01 Dec 00:31
Compare
Choose a tag to compare
v0.9.0-beta.1 Pre-release
Pre-release

No significant changes

    View changes on GitHub