Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Breaking] Update Dynamic APIs to be async #68812

Open
wants to merge 14 commits into
base: canary
Choose a base branch
from

Conversation

gnoff
Copy link
Contributor

@gnoff gnoff commented Aug 12, 2024

Next.js has a number of dynamic APIs that aren't available during prerendering. What happens when you access these APIs might differ depending on the mode you are using, for instance if you have PPR turned on or the newly introduced dynamicIO experimental mode. But regardless of the mode the underlying API represents accessing something that might only be available at render time (dynamic rendering) rather than prerender time (build and revalidate rendering)

Unfortunately our current dynamic APIs make certain kinds of modeling tricky because they are all synchronous. For instance if we wanted to add a feature to Next.js where we started a dynamic render before a Request even hits the server it would be interesting to be able to start working on everything that does not rely on any dynamic data and then once a real Request arrives we can continue the render and provide the associated Request context through our dynamic APIs.

If our dynamic APIs were all async we could build something like this because they represnt a value that will eventually resolve to some Request value. This PR updates most existing dynamic APIs to be async rather than sync. This is a breaking change and will need to be paired with codemods to realistically adopt. Additionally since this change is so invasive I have implemented it in a way to maximize backward compatibility by still allowing most synchronous access. The combination of codemods, typescript updates, and backward compat functionality should make it possible for projects to upgrade to the latest version with minimal effort and then follow up with a complete conversion over time.

cookies()

cookies() now returns Promise<ReadonlyRequestCookies>. Synchronous access to the underlying RequestCookies object is still supported to facilitate migration.

// ------------ preferred usage

// async Server Component
const token = (await cookies()).get('token')

// sync Server Component
import { use } from 'react'
//...
const token = use(cookies()).get('token')

// ------------ temporarily allowed usage

// javascript, dev warning at runtime
const token = cookies().get('token')

// typescript, dev warning at runtime
import { type UnsafeUnwrappedCookies } from 'next/headers'
// ...
const token = (cookies() as unknown as UnsafeUnwrappedCookies).get('token')

headers()

headers() now returns Promise<ReadonlyHeaders>. Synchronous access to the underlying Headers object is still supported to facilitate migration.

// ------------ preferred usage

// async Server Component
const header = (await headers()).get('x-foo')

// sync Server Component
import { use } from 'react'
//...
const header = use(headers()).get('x-foo')

// ------------ temporarily allowed usage

// javascript, dev warning at runtime
const header = headers().get('x-foo')

// typescript, dev warning at runtime
import { type UnsafeUnwrappedHeaders } from 'next/headers'
// ...
const header = (headers() as unknown as UnsafeUnwrappedHeaders).get('x-foo')

draftMode()

draftMode() now returns Promise<DraftMode>. Synchronous access to the underlying DraftMode object is still supported to facilitate migration.

// ------------ preferred usage

// async Server Component
if ((await draftMode()).isEnabled) { ... }

// sync Server Component
import { use } from 'react'
//...
if (use(draftMode()).isEnabled) { ... }

// ------------ temporarily allowed usage

// javascript, dev warning at runtime
if (draftMode().isEnabled) { ... }

// typescript, dev warning at runtime
import { type UnsafeUnwrappedDraftMode} from 'next/headers'
// ...
if ((draftMode() as unknown as UnsafeUnwrappedDraftMode).isEnabled) { ... }

searchParams

searchParams is now a Promise<{...}>. Synchronous access to the underlying search params is still supported to facilitate migration.

// ------------ preferred usage

// async Page Component
export default async function Page({
  searchParams
}: {
  searchParams: Promise<{ foo: string }>
}) {
  const fooSearchParam = (await searchParams).foo
}

// sync Page Component
import { use } from 'react'
export default function Page({
  searchParams
}: {
  searchParams: Promise<{ foo: string }>
}) {
  const fooSearchParam = use(searchParams).foo
}

// ------------ temporarily allowed usage

// javascript, dev warning at runtime
export default async function Page({ searchParams}) {
  const fooSearchParam = searchParams.foo
}

// typescript, dev warning at runtime
import { type UnsafeUnwrappedSearchParams } from 'next/server'
export default async function Page({
  searchParams
}: {
  searchParams: Promise<{ foo: string }>
}) {
  const syncSearchParams = (searchParams as unknown as UnsafeUnwrappedSearchParams<typeof searchParams>)
  const fooSearchParam = syncSearchParams.foo
}

params

params is now a Promise<{...}>. Synchronous access to the underlying params is still supported to facilitate migration. It should be noted that while params are not usually dynamic there are certain modes where they can be such as fallback prerenders for PPR.

// ------------ preferred usage

// async Segment Component
export default async function Layout({
  params
}: {
  params: Promise<{ foo: string }>
}) {
  const fooParam = (await params).foo
}

// sync Segment Component
import { use } from 'react'
export default function Layout({
  params
}: {
  params: Promise<{ foo: string }>
}) {
  const fooParam = use(params).foo
}

// ------------ temporarily allowed usage

// javascript, dev warning at runtime
export default async function Layout({ params}) {
  const fooParam = params.foo
}

