rsnext/packages/next/shared/lib
Klein Torres a34b20e6f2
Fix browser navigation buttons not working with shallow routing and middleware (#43919)
This PR fixes #41064.
In some particular cases, while using a middleware and shallow routing
the navigation get stucks and stop refreshing the page. After futher
investigation it seems that a line of code was added that causes the
router pathname to be incorrect and then making Next believe it's the
same page that is loading.

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [x] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/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`
- [ ]
[e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-12-12 20:02:06 -08:00
..
i18n Enable @typescript-eslint/no-use-before-define for functions (#39602) 2022-08-15 10:29:51 -04:00
isomorphic polish isomorphic path module (#36521) 2022-04-27 18:23:26 +00:00
page-path Bypass empty pages folder for layouts (#40132) 2022-09-03 00:13:47 +00:00
router Fix browser navigation buttons not working with shallow routing and middleware (#43919) 2022-12-12 20:02:06 -08:00
utils Optimize bundle size for appDir (#42252) 2022-10-31 17:50:35 +00:00
amp-context.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
amp-mode.ts Fix bloat in main bundle from amp (#37383) 2022-06-02 00:21:09 +00:00
amp.ts Fix bloat in main bundle from amp (#37383) 2022-06-02 00:21:09 +00:00
app-router-context.ts Add additional item to RSC payload, preparing for head.tsx on navigation (#42791) 2022-11-14 14:50:30 +01:00
constants.ts Merge app internal chunk into main chunk for layouts (#41902) 2022-10-27 16:50:46 -07:00
dynamic-no-ssr.ts Implement loadable with lazy and suspense for next dynamic (#42589) 2022-12-07 19:42:10 +01:00
dynamic.tsx Fix next/dynamic types for resolving named export module (#43923) 2022-12-10 17:35:13 +00:00
escape-regexp.ts perf(escapeStringRegexp): test before replace (#34472) 2022-04-16 05:42:10 +00:00
flatten.ts Refactor Page Paths utils and Middleware Plugin (#36576) 2022-04-30 11:19:27 +00:00
get-hostname.ts Execute middleware on Next.js internal requests (#37121) 2022-05-27 13:29:04 -05:00
head-manager-context.ts Load beforeInteractive scripts properly without blocking hydration (#41164) 2022-10-09 15:08:51 +00:00
head.tsx Optimize bundle size for appDir (#42252) 2022-10-31 17:50:35 +00:00
hooks-client-context.ts Hybrid App Hooks Support (#41767) 2022-10-31 20:13:27 -07:00
html-context.ts Add support for font loaders (#40746) 2022-09-21 22:12:59 -07:00
image-blur-svg.ts Fix next/image svg blur placeholder with fill (#41573) 2022-10-19 13:21:41 -07:00
image-config-context.ts fix: make sure image-config gets transpiled (#34677) 2022-02-22 09:27:18 -05:00
image-config.ts feat: set a better type for the default image loader (#41639) 2022-10-24 23:59:07 +00:00
image-loader.ts feat: set a better type for the default image loader (#41639) 2022-10-24 23:59:07 +00:00
is-plain-object.ts Use Edge Runtime for running Edge Functions locally (#37024) 2022-05-30 12:01:36 +00:00
loadable-context.ts Implement loadable with lazy and suspense for next dynamic (#42589) 2022-12-07 19:42:10 +01:00
loadable.d.ts Hybrid App Hooks Support (#41767) 2022-10-31 20:13:27 -07:00
loadable.js Implement loadable with lazy and suspense for next dynamic (#42589) 2022-12-07 19:42:10 +01:00
match-remote-pattern.ts Fix experimental remotePatterns wildcard (#37137) 2022-05-25 20:25:06 +00:00
mitt.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
no-ssr-error.ts Implement loadable with lazy and suspense for next dynamic (#42589) 2022-12-07 19:42:10 +01:00
router-context.ts Hybrid App Hooks Support (#41767) 2022-10-31 20:13:27 -07:00
runtime-config.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
server-inserted-html.tsx Dont apply existing externals path changing to rsc layers (#41744) 2022-10-24 18:00:44 -07:00
side-effect.tsx Upgrade typescript to 4.8.2 (#39979) 2022-08-29 16:56:02 +00:00
styled-jsx.d.ts Remove precopied styled-jsx (#39520) 2022-08-12 17:08:38 +00:00
styled-jsx.js Remove precopied styled-jsx (#39520) 2022-08-12 17:08:38 +00:00
utils.ts Remove unstable_revalidate (#43119) 2022-11-19 15:54:19 -08:00