1. 19 May, 2025 31 commits
  2. 18 May, 2025 3 commits
  3. 17 May, 2025 6 commits
    • vercel-release-bot's avatar
      v15.4.0-canary.38 · 73a3bc5a
      vercel-release-bot authored
      73a3bc5a
    • Hendrik Liebau's avatar
      Enable `ppr` when `dynamicIO` is enabled (#79302) · aa7d4de4
      Hendrik Liebau authored
      With this PR, we're automatically enabling `ppr` when `dynamicIO` is enabled, and forbid using `ppr: 'incremental'` or `ppr: false` together with `dynamicIO: true`.
      
      While implementing the config validation, I noticed that the `userConfig`, `config`, and `result` objects in `assignDefaults` were untyped. This is fixed now.
      aa7d4de4
    • Hendrik Liebau's avatar
      Enable PPR in Dynamic IO tests (#79301) · 53933954
      Hendrik Liebau authored
      To prepare for an upcoming change where `ppr` will be enabled
      automatically when `dynamicIO` is enabled, we're hard coding `ppr: true`
      in the Dynamic IO tests with this PR. The non-PPR assertions are
      subsequently removed, which makes up most of the changed lines.
      
      We can now also exclude the tests in the PPR tests manifest, so that
      they're not run twice in CI.
      
      > [!NOTE]  
      > This PR is best reviewed with hidden whitespace changes.
      53933954
    • Hendrik Liebau's avatar
      Disable `dynamicIO` in global default cache handler test (#79300) · 5442d092
      Hendrik Liebau authored
      To prepare for an upcoming change where `ppr` will be enabled automatically when `dynamicIO` is enabled, we're disabling `dynamicIO` in the global default cache handler test, and using the `useCache` config instead, because `output: 'standalone'` is currently not compatible with PPR.
      5442d092
    • Hendrik Liebau's avatar
      Use `onPostpone` to determine if segment prefetch is partial (#79299) · e2837fb3
      Hendrik Liebau authored
      When dynamicIO is enabled, missing data is encoded to an infinitely hanging promise, the absence of which we use to determine if a segment is fully static or partially static. However, when dynamicIO is not enabled, this trick doesn't work.
      
      Previously, if PPR is enabled, and dynamicIO is not, we were conservative and assumed that all segments are partial. That doesn't need to be the case, though. We can use the `onPostpone` callback of the `prerender` function to determine if a given RSC node is partial.
      
      To make sure that this works as expected, we're disabling `dynamicIO` in `test/e2e/app-dir/segment-cache/incremental-opt-in`.
      
      Without this change, the following tests would fail because additional requests for the PPR-enabled routes are triggered when `dynamicIO` is disabled:
      
      - `when a link is prefetched with <Link prefetch=true>, no dynamic request is made on navigation`
      - `when prefetching with prefetch=true, refetches cache entries that only contain partial data`
      - `when prefetching with prefetch=true, refetches partial cache entries even if there's already a pending PPR request`
      
      In addition, we're also disabling `dynamicIO` in `test/e2e/app-dir/segment-cache/client-only-opt-in` as well as
      `test/e2e/app-dir/segment-cache/export`, to prepare for an upcoming change where `ppr` will be enabled automatically when `dynamicIO` is enabled. Those three tests are then not compatible with `dynamicIO` because they either rely on the `'incremental'` PPR config, or on `output: 'export'`.
      e2837fb3
    • Jiwon Choi's avatar
      [TypeScript Plugin] Moved the diagnostics' positions to the prop's type instead… · 3ecf087f
      Jiwon Choi authored
      [TypeScript Plugin] Moved the diagnostics' positions to the prop's type instead of the value for client-boundary warnings (#79193)
      
      Best be reviewed with "Hide whitespace".
      
      ### Why?
      
      Since it was matching `ts.isObjectBindingPattern`, which checks only the
      destructured props:
      
      ![CleanShot 2025-05-14 at 12 17
      25@2x](https://github.com/user-attachments/assets/44aaffd2-9276-486e-86ce-acb77d488ab0)
      
      It didn't handle non-destructured:
      
      ![CleanShot 2025-05-14 at 12 17
      34@2x](https://github.com/user-attachments/assets/23abc130-3e17-4f72-89a2-bc084841f52f)
      
      Therefore, I think it's more natural to target the types, not the props
      value, as the cause of this warning is actually the types:
      
      ![CleanShot 2025-05-14 at 12 18
      00@2x](https://github.com/user-attachments/assets/0a5a64c8-1ac9-4b0f-8fe7-20e78db2acec)
      
      ![CleanShot 2025-05-14 at 12 17
      53@2x](https://github.com/user-attachments/assets/72008c25-7d7b-46e4-8e2f-e52f01e50b80)
      
      x-ref:
      https://github.com/vercel/next.js/pull/79144#discussion_r2086941435
      
      ---------
      Co-authored-by: 's avatarJanka Uryga <lolzatu2@gmail.com>
      3ecf087f