Skip to content

v5.0.4

Compare
Choose a tag to compare
@kwhitley kwhitley released this 29 Mar 20:57
· 38 commits to v5.x since this release

itty-router v5

This represents a large shift in the ecosystem. While mostly backwards compatible, a few small tweaks will be needed to swap in the new Router or AutoRouter.

See https://itty.dev/itty-router/migrations/v4-v5 for migration guide and details.

Changes in v5

  • BREAKING router.fetch replaces router.handle to enable cleaner exports.
  • BREAKING createCors() has been replaced with the improved cors().
  • BREAKING RouteHandler (type) has been replaced with RequestHandler.
  • added previous Router is now preserved as IttyRouter.
  • added new Router (backwards-compatible) adds support for stages.
  • added new batteries-included AutoRouter adds default settings to Router.
  • added TypeScript support has been improved in all of the routers, allowing router-level generics AND route-level generic overrides in the same router.