v5.0.4
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
replacesrouter.handle
to enable cleaner exports. - BREAKING
createCors()
has been replaced with the improvedcors()
. - BREAKING
RouteHandler
(type) has been replaced withRequestHandler
. - added previous
Router
is now preserved asIttyRouter
. - added new
Router
(backwards-compatible) adds support for stages. - added new batteries-included
AutoRouter
adds default settings toRouter
. - added TypeScript support has been improved in all of the routers, allowing router-level generics AND route-level generic overrides in the same router.