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

Rename swrDelta config to expireTime #71159

Merged
merged 5 commits into from
Oct 12, 2024

Conversation

ijjk
Copy link
Member

@ijjk ijjk commented Oct 11, 2024

As discussed this updates the swrDelta config to expireTime as it's more clear what the config is doing since it's how long the cache is allowed to be kept before it's fully expired.

@ijjk ijjk added created-by: Next.js team PRs by the Next.js team. Documentation Related to Next.js' official documentation. type: next labels Oct 11, 2024
Copy link

vercel bot commented Oct 11, 2024

Notifying the following users due to files changed in this PR based on this repo's notify modifiers:

@timneutkens, @shuding, @huozhi:

packages/next/src/server/config.ts

@ijjk ijjk enabled auto-merge (squash) October 11, 2024 19:51
Copy link
Member

@ztanner ztanner left a comment

Choose a reason for hiding this comment

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

Should we warn that this flag was moved out of experimental and specify the new config name?

NVM, see below 😆

Co-authored-by: Zack Tanner <[email protected]>
Co-authored-by: Sebastian Markbåge <[email protected]>
@ijjk
Copy link
Member Author

ijjk commented Oct 12, 2024

Stats from current PR

Default Build (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary ijjk/next.js ijjk/swr-delta-expire-time Change
buildDuration 19s 16.3s N/A
buildDurationCached 15.4s 13.5s N/A
nodeModulesSize 371 MB 371 MB ⚠️ +4.1 kB
nextStartRea..uration (ms) 415ms 437ms N/A
Client Bundles (main, webpack)
vercel/next.js canary ijjk/next.js ijjk/swr-delta-expire-time Change
4053-HASH.js gzip 5.27 kB 5.27 kB
6569-HASH.js gzip 43.7 kB 43.7 kB N/A
6f96a7ca-HASH.js gzip 52.6 kB 52.6 kB N/A
7653.HASH.js gzip 169 B 169 B
framework-HASH.js gzip 57.4 kB 57.4 kB N/A
main-app-HASH.js gzip 235 B 233 B N/A
main-HASH.js gzip 32.8 kB 32.8 kB N/A
webpack-HASH.js gzip 1.71 kB 1.71 kB N/A
Overall change 5.44 kB 5.44 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary ijjk/next.js ijjk/swr-delta-expire-time 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 ijjk/next.js ijjk/swr-delta-expire-time Change
_app-HASH.js gzip 194 B 193 B N/A
_error-HASH.js gzip 191 B 192 B N/A
amp-HASH.js gzip 509 B 511 B N/A
css-HASH.js gzip 343 B 342 B N/A
dynamic-HASH.js gzip 1.84 kB 1.84 kB N/A
edge-ssr-HASH.js gzip 266 B 265 B N/A
head-HASH.js gzip 365 B 364 B N/A
hooks-HASH.js gzip 392 B 392 B
image-HASH.js gzip 4.4 kB 4.4 kB N/A
index-HASH.js gzip 269 B 268 B N/A
link-HASH.js gzip 2.78 kB 2.77 kB N/A
routerDirect..HASH.js gzip 327 B 328 B N/A
script-HASH.js gzip 396 B 395 B N/A
withRouter-HASH.js gzip 323 B 324 B N/A
1afbb74e6ecf..834.css gzip 106 B 106 B
Overall change 498 B 498 B
Client Build Manifests
vercel/next.js canary ijjk/next.js ijjk/swr-delta-expire-time Change
_buildManifest.js gzip 748 B 749 B N/A
Overall change 0 B 0 B
Rendered Page Sizes
vercel/next.js canary ijjk/next.js ijjk/swr-delta-expire-time Change
index.html gzip 519 B 523 B N/A
link.html gzip 533 B 537 B N/A
withRouter.html gzip 514 B 518 B N/A
Overall change 0 B 0 B
Edge SSR bundle Size
vercel/next.js canary ijjk/next.js ijjk/swr-delta-expire-time Change
edge-ssr.js gzip 129 kB 129 kB N/A
page.js gzip 188 kB 188 kB N/A
Overall change 0 B 0 B
Middleware size
vercel/next.js canary ijjk/next.js ijjk/swr-delta-expire-time Change
middleware-b..fest.js gzip 666 B 669 B N/A
middleware-r..fest.js gzip 156 B 156 B
middleware.js gzip 30.7 kB 30.7 kB N/A
edge-runtime..pack.js gzip 844 B 844 B
Overall change 1 kB 1 kB
Next Runtimes
vercel/next.js canary ijjk/next.js ijjk/swr-delta-expire-time 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 313 kB 313 kB N/A
app-page-exp..prod.js gzip 120 kB 120 kB
app-page-tur..prod.js gzip 133 kB 133 kB
app-page-tur..prod.js gzip 128 kB 128 kB
app-page.run...dev.js gzip 304 kB 304 kB N/A
app-page.run..prod.js gzip 115 kB 115 kB
app-route-ex...dev.js gzip 35 kB 35 kB
app-route-ex..prod.js gzip 23.6 kB 23.6 kB
app-route-tu..prod.js gzip 23.7 kB 23.7 kB
app-route-tu..prod.js gzip 23.4 kB 23.4 kB
app-route.ru...dev.js gzip 36.6 kB 36.6 kB
app-route.ru..prod.js gzip 23.4 kB 23.4 kB
pages-api-tu..prod.js gzip 9.61 kB 9.61 kB
pages-api.ru...dev.js gzip 11.4 kB 11.4 kB
pages-api.ru..prod.js gzip 9.61 kB 9.61 kB
pages-turbo...prod.js gzip 20.9 kB 20.9 kB N/A
pages.runtim...dev.js gzip 26.5 kB 26.5 kB N/A
pages.runtim..prod.js gzip 20.9 kB 20.9 kB N/A
server.runti..prod.js gzip 59.7 kB 59.7 kB N/A
Overall change 694 kB 694 kB
build cache Overall increase ⚠️
vercel/next.js canary ijjk/next.js ijjk/swr-delta-expire-time Change
0.pack gzip 1.84 MB 1.84 MB N/A
index.pack gzip 142 kB 142 kB ⚠️ +230 B
Overall change 142 kB 142 kB ⚠️ +230 B
Diff details
Diff for page.js

Diff too large to display

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],
   {
-    /***/ 5: /***/ (
+    /***/ 6987: /***/ (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/image",
         function () {
-          return __webpack_require__(3284);
+          return __webpack_require__(4619);
         },
       ]);
       if (false) {
@@ -18,7 +18,7 @@
       /***/
     },
 
-    /***/ 1363: /***/ (module, exports, __webpack_require__) => {
+    /***/ 3287: /***/ (module, exports, __webpack_require__) => {
       "use strict";
       /* __next_internal_client_entry_do_not_use__  cjs */
       Object.defineProperty(exports, "__esModule", {
@@ -40,17 +40,17 @@
         __webpack_require__(8186)
       );
       const _head = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(1833)
+        __webpack_require__(7067)
       );
-      const _getimgprops = __webpack_require__(3128);
-      const _imageconfig = __webpack_require__(424);
-      const _imageconfigcontextsharedruntime = __webpack_require__(5438);
-      const _warnonce = __webpack_require__(5764);
-      const _routercontextsharedruntime = __webpack_require__(8196);
+      const _getimgprops = __webpack_require__(2807);
+      const _imageconfig = __webpack_require__(6219);
+      const _imageconfigcontextsharedruntime = __webpack_require__(394);
+      const _warnonce = __webpack_require__(463);
+      const _routercontextsharedruntime = __webpack_require__(1359);
       const _imageloader = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(7592)
+        __webpack_require__(3587)
       );
-      const _usemergedref = __webpack_require__(4721);
+      const _usemergedref = __webpack_require__(183);
       // This is replaced by webpack define plugin
       const configEnv = {
         deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
@@ -371,7 +371,7 @@
       /***/
     },
 
-    /***/ 4721: /***/ (module, exports, __webpack_require__) => {
+    /***/ 183: /***/ (module, exports, __webpack_require__) => {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -432,7 +432,7 @@
       /***/
     },
 
-    /***/ 3128: /***/ (
+    /***/ 2807: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -448,9 +448,9 @@
           return getImgProps;
         },
       });
-      const _warnonce = __webpack_require__(5764);
-      const _imageblursvg = __webpack_require__(8661);
-      const _imageconfig = __webpack_require__(424);
+      const _warnonce = __webpack_require__(463);
+      const _imageblursvg = __webpack_require__(4908);
+      const _imageconfig = __webpack_require__(6219);
       const VALID_LOADING_VALUES =
         /* unused pure expression or super */ null && [
           "lazy",
@@ -823,7 +823,7 @@
       /***/
     },
 
-    /***/ 8661: /***/ (__unused_webpack_module, exports) => {
+    /***/ 4908: /***/ (__unused_webpack_module, exports) => {
       "use strict";
       /**
        * A shared function, used on both client and server, to generate a SVG blur placeholder.
@@ -878,7 +878,7 @@
       /***/
     },
 
-    /***/ 8382: /***/ (
+    /***/ 1842: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -905,10 +905,10 @@
         },
       });
       const _interop_require_default = __webpack_require__(9608);
