rsnext/packages/next/next-server/lib/router/utils
JJ Kasper 4d291bd810
Use regex lexer for gathering named groups from has (#23626)
This is a follow-up to https://github.com/vercel/next.js/pull/23588 to update to use a regex lexer to gather the named regex groups instead of attempting to gather them through executing the regex since it can fail to gather the regex groups when they are using specific matching. This also ensures we don't pass the value as a segment when value is defined and it doesn't use a capture group. Additional tests are added to cover these cases and documentation updated to reflect this. 

Closes: https://github.com/vercel/next.js/issues/23415

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added

## Documentation / Examples

- [x] Make sure the linting passes
2021-04-13 12:34:51 +00:00
..
escape-path-delimiters.ts Ensure path encoding is handled consistently for prerendered pages (#19135) 2020-12-28 20:08:58 +00:00
format-url.ts Remove querystring from the client (#15378) 2020-08-06 12:32:58 -04:00
get-asset-path-from-route.ts Fix prerendered nested index handling (#14383) 2020-06-23 05:49:48 +00:00
get-route-from-asset-path.ts Fix prerendered nested index handling (#14383) 2020-06-23 05:49:48 +00:00
index.ts Move next-server back into next package (#8613) 2019-09-04 10:00:54 -04:00
is-dynamic.ts Improve linting rules to catch more errors (#9374) 2019-11-10 19:24:53 -08:00
parse-relative-url.ts Update error when internal href and external as are used (#20658) 2021-01-01 12:14:42 -06:00
path-match.ts Improve server performance by skipping decode/re-encode (#17323) 2020-09-24 06:05:40 +00:00
prepare-destination.ts Use regex lexer for gathering named groups from has (#23626) 2021-04-13 12:34:51 +00:00
querystring.ts Correct query behavior for falsey values to pre 9.5.1 behavior (#16608) 2020-09-10 15:12:37 +00:00
resolve-rewrites-noop.ts Preserve asPath while resolving rewrites (#21410) 2021-01-21 17:40:23 -06:00
resolve-rewrites.ts Add handling fo beforeFiles, afterFiles, and fallback rewrites (#23407) 2021-03-26 15:19:48 +00:00
route-matcher.ts Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
route-regex.ts Break up the serverless loader into typed handlers (#19511) 2020-11-25 19:56:18 +00:00
sorted-routes.ts Update err.sh links to use nextjs.org/docs/messages instead (#23353) 2021-03-29 10:25:00 +02:00