Skip to content

feat!(koa): router v15, improve middleware support, fix overlapping route matching#442

Merged
mnahkies merged 8 commits into
mainfrom
mn/437/matching-overlapping-routes
May 9, 2026
Merged

feat!(koa): router v15, improve middleware support, fix overlapping route matching#442
mnahkies merged 8 commits into
mainfrom
mn/437/matching-overlapping-routes

Conversation

@mnahkies

@mnahkies mnahkies commented Mar 18, 2026

Copy link
Copy Markdown
Owner

fixes #437

  • Updates the @koa/router dependency to v15, and updates the peer requirements for koa to v3
  • Adds a failing e2e test showing the issue described in Route 'exclusive' option support #437
  • Solves the overlapping route issue by no longer calling next after route handlers
  • Adds support for mounting middleware on any individual router, as an optional parameter to createRouter

@mnahkies mnahkies force-pushed the mn/437/matching-overlapping-routes branch from 8536762 to 055bd28 Compare March 18, 2026 04:29
@mnahkies mnahkies force-pushed the mn/437/matching-overlapping-routes branch from 055bd28 to ec6db16 Compare May 3, 2026 07:48
mnahkies added 7 commits May 4, 2026 13:56
- calling next can cause the wrong route handler to be run
- it's better to mount middleware before the router handler,
  and execute code after `await next()` in the middleware for
  "after request handler" middleware
@mnahkies mnahkies force-pushed the mn/437/matching-overlapping-routes branch from ec6db16 to 6a8a28d Compare May 9, 2026 09:17
@mnahkies mnahkies changed the title fix(koa): matching overlapping routes feat!(koa): router v15, improve middleware support, fix overlapping route matching May 9, 2026
Comment thread pnpm-workspace.yaml

minimumReleaseAgeExclude: []
minimumReleaseAgeExclude:
- '@koa/router@15.5.0'

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

6.5 days old, close enough our 7 cooldown

@mnahkies mnahkies marked this pull request as ready for review May 9, 2026 09:36
@mnahkies mnahkies merged commit 037409f into main May 9, 2026
16 checks passed
@mnahkies mnahkies deleted the mn/437/matching-overlapping-routes branch May 9, 2026 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Route 'exclusive' option support

1 participant