-      const _getimgprops = __webpack_require__(3128);
-      const _imagecomponent = __webpack_require__(1363);
+      const _getimgprops = __webpack_require__(2807);
+      const _imagecomponent = __webpack_require__(3287);
       const _imageloader = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(7592)
+        __webpack_require__(3587)
       );
       function getImageProps(imgProps) {
         const { props } = (0, _getimgprops.getImgProps)(imgProps, {
@@ -940,7 +940,7 @@
       /***/
     },
 
-    /***/ 7592: /***/ (__unused_webpack_module, exports) => {
+    /***/ 3587: /***/ (__unused_webpack_module, exports) => {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -975,7 +975,7 @@
       /***/
     },
 
-    /***/ 3284: /***/ (
+    /***/ 4619: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -992,8 +992,8 @@
 
       // EXTERNAL MODULE: ./node_modules/.pnpm/[email protected]/node_modules/react/jsx-runtime.js
       var jsx_runtime = __webpack_require__(3970);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-70fb1363-20241010_re_ej6p4ob2iqs5g3c6x2lcn37z5e/node_modules/next/image.js
-      var next_image = __webpack_require__(4281);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-70fb1363-20241010_re_5nmd7l34pjgqifaws33tkiz5ni/node_modules/next/image.js
+      var next_image = __webpack_require__(6183);
       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",
@@ -1023,12 +1023,12 @@
       /***/
     },
 
-    /***/ 4281: /***/ (
+    /***/ 6183: /***/ (
       module,
       __unused_webpack_exports,
       __webpack_require__
     ) => {
-      module.exports = __webpack_require__(8382);
+      module.exports = __webpack_require__(1842);
 
       /***/
     },
@@ -1038,7 +1038,7 @@
     /******/ var __webpack_exec__ = (moduleId) =>
       __webpack_require__((__webpack_require__.s = moduleId));
     /******/ __webpack_require__.O(0, [2888, 9774, 179], () =>
-      __webpack_exec__(5)
+      __webpack_exec__(6987)
     );
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for 4053-HASH.js
@@ -1,8 +1,8 @@
 "use strict";
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
-  [4053],
+  [8793],
   {
-    /***/ 4053: /***/ (module, exports, __webpack_require__) => {
+    /***/ 8793: /***/ (module, exports, __webpack_require__) => {
       /* __next_internal_client_entry_do_not_use__  cjs */
       Object.defineProperty(exports, "__esModule", {
         value: true,
@@ -13,27 +13,27 @@
           return Image;
         },
       });
-      const _interop_require_default = __webpack_require__(581);
-      const _interop_require_wildcard = __webpack_require__(8487);
-      const _jsxruntime = __webpack_require__(5696);
+      const _interop_require_default = __webpack_require__(1759);
+      const _interop_require_wildcard = __webpack_require__(5656);
+      const _jsxruntime = __webpack_require__(6182);
       const _react = /*#__PURE__*/ _interop_require_wildcard._(
-        __webpack_require__(1113)
+        __webpack_require__(9668)
       );
       const _reactdom = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(9212)
+        __webpack_require__(5952)
       );
       const _head = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(4580)
+        __webpack_require__(5479)
       );
-      const _getimgprops = __webpack_require__(53);
-      const _imageconfig = __webpack_require__(1210);
-      const _imageconfigcontextsharedruntime = __webpack_require__(7961);
-      const _warnonce = __webpack_require__(3745);
-      const _routercontextsharedruntime = __webpack_require__(9909);
+      const _getimgprops = __webpack_require__(7593);
+      const _imageconfig = __webpack_require__(4885);
+      const _imageconfigcontextsharedruntime = __webpack_require__(9147);
+      const _warnonce = __webpack_require__(1800);
+      const _routercontextsharedruntime = __webpack_require__(3585);
       const _imageloader = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(1424)
+        __webpack_require__(500)
       );
-      const _usemergedref = __webpack_require__(671);
+      const _usemergedref = __webpack_require__(2487);
       // This is replaced by webpack define plugin
       const configEnv = {
         deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
@@ -355,7 +355,7 @@
       /***/
     },
 
-    /***/ 671: /***/ (module, exports, __webpack_require__) => {
+    /***/ 2487: /***/ (module, exports, __webpack_require__) => {
       Object.defineProperty(exports, "__esModule", {
         value: true,
       });
@@ -365,7 +365,7 @@
           return useMergedRef;
         },
       });
-      const _react = __webpack_require__(1113);
+      const _react = __webpack_require__(9668);
       function useMergedRef(refA, refB) {
         const cleanupA = (0, _react.useRef)(() => {});
         const cleanupB = (0, _react.useRef)(() => {});
@@ -414,7 +414,7 @@
       /***/
     },
 
-    /***/ 2904: /***/ (
+    /***/ 3455: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -428,9 +428,9 @@
           return AmpStateContext;
         },
       });
-      const _interop_require_default = __webpack_require__(581);
+      const _interop_require_default = __webpack_require__(1759);
       const _react = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(1113)
+        __webpack_require__(9668)
       );
       const AmpStateContext = _react.default.createContext({});
       if (false) {
@@ -439,7 +439,7 @@
       /***/
     },
 
-    /***/ 3468: /***/ (__unused_webpack_module, exports) => {
+    /***/ 3005: /***/ (__unused_webpack_module, exports) => {
       Object.defineProperty(exports, "__esModule", {
         value: true,
       });
@@ -461,7 +461,11 @@
       /***/
     },
 
-    /***/ 53: /***/ (__unused_webpack_module, exports, __webpack_require__) => {
+    /***/ 7593: /***/ (
+      __unused_webpack_module,
+      exports,
+      __webpack_require__
+    ) => {
       Object.defineProperty(exports, "__esModule", {
         value: true,
       });
@@ -471,9 +475,9 @@
           return getImgProps;
         },
       });
-      const _warnonce = __webpack_require__(3745);
-      const _imageblursvg = __webpack_require__(7184);
-      const _imageconfig = __webpack_require__(1210);
+      const _warnonce = __webpack_require__(1800);
+      const _imageblursvg = __webpack_require__(4457);
+      const _imageconfig = __webpack_require__(4885);
       const VALID_LOADING_VALUES =
         /* unused pure expression or super */ null && [
           "lazy",
@@ -846,8 +850,8 @@
       /***/
     },
 
-    /***/ 4580: /***/ (module, exports, __webpack_require__) => {
-      /* provided dependency */ var process = __webpack_require__(1964);
+    /***/ 5479: /***/ (module, exports, __webpack_require__) => {
+      /* provided dependency */ var process = __webpack_require__(4898);
       /* __next_internal_client_entry_do_not_use__  cjs */
       Object.defineProperty(exports, "__esModule", {
         value: true,
@@ -868,19 +872,19 @@
           return defaultHead;
         },
       });
-      const _interop_require_default = __webpack_require__(581);
-      const _interop_require_wildcard = __webpack_require__(8487);
-      const _jsxruntime = __webpack_require__(5696);
+      const _interop_require_default = __webpack_require__(1759);
+      const _interop_require_wildcard = __webpack_require__(5656);
+      const _jsxruntime = __webpack_require__(6182);
       const _react = /*#__PURE__*/ _interop_require_wildcard._(
-        __webpack_require__(1113)
+        __webpack_require__(9668)
       );
       const _sideeffect = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(3242)
+        __webpack_require__(9183)
       );
-      const _ampcontextsharedruntime = __webpack_require__(2904);
-      const _headmanagercontextsharedruntime = __webpack_require__(9399);
-      const _ampmode = __webpack_require__(3468);
-      const _warnonce = __webpack_require__(3745);
+      const _ampcontextsharedruntime = __webpack_require__(3455);
+      const _headmanagercontextsharedruntime = __webpack_require__(5755);
+      const _ampmode = __webpack_require__(3005);
+      const _warnonce = __webpack_require__(1800);
       function defaultHead(inAmpMode) {
         if (inAmpMode === void 0) inAmpMode = false;
         const head = [
@@ -1064,7 +1068,7 @@
       /***/
     },
 
-    /***/ 7184: /***/ (__unused_webpack_module, exports) => {
+    /***/ 4457: /***/ (__unused_webpack_module, exports) => {
       /**
        * A shared function, used on both client and server, to generate a SVG blur placeholder.
        */
@@ -1118,7 +1122,7 @@
       /***/
     },
 
-    /***/ 7961: /***/ (
+    /***/ 9147: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -1132,11 +1136,11 @@
           return ImageConfigContext;
         },
       });
