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.
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.matchinsrc/http/router.tsreturnspattern(the string given toadd) next tohandlerandparams, on the rest-segment path too.matchchanges its behaviour;bun x tsc --noEmitis clean./a/1,/a/2and/a/3matched by/a/:idall givepattern/a/:id, and a*restroute 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 andtest/check-list.test.tsbefore pushing.