// typescript, dev warning at runtime
import { type UnsafeUnwrappedParams } from 'next/headers'
export default async function Layout({
  params
}: {
  params: Promise<{ foo: string }>
}) {
  const syncParams = (params as unknown as UnsafeUnwrappedParams<typeof params>)
  const fooSearchParam = syncParams.foo
}

Typescript Changes

When using typescript with Next.js currently it is up to you to author types for Pages, Layouts and other Segment components that recieve props like params and searchParams.

Next comes with some build-time type checking to ensure you have not improperly typed various top level module exports however the current type assertions for params and searchParams is any. This isn't very helpful because it allows you to erroneously type these props.

searchParams is tricky because while the default type is a dictionary object parsed using node.js url parsing it is possible to customize when running a custom Next.js server. However we can ensure that you correctly type the prop as a Promise so with this change the validated type for searchParams will be Promise<any>.

In the long run we will look at updating the searchParams underlying type to be URLSearchParams so we can move away from supporting customized parsing during rendering and we can get even more explicit about valid types.

params is more straight forward because the framework controls the actual params prop implementation and no customization is possible. In the long run we want to enforce you are only typing params that are valid for the Layout level your file is located in but for now we are updating the allowed type to be Promise<{[key: string]: string | string[] | undefined }>.

These new type restrictions may also require fixes before being able to successfully build a project that updates to include these breaking changes. These changes will also not always be codemodable because it is valid to type the entire component using an opaque type like Props which our codemods may not have an ability to introspect or modify.

@gnoff gnoff changed the title WIP dynamic cookies WIP exotic cookies Aug 12, 2024
@ijjk
Copy link
Member

ijjk commented Aug 12, 2024

Tests Passed

@ijjk
Copy link
Member

ijjk commented Aug 12, 2024

Stats from current PR

Default Build (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary gnoff/next.js async-dynamic Change
buildDuration 18.5s 16.1s N/A
buildDurationCached 8.6s 7.4s N/A
nodeModulesSize 359 MB 360 MB ⚠️ +1.47 MB
nextStartRea..uration (ms) 428ms 435ms N/A
Client Bundles (main, webpack)
vercel/next.js canary gnoff/next.js async-dynamic Change
2120-HASH.js gzip 5.25 kB 5.26 kB N/A
2893-HASH.js gzip 43.1 kB 41.2 kB N/A
4799ad3f-HASH.js gzip 52.8 kB 52.8 kB N/A
6087.HASH.js gzip 170 B 169 B N/A
framework-HASH.js gzip 57.6 kB 57.6 kB N/A
main-app-HASH.js gzip 228 B 230 B N/A
main-HASH.js gzip 32.7 kB 32.7 kB N/A
webpack-HASH.js gzip 1.71 kB 1.71 kB N/A
Overall change 0 B 0 B
Legacy Client Bundles (polyfills)
vercel/next.js canary gnoff/next.js async-dynamic Change
polyfills-HASH.js gzip 39.4 kB 39.4 kB
Overall change 39.4 kB 39.4 kB
Client Pages
vercel/next.js canary gnoff/next.js async-dynamic Change
_app-HASH.js gzip 193 B 193 B
_error-HASH.js gzip 192 B 192 B
amp-HASH.js gzip 511 B 510 B N/A
css-HASH.js gzip 343 B 343 B
dynamic-HASH.js gzip 1.84 kB 1.84 kB N/A
edge-ssr-HASH.js gzip 264 B 264 B
head-HASH.js gzip 364 B 363 B N/A
hooks-HASH.js gzip 392 B 392 B
image-HASH.js gzip 4.41 kB 4.4 kB N/A
index-HASH.js gzip 269 B 268 B N/A
link-HASH.js gzip 2.78 kB 2.78 kB N/A
routerDirect..HASH.js gzip 327 B 329 B N/A
script-HASH.js gzip 397 B 392 B N/A
withRouter-HASH.js gzip 325 B 325 B
1afbb74e6ecf..834.css gzip 106 B 106 B
Overall change 1.81 kB 1.81 kB
Client Build Manifests
vercel/next.js canary gnoff/next.js async-dynamic Change
_buildManifest.js gzip 751 B 748 B N/A
Overall change 0 B 0 B
Rendered Page Sizes
vercel/next.js canary gnoff/next.js async-dynamic Change
index.html gzip 523 B 523 B
link.html gzip 537 B 538 B N/A
withRouter.html gzip 518 B 520 B N/A
Overall change 523 B 523 B
Edge SSR bundle Size Overall increase ⚠️
vercel/next.js canary gnoff/next.js async-dynamic Change
edge-ssr.js gzip 128 kB 128 kB N/A
page.js gzip 179 kB 180 kB ⚠️ +1.06 kB
Overall change 179 kB 180 kB ⚠️ +1.06 kB
Middleware size
vercel/next.js canary gnoff/next.js async-dynamic Change
middleware-b..fest.js gzip 670 B 668 B N/A
middleware-r..fest.js gzip 156 B 154 B N/A
middleware.js gzip 29.8 kB 29.8 kB N/A
edge-runtime..pack.js gzip 844 B 844 B
Overall change 844 B 844 B
Next Runtimes Overall increase ⚠️
vercel/next.js canary gnoff/next.js async-dynamic Change
973-experime...dev.js gzip 322 B 322 B
973.runtime.dev.js gzip 314 B 314 B
app-page-exp...dev.js gzip 318 kB 318 kB ⚠️ +570 B
app-page-exp..prod.js gzip 126 kB 126 kB ⚠️ +230 B
app-page-tur..prod.js gzip 139 kB 139 kB ⚠️ +226 B
app-page-tur..prod.js gzip 134 kB 134 kB ⚠️ +225 B
app-page.run...dev.js gzip 308 kB 309 kB ⚠️ +581 B
app-page.run..prod.js gzip 121 kB 121 kB ⚠️ +224 B
app-route-ex...dev.js gzip 32.1 kB 33.6 kB ⚠️ +1.58 kB
app-route-ex..prod.js gzip 21.7 kB 22.3 kB ⚠️ +585 B
app-route-tu..prod.js gzip 21.7 kB 22.3 kB ⚠️ +586 B
app-route-tu..prod.js gzip 21.5 kB 22.1 kB ⚠️ +580 B
app-route.ru...dev.js gzip 33.7 kB 35.3 kB ⚠️ +1.59 kB
app-route.ru..prod.js gzip 21.5 kB 22.1 kB ⚠️ +581 B
pages-api-tu..prod.js gzip 9.62 kB 9.62 kB
pages-api.ru...dev.js gzip 11.5 kB 11.5 kB
pages-api.ru..prod.js gzip 9.61 kB 9.61 kB
pages-turbo...prod.js gzip 20.8 kB 20.8 kB
pages.runtim...dev.js gzip 26.4 kB 26.4 kB
pages.runtim..prod.js gzip 20.8 kB 20.8 kB
server.runti..prod.js gzip 57.9 kB 57.1 kB N/A
Overall change 1.4 MB 1.41 MB ⚠️ +7.56 kB
build cache Overall increase ⚠️
vercel/next.js canary gnoff/next.js async-dynamic Change
0.pack gzip 1.65 MB 1.66 MB ⚠️ +5.63 kB
index.pack gzip 133 kB 130 kB N/A
Overall change 1.65 MB 1.66 MB ⚠️ +5.63 kB
Diff details
Diff for page.js
@@ -15,7 +15,7 @@
       /***/
     },
 
