npm @orpc/zod 0.41.0
v0.41.0

latest releases: 1.13.0, 0.0.0-next.f01f7b1, 0.0.0-next.b2d00a3...
10 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 zod release

NewReleases is sending notifications on new releases.