-      const _interop_require_default = __webpack_require__(581);
+      const _interop_require_default = __webpack_require__(1759);
       const _react = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(1113)
+        __webpack_require__(9668)
       );
-      const _imageconfig = __webpack_require__(1210);
+      const _imageconfig = __webpack_require__(4885);
       const ImageConfigContext = _react.default.createContext(
         _imageconfig.imageConfigDefault
       );
@@ -1146,7 +1150,7 @@
       /***/
     },
 
-    /***/ 1210: /***/ (__unused_webpack_module, exports) => {
+    /***/ 4885: /***/ (__unused_webpack_module, exports) => {
       Object.defineProperty(exports, "__esModule", {
         value: true,
       });
@@ -1194,7 +1198,7 @@
       /***/
     },
 
-    /***/ 1424: /***/ (__unused_webpack_module, exports) => {
+    /***/ 500: /***/ (__unused_webpack_module, exports) => {
       Object.defineProperty(exports, "__esModule", {
         value: true,
       });
@@ -1227,7 +1231,7 @@
       /***/
     },
 
-    /***/ 9909: /***/ (
+    /***/ 3585: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -1241,9 +1245,9 @@
           return RouterContext;
         },
       });
-      const _interop_require_default = __webpack_require__(581);
+      const _interop_require_default = __webpack_require__(1759);
       const _react = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(1113)
+        __webpack_require__(9668)
       );
       const RouterContext = _react.default.createContext(null);
       if (false) {
@@ -1252,7 +1256,7 @@
       /***/
     },
 
-    /***/ 3242: /***/ (
+    /***/ 9183: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -1266,7 +1270,7 @@
           return SideEffect;
         },
       });
-      const _react = __webpack_require__(1113);
+      const _react = __webpack_require__(9668);
       const isServer = typeof window === "undefined";
       const useClientOnlyLayoutEffect = isServer
         ? () => {}
Diff for pages-turbo...time.prod.js
@@ -19,8 +19,8 @@ Reason: ${n}`)}}function $(e,t,r){if(!T(r))throw new N(e,t,"",`Props must be ret
 
 Keys that need to be moved: ${t.join(", ")}.
 Read more: https://nextjs.org/docs/messages/${r}`};function e1(e,t,r){let{destination:n,permanent:o,statusCode:s,basePath:a}=e,i=[],l=void 0!==s,d=void 0!==o;d&&l?i.push("`permanent` and `statusCode` can not both be provided"):d&&"boolean"!=typeof o?i.push("`permanent` must be `true` or `false`"):l&&!er.has(s)&&i.push(`\`statusCode\` must undefined or one of ${[...er].join(", ")}`);let u=typeof n;"string"!==u&&i.push(`\`destination\` should be string but received ${u}`);let c=typeof a;if("undefined"!==c&&"boolean"!==c&&i.push(`\`basePath\` should be undefined or a false, received ${c}`),i.length>0)throw Error(`Invalid redirect object returned from ${r} for ${t.url}
-`+i.join(" and ")+"\nSee more info here: https://nextjs.org/docs/messages/invalid-redirect-gssp")}async function e4(n,s,a,i,l,d){var u,c;let p,h,m,f;(0,x.gk)({req:n},"cookies",(u=n.headers,function(){let{cookie:e}=u;if(!e)return{};let{parse:t}=r("./dist/compiled/cookie/index.js");return t(Array.isArray(e)?e.join("; "):e)}));let g={};if(g.assetQueryString=l.dev&&l.assetQueryString||"",l.dev&&!g.assetQueryString){let e=(n.headers["user-agent"]||"").toLowerCase();e.includes("safari")&&!e.includes("chrome")&&(g.assetQueryString=`?ts=${Date.now()}`)}l.deploymentId&&(g.assetQueryString+=`${g.assetQueryString?"&":"?"}dpl=${l.deploymentId}`),i=Object.assign({},i);let{err:v,dev:b=!1,ampPath:w="",pageConfig:S={},buildManifest:C,reactLoadableManifest:E,ErrorDebug:T,getStaticProps:L,getStaticPaths:N,getServerSideProps:k,isNextDataRequest:M,params:D,previewProps:F,basePath:q,images:B,runtime:G,isExperimentalCompile:K,swrDelta:ee}=l,{App:er}=d,ea=g.assetQueryString,ei=d.Document,el=l.Component,ed=!!i.__nextFallback,ep=i.__nextNotFoundSrcPage;!function(e){for(let t of eO)delete e[t]}(i);let eh=!!L,em=eh&&l.nextExport,ef=er.getInitialProps===er.origGetInitialProps,eg=!!(null==el?void 0:el.getInitialProps),ev=null==el?void 0:el.unstable_scriptLoader,ey=J(a),ex="/_error"===a&&el.getInitialProps===el.origGetInitialProps;l.nextExport&&eg&&!ex&&t(`Detected getInitialProps on page '${a}' while running export. It's recommended to use getStaticProps which has a more correct behavior for static exporting.
-Read more: https://nextjs.org/docs/messages/get-initial-props-export`);let eb=!eg&&ef&&!eh&&!k;if(eb&&!b&&K&&(s.setHeader("Cache-Control",function({revalidate:e,swrDelta:t}){let r=t?`stale-while-revalidate=${t}`:"stale-while-revalidate";return 0===e?"private, no-cache, no-store, max-age=0, must-revalidate":"number"==typeof e?`s-maxage=${e}, ${r}`:`s-maxage=${R.BR}, ${r}`}({revalidate:!1,swrDelta:ee})),eb=!1),eg&&eh)throw Error(R.wh+` ${a}`);if(eg&&k)throw Error(R.Wo+` ${a}`);if(k&&eh)throw Error(R.oL+` ${a}`);if(k&&"export"===l.nextConfigOutput)throw Error('getServerSideProps cannot be used with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export');if(N&&!ey)throw Error(`getStaticPaths is only allowed for dynamic SSG pages and was found on '${a}'.
+`+i.join(" and ")+"\nSee more info here: https://nextjs.org/docs/messages/invalid-redirect-gssp")}async function e4(n,s,a,i,l,d){var u,c;let p,h,m,f;(0,x.gk)({req:n},"cookies",(u=n.headers,function(){let{cookie:e}=u;if(!e)return{};let{parse:t}=r("./dist/compiled/cookie/index.js");return t(Array.isArray(e)?e.join("; "):e)}));let g={};if(g.assetQueryString=l.dev&&l.assetQueryString||"",l.dev&&!g.assetQueryString){let e=(n.headers["user-agent"]||"").toLowerCase();e.includes("safari")&&!e.includes("chrome")&&(g.assetQueryString=`?ts=${Date.now()}`)}l.deploymentId&&(g.assetQueryString+=`${g.assetQueryString?"&":"?"}dpl=${l.deploymentId}`),i=Object.assign({},i);let{err:v,dev:b=!1,ampPath:w="",pageConfig:S={},buildManifest:C,reactLoadableManifest:E,ErrorDebug:T,getStaticProps:L,getStaticPaths:N,getServerSideProps:k,isNextDataRequest:M,params:D,previewProps:F,basePath:q,images:B,runtime:G,isExperimentalCompile:K,expireTime:ee}=l,{App:er}=d,ea=g.assetQueryString,ei=d.Document,el=l.Component,ed=!!i.__nextFallback,ep=i.__nextNotFoundSrcPage;!function(e){for(let t of eO)delete e[t]}(i);let eh=!!L,em=eh&&l.nextExport,ef=er.getInitialProps===er.origGetInitialProps,eg=!!(null==el?void 0:el.getInitialProps),ev=null==el?void 0:el.unstable_scriptLoader,ey=J(a),ex="/_error"===a&&el.getInitialProps===el.origGetInitialProps;l.nextExport&&eg&&!ex&&t(`Detected getInitialProps on page '${a}' while running export. It's recommended to use getStaticProps which has a more correct behavior for static exporting.
+Read more: https://nextjs.org/docs/messages/get-initial-props-export`);let eb=!eg&&ef&&!eh&&!k;if(eb&&!b&&K&&(s.setHeader("Cache-Control",function({revalidate:e,expireTime:t}){let r="number"==typeof e&&void 0!==t?e>=t?"":`stale-while-revalidate=${t-e}`:"stale-while-revalidate";return 0===e?"private, no-cache, no-store, max-age=0, must-revalidate":"number"==typeof e?`s-maxage=${e}, ${r}`:`s-maxage=${R.BR}, ${r}`}({revalidate:!1,expireTime:ee})),eb=!1),eg&&eh)throw Error(R.wh+` ${a}`);if(eg&&k)throw Error(R.Wo+` ${a}`);if(k&&eh)throw Error(R.oL+` ${a}`);if(k&&"export"===l.nextConfigOutput)throw Error('getServerSideProps cannot be used with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export');if(N&&!ey)throw Error(`getStaticPaths is only allowed for dynamic SSG pages and was found on '${a}'.
 Read more: https://nextjs.org/docs/messages/non-dynamic-getstaticpaths-usage`);if(N&&!eh)throw Error(`getStaticPaths was added without a getStaticProps in ${a}. Without getStaticProps, getStaticPaths does nothing`);if(eh&&ey&&!N)throw Error(`getStaticPaths is required for dynamic SSG pages and is missing for '${a}'.
 Read more: https://nextjs.org/docs/messages/invalid-getstaticpaths-value`);let ew=l.resolvedAsPath||n.url;if(b){let{isValidElementType:e}=r("./dist/compiled/react-is/index.js");if(!e(el))throw Error(`The default export is not a React Component in page: "${a}"`);if(!e(er))throw Error('The default export is not a React Component in page: "/_app"');if(!e(ei))throw Error('The default export is not a React Component in page: "/_document"');if((eb||ed)&&(i={...i.amp?{amp:i.amp}:{}},ew=`${a}${n.url.endsWith("/")&&"/"!==a&&!ey?"/":""}`,n.url=a),"/404"===a&&(eg||k))throw Error(`\`pages/404\` ${R.Ei}`);if(j.includes(a)&&(eg||k))throw Error(`\`pages${a}\` ${R.Ei}`)}for(let e of["getStaticProps","getServerSideProps","getStaticPaths"])if(null==el?void 0:el[e])throw Error(`page ${a} ${e} ${R.lk}`);await H.preloadAll(),(eh||k)&&!ed&&F&&(m=!1!==(p=e(n,s,F,!!l.multiZoneDraftMode)));let eS=new eY(a,i,ew,{isFallback:ed},!!(k||eg||!ef&&!eh||K),q,l.locale,l.locales,l.defaultLocale,l.domainLocales,m,et(n,"isLocaleDomain")),eP={back(){eS.back()},forward(){eS.forward()},refresh(){eS.reload()},hmrRefresh(){},push(e,t){let{scroll:r}=void 0===t?{}:t;eS.push(e,void 0,{scroll:r})},replace(e,t){let{scroll:r}=void 0===t?{}:t;eS.replace(e,void 0,{scroll:r})},prefetch(e){eS.prefetch(e)}},e_={},eR=(0,_.createStyleRegistry)(),eC={ampFirst:!0===S.amp,hasQuery:!!i.amp,hybrid:"hybrid"===S.amp},ej=function(e){let{ampFirst:t=!1,hybrid:r=!1,hasQuery:n=!1}=void 0===e?{}:e;return t||r&&n}(eC),eE=function(e){void 0===e&&(e=!1);let t=[(0,y.jsx)("meta",{charSet:"utf-8"},"charset")];return e||t.push((0,y.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")),t}(ej),eN=[],eI={};ev&&(eI.beforeInteractive=[].concat(ev()).filter(e=>"beforeInteractive"===e.props.strategy).map(e=>e.props));let eM=({children:e})=>(0,y.jsx)(ez.Provider,{value:eP,children:(0,y.jsx)(eA.Provider,{value:eS.isReady&&eS.query?new URL(eS.asPath,"http://n").searchParams:new URLSearchParams,children:(0,y.jsx)(eH,{router:eS,isAutoExport:eb,children:(0,y.jsx)(ek.Provider,{value:function(e){if(!e.isReady||!e.query)return null;let t={};for(let r of Object.keys(function(e){let{parameterizedRoute:t,groups:r}=function(e){let t=ec(e).slice(1).split("/"),r={},n=1;return{parameterizedRoute:t.map(e=>{let t=W.find(t=>e.startsWith(t)),o=e.match(eq);if(t&&o){let{key:e,optional:s,repeat:a}=eB(o[1]);return r[e]={pos:n++,repeat:a,optional:s},"/"+eF(t)+"([^/]+?)"}if(!o)return"/"+eF(e);{let{key:e,repeat:t,optional:s}=eB(o[1]);return r[e]={pos:n++,repeat:t,optional:s},t?s?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}}).join(""),groups:r}}(e);return{re:RegExp("^"+t+"(?:/)?$"),groups:r}}(e.pathname).groups))t[r]=e.query[r];return t}(eS),children:(0,y.jsx)(z.Provider,{value:eS,children:(0,y.jsx)(O.Provider,{value:eC,children:(0,y.jsx)(A.Provider,{value:{updateHead:e=>{eE=e},updateScripts:e=>{e_=e},scripts:eI,mountedInstances:new Set},children:(0,y.jsx)(I.Provider,{value:e=>eN.push(e),children:(0,y.jsx)(_.StyleRegistry,{registry:eR,children:(0,y.jsx)(eL.Provider,{value:B,children:e})})})})})})})})})}),eD=()=>null,eU=({children:e})=>(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(eD,{}),(0,y.jsx)(eM,{children:(0,y.jsxs)(y.Fragment,{children:[b?(0,y.jsxs)(y.Fragment,{children:[e,(0,y.jsx)(eD,{})]}):e,(0,y.jsx)(eD,{})]})})]}),eW={err:v,req:eb?void 0:n,res:eb?void 0:s,pathname:a,query:i,asPath:ew,locale:l.locale,locales:l.locales,defaultLocale:l.defaultLocale,AppTree:e=>(0,y.jsx)(eU,{children:eK(er,el,{...e,router:eS})}),defaultGetInitialProps:async(e,t={})=>{let{html:r,head:n}=await e.renderPage({enhanceApp:e=>t=>(0,y.jsx)(e,{...t})}),o=eR.styles({nonce:t.nonce});return eR.flush(),{html:r,head:n,styles:o}}},eG=!eh&&(l.nextExport||b&&(eb||ed)),eJ=()=>{let e=eR.styles();return eR.flush(),(0,y.jsx)(y.Fragment,{children:e})};if(h=await Q(er,{AppTree:eW.AppTree,Component:el,router:eS,ctx:eW}),(eh||k)&&m&&(h.__N_PREVIEW=!0),eh&&(h.__N_SSG=!0),eh&&!ed){let e,t;try{e=await (0,eo.getTracer)().trace(es.xj.getStaticProps,{spanName:`getStaticProps ${a}`,attributes:{"next.route":a}},()=>L({...ey?{params:i}:void 0,...m?{draftMode:!0,preview:!0,previewData:p}:void 0,locales:l.locales,locale:l.locale,defaultLocale:l.defaultLocale,revalidateReason:l.isOnDemandRevalidate?"on-demand":em?"build":"stale"}))}catch(e){throw e&&"ENOENT"===e.code&&delete e.code,e}if(null==e)throw Error(R.q6);let r=Object.keys(e).filter(e=>"revalidate"!==e&&"props"!==e&&"redirect"!==e&&"notFound"!==e);if(r.includes("unstable_revalidate"))throw Error(R.Eo);if(r.length)throw Error(e0("getStaticProps",r));if("notFound"in e&&e.notFound){if("/404"===a)throw Error('The /404 page can not return notFound in "getStaticProps", please remove it to continue!');g.isNotFound=!0}if("redirect"in e&&e.redirect&&"object"==typeof e.redirect){if(e1(e.redirect,n,"getStaticProps"),em)throw Error(`\`redirect\` can not be returned from getStaticProps during prerendering (${n.url})
 See more info here: https://nextjs.org/docs/messages/gsp-redirect-during-prerender`);e.props={__N_REDIRECT:e.redirect.destination,__N_REDIRECT_STATUS:en(e.redirect)},void 0!==e.redirect.basePath&&(e.props.__N_REDIRECT_BASE_PATH=e.redirect.basePath),g.isRedirect=!0}if((b||em)&&!g.isNotFound&&!$(a,"getStaticProps",e.props))throw Error("invariant: getStaticProps did not return valid props. Please report this.");if("revalidate"in e){if(e.revalidate&&"export"===l.nextConfigOutput)throw Error('ISR cannot be used with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export');if("number"==typeof e.revalidate){if(Number.isInteger(e.revalidate)){if(e.revalidate<=0)throw Error(`A page's revalidate option can not be less than or equal to zero for ${n.url}. A revalidate option of zero means to revalidate after _every_ request, and implies stale data cannot be tolerated.
