github middleapi/orpc v2.0.0-beta.49

pre-release52 minutes ago

Highlights

This beta cleans up option shapes before v2 stable. Most breaking changes are renames your type checker will flag.

// Boolean-or-object options replace `{ enabled }`
new MemoryPublisher({ resume: { ttl: 60_000 } })
new RPCLink({ connect, reconnect: { maxAttempt: 5, onClose: true } })
new BatchHandlerPlugin({ keepAlive: false })

// Per-direction trace propagation
new ORPCInstrumentation({ propagation: { extract: false } })

Tip

v2 is close to stable. Tell us what hurt when migrating and what should change before stable: #2446

  • Breaking — boolean-or-object options: publisher resume, WebSocket reconnect, event stream initialComment/keepAlive, and batch keepAlive take true, false, or an object instead of { enabled }. Publisher · WebSocket · Event Stream · Batch
  • Breaking — propagation: propagationEnabled is now propagation and accepts { inject, extract }. OpenTelemetry · Cloudflare
  • Breaking — streamed queries: refetches keep existing data until the new stream connects, refetchMode: 'replace' is removed, and the new settleOnFirstData lets SSR finish at the first data. TanStack Query · Pinia Colada · SWR · Migration
  • Breaking — static files: allowSymlinks is removed, .. paths are refused, and directories no longer redirect. Docs
  • Breaking — OpenAPI component names: ids are sanitized to valid keys (User Profile → User_Profile), and componentName must return a string. Docs
  • Redirects: fetch links now follow redirects. Use a custom fetch with redirect: 'manual' to get 3xx responses. Docs
  • Other breaking changes: omitUndefinedProperties removed from the OpenAPI serializer (#2441), outputStatus must return a number (#2438), and a few @standard-server exports renamed (#2430).

   🚨 Breaking Changes

   🐞 Bug Fixes

  • client:
  • client, openapi:
  • contract:
    • Reconcile mid-stream errors in response validation plugin  -  by @dinwwwh in #2380 (4bdb6)
    • Keep own __proto__ routes in augmentContractRouter and minifyRouterContract  -  by @dinwwwh and Claude in #2401 (4d691)
  • hibernation:
  • json-schema, openapi:
  • lock:
  • next:
  • openapi:
  • openapi, json-schema, zod:
  • opentelemetry:
    • Simplify package and keep context so baggage propagates  -  by @dinwwwh and Claude in #2408 (2edd7)
  • pinia-colada,tanstack-query,swr:
  • publisher:
  • rpc:
  • rpc,openapi:
    • Run custom primitive handlers on the inlined JSON serializer fast path  -  by @dinwwwh in #2381 (989bd)
  • server:
    • Ignore websocket messages received after close  -  by @dinwwwh in #2373 (73a9f)
    • Serve the implementation when a normal router is implemented as a contract  -  by @dinwwwh and Claude in #2378 (f59a9)
    • Ignore message-port messages after close  -  by @dinwwwh and Claude in #2394 (4b274)
    • Keep __proto__ routes and let implement config win over server procedures  -  by @dinwwwh in #2406 (b85ea)
  • shared:
  • trpc:
  • valibot, arktype:
    View changes on GitHub

Don't miss a new orpc release

NewReleases is sending notifications on new releases.