Skip to content

Releases: kwhitley/itty-router

Release v5.0.22

11 Aug 16:52
Compare
Choose a tag to compare

Release v5.0.21

04 Aug 02:09
Compare
Choose a tag to compare

Release v5.0.20

26 Jul 19:20
Compare
Choose a tag to compare

Release v5.0.19

26 Jul 19:00
Compare
Choose a tag to compare

Release v5.0.18

16 Aug 17:28
Compare
Choose a tag to compare

Release v5.0.17

28 Apr 15:30
Compare
Choose a tag to compare

Release v5.0.16

20 Apr 04:54
Compare
Choose a tag to compare

Release v5.0.13

14 Apr 19:49
Compare
Choose a tag to compare

see CHANGELOG for notes

v5.0.4

29 Mar 20:57
Compare
Choose a tag to compare

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.

v4.0.0

26 May 19:49
Compare
Choose a tag to compare

This is an extensive v4.x update, bringing a series of quality of life additions, as well as a potentially breaking change for TypeScript users:

!Breaking Changes!

  • TYPES HAVE CHANGED FOR THE ROUTER. The core TypeScript and exposed types for the Router itself have been completely retooled to allow much better, strong type support throughout your routes. Previously this required complex custom setups to work around the lack of internal typing. Now it's included out of the box, but you'll need to follow the instructions.

    This was not an easy change to commit to, but was long overdue. The solution finally settled on allows for a more flexible (yet boiler-platey) approach, or a more rigid one... but allows for many more scenarios than the previous types did.

Other Changes

  • added: nearly all the extras from itty-router-extras have moved in-house to the core library. This library will be deprecated as a result.
  • added: createCors from itty-cors has moved into the core library as well
  • feature: withParams middleware (previously from itty-router-extras) is now possible to use as upstream middleware (e.g. globally) to reduce boilerplate. Previously this was not possible.

Official Documentation Site

We've just launched a itty.dev to house documentation for all the itty projects going forward. Previously, we auto-generated docs from the README, but clearly the documentation needs far outweighed what could feasibly fit within a single long README. See the itty-router section for more details!

See the migration guide for complete details.