next 15.3.0-canary.32 → 15.3.0-canary.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/bin/next +1 -1
  2. package/dist/build/index.js +3 -4
  3. package/dist/build/index.js.map +1 -1
  4. package/dist/build/swc/index.js +1 -1
  5. package/dist/build/webpack-config.js +2 -2
  6. package/dist/cli/next-start.js +0 -5
  7. package/dist/cli/next-start.js.map +1 -1
  8. package/dist/client/app-bootstrap.js +1 -1
  9. package/dist/client/index.js +1 -1
  10. package/dist/compiled/next-server/server.runtime.prod.js +1 -1
  11. package/dist/compiled/next-server/server.runtime.prod.js.map +1 -1
  12. package/dist/esm/build/index.js +3 -4
  13. package/dist/esm/build/index.js.map +1 -1
  14. package/dist/esm/build/swc/index.js +1 -1
  15. package/dist/esm/build/webpack-config.js +2 -2
  16. package/dist/esm/client/app-bootstrap.js +1 -1
  17. package/dist/esm/client/index.js +1 -1
  18. package/dist/esm/server/app-render/work-unit-async-storage.external.js +4 -1
  19. package/dist/esm/server/app-render/work-unit-async-storage.external.js.map +1 -1
  20. package/dist/esm/server/dev/hot-reloader-turbopack.js +1 -1
  21. package/dist/esm/server/dev/hot-reloader-webpack.js +1 -1
  22. package/dist/esm/server/lib/app-info-log.js +1 -1
  23. package/dist/esm/server/lib/start-server.js +1 -1
  24. package/dist/esm/server/next-server.js +1 -18
  25. package/dist/esm/server/next-server.js.map +1 -1
  26. package/dist/esm/server/next.js +0 -2
  27. package/dist/esm/server/next.js.map +1 -1
  28. package/dist/esm/server/use-cache/use-cache-wrapper.js +9 -5
  29. package/dist/esm/server/use-cache/use-cache-wrapper.js.map +1 -1
  30. package/dist/esm/shared/lib/canary-only.js +1 -1
  31. package/dist/server/app-render/work-unit-async-storage.external.d.ts +1 -1
  32. package/dist/server/app-render/work-unit-async-storage.external.js +4 -1
  33. package/dist/server/app-render/work-unit-async-storage.external.js.map +1 -1
  34. package/dist/server/dev/hot-reloader-turbopack.js +1 -1
  35. package/dist/server/dev/hot-reloader-webpack.js +1 -1
  36. package/dist/server/lib/app-info-log.js +1 -1
  37. package/dist/server/lib/start-server.js +1 -1
  38. package/dist/server/next-server.js +1 -18
  39. package/dist/server/next-server.js.map +1 -1
  40. package/dist/server/next.js +0 -2
  41. package/dist/server/next.js.map +1 -1
  42. package/dist/server/use-cache/use-cache-wrapper.js +9 -5
  43. package/dist/server/use-cache/use-cache-wrapper.js.map +1 -1
  44. package/dist/shared/lib/canary-only.js +1 -1
  45. package/dist/telemetry/anonymous-meta.js +1 -1
  46. package/dist/telemetry/events/session-stopped.js +2 -2
  47. package/dist/telemetry/events/version.js +2 -2
  48. package/package.json +15 -15
@@ -11,7 +11,7 @@ import { isDeepStrictEqual } from 'util';
11
11
  import { getDefineEnv } from '../webpack/plugins/define-env-plugin';
12
12
  import { getReactCompilerLoader } from '../get-babel-loader-config';
13
13
  import { TurbopackInternalError } from '../../shared/lib/turbopack/utils';
14
- const nextVersion = "15.3.0-canary.32";
14
+ const nextVersion = "15.3.0-canary.33";
15
15
  const ArchName = arch();
16
16
  const PlatformName = platform();
17
17
  function infoLog(...args) {
@@ -1543,7 +1543,7 @@ export default async function getBaseWebpackConfig(dir, { buildId, encryptionKey
1543
1543
  isClient && new CopyFilePlugin({
1544
1544
  // file path to build output of `@next/polyfill-nomodule`
1545
1545
  filePath: require.resolve('./polyfills/polyfill-nomodule'),
1546
- cacheKey: "15.3.0-canary.32",
1546
+ cacheKey: "15.3.0-canary.33",
1547
1547
  name: `static/chunks/polyfills${dev ? '' : '-[hash]'}.js`,
1548
1548
  minimize: false,
1549
1549
  info: {
@@ -1720,7 +1720,7 @@ export default async function getBaseWebpackConfig(dir, { buildId, encryptionKey
1720
1720
  // - Next.js location on disk (some loaders use absolute paths and some resolve options depend on absolute paths)
1721
1721
  // - Next.js version
1722
1722
  // - next.config.js keys that affect compilation
1723
- version: `${__dirname}|${"15.3.0-canary.32"}|${configVars}`,
1723
+ version: `${__dirname}|${"15.3.0-canary.33"}|${configVars}`,
1724
1724
  cacheDirectory: path.join(distDir, 'cache', 'webpack'),
1725
1725
  // For production builds, it's more efficient to compress all cache files together instead of compression each one individually.
1726
1726
  // So we disable compression here and allow the build runner to take care of compressing the cache as a whole.
@@ -3,7 +3,7 @@
3
3
  * sure the following scripts are executed in the correct order:
4
4
  * - Polyfills
5
5
  * - next/script with `beforeInteractive` strategy
6
- */ const version = "15.3.0-canary.32";
6
+ */ const version = "15.3.0-canary.33";
7
7
  window.next = {
8
8
  version,
9
9
  appDir: true
@@ -26,7 +26,7 @@ import { SearchParamsContext, PathParamsContext } from '../shared/lib/hooks-clie
26
26
  import { onRecoverableError } from './react-client-callbacks/on-recoverable-error';
27
27
  import tracer from './tracing/tracer';
28
28
  import { isNextRouterError } from './components/is-next-router-error';
29
- export const version = "15.3.0-canary.32";
29
+ export const version = "15.3.0-canary.33";
30
30
  export let router;
31
31
  export const emitter = mitt();
32
32
  const looseToArray = (input)=>[].slice.call(input);
@@ -61,8 +61,11 @@ export function getRenderResumeDataCache(workUnitStore) {
61
61
  }
62
62
  return null;
63
63
  }
64
- export function getHmrRefreshHash(workUnitStore) {
64
+ export function getHmrRefreshHash(workStore, workUnitStore) {
65
65
  var _workUnitStore_cookies_get;
66
+ if (!workStore.dev) {
67
+ return undefined;
68
+ }
66
69
  return workUnitStore.type === 'cache' ? workUnitStore.hmrRefreshHash : workUnitStore.type === 'request' ? (_workUnitStore_cookies_get = workUnitStore.cookies.get('__next_hmr_refresh_hash__')) == null ? void 0 : _workUnitStore_cookies_get.value : undefined;
67
70
  }
68
71
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/server/app-render/work-unit-async-storage.external.ts"],"sourcesContent":["import type { AsyncLocalStorage } from 'async_hooks'\nimport type { DraftModeProvider } from '../async-storage/draft-mode-provider'\nimport type { ResponseCookies } from '../web/spec-extension/cookies'\nimport type { ReadonlyHeaders } from '../web/spec-extension/adapters/headers'\nimport type { ReadonlyRequestCookies } from '../web/spec-extension/adapters/request-cookies'\nimport type { CacheSignal } from './cache-signal'\nimport type { DynamicTrackingState } from './dynamic-rendering'\n\n// Share the instance module in the next-shared layer\nimport { workUnitAsyncStorageInstance } from './work-unit-async-storage-instance' with { 'turbopack-transition': 'next-shared' }\nimport type { ServerComponentsHmrCache } from '../response-cache'\nimport type {\n RenderResumeDataCache,\n PrerenderResumeDataCache,\n} from '../resume-data-cache/resume-data-cache'\nimport type { Params } from '../request/params'\nimport type { ImplicitTags } from '../lib/implicit-tags'\nimport type { WorkStore } from './work-async-storage.external'\n\nexport type WorkUnitPhase = 'action' | 'render' | 'after'\n\nexport interface CommonWorkUnitStore {\n /** NOTE: Will be mutated as phases change */\n phase: WorkUnitPhase\n readonly implicitTags: ImplicitTags | undefined\n}\n\nexport interface RequestStore extends CommonWorkUnitStore {\n type: 'request'\n\n /**\n * The URL of the request. This only specifies the pathname and the search\n * part of the URL.\n */\n readonly url: {\n /**\n * The pathname of the requested URL.\n */\n readonly pathname: string\n\n /**\n * The search part of the requested URL. If the request did not provide a\n * search part, this will be an empty string.\n */\n readonly search: string\n }\n\n readonly headers: ReadonlyHeaders\n // This is mutable because we need to reassign it when transitioning from the action phase to the render phase.\n // The cookie object itself is deliberately read only and thus can't be updated.\n cookies: ReadonlyRequestCookies\n readonly mutableCookies: ResponseCookies\n readonly userspaceMutableCookies: ResponseCookies\n readonly draftMode: DraftModeProvider\n readonly isHmrRefresh?: boolean\n readonly serverComponentsHmrCache?: ServerComponentsHmrCache\n\n readonly rootParams: Params\n\n /**\n * The resume data cache for this request. This will be a immutable cache.\n */\n renderResumeDataCache: RenderResumeDataCache | null\n\n // DEV-only\n usedDynamic?: boolean\n prerenderPhase?: boolean\n}\n\n/**\n * The Prerender store is for tracking information related to prerenders.\n *\n * It can be used for both RSC and SSR prerendering and should be scoped as close\n * to the individual `renderTo...` API call as possible. To keep the type simple\n * we don't distinguish between RSC and SSR prerendering explicitly but instead\n * use conditional object properties to infer which mode we are in. For instance cache tracking\n * only needs to happen during the RSC prerender when we are prospectively prerendering\n * to fill all caches.\n */\nexport interface PrerenderStoreModern extends CommonWorkUnitStore {\n type: 'prerender'\n\n /**\n * This signal is aborted when the React render is complete. (i.e. it is the same signal passed to react)\n */\n readonly renderSignal: AbortSignal\n /**\n * This is the AbortController which represents the boundary between Prerender and dynamic. In some renders it is\n * the same as the controller for the renderSignal but in others it is a separate controller. It should be aborted\n * whenever the we are no longer in the prerender phase of rendering. Typically this is after one task or when you call\n * a sync API which requires the prerender to end immediately\n */\n readonly controller: AbortController\n\n /**\n * when not null this signal is used to track cache reads during prerendering and\n * to await all cache reads completing before aborting the prerender.\n */\n readonly cacheSignal: null | CacheSignal\n\n /**\n * During some prerenders we want to track dynamic access.\n */\n readonly dynamicTracking: null | DynamicTrackingState\n\n readonly rootParams: Params\n\n // Collected revalidate times and tags for this document during the prerender.\n revalidate: number // in seconds. 0 means dynamic. INFINITE_CACHE and higher means never revalidate.\n expire: number // server expiration time\n stale: number // client expiration time\n tags: null | string[]\n\n /**\n * The resume data cache for this prerender.\n */\n prerenderResumeDataCache: PrerenderResumeDataCache | null\n\n // DEV ONLY\n // When used this flag informs certain APIs to skip logging because we're\n // not part of the primary render path and are just prerendering to produce\n // validation results\n validating?: boolean\n}\n\nexport interface PrerenderStorePPR extends CommonWorkUnitStore {\n type: 'prerender-ppr'\n readonly rootParams: Params\n readonly dynamicTracking: null | DynamicTrackingState\n // Collected revalidate times and tags for this document during the prerender.\n revalidate: number // in seconds. 0 means dynamic. INFINITE_CACHE and higher means never revalidate.\n expire: number // server expiration time\n stale: number // client expiration time\n tags: null | string[]\n\n /**\n * The resume data cache for this prerender.\n */\n prerenderResumeDataCache: PrerenderResumeDataCache\n}\n\nexport interface PrerenderStoreLegacy extends CommonWorkUnitStore {\n type: 'prerender-legacy'\n readonly rootParams: Params\n // Collected revalidate times and tags for this document during the prerender.\n revalidate: number // in seconds. 0 means dynamic. INFINITE_CACHE and higher means never revalidate.\n expire: number // server expiration time\n stale: number // client expiration time\n tags: null | string[]\n}\n\nexport type PrerenderStore =\n | PrerenderStoreLegacy\n | PrerenderStorePPR\n | PrerenderStoreModern\n\nexport interface UseCacheStore extends CommonWorkUnitStore {\n type: 'cache'\n // Collected revalidate times and tags for this cache entry during the cache render.\n revalidate: number // implicit revalidate time from inner caches / fetches\n expire: number // server expiration time\n stale: number // client expiration time\n explicitRevalidate: undefined | number // explicit revalidate time from cacheLife() calls\n explicitExpire: undefined | number // server expiration time\n explicitStale: undefined | number // client expiration time\n tags: null | string[]\n readonly hmrRefreshHash: string | undefined\n readonly isHmrRefresh: boolean\n readonly serverComponentsHmrCache: ServerComponentsHmrCache | undefined\n readonly forceRevalidate: boolean\n // Draft mode is only available if the outer work unit store is a request\n // store and draft mode is enabled.\n readonly draftMode: DraftModeProvider | undefined\n}\n\nexport interface UnstableCacheStore extends CommonWorkUnitStore {\n type: 'unstable-cache'\n // Draft mode is only available if the outer work unit store is a request\n // store and draft mode is enabled.\n readonly draftMode: DraftModeProvider | undefined\n}\n\n/**\n * The Cache store is for tracking information inside a \"use cache\" or unstable_cache context.\n * Inside this context we should never expose any request or page specific information.\n */\nexport type CacheStore = UseCacheStore | UnstableCacheStore\n\nexport type WorkUnitStore = RequestStore | CacheStore | PrerenderStore\n\nexport type WorkUnitAsyncStorage = AsyncLocalStorage<WorkUnitStore>\n\nexport { workUnitAsyncStorageInstance as workUnitAsyncStorage }\n\nexport function getExpectedRequestStore(\n callingExpression: string\n): RequestStore {\n const workUnitStore = workUnitAsyncStorageInstance.getStore()\n\n if (!workUnitStore) {\n throwForMissingRequestStore(callingExpression)\n }\n\n switch (workUnitStore.type) {\n case 'request':\n return workUnitStore\n\n case 'prerender':\n case 'prerender-ppr':\n case 'prerender-legacy':\n // This should not happen because we should have checked it already.\n throw new Error(\n `\\`${callingExpression}\\` cannot be called inside a prerender. This is a bug in Next.js.`\n )\n\n case 'cache':\n throw new Error(\n `\\`${callingExpression}\\` cannot be called inside \"use cache\". Call it outside and pass an argument instead. Read more: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n\n case 'unstable-cache':\n throw new Error(\n `\\`${callingExpression}\\` cannot be called inside unstable_cache. Call it outside and pass an argument instead. Read more: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`\n )\n\n default:\n const _exhaustiveCheck: never = workUnitStore\n return _exhaustiveCheck\n }\n}\n\nexport function throwForMissingRequestStore(callingExpression: string): never {\n throw new Error(\n `\\`${callingExpression}\\` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`\n )\n}\n\nexport function getPrerenderResumeDataCache(\n workUnitStore: WorkUnitStore\n): PrerenderResumeDataCache | null {\n if (\n workUnitStore.type === 'prerender' ||\n workUnitStore.type === 'prerender-ppr'\n ) {\n return workUnitStore.prerenderResumeDataCache\n }\n\n return null\n}\n\nexport function getRenderResumeDataCache(\n workUnitStore: WorkUnitStore\n): RenderResumeDataCache | null {\n if (\n workUnitStore.type !== 'prerender-legacy' &&\n workUnitStore.type !== 'cache' &&\n workUnitStore.type !== 'unstable-cache'\n ) {\n if (workUnitStore.type === 'request') {\n return workUnitStore.renderResumeDataCache\n }\n\n // We return the mutable resume data cache here as an immutable version of\n // the cache as it can also be used for reading.\n return workUnitStore.prerenderResumeDataCache\n }\n\n return null\n}\n\nexport function getHmrRefreshHash(\n workUnitStore: WorkUnitStore\n): string | undefined {\n return workUnitStore.type === 'cache'\n ? workUnitStore.hmrRefreshHash\n : workUnitStore.type === 'request'\n ? workUnitStore.cookies.get('__next_hmr_refresh_hash__')?.value\n : undefined\n}\n\n/**\n * Returns a draft mode provider only if draft mode is enabled.\n */\nexport function getDraftModeProviderForCacheScope(\n workStore: WorkStore,\n workUnitStore: WorkUnitStore\n): DraftModeProvider | undefined {\n if (workStore.isDraftMode) {\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache':\n case 'request':\n return workUnitStore.draftMode\n default:\n return undefined\n }\n }\n\n return undefined\n}\n"],"names":["workUnitAsyncStorageInstance","workUnitAsyncStorage","getExpectedRequestStore","callingExpression","workUnitStore","getStore","throwForMissingRequestStore","type","Error","_exhaustiveCheck","getPrerenderResumeDataCache","prerenderResumeDataCache","getRenderResumeDataCache","renderResumeDataCache","getHmrRefreshHash","hmrRefreshHash","cookies","get","value","undefined","getDraftModeProviderForCacheScope","workStore","isDraftMode","draftMode"],"mappings":"AAQA,qDAAqD;AACrD,SAASA,4BAA4B,QAAQ,0CAA0C;IAAE,wBAAwB;AAAc,EAAC;AAuLhI,SAASA,gCAAgCC,oBAAoB,GAAE;AAE/D,OAAO,SAASC,wBACdC,iBAAyB;IAEzB,MAAMC,gBAAgBJ,6BAA6BK,QAAQ;IAE3D,IAAI,CAACD,eAAe;QAClBE,4BAA4BH;IAC9B;IAEA,OAAQC,cAAcG,IAAI;QACxB,KAAK;YACH,OAAOH;QAET,KAAK;QACL,KAAK;QACL,KAAK;YACH,oEAAoE;YACpE,MAAM,qBAEL,CAFK,IAAII,MACR,CAAC,EAAE,EAAEL,kBAAkB,iEAAiE,CAAC,GADrF,qBAAA;uBAAA;4BAAA;8BAAA;YAEN;QAEF,KAAK;YACH,MAAM,qBAEL,CAFK,IAAIK,MACR,CAAC,EAAE,EAAEL,kBAAkB,2JAA2J,CAAC,GAD/K,qBAAA;uBAAA;4BAAA;8BAAA;YAEN;QAEF,KAAK;YACH,MAAM,qBAEL,CAFK,IAAIK,MACR,CAAC,EAAE,EAAEL,kBAAkB,sKAAsK,CAAC,GAD1L,qBAAA;uBAAA;4BAAA;8BAAA;YAEN;QAEF;YACE,MAAMM,mBAA0BL;YAChC,OAAOK;IACX;AACF;AAEA,OAAO,SAASH,4BAA4BH,iBAAyB;IACnE,MAAM,qBAEL,CAFK,IAAIK,MACR,CAAC,EAAE,EAAEL,kBAAkB,iHAAiH,CAAC,GADrI,qBAAA;eAAA;oBAAA;sBAAA;IAEN;AACF;AAEA,OAAO,SAASO,4BACdN,aAA4B;IAE5B,IACEA,cAAcG,IAAI,KAAK,eACvBH,cAAcG,IAAI,KAAK,iBACvB;QACA,OAAOH,cAAcO,wBAAwB;IAC/C;IAEA,OAAO;AACT;AAEA,OAAO,SAASC,yBACdR,aAA4B;IAE5B,IACEA,cAAcG,IAAI,KAAK,sBACvBH,cAAcG,IAAI,KAAK,WACvBH,cAAcG,IAAI,KAAK,kBACvB;QACA,IAAIH,cAAcG,IAAI,KAAK,WAAW;YACpC,OAAOH,cAAcS,qBAAqB;QAC5C;QAEA,0EAA0E;QAC1E,gDAAgD;QAChD,OAAOT,cAAcO,wBAAwB;IAC/C;IAEA,OAAO;AACT;AAEA,OAAO,SAASG,kBACdV,aAA4B;QAKtBA;IAHN,OAAOA,cAAcG,IAAI,KAAK,UAC1BH,cAAcW,cAAc,GAC5BX,cAAcG,IAAI,KAAK,aACrBH,6BAAAA,cAAcY,OAAO,CAACC,GAAG,CAAC,iDAA1Bb,2BAAwDc,KAAK,GAC7DC;AACR;AAEA;;CAEC,GACD,OAAO,SAASC,kCACdC,SAAoB,EACpBjB,aAA4B;IAE5B,IAAIiB,UAAUC,WAAW,EAAE;QACzB,OAAQlB,cAAcG,IAAI;YACxB,KAAK;YACL,KAAK;YACL,KAAK;gBACH,OAAOH,cAAcmB,SAAS;YAChC;gBACE,OAAOJ;QACX;IACF;IAEA,OAAOA;AACT"}
1
+ {"version":3,"sources":["../../../src/server/app-render/work-unit-async-storage.external.ts"],"sourcesContent":["import type { AsyncLocalStorage } from 'async_hooks'\nimport type { DraftModeProvider } from '../async-storage/draft-mode-provider'\nimport type { ResponseCookies } from '../web/spec-extension/cookies'\nimport type { ReadonlyHeaders } from '../web/spec-extension/adapters/headers'\nimport type { ReadonlyRequestCookies } from '../web/spec-extension/adapters/request-cookies'\nimport type { CacheSignal } from './cache-signal'\nimport type { DynamicTrackingState } from './dynamic-rendering'\n\n// Share the instance module in the next-shared layer\nimport { workUnitAsyncStorageInstance } from './work-unit-async-storage-instance' with { 'turbopack-transition': 'next-shared' }\nimport type { ServerComponentsHmrCache } from '../response-cache'\nimport type {\n RenderResumeDataCache,\n PrerenderResumeDataCache,\n} from '../resume-data-cache/resume-data-cache'\nimport type { Params } from '../request/params'\nimport type { ImplicitTags } from '../lib/implicit-tags'\nimport type { WorkStore } from './work-async-storage.external'\n\nexport type WorkUnitPhase = 'action' | 'render' | 'after'\n\nexport interface CommonWorkUnitStore {\n /** NOTE: Will be mutated as phases change */\n phase: WorkUnitPhase\n readonly implicitTags: ImplicitTags | undefined\n}\n\nexport interface RequestStore extends CommonWorkUnitStore {\n type: 'request'\n\n /**\n * The URL of the request. This only specifies the pathname and the search\n * part of the URL.\n */\n readonly url: {\n /**\n * The pathname of the requested URL.\n */\n readonly pathname: string\n\n /**\n * The search part of the requested URL. If the request did not provide a\n * search part, this will be an empty string.\n */\n readonly search: string\n }\n\n readonly headers: ReadonlyHeaders\n // This is mutable because we need to reassign it when transitioning from the action phase to the render phase.\n // The cookie object itself is deliberately read only and thus can't be updated.\n cookies: ReadonlyRequestCookies\n readonly mutableCookies: ResponseCookies\n readonly userspaceMutableCookies: ResponseCookies\n readonly draftMode: DraftModeProvider\n readonly isHmrRefresh?: boolean\n readonly serverComponentsHmrCache?: ServerComponentsHmrCache\n\n readonly rootParams: Params\n\n /**\n * The resume data cache for this request. This will be a immutable cache.\n */\n renderResumeDataCache: RenderResumeDataCache | null\n\n // DEV-only\n usedDynamic?: boolean\n prerenderPhase?: boolean\n}\n\n/**\n * The Prerender store is for tracking information related to prerenders.\n *\n * It can be used for both RSC and SSR prerendering and should be scoped as close\n * to the individual `renderTo...` API call as possible. To keep the type simple\n * we don't distinguish between RSC and SSR prerendering explicitly but instead\n * use conditional object properties to infer which mode we are in. For instance cache tracking\n * only needs to happen during the RSC prerender when we are prospectively prerendering\n * to fill all caches.\n */\nexport interface PrerenderStoreModern extends CommonWorkUnitStore {\n type: 'prerender'\n\n /**\n * This signal is aborted when the React render is complete. (i.e. it is the same signal passed to react)\n */\n readonly renderSignal: AbortSignal\n /**\n * This is the AbortController which represents the boundary between Prerender and dynamic. In some renders it is\n * the same as the controller for the renderSignal but in others it is a separate controller. It should be aborted\n * whenever the we are no longer in the prerender phase of rendering. Typically this is after one task or when you call\n * a sync API which requires the prerender to end immediately\n */\n readonly controller: AbortController\n\n /**\n * when not null this signal is used to track cache reads during prerendering and\n * to await all cache reads completing before aborting the prerender.\n */\n readonly cacheSignal: null | CacheSignal\n\n /**\n * During some prerenders we want to track dynamic access.\n */\n readonly dynamicTracking: null | DynamicTrackingState\n\n readonly rootParams: Params\n\n // Collected revalidate times and tags for this document during the prerender.\n revalidate: number // in seconds. 0 means dynamic. INFINITE_CACHE and higher means never revalidate.\n expire: number // server expiration time\n stale: number // client expiration time\n tags: null | string[]\n\n /**\n * The resume data cache for this prerender.\n */\n prerenderResumeDataCache: PrerenderResumeDataCache | null\n\n // DEV ONLY\n // When used this flag informs certain APIs to skip logging because we're\n // not part of the primary render path and are just prerendering to produce\n // validation results\n validating?: boolean\n}\n\nexport interface PrerenderStorePPR extends CommonWorkUnitStore {\n type: 'prerender-ppr'\n readonly rootParams: Params\n readonly dynamicTracking: null | DynamicTrackingState\n // Collected revalidate times and tags for this document during the prerender.\n revalidate: number // in seconds. 0 means dynamic. INFINITE_CACHE and higher means never revalidate.\n expire: number // server expiration time\n stale: number // client expiration time\n tags: null | string[]\n\n /**\n * The resume data cache for this prerender.\n */\n prerenderResumeDataCache: PrerenderResumeDataCache\n}\n\nexport interface PrerenderStoreLegacy extends CommonWorkUnitStore {\n type: 'prerender-legacy'\n readonly rootParams: Params\n // Collected revalidate times and tags for this document during the prerender.\n revalidate: number // in seconds. 0 means dynamic. INFINITE_CACHE and higher means never revalidate.\n expire: number // server expiration time\n stale: number // client expiration time\n tags: null | string[]\n}\n\nexport type PrerenderStore =\n | PrerenderStoreLegacy\n | PrerenderStorePPR\n | PrerenderStoreModern\n\nexport interface UseCacheStore extends CommonWorkUnitStore {\n type: 'cache'\n // Collected revalidate times and tags for this cache entry during the cache render.\n revalidate: number // implicit revalidate time from inner caches / fetches\n expire: number // server expiration time\n stale: number // client expiration time\n explicitRevalidate: undefined | number // explicit revalidate time from cacheLife() calls\n explicitExpire: undefined | number // server expiration time\n explicitStale: undefined | number // client expiration time\n tags: null | string[]\n readonly hmrRefreshHash: string | undefined\n readonly isHmrRefresh: boolean\n readonly serverComponentsHmrCache: ServerComponentsHmrCache | undefined\n readonly forceRevalidate: boolean\n // Draft mode is only available if the outer work unit store is a request\n // store and draft mode is enabled.\n readonly draftMode: DraftModeProvider | undefined\n}\n\nexport interface UnstableCacheStore extends CommonWorkUnitStore {\n type: 'unstable-cache'\n // Draft mode is only available if the outer work unit store is a request\n // store and draft mode is enabled.\n readonly draftMode: DraftModeProvider | undefined\n}\n\n/**\n * The Cache store is for tracking information inside a \"use cache\" or unstable_cache context.\n * Inside this context we should never expose any request or page specific information.\n */\nexport type CacheStore = UseCacheStore | UnstableCacheStore\n\nexport type WorkUnitStore = RequestStore | CacheStore | PrerenderStore\n\nexport type WorkUnitAsyncStorage = AsyncLocalStorage<WorkUnitStore>\n\nexport { workUnitAsyncStorageInstance as workUnitAsyncStorage }\n\nexport function getExpectedRequestStore(\n callingExpression: string\n): RequestStore {\n const workUnitStore = workUnitAsyncStorageInstance.getStore()\n\n if (!workUnitStore) {\n throwForMissingRequestStore(callingExpression)\n }\n\n switch (workUnitStore.type) {\n case 'request':\n return workUnitStore\n\n case 'prerender':\n case 'prerender-ppr':\n case 'prerender-legacy':\n // This should not happen because we should have checked it already.\n throw new Error(\n `\\`${callingExpression}\\` cannot be called inside a prerender. This is a bug in Next.js.`\n )\n\n case 'cache':\n throw new Error(\n `\\`${callingExpression}\\` cannot be called inside \"use cache\". Call it outside and pass an argument instead. Read more: https://nextjs.org/docs/messages/next-request-in-use-cache`\n )\n\n case 'unstable-cache':\n throw new Error(\n `\\`${callingExpression}\\` cannot be called inside unstable_cache. Call it outside and pass an argument instead. Read more: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`\n )\n\n default:\n const _exhaustiveCheck: never = workUnitStore\n return _exhaustiveCheck\n }\n}\n\nexport function throwForMissingRequestStore(callingExpression: string): never {\n throw new Error(\n `\\`${callingExpression}\\` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`\n )\n}\n\nexport function getPrerenderResumeDataCache(\n workUnitStore: WorkUnitStore\n): PrerenderResumeDataCache | null {\n if (\n workUnitStore.type === 'prerender' ||\n workUnitStore.type === 'prerender-ppr'\n ) {\n return workUnitStore.prerenderResumeDataCache\n }\n\n return null\n}\n\nexport function getRenderResumeDataCache(\n workUnitStore: WorkUnitStore\n): RenderResumeDataCache | null {\n if (\n workUnitStore.type !== 'prerender-legacy' &&\n workUnitStore.type !== 'cache' &&\n workUnitStore.type !== 'unstable-cache'\n ) {\n if (workUnitStore.type === 'request') {\n return workUnitStore.renderResumeDataCache\n }\n\n // We return the mutable resume data cache here as an immutable version of\n // the cache as it can also be used for reading.\n return workUnitStore.prerenderResumeDataCache\n }\n\n return null\n}\n\nexport function getHmrRefreshHash(\n workStore: WorkStore,\n workUnitStore: WorkUnitStore\n): string | undefined {\n if (!workStore.dev) {\n return undefined\n }\n\n return workUnitStore.type === 'cache'\n ? workUnitStore.hmrRefreshHash\n : workUnitStore.type === 'request'\n ? workUnitStore.cookies.get('__next_hmr_refresh_hash__')?.value\n : undefined\n}\n\n/**\n * Returns a draft mode provider only if draft mode is enabled.\n */\nexport function getDraftModeProviderForCacheScope(\n workStore: WorkStore,\n workUnitStore: WorkUnitStore\n): DraftModeProvider | undefined {\n if (workStore.isDraftMode) {\n switch (workUnitStore.type) {\n case 'cache':\n case 'unstable-cache':\n case 'request':\n return workUnitStore.draftMode\n default:\n return undefined\n }\n }\n\n return undefined\n}\n"],"names":["workUnitAsyncStorageInstance","workUnitAsyncStorage","getExpectedRequestStore","callingExpression","workUnitStore","getStore","throwForMissingRequestStore","type","Error","_exhaustiveCheck","getPrerenderResumeDataCache","prerenderResumeDataCache","getRenderResumeDataCache","renderResumeDataCache","getHmrRefreshHash","workStore","dev","undefined","hmrRefreshHash","cookies","get","value","getDraftModeProviderForCacheScope","isDraftMode","draftMode"],"mappings":"AAQA,qDAAqD;AACrD,SAASA,4BAA4B,QAAQ,0CAA0C;IAAE,wBAAwB;AAAc,EAAC;AAuLhI,SAASA,gCAAgCC,oBAAoB,GAAE;AAE/D,OAAO,SAASC,wBACdC,iBAAyB;IAEzB,MAAMC,gBAAgBJ,6BAA6BK,QAAQ;IAE3D,IAAI,CAACD,eAAe;QAClBE,4BAA4BH;IAC9B;IAEA,OAAQC,cAAcG,IAAI;QACxB,KAAK;YACH,OAAOH;QAET,KAAK;QACL,KAAK;QACL,KAAK;YACH,oEAAoE;YACpE,MAAM,qBAEL,CAFK,IAAII,MACR,CAAC,EAAE,EAAEL,kBAAkB,iEAAiE,CAAC,GADrF,qBAAA;uBAAA;4BAAA;8BAAA;YAEN;QAEF,KAAK;YACH,MAAM,qBAEL,CAFK,IAAIK,MACR,CAAC,EAAE,EAAEL,kBAAkB,2JAA2J,CAAC,GAD/K,qBAAA;uBAAA;4BAAA;8BAAA;YAEN;QAEF,KAAK;YACH,MAAM,qBAEL,CAFK,IAAIK,MACR,CAAC,EAAE,EAAEL,kBAAkB,sKAAsK,CAAC,GAD1L,qBAAA;uBAAA;4BAAA;8BAAA;YAEN;QAEF;YACE,MAAMM,mBAA0BL;YAChC,OAAOK;IACX;AACF;AAEA,OAAO,SAASH,4BAA4BH,iBAAyB;IACnE,MAAM,qBAEL,CAFK,IAAIK,MACR,CAAC,EAAE,EAAEL,kBAAkB,iHAAiH,CAAC,GADrI,qBAAA;eAAA;oBAAA;sBAAA;IAEN;AACF;AAEA,OAAO,SAASO,4BACdN,aAA4B;IAE5B,IACEA,cAAcG,IAAI,KAAK,eACvBH,cAAcG,IAAI,KAAK,iBACvB;QACA,OAAOH,cAAcO,wBAAwB;IAC/C;IAEA,OAAO;AACT;AAEA,OAAO,SAASC,yBACdR,aAA4B;IAE5B,IACEA,cAAcG,IAAI,KAAK,sBACvBH,cAAcG,IAAI,KAAK,WACvBH,cAAcG,IAAI,KAAK,kBACvB;QACA,IAAIH,cAAcG,IAAI,KAAK,WAAW;YACpC,OAAOH,cAAcS,qBAAqB;QAC5C;QAEA,0EAA0E;QAC1E,gDAAgD;QAChD,OAAOT,cAAcO,wBAAwB;IAC/C;IAEA,OAAO;AACT;AAEA,OAAO,SAASG,kBACdC,SAAoB,EACpBX,aAA4B;QAStBA;IAPN,IAAI,CAACW,UAAUC,GAAG,EAAE;QAClB,OAAOC;IACT;IAEA,OAAOb,cAAcG,IAAI,KAAK,UAC1BH,cAAcc,cAAc,GAC5Bd,cAAcG,IAAI,KAAK,aACrBH,6BAAAA,cAAce,OAAO,CAACC,GAAG,CAAC,iDAA1BhB,2BAAwDiB,KAAK,GAC7DJ;AACR;AAEA;;CAEC,GACD,OAAO,SAASK,kCACdP,SAAoB,EACpBX,aAA4B;IAE5B,IAAIW,UAAUQ,WAAW,EAAE;QACzB,OAAQnB,cAAcG,IAAI;YACxB,KAAK;YACL,KAAK;YACL,KAAK;gBACH,OAAOH,cAAcoB,SAAS;YAChC;gBACE,OAAOP;QACX;IACF;IAEA,OAAOA;AACT"}
@@ -83,7 +83,7 @@ export async function createHotReloaderTurbopack(opts, serverFields, distDir, re
83
83
  }
84
84
  const hasRewrites = opts.fsChecker.rewrites.afterFiles.length > 0 || opts.fsChecker.rewrites.beforeFiles.length > 0 || opts.fsChecker.rewrites.fallback.length > 0;
85
85
  const hotReloaderSpan = trace('hot-reloader', undefined, {
86
- version: "15.3.0-canary.32"
86
+ version: "15.3.0-canary.33"
87
87
  });
88
88
  // Ensure the hotReloaderSpan is flushed immediately as it's the parentSpan for all processing
89
89
  // of the current `next dev` invocation.
@@ -181,7 +181,7 @@ export default class HotReloaderWebpack {
181
181
  this.previewProps = previewProps;
182
182
  this.rewrites = rewrites;
183
183
  this.hotReloaderSpan = trace('hot-reloader', undefined, {
184
- version: "15.3.0-canary.32"
184
+ version: "15.3.0-canary.33"
185
185
  });
186
186
  // Ensure the hotReloaderSpan is flushed immediately as it's the parentSpan for all processing
187
187
  // of the current `next dev` invocation.
@@ -12,7 +12,7 @@ export function logStartInfo({ networkUrl, appUrl, envInfo, experimentalFeatures
12
12
  } else {
13
13
  bundlerSuffix = '';
14
14
  }
15
- Log.bootstrap(`${bold(purple(`${Log.prefixes.ready} Next.js ${"15.3.0-canary.32"}`))}${bundlerSuffix}`);
15
+ Log.bootstrap(`${bold(purple(`${Log.prefixes.ready} Next.js ${"15.3.0-canary.33"}`))}${bundlerSuffix}`);
16
16
  if (appUrl) {
17
17
  Log.bootstrap(`- Local: ${appUrl}`);
18
18
  }
@@ -43,7 +43,7 @@ export async function getRequestHandlers({ dir, port, isDev, onDevServerCleanup,
43
43
  export async function startServer(serverOptions) {
44
44
  const { dir, isDev, hostname, minimalMode, allowRetry, keepAliveTimeout, selfSignedCertificate } = serverOptions;
45
45
  let { port } = serverOptions;
46
- process.title = `next-server (v${"15.3.0-canary.32"})`;
46
+ process.title = `next-server (v${"15.3.0-canary.33"})`;
47
47
  let handlersReady = ()=>{};
48
48
  let handlersError = ()=>{};
49
49
  let handlersPromise = new Promise((resolve, reject)=>{
@@ -77,7 +77,7 @@ function getMiddlewareMatcher(info) {
77
77
  }
78
78
  export default class NextNodeServer extends BaseServer {
79
79
  constructor(options){
80
- var _options_conf_experimental_sri, _options_conf_experimental, _this_nextConfig_experimental;
80
+ var _options_conf_experimental_sri, _options_conf_experimental;
81
81
  // Initialize super class
82
82
  super(options), this.registeredInstrumentation = false, this.cleanupListeners = new AsyncCallbackSet(), this.handleNextImageRequest = async (req, res, parsedUrl)=>{
83
83
  if (!parsedUrl.pathname || !parsedUrl.pathname.startsWith('/_next/image')) {
@@ -335,23 +335,6 @@ export default class NextNodeServer extends BaseServer {
335
335
  const isDev = options.dev ?? false;
336
336
  this.isDev = isDev;
337
337
  this.sriEnabled = Boolean((_options_conf_experimental = options.conf.experimental) == null ? void 0 : (_options_conf_experimental_sri = _options_conf_experimental.sri) == null ? void 0 : _options_conf_experimental_sri.algorithm);
338
- // @ts-expect-error internal field not publicly exposed
339
- const isTurbopackBuild = (_this_nextConfig_experimental = this.nextConfig.experimental) == null ? void 0 : _this_nextConfig_experimental.isTurbopackBuild;
340
- if (!isDev && typeof isTurbopackBuild !== 'undefined') {
341
- if (process.env.TURBOPACK && !isTurbopackBuild) {
342
- throw Object.defineProperty(new Error(`Invariant: --turbopack is set but the build used Webpack`), "__NEXT_ERROR_CODE", {
343
- value: "E669",
344
- enumerable: false,
345
- configurable: true
346
- });
347
- } else if (!process.env.TURBOPACK && isTurbopackBuild) {
348
- throw Object.defineProperty(new Error(`Invariant: --turbopack is not set but the build used Turbopack. Add --turbopack to "next start".`), "__NEXT_ERROR_CODE", {
349
- value: "E670",
350
- enumerable: false,
351
- configurable: true
352
- });
353
- }
354
- }
355
338
  /**
356
339
  * This sets environment variable to be used at the time of SSR by head.tsx.
357
340
  * Using this from process.env allows targeting SSR by calling