-    /***/ 1268: /***/ (
+    /***/ 7109: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -30,7 +30,7 @@
         default: () => /* binding */ nHandler,
       });
 
-      // NAMESPACE OBJECT: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-5d19e1c8-20240923_re_exh3korby52talgbfgrfijbiwa/node_modules/next/dist/build/webpack/loaders/next-app-loader/index.js?name=app%2Fapp-edge-ssr%2Fpage&page=%2Fapp-edge-ssr%2Fpage&pagePath=private-next-app-dir%2Fapp-edge-ssr%2Fpage.js&appDir=%2Ftmp%2Fnext-statsKs3jhM%2Fstats-app%2Fapp&appPaths=%2Fapp-edge-ssr%2Fpage&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&basePath=&assetPrefix=&nextConfigOutput=&flyingShuttle=false&preferredRegion=&middlewareConfig=e30%3D!./app/app-edge-ssr/page.js?__next_edge_ssr_entry__
+      // NAMESPACE OBJECT: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-5d19e1c8-20240923_re_l4vv5whrqalbzw3o4esxkwi2ju/node_modules/next/dist/build/webpack/loaders/next-app-loader/index.js?name=app%2Fapp-edge-ssr%2Fpage&page=%2Fapp-edge-ssr%2Fpage&pagePath=private-next-app-dir%2Fapp-edge-ssr%2Fpage.js&appDir=%2Ftmp%2Fnext-statsKs3jhM%2Fstats-app%2Fapp&appPaths=%2Fapp-edge-ssr%2Fpage&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&basePath=&assetPrefix=&nextConfigOutput=&flyingShuttle=false&preferredRegion=&middlewareConfig=e30%3D!./app/app-edge-ssr/page.js?__next_edge_ssr_entry__
       var page_next_edge_ssr_entry_namespaceObject = {};
       __webpack_require__.r(page_next_edge_ssr_entry_namespaceObject);
       __webpack_require__.d(page_next_edge_ssr_entry_namespaceObject, {
@@ -44,17 +44,23 @@
           entry_base /* RenderFromTemplateContext */.b5,
         __next_app__: () => __next_app__,
         actionAsyncStorage: () => entry_base /* actionAsyncStorage */.Wz,
-        createDynamicallyTrackedParams: () =>
-          entry_base /* createDynamicallyTrackedParams */.eV,
-        createDynamicallyTrackedSearchParams: () =>
-          entry_base /* createDynamicallyTrackedSearchParams */.rL,
-        createUntrackedSearchParams: () =>
-          entry_base /* createUntrackedSearchParams */.S5,
+        createPrerenderParamsForClientSegment: () =>
+          entry_base /* createPrerenderParamsForClientSegment */.XH,
+        createPrerenderSearchParamsForClientPage: () =>
+          entry_base /* createPrerenderSearchParamsForClientPage */.$h,
+        createServerParamsForMetadata: () =>
+          entry_base /* createServerParamsForMetadata */.qj,
+        createServerParamsForServerSegment: () =>
+          entry_base /* createServerParamsForServerSegment */.p5,
+        createServerSearchParamsForMetadata: () =>
+          entry_base /* createServerSearchParamsForMetadata */.Kn,
+        createServerSearchParamsForServerPage: () =>
+          entry_base /* createServerSearchParamsForServerPage */.Bt,
         decodeAction: () => entry_base /* decodeAction */.Hs,
         decodeFormState: () => entry_base /* decodeFormState */.dH,
         decodeReply: () => entry_base /* decodeReply */.kf,
         pages: () => pages,
-        patchFetch: () => entry_base /* patchFetch */.XH,
+        patchFetch: () => entry_base /* patchFetch */.eH,
         preconnect: () => entry_base /* preconnect */.$P,
         preloadFont: () => entry_base /* preloadFont */.C5,
         preloadStyle: () => entry_base /* preloadStyle */.oH,
@@ -70,35 +76,35 @@
         tree: () => tree,
       });
 
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-5d19e1c8-20240923_re_exh3korby52talgbfgrfijbiwa/node_modules/next/dist/esm/server/web/globals.js
-      var globals = __webpack_require__(3663);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-5d19e1c8-20240923_re_exh3korby52talgbfgrfijbiwa/node_modules/next/dist/esm/server/web/adapter.js + 3 modules
-      var adapter = __webpack_require__(302);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-5d19e1c8-20240923_re_exh3korby52talgbfgrfijbiwa/node_modules/next/dist/esm/build/webpack/loaders/next-edge-ssr-loader/render.js + 85 modules
-      var render = __webpack_require__(2253);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-5d19e1c8-20240923_re_exh3korby52talgbfgrfijbiwa/node_modules/next/dist/esm/server/lib/incremental-cache/index.js + 3 modules
-      var incremental_cache = __webpack_require__(7458);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-5d19e1c8-20240923_re_exh3korby52talgbfgrfijbiwa/node_modules/next/dist/esm/server/app-render/app-render.js + 74 modules
-      var app_render = __webpack_require__(7615);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-5d19e1c8-20240923_re_exh3korby52talgbfgrfijbiwa/node_modules/next/dist/esm/server/route-modules/app-page/module.compiled.js
-      var module_compiled = __webpack_require__(7537);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-5d19e1c8-20240923_re_exh3korby52talgbfgrfijbiwa/node_modules/next/dist/esm/server/route-kind.js
-      var route_kind = __webpack_require__(4905);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-5d19e1c8-20240923_re_exh3korby52talgbfgrfijbiwa/node_modules/next/dist/esm/client/components/error-boundary.js
-      var error_boundary = __webpack_require__(4740);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-5d19e1c8-20240923_re_exh3korby52talgbfgrfijbiwa/node_modules/next/dist/esm/server/app-render/entry-base.js + 10 modules
-      var entry_base = __webpack_require__(6203); // CONCATENATED MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-5d19e1c8-20240923_re_exh3korby52talgbfgrfijbiwa/node_modules/next/dist/build/webpack/loaders/next-app-loader/index.js?name=app%2Fapp-edge-ssr%2Fpage&page=%2Fapp-edge-ssr%2Fpage&pagePath=private-next-app-dir%2Fapp-edge-ssr%2Fpage.js&appDir=%2Ftmp%2Fnext-statsKs3jhM%2Fstats-app%2Fapp&appPaths=%2Fapp-edge-ssr%2Fpage&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&basePath=&assetPrefix=&nextConfigOutput=&flyingShuttle=false&preferredRegion=&middlewareConfig=e30%3D!./app/app-edge-ssr/page.js?__next_edge_ssr_entry__
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-5d19e1c8-20240923_re_l4vv5whrqalbzw3o4esxkwi2ju/node_modules/next/dist/esm/server/web/globals.js
+      var globals = __webpack_require__(4950);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-5d19e1c8-20240923_re_l4vv5whrqalbzw3o4esxkwi2ju/node_modules/next/dist/esm/server/web/adapter.js + 3 modules
+      var adapter = __webpack_require__(2858);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-5d19e1c8-20240923_re_l4vv5whrqalbzw3o4esxkwi2ju/node_modules/next/dist/esm/build/webpack/loaders/next-edge-ssr-loader/render.js + 87 modules
+      var render = __webpack_require__(6886);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-5d19e1c8-20240923_re_l4vv5whrqalbzw3o4esxkwi2ju/node_modules/next/dist/esm/server/lib/incremental-cache/index.js + 3 modules
+      var incremental_cache = __webpack_require__(7539);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-5d19e1c8-20240923_re_l4vv5whrqalbzw3o4esxkwi2ju/node_modules/next/dist/esm/server/app-render/app-render.js + 74 modules
+      var app_render = __webpack_require__(8471);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-5d19e1c8-20240923_re_l4vv5whrqalbzw3o4esxkwi2ju/node_modules/next/dist/esm/server/route-modules/app-page/module.compiled.js
+      var module_compiled = __webpack_require__(5259);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-5d19e1c8-20240923_re_l4vv5whrqalbzw3o4esxkwi2ju/node_modules/next/dist/esm/server/route-kind.js
+      var route_kind = __webpack_require__(8281);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-5d19e1c8-20240923_re_l4vv5whrqalbzw3o4esxkwi2ju/node_modules/next/dist/esm/client/components/error-boundary.js
+      var error_boundary = __webpack_require__(790);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-5d19e1c8-20240923_re_l4vv5whrqalbzw3o4esxkwi2ju/node_modules/next/dist/esm/server/app-render/entry-base.js + 9 modules
+      var entry_base = __webpack_require__(6391); // CONCATENATED MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-5d19e1c8-20240923_re_l4vv5whrqalbzw3o4esxkwi2ju/node_modules/next/dist/build/webpack/loaders/next-app-loader/index.js?name=app%2Fapp-edge-ssr%2Fpage&page=%2Fapp-edge-ssr%2Fpage&pagePath=private-next-app-dir%2Fapp-edge-ssr%2Fpage.js&appDir=%2Ftmp%2Fnext-statsKs3jhM%2Fstats-app%2Fapp&appPaths=%2Fapp-edge-ssr%2Fpage&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&basePath=&assetPrefix=&nextConfigOutput=&flyingShuttle=false&preferredRegion=&middlewareConfig=e30%3D!./app/app-edge-ssr/page.js?__next_edge_ssr_entry__
       const module0 = () =>
         Promise.resolve(/* import() eager */).then(
-          __webpack_require__.bind(__webpack_require__, 5931)
+          __webpack_require__.bind(__webpack_require__, 3867)
         );
       const module1 = () =>
         Promise.resolve(/* import() eager */).then(
-          __webpack_require__.bind(__webpack_require__, 3697)
+          __webpack_require__.bind(__webpack_require__, 4592)
         );
       const page2 = () =>
         Promise.resolve(/* import() eager */).then(
-          __webpack_require__.bind(__webpack_require__, 2928)
+          __webpack_require__.bind(__webpack_require__, 4242)
         );
 
       // We inject the tree and pages here so that we can use them in the route
@@ -161,12 +167,12 @@
       });
 
       //# sourceMappingURL=app-page.js.map
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-5d19e1c8-20240923_re_exh3korby52talgbfgrfijbiwa/node_modules/next/dist/esm/lib/page-types.js
-      var page_types = __webpack_require__(203);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-5d19e1c8-20240923_re_exh3korby52talgbfgrfijbiwa/node_modules/next/dist/esm/server/app-render/encryption-utils.js
-      var encryption_utils = __webpack_require__(8791);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-5d19e1c8-20240923_re_exh3korby52talgbfgrfijbiwa/node_modules/next/dist/esm/server/app-render/action-utils.js
-      var action_utils = __webpack_require__(5338); // CONCATENATED MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-5d19e1c8-20240923_re_exh3korby52talgbfgrfijbiwa/node_modules/next/dist/build/webpack/loaders/next-edge-ssr-loader/index.js?{"absolute500Path":"","absoluteAppPath":"next/dist/pages/_app","absoluteDocumentPath":"next/dist/pages/_document","absoluteErrorPath":"next/dist/pages/_error","absolutePagePath":"private-next-app-dir/app-edge-ssr/page.js","dev":false,"isServerComponent":true,"page":"/app-edge-ssr/page","stringifiedConfig":"eyJlbnYiOnt9LCJlc2xpbnQiOnsiaWdub3JlRHVyaW5nQnVpbGRzIjpmYWxzZX0sInR5cGVzY3JpcHQiOnsiaWdub3JlQnVpbGRFcnJvcnMiOmZhbHNlLCJ0c2NvbmZpZ1BhdGgiOiJ0c2NvbmZpZy5qc29uIn0sImRpc3REaXIiOiIubmV4dCIsImNsZWFuRGlzdERpciI6dHJ1ZSwiYXNzZXRQcmVmaXgiOiIiLCJjYWNoZU1heE1lbW9yeVNpemUiOjUyNDI4ODAwLCJjb25maWdPcmlnaW4iOiJuZXh0LmNvbmZpZy5qcyIsInVzZUZpbGVTeXN0ZW1QdWJsaWNSb3V0ZXMiOnRydWUsImdlbmVyYXRlRXRhZ3MiOnRydWUsInBhZ2VFeHRlbnNpb25zIjpbInRzeCIsInRzIiwianN4IiwianMiXSwicG93ZXJlZEJ5SGVhZGVyIjp0cnVlLCJjb21wcmVzcyI6dHJ1ZSwiaW1hZ2VzIjp7ImRldmljZVNpemVzIjpbNjQwLDc1MCw4MjgsMTA4MCwxMjAwLDE5MjAsMjA0OCwzODQwXSwiaW1hZ2VTaXplcyI6WzE2LDMyLDQ4LDY0LDk2LDEyOCwyNTYsMzg0XSwicGF0aCI6Ii9fbmV4dC9pbWFnZSIsImxvYWRlciI6ImRlZmF1bHQiLCJsb2FkZXJGaWxlIjoiIiwiZG9tYWlucyI6W10sImRpc2FibGVTdGF0aWNJ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VFeHRlbnNpb25zPXRzJnBhZ2VFeHRlbnNpb25zPWpzeCZwYWdlRXh0ZW5zaW9ucz1qcyZiYXNlUGF0aD0mYXNzZXRQcmVmaXg9Jm5leHRDb25maWdPdXRwdXQ9JmZseWluZ1NodXR0bGU9ZmFsc2UmcHJlZmVycmVkUmVnaW9uPSZtaWRkbGV3YXJlQ29uZmlnPWUzMCUzRCE=","sriEnabled":false,"middlewareConfig":"e30="}!
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-5d19e1c8-20240923_re_l4vv5whrqalbzw3o4esxkwi2ju/node_modules/next/dist/esm/lib/page-types.js
+      var page_types = __webpack_require__(8438);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-5d19e1c8-20240923_re_l4vv5whrqalbzw3o4esxkwi2ju/node_modules/next/dist/esm/server/app-render/encryption-utils.js
+      var encryption_utils = __webpack_require__(4011);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-5d19e1c8-20240923_re_l4vv5whrqalbzw3o4esxkwi2ju/node_modules/next/dist/esm/server/app-render/action-utils.js
+      var action_utils = __webpack_require__(9470); // CONCATENATED MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-5d19e1c8-20240923_re_l4vv5whrqalbzw3o4esxkwi2ju/node_modules/next/dist/build/webpack/loaders/next-edge-ssr-loader/index.js?{"absolute500Path":"","absoluteAppPath":"next/dist/pages/_app","absoluteDocumentPath":"next/dist/pages/_document","absoluteErrorPath":"next/dist/pages/_error","absolutePagePath":"private-next-app-dir/app-edge-ssr/page.js","dev":false,"isServerComponent":true,"page":"/app-edge-ssr/page","stringifiedConfig":"eyJlbnYiOnt9LCJlc2xpbnQiOnsiaWdub3JlRHVyaW5nQnVpbGRzI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VhY3QtaWNvbnMvcngiLCJyZWFjdC1pY29ucy9zaSIsInJlYWN0LWljb25zL3NsIiwicmVhY3QtaWNvbnMvdGIiLCJyZWFjdC1pY29ucy90ZmkiLCJyZWFjdC1pY29ucy90aSIsInJlYWN0LWljb25zL3ZzYyIsInJlYWN0LWljb25zL3dpIl19LCJidW5kbGVQYWdlc1JvdXRlckRlcGVuZGVuY2llcyI6ZmFsc2UsImNvbmZpZ0ZpbGUiOiIvdG1wL25leHQtc3RhdHNLczNqaE0vc3RhdHMtYXBwL25leHQuY29uZmlnLmpzIiwiY29uZmlnRmlsZU5hbWUiOiJuZXh0LmNvbmZpZy5qcyJ9","pagesType":"app","appDirLoader":"bmV4dC1hcHAtbG9hZGVyP25hbWU9YXBwJTJGYXBwLWVkZ2Utc3NyJTJGcGFnZSZwYWdlPSUyRmFwcC1lZGdlLXNzciUyRnBhZ2UmcGFnZVBhdGg9cHJpdmF0ZS1uZXh0LWFwcC1kaXIlMkZhcHAtZWRnZS1zc3IlMkZwYWdlLmpzJmFwcERpcj0lMkZ0bXAlMkZuZXh0LXN0YXRzS3MzamhNJTJGc3RhdHMtYXBwJTJGYXBwJmFwcFBhdGhzPSUyRmFwcC1lZGdlLXNzciUyRnBhZ2UmcGFnZUV4dGVuc2lvbnM9dHN4JnBhZ2VFeHRlbnNpb25zPXRzJnBhZ2VFeHRlbnNpb25zPWpzeCZwYWdlRXh0ZW5zaW9ucz1qcyZiYXNlUGF0aD0mYXNzZXRQcmVmaXg9Jm5leHRDb25maWdPdXRwdXQ9JmZseWluZ1NodXR0bGU9ZmFsc2UmcHJlZmVycmVkUmVnaW9uPSZtaWRkbGV3YXJlQ29uZmlnPWUzMCUzRCE=","sriEnabled":false,"middlewareConfig":"e30="}!
       var _self___RSC_MANIFEST;
 
       const incrementalCacheHandler = null;
@@ -430,53 +436,53 @@
       /***/
     },
 
-    /***/ 8003: /***/ (
+    /***/ 8614: /***/ (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
     ) => {
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 5501)
+        __webpack_require__.bind(__webpack_require__, 263)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 1323)
+        __webpack_require__.bind(__webpack_require__, 239)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 933)
+        __webpack_require__.bind(__webpack_require__, 6808)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 7131)
+        __webpack_require__.bind(__webpack_require__, 9543)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 3048)
+        __webpack_require__.bind(__webpack_require__, 4145)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 8281)
+        __webpack_require__.bind(__webpack_require__, 6196)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 3129)
+        __webpack_require__.bind(__webpack_require__, 754)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 9429)
+        __webpack_require__.bind(__webpack_require__, 3482)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 1985)
+        __webpack_require__.bind(__webpack_require__, 9294)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 1815)
+        __webpack_require__.bind(__webpack_require__, 8049)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 566)
+        __webpack_require__.bind(__webpack_require__, 2408)
       );
 
       /***/
     },
 
-    /***/ 5415: /***/ () => {
+    /***/ 8977: /***/ () => {
       /***/
     },
 
-    /***/ 2928: /***/ (
+    /***/ 4242: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -496,7 +502,7 @@
       /***/
     },
 
-    /***/ 5931: /***/ (
+    /***/ 3867: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -508,7 +514,7 @@
         /* harmony export */
       });
       /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ =
-        __webpack_require__(7887);
+        __webpack_require__(9851);
 
       function RootLayout({ children }) {
         return /*#__PURE__*/ (0,
@@ -527,7 +533,7 @@
     // webpackRuntimeModules
     /******/ var __webpack_exec__ = (moduleId) =>
       __webpack_require__((__webpack_require__.s = moduleId));
-    /******/ __webpack_require__.O(0, [403, 678], () => __webpack_exec__(1268));
+    /******/ __webpack_require__.O(0, [342, 65], () => __webpack_exec__(7109));
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ (_ENTRIES = typeof _ENTRIES === "undefined" ? {} : _ENTRIES)[
       "middleware_app/app-edge-ssr/page"
Diff for middleware.js

Diff too large to display

Diff for edge-ssr.js

Diff too large to display

Diff for image-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [8358],
   {
-    /***/ 9553: /***/ (
+    /***/ 2542: /***/ (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/image",
         function () {
-          return __webpack_require__(4973);
+          return __webpack_require__(5220);
         },
       ]);
       if (false) {
@@ -18,7 +18,7 @@
       /***/
     },
 
-    /***/ 4492: /***/ (module, exports, __webpack_require__) => {
+    /***/ 39: /***/ (module, exports, __webpack_require__) => {
       "use strict";
       /* __next_internal_client_entry_do_not_use__  cjs */
       Object.defineProperty(exports, "__esModule", {
@@ -40,17 +40,17 @@
         __webpack_require__(5096)
       );
       const _head = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(1900)
+        __webpack_require__(4927)
       );
-      const _getimgprops = __webpack_require__(7298);
-      const _imageconfig = __webpack_require__(364);
-      const _imageconfigcontextsharedruntime = __webpack_require__(607);
-      const _warnonce = __webpack_require__(3417);
-      const _routercontextsharedruntime = __webpack_require__(8249);
+      const _getimgprops = __webpack_require__(9121);
+      const _imageconfig = __webpack_require__(5657);
+      const _imageconfigcontextsharedruntime = __webpack_require__(4517);
+      const _warnonce = __webpack_require__(1512);
+      const _routercontextsharedruntime = __webpack_require__(499);
       const _imageloader = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(6186)
+        __webpack_require__(6699)
       );
-      const _usemergedref = __webpack_require__(1927);
+      const _usemergedref = __webpack_require__(5395);
       // This is replaced by webpack define plugin
       const configEnv = {
         deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
@@ -371,7 +371,7 @@
       /***/
     },
 
-    /***/ 1927: /***/ (module, exports, __webpack_require__) => {
+    /***/ 5395: /***/ (module, exports, __webpack_require__) => {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -440,7 +440,7 @@
       /***/
     },
 
-    /***/ 7298: /***/ (
+    /***/ 9121: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -456,9 +456,9 @@
           return getImgProps;
         },
       });
-      const _warnonce = __webpack_require__(3417);
-      const _imageblursvg = __webpack_require__(3844);
-      const _imageconfig = __webpack_require__(364);
+      const _warnonce = __webpack_require__(1512);
+      const _imageblursvg = __webpack_require__(94);
+      const _imageconfig = __webpack_require__(5657);
       const VALID_LOADING_VALUES =
         /* unused pure expression or super */ null && [
           "lazy",
@@ -831,7 +831,7 @@
       /***/
     },
 
-    /***/ 3844: /***/ (__unused_webpack_module, exports) => {
+    /***/ 94: /***/ (__unused_webpack_module, exports) => {
       "use strict";
       /**
        * A shared function, used on both client and server, to generate a SVG blur placeholder.
@@ -886,7 +886,7 @@
       /***/
     },
 
-    /***/ 2464: /***/ (
+    /***/ 7268: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -913,10 +913,10 @@
         },
       });
       const _interop_require_default = __webpack_require__(9608);
-      const _getimgprops = __webpack_require__(7298);
-      const _imagecomponent = __webpack_require__(4492);
+      const _getimgprops = __webpack_require__(9121);
+      const _imagecomponent = __webpack_require__(39);
       const _imageloader = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(6186)
+        __webpack_require__(6699)
       );
       function getImageProps(imgProps) {
         const { props } = (0, _getimgprops.getImgProps)(imgProps, {
@@ -948,7 +948,7 @@
       /***/
     },
 
-    /***/ 6186: /***/ (__unused_webpack_module, exports) => {
+    /***/ 6699: /***/ (__unused_webpack_module, exports) => {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -983,7 +983,7 @@
       /***/
     },
 
-    /***/ 4973: /***/ (
+    /***/ 5220: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -1000,8 +1000,8 @@
 
       // EXTERNAL MODULE: ./node_modules/.pnpm/react@19.0.0-rc-5d19e1c8-20240923/node_modules/react/jsx-runtime.js
       var jsx_runtime = __webpack_require__(4129);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-5d19e1c8-20240923_re_exh3korby52talgbfgrfijbiwa/node_modules/next/image.js
-      var next_image = __webpack_require__(487);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-5d19e1c8-20240923_re_l4vv5whrqalbzw3o4esxkwi2ju/node_modules/next/image.js
+      var next_image = __webpack_require__(6147);
       var image_default = /*#__PURE__*/ __webpack_require__.n(next_image); // CONCATENATED MODULE: ./pages/nextjs.png
       /* harmony default export */ const nextjs = {
         src: "/_next/static/media/nextjs.cae0b805.png",
@@ -1031,12 +1031,12 @@
       /***/
     },
 
-    /***/ 487: /***/ (
+    /***/ 6147: /***/ (
       module,
       __unused_webpack_exports,
       __webpack_require__
     ) => {
-      module.exports = __webpack_require__(2464);
+      module.exports = __webpack_require__(7268);
 
       /***/
     },
@@ -1046,7 +1046,7 @@
     /******/ var __webpack_exec__ = (moduleId) =>
       __webpack_require__((__webpack_require__.s = moduleId));
     /******/ __webpack_require__.O(0, [2888, 9774, 179], () =>
-      __webpack_exec__(9553)
+      __webpack_exec__(2542)
     );
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for 2893-HASH.js

Diff too large to display

Diff for main-HASH.js

Diff too large to display

Diff for app-page-exp..ntime.dev.js
failed to diff
Diff for app-page-exp..time.prod.js

Diff too large to display

Diff for app-page-tur..time.prod.js

Diff too large to display

Diff for app-page-tur..time.prod.js

Diff too large to display

Diff for app-page.runtime.dev.js

Diff too large to display

Diff for app-page.runtime.prod.js

Diff too large to display

Diff for app-route-ex..ntime.dev.js

Diff too large to display

Diff for app-route-ex..time.prod.js

Diff too large to display

Diff for app-route-tu..time.prod.js

Diff too large to display

Diff for app-route-tu..time.prod.js

Diff too large to display

Diff for app-route.runtime.dev.js

Diff too large to display

Diff for app-route.ru..time.prod.js

Diff too large to display

Diff for server.runtime.prod.js

Diff too large to display

Commit: 77f7792

@gnoff gnoff force-pushed the async-dynamic branch 10 times, most recently from 34a65a9 to cbeba6a Compare August 14, 2024 03:59
@gnoff gnoff force-pushed the async-dynamic branch 4 times, most recently from c259778 to 0196e56 Compare August 25, 2024 05:57
@ijjk ijjk added the Turbopack Related to Turbopack with Next.js. label Aug 25, 2024
@gnoff gnoff force-pushed the async-dynamic branch 9 times, most recently from f2d7d38 to e4d1fd0 Compare August 27, 2024 03:28
packages/next/src/server/request/params.ts Outdated Show resolved Hide resolved
packages/next/src/server/request/params.ts Outdated Show resolved Hide resolved
packages/next/src/server/request/params.ts Outdated Show resolved Hide resolved
packages/next/src/server/request/params.ts Outdated Show resolved Hide resolved
packages/next/src/server/request/params.ts Show resolved Hide resolved
packages/next/src/server/request/cookies.ts Outdated Show resolved Hide resolved
packages/next/src/server/request/cookies.ts Outdated Show resolved Hide resolved
packages/next/src/server/request/draft-mode.ts Outdated Show resolved Hide resolved
Comment on lines +42 to +44
// These properties cannot be shadowed with a search param because they
// are necessary for ReactPromise's to work correctly with `use`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we disallow these keys on the unwrapped type so you'll get a TS warning. don't have a story for it for JS b/c we can't tell the difference between a status param and an attempt to read the status of the promise by react.

We could potentially add something to the codemods to flag it though

Comment on lines +42 to +44
// These properties cannot be shadowed with a search param because they
// are necessary for ReactPromise's to work correctly with `use`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @huozhi

@gnoff gnoff force-pushed the async-dynamic branch 9 times, most recently from 52e9208 to 9b290e2 Compare September 24, 2024 04:46
packages/next/src/server/app-render/dynamic-rendering.ts Outdated Show resolved Hide resolved
packages/next/src/server/app-render/dynamic-rendering.ts Outdated Show resolved Hide resolved
packages/next/src/server/app-render/dynamic-rendering.ts Outdated Show resolved Hide resolved
packages/next/src/server/request/search-params.ts Outdated Show resolved Hide resolved
packages/next/src/server/request/headers.ts Outdated Show resolved Hide resolved
packages/next/src/server/request/params.ts Outdated Show resolved Hide resolved
packages/next/src/server/request/params.ts Outdated Show resolved Hide resolved
packages/next/src/server/request/params.ts Outdated Show resolved Hide resolved
Similar to `cookies()`, `headers()` provides access to an underlying Request in Next.js. To be optimally compatible with dynamicIO we need request access to be implemented through async APIs and have udpated this function to return a promise of Headers rather than Headers directly. To facilitate migration this API will augment the Promise with properties that allow direct access to headers. In a future version of Next.js we will remove the exotic nature of this Promise and all access will require awaiting the result.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
created-by: Next.js team PRs by the Next.js team. tests Turbopack Related to Turbopack with Next.js. type: next
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants