- 08 Apr, 2024 16 commits
-
-
vercel-release-bot authored
-
Sebastian Silbermann authored
-
Jiachi Liu authored
x-ref: https://github.com/vercel/next.js/actions/runs/8598454715/job/23559349141?pr=64110 Follow up for #64141 Closes NEXT-3028
-
HyunJick Lee authored
I'm looking at the example code and demo for the Image component, [Responsive image using a static import](https://nextjs.org/docs/app/api-reference/components/image#responsive-image-using-a-static-import) and [Responsive image with aspect ratio](https://nextjs.org/docs/app/api-reference/components/image#responsive-image-with-aspect-ratio) sections are immersive because the code in the example and the demo match, The [Responsive image with fill](https://nextjs.org/docs/app/api-reference/components/image#responsive-image-with-fill) section breaks the immersion because the code in the example and the demo are slightly different. I think it's just a typo. It seems the width and height values are reversed. Attach the code from the demo. <img width="504" alt="Responsive image with fill demo code" src="https://github.com/vercel/next.js/assets/56260102/72ab314d-a9b3-4a88-8d9c-48f0dde8c19f"> Co-authored-by:
Steven <steven@ceriously.com>
-
Benjamin Woodruff authored
I'm not sure why this issue is impacting me and seemingly not others, but on Debian 12 with the default linker options (gcc with ld) I get the following compilation error regarding unresolved symbols: https://gist.github.com/bgw/92da94f46b0994514a144b8938aa2f6c This flag downgrades that linker error to a warning (which cargo hides). I've checked that this flag is supported by ld, gold, lld, and mold. I've also tried building with mold in addition to ld. I'm restricting the option to linux to avoid potentially breaking other platforms. Tested by running: ``` cargo test -p next-swc-napi ``` Which now gives: ``` running 2 tests test transform::test_deserialize_transform_regenerator ... ok test transform::test_deser ... ok ```
-
Jiachi Liu authored
### What We introduced a new algorithm to find the matched hydration error tags, when there're two tags indicating children and parent as bad descendence relationship. Now we search for the child first from the last index, and then from found child to search its above parent. This way we can find the two related tags in O(1), since they could be not directly nested. ### Why When a hydration error occurred, such as bad nesting `div` under `p`, one of the tag `div` is matched multiple times in the component stack, it shouldn't be highlighted multiple times. This PR fixes the bad matching about multiple nested tags, e.g. when there're many `div` tag and `div` is one of the bad tag, only the one directly under p should be highlited. Case ``` Page > div > div > p > div ``` Current Result: all `div` and `p` get highlighted, `[]` represents highlighted. ``` Page > [div] > [div] > [p] > [div] ``` Expected: only the related 2 tags are highlighted, `[]` represents highlighted. ``` Page > div > div > [p] > [div] ``` Thanks @JohnPhamous for reporting the issue Closes NEXT-3022
-
Jiwon Choi authored
### Why? The examples `with-apollo` and `with-graphql-hooks` included outdated API endpoints and packages. This resulted in the **failed Vercel Deployment** of the examples. <details><summary>Screenshot of failed deployments</summary> <p> #### with-graphql-hooks  #### with-apollo  </p> </details> ### How? - Migrated examples from `pages` to `app` router and removed invalid API endpoints. - Refactored the example to a minimal template as possible with essential features. Closes #9865 #10253 #36112 --------- Co-authored-by:
Sam Ko <sam@vercel.com>
-
Donny/강동윤 authored
### What? Synchronize dependencies with turbopack ### Why? This mismatches seem to cause some strange build failures. ### How? Closes PACK-2910
-
Tim Neutkens authored
## What? Few more links for relevant concepts. <!-- 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: ## For Contributors ### Improving Documentation - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide ### Adding or Updating Examples - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? ### Why? ### How? Closes NEXT- Fixes # --> Closes NEXT-3027
-
Zack Tanner authored
When we seed the prefetch cache with an entry for the loaded page, we should also mark `lastUsedTime` to be the current time. Otherwise, if the prefetch entry has technically expired, it'll incorrectly be considered "reusable" because the `lastUsedTime` will be set to when it's first routed to client-side. x-ref: https://github.com/vercel/next.js/discussions/54075#discussioncomment-9031149 <!-- 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: ## For Contributors ### Improving Documentation - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide ### Adding or Updating Examples - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? ### Why? ### How? Closes NEXT- Fixes # --> Closes NEXT-3025
-
Lee Robinson authored
https://bugs.webkit.org/show_bug.cgi?id=252413 --------- Co-authored-by:
Steven <steven@ceriously.com>
-
Julius Marminge authored
Fixes #64018 Adds support for modern configurations introduced in TS 5.4 Expected output: not modifying the `module`, `esModuleInterop` configs since `module: preserve` is present ``` We detected TypeScript in your project and reconfigured your tsconfig.json file for you. Strict-mode is set to false by default. The following suggested values were added to your tsconfig.json. These values can be changed to fit your project's n eeds: - lib was set to dom,dom.iterable,esnext - allowJs was set to true - skipLibCheck was set to true - strict was set to false - noEmit was set to true - incremental was set to true - include was set to ['next-env.d.ts', '**/*.ts', '**/*.tsx'] - exclude was set to ['node_modules'] The following mandatory changes were made to your tsconfig.json: - isolatedModules was set to true (requirement for SWC / Babel) - jsx was set to preserve (next.js implements its own optimized jsx transform) ``` --------- Co-authored-by:Jiachi Liu <inbox@huozhi.im>
-
Tim Neutkens authored
## What? We're currently seeing a failure on this action but it's unclear why it happens so this PR introduces additional logs. Current failure: https://github.com/vercel/next.js/actions/runs/8550039767/job/23427388195#step:4:110 <!-- 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: ## For Contributors ### Improving Documentation - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide ### Adding or Updating Examples - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? ### Why? ### How? Closes NEXT- Fixes # --> Closes NEXT-3024
-
Vercel Release Bot authored
This auto-generated PR updates the development integration test manifest used when testing Turbopack.
-
Donny/강동윤 authored
### What? Emit `<link data-next-font="size-adjust" rel="preconnect" href="/" crossorigin="anonymous"/>` in more cases. ### Why? To align with the default mode ### How?
-
Vercel Release Bot authored
This auto-generated PR updates the development integration test manifest used when testing Turbopack.
-
- 07 Apr, 2024 3 commits
-
-
vercel-release-bot authored
-
DevMirza authored
<!-- 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: ## For Contributors ### Improving Documentation - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide ### Adding or Updating Examples - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? ### Why? ### How? Closes NEXT- Fixes # --> ### What? So, i was trying to create a Next.js project with Bun as i was experimenting with it and i got error creating the project `error: could not determine executable to run for package create` so i added `-` after create and works and created by project successfully. ## Before  ## After  --------- Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-
Lee Robinson authored
Based on customer feedback --------- Co-authored-by:JJ Kasper <jj@jjsweb.site>
-
- 06 Apr, 2024 2 commits
-
-
vercel-release-bot authored
-
Jiwon Choi authored
This is a hotfix since it breaks `next lint`, I'll start to implement eslint v9 for canary. x-ref: #64114 x-ref: [eslint v9 release](https://github.com/eslint/eslint/releases/tag/v9.0.0) Fixes #64136 --------- Co-authored-by:
Zack Tanner <zacktanner@gmail.com>
-
- 05 Apr, 2024 15 commits
-
-
vercel-release-bot authored
-
Jiachi Liu authored
### What Polish the UX based on the feedbacks from @sambecker * Fix the font that still use mono * Align the color, to use red for the warnings * Give the title to build error * Only highlight the nextjs doc url as link ### After vs Before #### Runtime Error <img width="335" alt="image" src="https://github.com/vercel/next.js/assets/4800338/64f2f692-1eae-41db-9287-046aff9ba112"> <img width="335" alt="image" src="https://github.com/vercel/next.js/assets/4800338/2d4bad15-745e-4083-ba57-8968c0f321c2"> #### Build Error <img width="335" alt="image" src="https://github.com/vercel/next.js/assets/4800338/ecfc3883-4522-40c6-b042-6d85e7ea970e"> <img width="335" alt="image" src="https://github.com/vercel/next.js/assets/4800338/bbf37ec5-b639-4b95-a87f-9911182e431c"> Closes NEXT-2958
-
Mehdi authored
That's it, and about the metadata (description), I had to change it cause it feels like the new change can be more relatable on the [MDX](https://nextjs.org/docs/app/building-your-application/configuring/mdx) page. --------- Co-authored-by:
samcx <sam@vercel.com>
-
Tim Neutkens authored
## What? When creating the Next.js instance fails for whatever reason (most commonly `next build` failing) it currently exits the process, this causes Jest to not report these tests as failed. The change in this PR ensures that anytime creating the instance fails it throws an error that is caught by Jest and then causes Jest to report the tests as failed. The reporting of tests is relevant as our monitoring tools (i.e. DataDog / Turbopack test manifest) rely on correct reporting of all failing tests. <!-- 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: ## For Contributors ### Improving Documentation - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide ### Adding or Updating Examples - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? ### Why? ### How? Closes NEXT- Fixes # --> Closes NEXT-3016
-
vercel-release-bot authored
-
Dima Voytenko authored
Next creates an alias for `@opentelemetry/api` to a prebundled version [here](https://github.com/vercel/next.js/blob/a9f85d14c0187a0a3dd08468bcb9d2be3cb4be40/packages/next/src/build/create-compiler-aliases.ts#L108-L110). However, there's a bug in `hasExternalOtelApiPackage` - it currently always fails to remove `@opentelemetry/api/package.json` because it's not one of the exports.
-
JJ Kasper authored
Follow-up to https://github.com/vercel/next.js/pull/64084 this refactors it a bit and renames the flag. Closes NEXT-3018
-
Tobias Koppers authored
Closes PACK-1935 --------- Co-authored-by:Will Binns-Smith <wbinnssmith@gmail.com>
-
Alexander authored
Removed unintended use of `PagesOnly` component inside a code block.
-
JJ Kasper authored
-
Tim Neutkens authored
## What? There's a bug currently that shows the "webpack has been configured" warning incorrectly: ``` pnpm next dev --turbo examples/hello-world > nextjs-project@0.0.0 next /Users/timneutkens/projects/next.js > cross-env NEXT_TELEMETRY_DISABLED=1 node --trace-deprecation --enable-source-maps packages/next/dist/bin/next "dev" "--turbo" "examples/hello-world" ▲ Next.js 14.2.0-canary.58 (turbo) - Local: http://localhost:3000 ✓ Starting... ✓ Ready in 791ms
⚠ Webpack is configured while Turbopack is not, which may cause problems.⚠ See instructions if you need to configure Turbopack: https://nextjs.org/docs/app/api-reference/next-config-js/turbo ``` This PR ensures the warning is only shown when you have actually configured `webpack` in `next.config.js`. <!-- 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: ## For Contributors ### Improving Documentation - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide ### Adding or Updating Examples - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? ### Why? ### How? Closes NEXT- Fixes # --> Closes NEXT-3013 -
Wyatt Johnson authored
<!-- 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: ## For Contributors ### Improving Documentation - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide ### Adding or Updating Examples - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? ### Why? ### How? Closes NEXT- Fixes # --> ### What? Primarily, this is fixing the code highlighted here: https://github.com/vercel/next.js/blob/073cd74433146d6d3849110e7dada92351ebb7d4/packages/next/src/server/lib/patch-fetch.ts#L228-L230 As `(fetch as any).__nextGetStaticStore?.()` returns `StaticGenerationAsyncStorage | undefined`, and not `StaticGenerationStore`. A call to `.getStore()` as the previous line does corrects this issue. Secondarily, this improves the `as any` type access being done on the patched fetch object to make it more type safe and easier to work with. Since this was added, some features like the `.external` files were added that allowed files to import the correct async local storage object in client and server environments correctly to allow for direct access. Code across Next.js no-longer uses this mechanism to access the storage, and instead relies on this special treated import. Types were improved within the `patch-fetch.ts` file to allow for safer property access by adding consistent types and guards. ### Why? Without this change, checks like: https://github.com/vercel/next.js/blob/073cd74433146d6d3849110e7dada92351ebb7d4/packages/next/src/server/lib/patch-fetch.ts#L246 Always fail, because when `(fetch as any).__nextGetStaticStore?.()` returns `StaticGenerationAsyncStorage`, it isn't the actual store, so the type is wrong. Closes NEXT-3008
-
Balázs Orbán authored
-
Vercel Release Bot authored
This auto-generated PR updates the development integration test manifest used when testing Turbopack.
-
Sukka authored
Previously, the `serve-static` utility function in Next.js would determine which codepath to use based on the version of `mime` **for every incoming request**. The PR changes so that the codepath **will be determined in advance**, thereby reducing the overhead.
-
- 04 Apr, 2024 4 commits
-
-
vercel-release-bot authored
-
Zack Tanner authored
When adding refresh markers for refetching segments that are "stale" (the soft navigation case where they are still in the Router State Tree but not part of the page that we're rendering), they only contained a reference to the pathname. Once the actual refresh was triggered we added the current search params to the request. However, this causes an issue: segments in the `FlightRouterState` can contain searchParams (ie, `__PAGE__?{"foo": "bar}` is what the segment becomes when adding `?foo=bar` to a page). This means that when we refresh those nodes from the server, it won't know how to find the `CacheNode` for the stale segment since we won't have them in the refetch tree. This updates to keep a reference to the searchParams that were part of the request that made it active. While fixing this, I also noticed that we were missing a spot to add the refetch marker in `applyRouterStatePatchToTree` in the case of a root refresh (caught by these tests failing in PPR) [x-ref](https://github.com/vercel/next.js/discussions/63900#discussioncomment-9002137) <!-- 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: ## For Contributors ### Improving Documentation - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide ### Adding or Updating Examples - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? ### Why? ### How? Closes NEXT- Fixes # --> Closes NEXT-3007 -
Will Binns-Smith authored
Depends on https://github.com/vercel/turbo/pull/7874, which should be merged first. Test Plan: `cargo check` Closes PACK-2903
-
vercel-release-bot authored
-