rsnext/packages/next/shared/lib/router/utils
Shu Ding 49d5e362d4
Add state comparison to router (#38422)
Lands #37431 again, but it only solves the re-render issue completely for the middleware case (closes #38267), not the `rewrites` case (#37139).

For `rewrites`, the blocker is `isReady` always being `false` initially and to match the markup on hydration we can't simply work around it without a re-render. Need to come up with another fix.

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-07-25 15:25:56 +00:00
..
add-locale.ts Refactor server routing (#37725) 2022-06-16 21:43:01 +00:00
add-path-prefix.ts Execute middleware on Next.js internal requests (#37121) 2022-05-27 13:29:04 -05:00
add-path-suffix.ts Execute middleware on Next.js internal requests (#37121) 2022-05-27 13:29:04 -05:00
app-paths.ts Rename app paths folder (#37146) 2022-05-25 11:46:26 +02:00
compare-states.ts Add state comparison to router (#38422) 2022-07-25 15:25:56 +00:00
escape-path-delimiters.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
format-next-pathname-info.ts Refactor server routing (#37725) 2022-06-16 21:43:01 +00:00
format-url.ts chore: replace deprecated String.prototype.substr() (#35421) 2022-03-24 17:49:38 -04:00
get-asset-path-from-route.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
get-next-pathname-info.ts Remove Middleware Preflight (#37490) 2022-06-08 10:41:28 -05:00
get-route-from-asset-path.ts Fix dynamic routes with pages under index folder (#32440) 2021-12-13 20:36:31 +00:00
index.ts Deprecate nested Middleware in favor of root middleware (#36772) 2022-05-19 15:46:21 +00:00
is-dynamic.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
parse-path.ts Ensure mixed query/hash values are handled correctly (#38852) 2022-07-21 19:16:38 +00:00
parse-relative-url.ts Remove Middleware Preflight (#37490) 2022-06-08 10:41:28 -05:00
parse-url.ts Move middleware handling to node server (#33448) 2022-01-19 12:36:06 +00:00
path-has-prefix.ts Execute middleware on Next.js internal requests (#37121) 2022-05-27 13:29:04 -05:00
path-match.ts Use edge compiler for middleware (#36486) 2022-04-27 11:50:29 +02:00
prepare-destination.ts Update to process redirects/rewrites for _next/data with middleware (#37574) 2022-06-10 12:35:12 -05:00
querystring.ts Use fallbackable path module for node and edge runtime (#36306) 2022-04-21 09:07:03 +00:00
relativize-url.ts Fix running server with Polyfilled fetch (#32368) 2021-12-13 18:30:24 +00:00
remove-path-prefix.ts Execute middleware on Next.js internal requests (#37121) 2022-05-27 13:29:04 -05:00
remove-trailing-slash.ts Deprecate nested Middleware in favor of root middleware (#36772) 2022-05-19 15:46:21 +00:00
resolve-rewrites.ts Ensure trailing slash is handled correctly with middleware (#38282) 2022-07-04 09:31:07 -05:00
route-matcher.ts Deprecate nested Middleware in favor of root middleware (#36772) 2022-05-19 15:46:21 +00:00
route-regex.ts Execute middleware on Next.js internal requests (#37121) 2022-05-27 13:29:04 -05:00
sorted-routes.ts Revert "fix the dynamic routing of middleware" (#35932) 2022-04-06 14:35:52 +00:00