PackageTrack
Sign in Get early access

shelf_router

A convenient request router for the shelf web-framework, with support for URL-parameters, nested routers and routers generated from source annotations.

1.1.4 341K downloads/mo #638 most downloaded on pub.dev dart-lang/shelf

What this package is like to depend on

Last release 3 years ago

no release in 18 months

Ships fairly regularly

a new release about every 4 months

Nearly every release is documented

notes for 12 of 12 stable releases

Nothing withdrawn

no release was ever pulled

7 years old

12 releases · first in 2019

0 releases in the last 12 months

see the full history below

Release timeline

12 releases · Mar 2019 to May 2023
2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 12
  1. 1.1.4 03 May 2023
    Release notes
    • Support analyzer: '^10.0.0'
    Open source →
    Release notes
    • Fixed a spelling issue in the pubspec file.
    • Added package topics to the pubspec file.
    • Require Dart >=2.17.
    Open source →
  2. 1.1.3 16 Jun 2022
    Release notes
    • Require analyzer: ^8.1.1
    • Require build: ^4.0.0
    • Require build_config: ^1.2.0
    • Require source_gen: ^4.0.1
    • Require sdk: ^3.9.0
    Open source →
    Release notes
    • Update the pubspec repository field.
    Open source →
  3. 1.1.2 02 Nov 2021
    Release notes
    • Require analyzer: '>=7.4.0 <9.0.0'
    • Require build: ^3.0.0
    • Require build_config: ^1.1.0
    • Require source_gen: ^3.0.0
    • Require sdk: ^3.7.0
    Open source →
    Release notes
    • Remove trailing slash requirement when using mount.
    Open source →
  4. 1.1.1 15 Jul 2021
    Release notes
    • Support the latest package:analyzer and package:source_gen
    • Require sdk: ^3.3.0
    Open source →
    Release notes
    • Fix Router.routeNotFound to enable multiple read() calls on it.
    Open source →
  5. 1.1.0 07 Jul 2021
    Release notes
    • params is deprecated in favor of Request.params adding using an extension on Request.
    • The default notFoundHandler now returns a sentinel routeNotFound response object which causes 404 with the message 'Route not found'.
    • Minor breaking: Handlers and sub-routers that return the sentinel routeNotFound response object will be ignored and pattern matching will continue on additional routes/handlers.

    Changing the router to continue pattern matching additional routes if a matched handler or nested router returns the sentinel routeNotFound response object is technically a breaking change. However, it only affects scenarios where the request matches a mounted sub-router, but does not match any route on this sub-router. In this case, shelf_router version 1.0.0 would immediately respond 404, without attempting to match further routes. With this release, the behavior changes to matching additional routes until one returns a custom 404 response object, or all routes have been matched.

    This behavior is more in line with how shelf_router version 0.7.x worked, and since many affected users consider the behavior from 1.0.0 a defect, we decided to remedy the situation.

    Open source →
  6. 1.0.0 08 Mar 2021
    Release notes
    • Migrate package to null-safety
    • Since handlers are not allowed to return null in shelf 1.0.0, a router will return a default 404 response instead. This behavior can be overridden with the notFoundHandler constructor parameter.
    • Breaking: Remove deprecated Router.handler getter. The router itself is a handler.
    Open source →
  7. 0.7.4 11 Dec 2020
    Release notes
    • Update Router.mount parameter to accept a Handler.
    • Make Router to be considered a Handler.
    • Deprecate the Router.handler getter.
    Open source →
  8. 0.7.3 03 Nov 2020
    Release notes
    • Added @sealed annotation to Router and Route.
    Open source →
  9. 0.7.2 08 Jan 2020
    Release notes
    • Always register a HEAD handler whenever a GET handler is registered. Defaulting to calling the GET handler and throwing away the body.
    Open source →
  10. 0.7.1 28 May 2019
    Release notes
    • Use Function instead of dynamic in RouterEntry to improve typing.
    Open source →
  11. 0.7.0 22 Mar 2019
    Release notes
    • Initial release
    Open source →
  12. 0.7.0+1 22 Mar 2019
    Release notes
    • Fixed description to fit size recommendations.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive