rsnext/packages
Tim Neutkens 341daf9c7d
Ensure router.refresh() matches revalidatePath('/') behavior (#46723)
Ensures `router.refresh()` matches the upcoming `revalidatePath('/')`
api. This also ensures that when server context has changed it applies
to all routes, not just the one that triggered the refresh.

- When `router.refresh()` is called we fetch the full RSC payload from
the server (root layout till the page)
- The client-side router cache is fully invalidated, effectively making
it empty
- The client-side router prefetch cache is fully invalidated,
effectively making it empty
- RSC payload is applied to the state


fix NEXT-590 ([link](https://linear.app/vercel/issue/NEXT-590))

<!--
Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:
-->

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] 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)
2023-03-16 10:14:21 +01:00
..
create-next-app v13.2.5-canary.4 2023-03-15 11:55:55 +01:00
eslint-config-next v13.2.5-canary.4 2023-03-15 11:55:55 +01:00
eslint-plugin-next v13.2.5-canary.4 2023-03-15 11:55:55 +01:00
font v13.2.5-canary.4 2023-03-15 11:55:55 +01:00
next Ensure router.refresh() matches revalidatePath('/') behavior (#46723) 2023-03-16 10:14:21 +01:00
next-bundle-analyzer v13.2.5-canary.4 2023-03-15 11:55:55 +01:00
next-codemod v13.2.5-canary.4 2023-03-15 11:55:55 +01:00
next-env v13.2.5-canary.4 2023-03-15 11:55:55 +01:00
next-mdx v13.2.5-canary.4 2023-03-15 11:55:55 +01:00
next-plugin-storybook v13.2.5-canary.4 2023-03-15 11:55:55 +01:00
next-polyfill-module v13.2.5-canary.4 2023-03-15 11:55:55 +01:00
next-polyfill-nomodule v13.2.5-canary.4 2023-03-15 11:55:55 +01:00
next-swc Implement server entry creation in client layer (#47127 2023-03-15 23:58:18 +01:00
react-dev-overlay v13.2.5-canary.4 2023-03-15 11:55:55 +01:00
react-refresh-utils v13.2.5-canary.4 2023-03-15 11:55:55 +01:00