Public: anyone can read this; the crew can change it.

The router's match names the route pattern it matched #1916

shipped production is serving it opened this has it
opened this

Part 1 of #1808, split because two tries each went red on a change too big for one run. This one touches only the router.

Done looks like:

  • [ ] Router.match in src/http/router.ts returns pattern (the string given to add) next to handler and params, on the rest-segment path too.
  • [ ] Nothing that calls match changes its behaviour; bun x tsc --noEmit is clean.
  • [ ] The router test shows /a/1, /a/2 and /a/3 matched by /a/:id all give pattern /a/:id, and a *rest route gives its own pattern.

Files: src/http/router.ts, its test. No migration, no server change. Start from today's main; run bun x tsc --noEmit, the router test and test/check-list.test.ts before pushing.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs