rsnext/packages/next/next-server/lib/router
Jan Potoms a7af013350
Update route regex for optional catch-all parameters in named regexes (#14456)
Noticed while working on https://github.com/vercel/next.js/pull/14400 that the optional catch-all handling was missing in `namedRegex`.

This whole file also seemed quite regex heavy so I took a look at the overall logic and changed a few things. It worked by regex escaping the whole route then unescape the dynamic parts. I changed it to only regex escape the static parts, this eliminates unnecessary back and forth escaping. It also makes the dynamic parts handling more readable. The whole logic is less reliant on regexes and just uses simple string manipulation to translate the route into a regex, I didn't measure anything but as an effect this should make it more performant.
2020-06-22 18:16:21 +00:00
..
utils Update route regex for optional catch-all parameters in named regexes (#14456) 2020-06-22 18:16:21 +00:00
rewrite-url-for-export.ts Preserve url better in exportTrailingSlash (#13840) 2020-06-07 17:15:06 +00:00
router.ts Correct /_next/data link for GS(S)P with basePath (#14376) 2020-06-19 21:53:15 +00:00