Skip to content

Rouzer v6.0.0

Latest

Choose a tag to compare

@aleclarson aleclarson released this 03 Jul 03:14

Rouzer v6 moves the server boundary from Hattip-compatible handlers to fetch-compatible Rouzer handlers.

The route-contract side of Rouzer is intentionally stable: rouzer/http routes, handler maps, generated clients, response maps, raw bodies, response plugins, and NDJSON routes keep the same shape. The breaking change is how routers are mounted and how request-context host data is supplied.

Highlights:

  • Mount routers with toFetchHandler(router) where a Fetch API handler is expected.
  • Replace Hattip handler/context types with RequestHandler and RequestContext from rouzer.
  • Replace Hattip test adapters with a local fetch wrapper.
  • Read host/runtime data from ctx.host and use filterRuntime for runtime branches.

See the migration guide for details: https://github.com/alloc/rouzer/blob/v6.0.0/docs/migration-v5-to-v6.md