github unnoq/orpc v0.41.0

latest releases: v1.8.8, v1.8.7, v1.8.6...
6 months ago

🚨 Breaking Changes 🚨

We've moved the core from @orpc/contract to @orpc/client, making @orpc/client fully independent. It no longer requires @orpc/server or @orpc/contract to function.

Client Definition Changes

This update introduces a breaking change in how clients are defined:

// Before ❌
const client = createORPCClient<typeof router /* or contract */>(rpcLink)

// After ✅
const client: RouterClient<typeof router> = createORPCClient(rpcLink)
const client: ContractRouterClient<typeof contract> = createORPCClient(rpcLink)

import type { RouterClient } from '@orpc/server`
import type { ContractRouterClient } from '@orpc/contract`

🌟 Reserved Expansion Pattern Support 🌟

You can now use + before a parameter name to match the rest of the path, including slashes (/).

const file = os.route({ method: 'GET', path: '/{+filePath}' })

This allows for more flexible route matching, especially for handling file paths or nested segments.

   🚨 Breaking Changes

   🚀 Features

    View changes on GitHub

Don't miss a new orpc release

NewReleases is sending notifications on new releases.