Diff for pages.runtime.dev.js
@@ -19,8 +19,8 @@ Reason: ${message}`)}}function isSerializableProps(page,method,input){if(!is_pla
 
 Keys that need to be moved: ${invalidKeys.join(", ")}.
 Read more: https://nextjs.org/docs/messages/${docsPathname}`};function checkRedirectValues(redirect,req,method){let{destination,permanent,statusCode,basePath}=redirect,errors=[],hasStatusCode=void 0!==statusCode,hasPermanent=void 0!==permanent;hasPermanent&&hasStatusCode?errors.push("`permanent` and `statusCode` can not both be provided"):hasPermanent&&"boolean"!=typeof permanent?errors.push("`permanent` must be `true` or `false`"):hasStatusCode&&!allowedStatusCodes.has(statusCode)&&errors.push(`\`statusCode\` must undefined or one of ${[...allowedStatusCodes].join(", ")}`);let destinationType=typeof destination;"string"!==destinationType&&errors.push(`\`destination\` should be string but received ${destinationType}`);let basePathType=typeof basePath;if("undefined"!==basePathType&&"boolean"!==basePathType&&errors.push(`\`basePath\` should be undefined or a false, received ${basePathType}`),errors.length>0)throw Error(`Invalid redirect object returned from ${method} for ${req.url}
-`+errors.join(" and ")+"\nSee more info here: https://nextjs.org/docs/messages/invalid-redirect-gssp")}async function renderToHTMLImpl(req,res,pathname,query,renderOpts,extra){var headers,err;let previewData,props,isPreview,source;(0,api_utils.gk)({req:req},"cookies",(headers=req.headers,function(){let{cookie}=headers;if(!cookie)return{};let{parse:parseCookieFn}=__webpack_require__("./dist/compiled/cookie/index.js");return parseCookieFn(Array.isArray(cookie)?cookie.join("; "):cookie)}));let metadata={};if(metadata.assetQueryString=renderOpts.dev&&renderOpts.assetQueryString||"",renderOpts.dev&&!metadata.assetQueryString){let userAgent=(req.headers["user-agent"]||"").toLowerCase();userAgent.includes("safari")&&!userAgent.includes("chrome")&&(metadata.assetQueryString=`?ts=${Date.now()}`)}renderOpts.deploymentId&&(metadata.assetQueryString+=`${metadata.assetQueryString?"&":"?"}dpl=${renderOpts.deploymentId}`),query=Object.assign({},query);let{err:err1,dev=!1,ampPath="",pageConfig={},buildManifest,reactLoadableManifest,ErrorDebug,getStaticProps,getStaticPaths,getServerSideProps,isNextDataRequest,params,previewProps,basePath,images,runtime:globalRuntime,isExperimentalCompile,swrDelta}=renderOpts,{App}=extra,assetQueryString=metadata.assetQueryString,Document=extra.Document,Component=renderOpts.Component,isFallback=!!query.__nextFallback,notFoundSrcPage=query.__nextNotFoundSrcPage;!function(query){for(let name of INTERNAL_QUERY_NAMES)delete query[name]}(query);let isSSG=!!getStaticProps,isBuildTimeSSG=isSSG&&renderOpts.nextExport,defaultAppGetInitialProps=App.getInitialProps===App.origGetInitialProps,hasPageGetInitialProps=!!(null==Component?void 0:Component.getInitialProps),hasPageScripts=null==Component?void 0:Component.unstable_scriptLoader,pageIsDynamic=isDynamicRoute(pathname),defaultErrorGetInitialProps="/_error"===pathname&&Component.getInitialProps===Component.origGetInitialProps;renderOpts.nextExport&&hasPageGetInitialProps&&!defaultErrorGetInitialProps&&warn(`Detected getInitialProps on page '${pathname}' while running export. It's recommended to use getStaticProps which has a more correct behavior for static exporting.
-Read more: https://nextjs.org/docs/messages/get-initial-props-export`);let isAutoExport=!hasPageGetInitialProps&&defaultAppGetInitialProps&&!isSSG&&!getServerSideProps;if(isAutoExport&&!dev&&isExperimentalCompile&&(res.setHeader("Cache-Control",function({revalidate,swrDelta}){let swrHeader=swrDelta?`stale-while-revalidate=${swrDelta}`:"stale-while-revalidate";return 0===revalidate?"private, no-cache, no-store, max-age=0, must-revalidate":"number"==typeof revalidate?`s-maxage=${revalidate}, ${swrHeader}`:`s-maxage=${constants.BR}, ${swrHeader}`}({revalidate:!1,swrDelta})),isAutoExport=!1),hasPageGetInitialProps&&isSSG)throw Error(constants.wh+` ${pathname}`);if(hasPageGetInitialProps&&getServerSideProps)throw Error(constants.Wo+` ${pathname}`);if(getServerSideProps&&isSSG)throw Error(constants.oL+` ${pathname}`);if(getServerSideProps&&"export"===renderOpts.nextConfigOutput)throw Error('getServerSideProps cannot be used with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export');if(getStaticPaths&&!pageIsDynamic)throw Error(`getStaticPaths is only allowed for dynamic SSG pages and was found on '${pathname}'.
+`+errors.join(" and ")+"\nSee more info here: https://nextjs.org/docs/messages/invalid-redirect-gssp")}async function renderToHTMLImpl(req,res,pathname,query,renderOpts,extra){var headers,err;let previewData,props,isPreview,source;(0,api_utils.gk)({req:req},"cookies",(headers=req.headers,function(){let{cookie}=headers;if(!cookie)return{};let{parse:parseCookieFn}=__webpack_require__("./dist/compiled/cookie/index.js");return parseCookieFn(Array.isArray(cookie)?cookie.join("; "):cookie)}));let metadata={};if(metadata.assetQueryString=renderOpts.dev&&renderOpts.assetQueryString||"",renderOpts.dev&&!metadata.assetQueryString){let userAgent=(req.headers["user-agent"]||"").toLowerCase();userAgent.includes("safari")&&!userAgent.includes("chrome")&&(metadata.assetQueryString=`?ts=${Date.now()}`)}renderOpts.deploymentId&&(metadata.assetQueryString+=`${metadata.assetQueryString?"&":"?"}dpl=${renderOpts.deploymentId}`),query=Object.assign({},query);let{err:err1,dev=!1,ampPath="",pageConfig={},buildManifest,reactLoadableManifest,ErrorDebug,getStaticProps,getStaticPaths,getServerSideProps,isNextDataRequest,params,previewProps,basePath,images,runtime:globalRuntime,isExperimentalCompile,expireTime}=renderOpts,{App}=extra,assetQueryString=metadata.assetQueryString,Document=extra.Document,Component=renderOpts.Component,isFallback=!!query.__nextFallback,notFoundSrcPage=query.__nextNotFoundSrcPage;!function(query){for(let name of INTERNAL_QUERY_NAMES)delete query[name]}(query);let isSSG=!!getStaticProps,isBuildTimeSSG=isSSG&&renderOpts.nextExport,defaultAppGetInitialProps=App.getInitialProps===App.origGetInitialProps,hasPageGetInitialProps=!!(null==Component?void 0:Component.getInitialProps),hasPageScripts=null==Component?void 0:Component.unstable_scriptLoader,pageIsDynamic=isDynamicRoute(pathname),defaultErrorGetInitialProps="/_error"===pathname&&Component.getInitialProps===Component.origGetInitialProps;renderOpts.nextExport&&hasPageGetInitialProps&&!defaultErrorGetInitialProps&&warn(`Detected getInitialProps on page '${pathname}' while running export. It's recommended to use getStaticProps which has a more correct behavior for static exporting.
+Read more: https://nextjs.org/docs/messages/get-initial-props-export`);let isAutoExport=!hasPageGetInitialProps&&defaultAppGetInitialProps&&!isSSG&&!getServerSideProps;if(isAutoExport&&!dev&&isExperimentalCompile&&(res.setHeader("Cache-Control",function({revalidate,expireTime}){let swrHeader="number"==typeof revalidate&&void 0!==expireTime?revalidate>=expireTime?"":`stale-while-revalidate=${expireTime-revalidate}`:"stale-while-revalidate";return 0===revalidate?"private, no-cache, no-store, max-age=0, must-revalidate":"number"==typeof revalidate?`s-maxage=${revalidate}, ${swrHeader}`:`s-maxage=${constants.BR}, ${swrHeader}`}({revalidate:!1,expireTime})),isAutoExport=!1),hasPageGetInitialProps&&isSSG)throw Error(constants.wh+` ${pathname}`);if(hasPageGetInitialProps&&getServerSideProps)throw Error(constants.Wo+` ${pathname}`);if(getServerSideProps&&isSSG)throw Error(constants.oL+` ${pathname}`);if(getServerSideProps&&"export"===renderOpts.nextConfigOutput)throw Error('getServerSideProps cannot be used with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export');if(getStaticPaths&&!pageIsDynamic)throw Error(`getStaticPaths is only allowed for dynamic SSG pages and was found on '${pathname}'.
 Read more: https://nextjs.org/docs/messages/non-dynamic-getstaticpaths-usage`);if(getStaticPaths&&!isSSG)throw Error(`getStaticPaths was added without a getStaticProps in ${pathname}. Without getStaticProps, getStaticPaths does nothing`);if(isSSG&&pageIsDynamic&&!getStaticPaths)throw Error(`getStaticPaths is required for dynamic SSG pages and is missing for '${pathname}'.
 Read more: https://nextjs.org/docs/messages/invalid-getstaticpaths-value`);let asPath=renderOpts.resolvedAsPath||req.url;if(dev){let{isValidElementType}=__webpack_require__("./dist/compiled/react-is/index.js");if(!isValidElementType(Component))throw Error(`The default export is not a React Component in page: "${pathname}"`);if(!isValidElementType(App))throw Error('The default export is not a React Component in page: "/_app"');if(!isValidElementType(Document))throw Error('The default export is not a React Component in page: "/_document"');if((isAutoExport||isFallback)&&(query={...query.amp?{amp:query.amp}:{}},asPath=`${pathname}${req.url.endsWith("/")&&"/"!==pathname&&!pageIsDynamic?"/":""}`,req.url=pathname),"/404"===pathname&&(hasPageGetInitialProps||getServerSideProps))throw Error(`\`pages/404\` ${constants.Ei}`);if(STATIC_STATUS_PAGES.includes(pathname)&&(hasPageGetInitialProps||getServerSideProps))throw Error(`\`pages${pathname}\` ${constants.Ei}`)}for(let methodName of["getStaticProps","getServerSideProps","getStaticPaths"])if(null==Component?void 0:Component[methodName])throw Error(`page ${pathname} ${methodName} ${constants.lk}`);await loadable_shared_runtime.preloadAll(),(isSSG||getServerSideProps)&&!isFallback&&previewProps&&(isPreview=!1!==(previewData=tryGetPreviewData(req,res,previewProps,!!renderOpts.multiZoneDraftMode)));let router=new ServerRouter(pathname,query,asPath,{isFallback:isFallback},!!(getServerSideProps||hasPageGetInitialProps||!defaultAppGetInitialProps&&!isSSG||isExperimentalCompile),basePath,renderOpts.locale,renderOpts.locales,renderOpts.defaultLocale,renderOpts.domainLocales,isPreview,request_meta_getRequestMeta(req,"isLocaleDomain")),appRouter={back(){router.back()},forward(){router.forward()},refresh(){router.reload()},hmrRefresh(){},push(href,param){let{scroll}=void 0===param?{}:param;router.push(href,void 0,{scroll})},replace(href,param){let{scroll}=void 0===param?{}:param;router.replace(href,void 0,{scroll})},prefetch(href){router.prefetch(href)}},scriptLoader={},jsxStyleRegistry=(0,external_styled_jsx_namespaceObject.createStyleRegistry)(),ampState={ampFirst:!0===pageConfig.amp,hasQuery:!!query.amp,hybrid:"hybrid"===pageConfig.amp},inAmpMode=function(param){let{ampFirst=!1,hybrid=!1,hasQuery=!1}=void 0===param?{}:param;return ampFirst||hybrid&&hasQuery}(ampState),head=function(inAmpMode){void 0===inAmpMode&&(inAmpMode=!1);let head=[(0,jsx_runtime_namespaceObject.jsx)("meta",{charSet:"utf-8"},"charset")];return inAmpMode||head.push((0,jsx_runtime_namespaceObject.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")),head}(inAmpMode),reactLoadableModules=[],initialScripts={};hasPageScripts&&(initialScripts.beforeInteractive=[].concat(hasPageScripts()).filter(script=>"beforeInteractive"===script.props.strategy).map(script=>script.props));let AppContainer=({children})=>(0,jsx_runtime_namespaceObject.jsx)(AppRouterContext.Provider,{value:appRouter,children:(0,jsx_runtime_namespaceObject.jsx)(SearchParamsContext.Provider,{value:router.isReady&&router.query?new URL(router.asPath,"http://n").searchParams:new URLSearchParams,children:(0,jsx_runtime_namespaceObject.jsx)(PathnameContextProviderAdapter,{router:router,isAutoExport:isAutoExport,children:(0,jsx_runtime_namespaceObject.jsx)(PathParamsContext.Provider,{value:function(router){if(!router.isReady||!router.query)return null;let pathParams={};for(let key of Object.keys(function(normalizedRoute){let{parameterizedRoute,groups}=function(route){let segments=remove_trailing_slash_removeTrailingSlash(route).slice(1).split("/"),groups={},groupIndex=1;return{parameterizedRoute:segments.map(segment=>{let markerMatch=interception_routes_INTERCEPTION_ROUTE_MARKERS.find(m=>segment.startsWith(m)),paramMatches=segment.match(PARAMETER_PATTERN);if(markerMatch&&paramMatches){let{key,optional,repeat}=parseMatchedParameter(paramMatches[1]);return groups[key]={pos:groupIndex++,repeat,optional},"/"+escape_regexp_escapeStringRegexp(markerMatch)+"([^/]+?)"}if(!paramMatches)return"/"+escape_regexp_escapeStringRegexp(segment);{let{key,repeat,optional}=parseMatchedParameter(paramMatches[1]);return groups[key]={pos:groupIndex++,repeat,optional},repeat?optional?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}}).join(""),groups}}(normalizedRoute);return{re:RegExp("^"+parameterizedRoute+"(?:/)?$"),groups:groups}}(router.pathname).groups))pathParams[key]=router.query[key];return pathParams}(router),children:(0,jsx_runtime_namespaceObject.jsx)(RouterContext.Provider,{value:router,children:(0,jsx_runtime_namespaceObject.jsx)(amp_context_shared_runtime_AmpStateContext.Provider,{value:ampState,children:(0,jsx_runtime_namespaceObject.jsx)(head_manager_context_shared_runtime_HeadManagerContext.Provider,{value:{updateHead:state=>{head=state},updateScripts:scripts=>{scriptLoader=scripts},scripts:initialScripts,mountedInstances:new Set},children:(0,jsx_runtime_namespaceObject.jsx)(LoadableContext.Provider,{value:moduleName=>reactLoadableModules.push(moduleName),children:(0,jsx_runtime_namespaceObject.jsx)(external_styled_jsx_namespaceObject.StyleRegistry,{registry:jsxStyleRegistry,children:(0,jsx_runtime_namespaceObject.jsx)(ImageConfigContext.Provider,{value:images,children:children})})})})})})})})})}),Noop=()=>null,AppContainerWithIsomorphicFiberStructure=({children})=>(0,jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment,{children:[(0,jsx_runtime_namespaceObject.jsx)(Noop,{}),(0,jsx_runtime_namespaceObject.jsx)(AppContainer,{children:(0,jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment,{children:[dev?(0,jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment,{children:[children,(0,jsx_runtime_namespaceObject.jsx)(Noop,{})]}):children,(0,jsx_runtime_namespaceObject.jsx)(Noop,{})]})})]}),ctx={err:err1,req:isAutoExport?void 0:req,res:isAutoExport?void 0:res,pathname,query,asPath,locale:renderOpts.locale,locales:renderOpts.locales,defaultLocale:renderOpts.defaultLocale,AppTree:props=>(0,jsx_runtime_namespaceObject.jsx)(AppContainerWithIsomorphicFiberStructure,{children:renderPageTree(App,Component,{...props,router})}),defaultGetInitialProps:async(docCtx,options={})=>{let{html,head:renderPageHead}=await docCtx.renderPage({enhanceApp:AppComp=>props=>(0,jsx_runtime_namespaceObject.jsx)(AppComp,{...props})}),styles=jsxStyleRegistry.styles({nonce:options.nonce});return jsxStyleRegistry.flush(),{html,head:renderPageHead,styles}}},nextExport=!isSSG&&(renderOpts.nextExport||dev&&(isAutoExport||isFallback)),styledJsxInsertedHTML=()=>{let styles=jsxStyleRegistry.styles();return jsxStyleRegistry.flush(),(0,jsx_runtime_namespaceObject.jsx)(jsx_runtime_namespaceObject.Fragment,{children:styles})};if(props=await loadGetInitialProps(App,{AppTree:ctx.AppTree,Component,router,ctx}),(isSSG||getServerSideProps)&&isPreview&&(props.__N_PREVIEW=!0),isSSG&&(props.__N_SSG=!0),isSSG&&!isFallback){let data,revalidate;try{data=await (0,tracer_.getTracer)().trace(trace_constants.xj.getStaticProps,{spanName:`getStaticProps ${pathname}`,attributes:{"next.route":pathname}},()=>getStaticProps({...pageIsDynamic?{params:query}:void 0,...isPreview?{draftMode:!0,preview:!0,previewData:previewData}:void 0,locales:renderOpts.locales,locale:renderOpts.locale,defaultLocale:renderOpts.defaultLocale,revalidateReason:renderOpts.isOnDemandRevalidate?"on-demand":isBuildTimeSSG?"build":"stale"}))}catch(staticPropsError){throw staticPropsError&&"ENOENT"===staticPropsError.code&&delete staticPropsError.code,staticPropsError}if(null==data)throw Error(constants.q6);let invalidKeys=Object.keys(data).filter(key=>"revalidate"!==key&&"props"!==key&&"redirect"!==key&&"notFound"!==key);if(invalidKeys.includes("unstable_revalidate"))throw Error(constants.Eo);if(invalidKeys.length)throw Error(invalidKeysMsg("getStaticProps",invalidKeys));if(void 0!==data.notFound&&void 0!==data.redirect)throw Error(`\`redirect\` and \`notFound\` can not both be returned from ${isSSG?"getStaticProps":"getServerSideProps"} at the same time. Page: ${pathname}
 See more info here: https://nextjs.org/docs/messages/gssp-mixed-not-found-redirect`);if("notFound"in data&&data.notFound){if("/404"===pathname)throw Error('The /404 page can not return notFound in "getStaticProps", please remove it to continue!');metadata.isNotFound=!0}if("redirect"in data&&data.redirect&&"object"==typeof data.redirect){if(checkRedirectValues(data.redirect,req,"getStaticProps"),isBuildTimeSSG)throw Error(`\`redirect\` can not be returned from getStaticProps during prerendering (${req.url})
Diff for pages.runtime.prod.js
@@ -19,8 +19,8 @@ Reason: ${n}`)}}function $(e,t,r){if(!T(r))throw new N(e,t,"",`Props must be ret
 
 Keys that need to be moved: ${t.join(", ")}.
 Read more: https://nextjs.org/docs/messages/${r}`};function e1(e,t,r){let{destination:n,permanent:o,statusCode:s,basePath:a}=e,i=[],l=void 0!==s,d=void 0!==o;d&&l?i.push("`permanent` and `statusCode` can not both be provided"):d&&"boolean"!=typeof o?i.push("`permanent` must be `true` or `false`"):l&&!er.has(s)&&i.push(`\`statusCode\` must undefined or one of ${[...er].join(", ")}`);let u=typeof n;"string"!==u&&i.push(`\`destination\` should be string but received ${u}`);let c=typeof a;if("undefined"!==c&&"boolean"!==c&&i.push(`\`basePath\` should be undefined or a false, received ${c}`),i.length>0)throw Error(`Invalid redirect object returned from ${r} for ${t.url}
-`+i.join(" and ")+"\nSee more info here: https://nextjs.org/docs/messages/invalid-redirect-gssp")}async function e4(n,s,a,i,l,d){var u,c;let p,h,m,f;(0,x.gk)({req:n},"cookies",(u=n.headers,function(){let{cookie:e}=u;if(!e)return{};let{parse:t}=r("./dist/compiled/cookie/index.js");return t(Array.isArray(e)?e.join("; "):e)}));let g={};if(g.assetQueryString=l.dev&&l.assetQueryString||"",l.dev&&!g.assetQueryString){let e=(n.headers["user-agent"]||"").toLowerCase();e.includes("safari")&&!e.includes("chrome")&&(g.assetQueryString=`?ts=${Date.now()}`)}l.deploymentId&&(g.assetQueryString+=`${g.assetQueryString?"&":"?"}dpl=${l.deploymentId}`),i=Object.assign({},i);let{err:v,dev:b=!1,ampPath:w="",pageConfig:S={},buildManifest:C,reactLoadableManifest:E,ErrorDebug:T,getStaticProps:L,getStaticPaths:N,getServerSideProps:k,isNextDataRequest:M,params:D,previewProps:F,basePath:q,images:B,runtime:G,isExperimentalCompile:K,swrDelta:ee}=l,{App:er}=d,ea=g.assetQueryString,ei=d.Document,el=l.Component,ed=!!i.__nextFallback,ep=i.__nextNotFoundSrcPage;!function(e){for(let t of eO)delete e[t]}(i);let eh=!!L,em=eh&&l.nextExport,ef=er.getInitialProps===er.origGetInitialProps,eg=!!(null==el?void 0:el.getInitialProps),ev=null==el?void 0:el.unstable_scriptLoader,ey=J(a),ex="/_error"===a&&el.getInitialProps===el.origGetInitialProps;l.nextExport&&eg&&!ex&&t(`Detected getInitialProps on page '${a}' while running export. It's recommended to use getStaticProps which has a more correct behavior for static exporting.
-Read more: https://nextjs.org/docs/messages/get-initial-props-export`);let eb=!eg&&ef&&!eh&&!k;if(eb&&!b&&K&&(s.setHeader("Cache-Control",function({revalidate:e,swrDelta:t}){let r=t?`stale-while-revalidate=${t}`:"stale-while-revalidate";return 0===e?"private, no-cache, no-store, max-age=0, must-revalidate":"number"==typeof e?`s-maxage=${e}, ${r}`:`s-maxage=${R.BR}, ${r}`}({revalidate:!1,swrDelta:ee})),eb=!1),eg&&eh)throw Error(R.wh+` ${a}`);if(eg&&k)throw Error(R.Wo+` ${a}`);if(k&&eh)throw Error(R.oL+` ${a}`);if(k&&"export"===l.nextConfigOutput)throw Error('getServerSideProps cannot be used with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export');if(N&&!ey)throw Error(`getStaticPaths is only allowed for dynamic SSG pages and was found on '${a}'.
+`+i.join(" and ")+"\nSee more info here: https://nextjs.org/docs/messages/invalid-redirect-gssp")}async function e4(n,s,a,i,l,d){var u,c;let p,h,m,f;(0,x.gk)({req:n},"cookies",(u=n.headers,function(){let{cookie:e}=u;if(!e)return{};let{parse:t}=r("./dist/compiled/cookie/index.js");return t(Array.isArray(e)?e.join("; "):e)}));let g={};if(g.assetQueryString=l.dev&&l.assetQueryString||"",l.dev&&!g.assetQueryString){let e=(n.headers["user-agent"]||"").toLowerCase();e.includes("safari")&&!e.includes("chrome")&&(g.assetQueryString=`?ts=${Date.now()}`)}l.deploymentId&&(g.assetQueryString+=`${g.assetQueryString?"&":"?"}dpl=${l.deploymentId}`),i=Object.assign({},i);let{err:v,dev:b=!1,ampPath:w="",pageConfig:S={},buildManifest:C,reactLoadableManifest:E,ErrorDebug:T,getStaticProps:L,getStaticPaths:N,getServerSideProps:k,isNextDataRequest:M,params:D,previewProps:F,basePath:q,images:B,runtime:G,isExperimentalCompile:K,expireTime:ee}=l,{App:er}=d,ea=g.assetQueryString,ei=d.Document,el=l.Component,ed=!!i.__nextFallback,ep=i.__nextNotFoundSrcPage;!function(e){for(let t of eO)delete e[t]}(i);let eh=!!L,em=eh&&l.nextExport,ef=er.getInitialProps===er.origGetInitialProps,eg=!!(null==el?void 0:el.getInitialProps),ev=null==el?void 0:el.unstable_scriptLoader,ey=J(a),ex="/_error"===a&&el.getInitialProps===el.origGetInitialProps;l.nextExport&&eg&&!ex&&t(`Detected getInitialProps on page '${a}' while running export. It's recommended to use getStaticProps which has a more correct behavior for static exporting.
+Read more: https://nextjs.org/docs/messages/get-initial-props-export`);let eb=!eg&&ef&&!eh&&!k;if(eb&&!b&&K&&(s.setHeader("Cache-Control",function({revalidate:e,expireTime:t}){let r="number"==typeof e&&void 0!==t?e>=t?"":`stale-while-revalidate=${t-e}`:"stale-while-revalidate";return 0===e?"private, no-cache, no-store, max-age=0, must-revalidate":"number"==typeof e?`s-maxage=${e}, ${r}`:`s-maxage=${R.BR}, ${r}`}({revalidate:!1,expireTime:ee})),eb=!1),eg&&eh)throw Error(R.wh+` ${a}`);if(eg&&k)throw Error(R.Wo+` ${a}`);if(k&&eh)throw Error(R.oL+` ${a}`);if(k&&"export"===l.nextConfigOutput)throw Error('getServerSideProps cannot be used with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export');if(N&&!ey)throw Error(`getStaticPaths is only allowed for dynamic SSG pages and was found on '${a}'.
 Read more: https://nextjs.org/docs/messages/non-dynamic-getstaticpaths-usage`);if(N&&!eh)throw Error(`getStaticPaths was added without a getStaticProps in ${a}. Without getStaticProps, getStaticPaths does nothing`);if(eh&&ey&&!N)throw Error(`getStaticPaths is required for dynamic SSG pages and is missing for '${a}'.
 Read more: https://nextjs.org/docs/messages/invalid-getstaticpaths-value`);let ew=l.resolvedAsPath||n.url;if(b){let{isValidElementType:e}=r("./dist/compiled/react-is/index.js");if(!e(el))throw Error(`The default export is not a React Component in page: "${a}"`);if(!e(er))throw Error('The default export is not a React Component in page: "/_app"');if(!e(ei))throw Error('The default export is not a React Component in page: "/_document"');if((eb||ed)&&(i={...i.amp?{amp:i.amp}:{}},ew=`${a}${n.url.endsWith("/")&&"/"!==a&&!ey?"/":""}`,n.url=a),"/404"===a&&(eg||k))throw Error(`\`pages/404\` ${R.Ei}`);if(j.includes(a)&&(eg||k))throw Error(`\`pages${a}\` ${R.Ei}`)}for(let e of["getStaticProps","getServerSideProps","getStaticPaths"])if(null==el?void 0:el[e])throw Error(`page ${a} ${e} ${R.lk}`);await H.preloadAll(),(eh||k)&&!ed&&F&&(m=!1!==(p=e(n,s,F,!!l.multiZoneDraftMode)));let eS=new eY(a,i,ew,{isFallback:ed},!!(k||eg||!ef&&!eh||K),q,l.locale,l.locales,l.defaultLocale,l.domainLocales,m,et(n,"isLocaleDomain")),eP={back(){eS.back()},forward(){eS.forward()},refresh(){eS.reload()},hmrRefresh(){},push(e,t){let{scroll:r}=void 0===t?{}:t;eS.push(e,void 0,{scroll:r})},replace(e,t){let{scroll:r}=void 0===t?{}:t;eS.replace(e,void 0,{scroll:r})},prefetch(e){eS.prefetch(e)}},e_={},eR=(0,_.createStyleRegistry)(),eC={ampFirst:!0===S.amp,hasQuery:!!i.amp,hybrid:"hybrid"===S.amp},ej=function(e){let{ampFirst:t=!1,hybrid:r=!1,hasQuery:n=!1}=void 0===e?{}:e;return t||r&&n}(eC),eE=function(e){void 0===e&&(e=!1);let t=[(0,y.jsx)("meta",{charSet:"utf-8"},"charset")];return e||t.push((0,y.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")),t}(ej),eN=[],eI={};ev&&(eI.beforeInteractive=[].concat(ev()).filter(e=>"beforeInteractive"===e.props.strategy).map(e=>e.props));let eM=({children:e})=>(0,y.jsx)(ez.Provider,{value:eP,children:(0,y.jsx)(eA.Provider,{value:eS.isReady&&eS.query?new URL(eS.asPath,"http://n").searchParams:new URLSearchParams,children:(0,y.jsx)(eH,{router:eS,isAutoExport:eb,children:(0,y.jsx)(ek.Provider,{value:function(e){if(!e.isReady||!e.query)return null;let t={};for(let r of Object.keys(function(e){let{parameterizedRoute:t,groups:r}=function(e){let t=ec(e).slice(1).split("/"),r={},n=1;return{parameterizedRoute:t.map(e=>{let t=W.find(t=>e.startsWith(t)),o=e.match(eq);if(t&&o){let{key:e,optional:s,repeat:a}=eB(o[1]);return r[e]={pos:n++,repeat:a,optional:s},"/"+eF(t)+"([^/]+?)"}if(!o)return"/"+eF(e);{let{key:e,repeat:t,optional:s}=eB(o[1]);return r[e]={pos:n++,repeat:t,optional:s},t?s?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}}).join(""),groups:r}}(e);return{re:RegExp("^"+t+"(?:/)?$"),groups:r}}(e.pathname).groups))t[r]=e.query[r];return t}(eS),children:(0,y.jsx)(z.Provider,{value:eS,children:(0,y.jsx)(O.Provider,{value:eC,children:(0,y.jsx)(A.Provider,{value:{updateHead:e=>{eE=e},updateScripts:e=>{e_=e},scripts:eI,mountedInstances:new Set},children:(0,y.jsx)(I.Provider,{value:e=>eN.push(e),children:(0,y.jsx)(_.StyleRegistry,{registry:eR,children:(0,y.jsx)(eL.Provider,{value:B,children:e})})})})})})})})})}),eD=()=>null,eU=({children:e})=>(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(eD,{}),(0,y.jsx)(eM,{children:(0,y.jsxs)(y.Fragment,{children:[b?(0,y.jsxs)(y.Fragment,{children:[e,(0,y.jsx)(eD,{})]}):e,(0,y.jsx)(eD,{})]})})]}),eW={err:v,req:eb?void 0:n,res:eb?void 0:s,pathname:a,query:i,asPath:ew,locale:l.locale,locales:l.locales,defaultLocale:l.defaultLocale,AppTree:e=>(0,y.jsx)(eU,{children:eK(er,el,{...e,router:eS})}),defaultGetInitialProps:async(e,t={})=>{let{html:r,head:n}=await e.renderPage({enhanceApp:e=>t=>(0,y.jsx)(e,{...t})}),o=eR.styles({nonce:t.nonce});return eR.flush(),{html:r,head:n,styles:o}}},eG=!eh&&(l.nextExport||b&&(eb||ed)),eJ=()=>{let e=eR.styles();return eR.flush(),(0,y.jsx)(y.Fragment,{children:e})};if(h=await Q(er,{AppTree:eW.AppTree,Component:el,router:eS,ctx:eW}),(eh||k)&&m&&(h.__N_PREVIEW=!0),eh&&(h.__N_SSG=!0),eh&&!ed){let e,t;try{e=await (0,eo.getTracer)().trace(es.xj.getStaticProps,{spanName:`getStaticProps ${a}`,attributes:{"next.route":a}},()=>L({...ey?{params:i}:void 0,...m?{draftMode:!0,preview:!0,previewData:p}:void 0,locales:l.locales,locale:l.locale,defaultLocale:l.defaultLocale,revalidateReason:l.isOnDemandRevalidate?"on-demand":em?"build":"stale"}))}catch(e){throw e&&"ENOENT"===e.code&&delete e.code,e}if(null==e)throw Error(R.q6);let r=Object.keys(e).filter(e=>"revalidate"!==e&&"props"!==e&&"redirect"!==e&&"notFound"!==e);if(r.includes("unstable_revalidate"))throw Error(R.Eo);if(r.length)throw Error(e0("getStaticProps",r));if("notFound"in e&&e.notFound){if("/404"===a)throw Error('The /404 page can not return notFound in "getStaticProps", please remove it to continue!');g.isNotFound=!0}if("redirect"in e&&e.redirect&&"object"==typeof e.redirect){if(e1(e.redirect,n,"getStaticProps"),em)throw Error(`\`redirect\` can not be returned from getStaticProps during prerendering (${n.url})
 See more info here: https://nextjs.org/docs/messages/gsp-redirect-during-prerender`);e.props={__N_REDIRECT:e.redirect.destination,__N_REDIRECT_STATUS:en(e.redirect)},void 0!==e.redirect.basePath&&(e.props.__N_REDIRECT_BASE_PATH=e.redirect.basePath),g.isRedirect=!0}if((b||em)&&!g.isNotFound&&!$(a,"getStaticProps",e.props))throw Error("invariant: getStaticProps did not return valid props. Please report this.");if("revalidate"in e){if(e.revalidate&&"export"===l.nextConfigOutput)throw Error('ISR cannot be used with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export');if("number"==typeof e.revalidate){if(Number.isInteger(e.revalidate)){if(e.revalidate<=0)throw Error(`A page's revalidate option can not be less than or equal to zero for ${n.url}. A revalidate option of zero means to revalidate after _every_ request, and implies stale data cannot be tolerated.
Diff for server.runtime.prod.js

Diff too large to display

Commit: 67c8e9b

@ijjk ijjk merged commit f71f180 into vercel:canary Oct 12, 2024
85 checks passed
@ijjk ijjk deleted the ijjk/swr-delta-expire-time branch October 12, 2024 16:40
ijjk pushed a commit that referenced this pull request Oct 12, 2024
…71190)

# 🧰Fixed a file name

Hello. In #71159 Next.js changed `swrDelta` to `expireTime`. 

However, the `swrDelta.mdx` file name wasn't updated. So I renamed it to
`expireTime.mdx`.

Additionally, I fixed a typo. `stale-while-revalidate` is in an inline
code block in the paragraph below, but not in the one above. (Please see
this
[link](https://nextjs.org/docs/canary/app/api-reference/next-config-js/swrDelta).)


![image](https://github.com/user-attachments/assets/fdbd4db1-43f3-4c58-a842-55c51f282c5d)
ijjk added a commit that referenced this pull request Oct 12, 2024
Follow-up to #71159 this tweaks
the docs to explain the new behavior a bit more and re-word some parts.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
created-by: Next.js team PRs by the Next.js team. Documentation Related to Next.js' official documentation. locked type: next
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants