unstale

npm / @koa/router

@koa/router

What changed in @koa/router 10 to 15, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-24.

2 breaking1 security4 new APIs and options3 behavior and defaults9 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.6 on npm

@koa/router 1510 changes

Security 1

New APIs and options 3

  • Adds ctx.routeMatched for not-found handling.

    15.4.0release notes

  • Adds a router event system for developers to use.

    15.4.0release notes

  • Adds a utility to validate route params and/or migrate from previous versions to v14+.

    15.2.0release notes

Fixes and other changes 6

  • Hides the internal rest parameter from prefixed middleware.

    15.6.0release notes

  • Prefix stripping now checks segment boundaries to prevent path corruption.

    15.5.0release notes

  • Types are now compatible with Koa Middleware.

    15.1.1release notes

  • The end-user types are more fully type-safe, with any types fixed.

    15.1.0release notes

  • The router constructor exports are fixed for CommonJS.

    15.1.0release notes

  • Middleware registered with .use() and no path params is now a global match.

    15.1.0release notes

@koa/router 143 changes

Breaking changes 1

Behavior and default changes 1

Fixes and other changes 1

  • When strict is true, the trailing option is passed to pathToRegexp.

    14.0.0release notes

@koa/router 131 changes

Fixes and other changes 1

  • Fixes an undefined property in an unmatched host.

    13.0.0release notes

@koa/router 121 changes

Breaking changes 1

@koa/router 113 changes

New APIs and options 1

Behavior and default changes 1

Fixes and other changes 1

  • Path checking before route registration was improved.

    11.0.0release notes

@koa/router 101 changes

Behavior and default changes 1

  • router.redirect() now accepts external destinations.

    10.0.0release notes