@vercel/next 4.7.2 → 4.7.3
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.
- package/dist/index.js +18 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
@@ -11641,6 +11641,7 @@ async function getPrerenderManifest(entryPath, outputDirectory) {
|
|
11641
11641
|
}
|
11642
11642
|
routes.forEach((route) => {
|
11643
11643
|
const { initialRevalidateSeconds, dataRoute, srcRoute } = manifest.routes[route];
|
11644
|
+
let initialExpireSeconds;
|
11644
11645
|
let initialStatus;
|
11645
11646
|
let initialHeaders;
|
11646
11647
|
let experimentalBypassFor;
|
@@ -11648,6 +11649,7 @@ async function getPrerenderManifest(entryPath, outputDirectory) {
|
|
11648
11649
|
let allowHeader;
|
11649
11650
|
let renderingMode;
|
11650
11651
|
if (manifest.version === 4) {
|
11652
|
+
initialExpireSeconds = manifest.routes[route].initialExpireSeconds;
|
11651
11653
|
initialStatus = manifest.routes[route].initialStatus;
|
11652
11654
|
initialHeaders = manifest.routes[route].initialHeaders;
|
11653
11655
|
experimentalBypassFor = manifest.routes[route].experimentalBypassFor;
|
@@ -11660,6 +11662,7 @@ async function getPrerenderManifest(entryPath, outputDirectory) {
|
|
11660
11662
|
}
|
11661
11663
|
ret.staticRoutes[route] = {
|
11662
11664
|
initialRevalidate: initialRevalidateSeconds === false ? false : Math.max(1, initialRevalidateSeconds),
|
11665
|
+
initialExpire: initialExpireSeconds,
|
11663
11666
|
dataRoute,
|
11664
11667
|
prefetchDataRoute,
|
11665
11668
|
srcRoute,
|
@@ -11679,6 +11682,7 @@ async function getPrerenderManifest(entryPath, outputDirectory) {
|
|
11679
11682
|
let fallbackHeaders;
|
11680
11683
|
let renderingMode = "STATIC" /* STATIC */;
|
11681
11684
|
let fallbackRevalidate;
|
11685
|
+
let fallbackExpire;
|
11682
11686
|
let fallbackRootParams;
|
11683
11687
|
let allowHeader;
|
11684
11688
|
let fallbackSourceRoute;
|
@@ -11692,6 +11696,7 @@ async function getPrerenderManifest(entryPath, outputDirectory) {
|
|
11692
11696
|
// using the `experimentalPPR` flag.
|
11693
11697
|
(manifest.dynamicRoutes[lazyRoute].experimentalPPR ? "PARTIALLY_STATIC" /* PARTIALLY_STATIC */ : "STATIC" /* STATIC */);
|
11694
11698
|
fallbackRevalidate = manifest.dynamicRoutes[lazyRoute].fallbackRevalidate;
|
11699
|
+
fallbackExpire = manifest.dynamicRoutes[lazyRoute].fallbackExpire;
|
11695
11700
|
fallbackRootParams = manifest.dynamicRoutes[lazyRoute].fallbackRootParams;
|
11696
11701
|
allowHeader = manifest.dynamicRoutes[lazyRoute].allowHeader;
|
11697
11702
|
fallbackSourceRoute = manifest.dynamicRoutes[lazyRoute].fallbackSourceRoute;
|
@@ -11708,6 +11713,7 @@ async function getPrerenderManifest(entryPath, outputDirectory) {
|
|
11708
11713
|
prefetchDataRoute,
|
11709
11714
|
prefetchDataRouteRegex,
|
11710
11715
|
fallbackRevalidate,
|
11716
|
+
fallbackExpire,
|
11711
11717
|
fallbackRootParams,
|
11712
11718
|
fallbackSourceRoute,
|
11713
11719
|
renderingMode,
|
@@ -12177,6 +12183,7 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
|
|
12177
12183
|
}
|
12178
12184
|
const isNotFound = prerenderManifest.notFoundRoutes.includes(routeKey);
|
12179
12185
|
let initialRevalidate;
|
12186
|
+
let initialExpire;
|
12180
12187
|
let srcRoute;
|
12181
12188
|
let dataRoute;
|
12182
12189
|
let prefetchDataRoute;
|
@@ -12212,6 +12219,7 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
|
|
12212
12219
|
const pr = prerenderManifest.staticRoutes[routeKey];
|
12213
12220
|
({
|
12214
12221
|
initialRevalidate,
|
12222
|
+
initialExpire,
|
12215
12223
|
srcRoute,
|
12216
12224
|
dataRoute,
|
12217
12225
|
initialHeaders,
|
@@ -12230,6 +12238,7 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
|
|
12230
12238
|
fallbackStatus,
|
12231
12239
|
fallbackHeaders,
|
12232
12240
|
fallbackRevalidate,
|
12241
|
+
fallbackExpire,
|
12233
12242
|
fallbackSourceRoute
|
12234
12243
|
} = prerenderManifest.fallbackRoutes[routeKey];
|
12235
12244
|
if (fallbackStatus) {
|
@@ -12243,6 +12252,7 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
|
|
12243
12252
|
}
|
12244
12253
|
if (renderingMode === "PARTIALLY_STATIC" /* PARTIALLY_STATIC */ && typeof fallbackRevalidate !== "undefined") {
|
12245
12254
|
initialRevalidate = fallbackRevalidate;
|
12255
|
+
initialExpire = fallbackExpire;
|
12246
12256
|
}
|
12247
12257
|
}
|
12248
12258
|
}
|
@@ -12491,6 +12501,7 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
|
|
12491
12501
|
}
|
12492
12502
|
prerenders[outputPathPage] = new import_build_utils.Prerender({
|
12493
12503
|
expiration: initialRevalidate,
|
12504
|
+
staleExpiration: initialExpire,
|
12494
12505
|
lambda,
|
12495
12506
|
allowQuery: htmlAllowQuery,
|
12496
12507
|
fallback: htmlFsRef,
|
@@ -12526,6 +12537,7 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
|
|
12526
12537
|
}
|
12527
12538
|
const prerender = new import_build_utils.Prerender({
|
12528
12539
|
expiration: initialRevalidate,
|
12540
|
+
staleExpiration: initialExpire,
|
12529
12541
|
lambda,
|
12530
12542
|
allowQuery,
|
12531
12543
|
fallback: jsonFsRef,
|
@@ -12585,6 +12597,7 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
|
|
12585
12597
|
}
|
12586
12598
|
prerenders[outputSegmentPath] = new import_build_utils.Prerender({
|
12587
12599
|
expiration: initialRevalidate,
|
12600
|
+
staleExpiration: initialExpire,
|
12588
12601
|
lambda,
|
12589
12602
|
allowQuery,
|
12590
12603
|
fallback,
|
@@ -15977,7 +15990,11 @@ var build = async (buildOptions) => {
|
|
15977
15990
|
(0, import_build_utils3.debug)("Found NPM_AUTH_TOKEN in environment, creating .npmrc");
|
15978
15991
|
await writeNpmRc(entryPath, process.env.NPM_AUTH_TOKEN);
|
15979
15992
|
}
|
15980
|
-
const { detectedPackageManager } = (0, import_build_utils3.detectPackageManager)(
|
15993
|
+
const { detectedPackageManager } = (0, import_build_utils3.detectPackageManager)(
|
15994
|
+
cliType,
|
15995
|
+
lockfileVersion,
|
15996
|
+
config.projectSettings?.createdAt
|
15997
|
+
) ?? {};
|
15981
15998
|
const trimmedInstallCommand = installCommand?.trim();
|
15982
15999
|
const shouldRunInstallCommand = (
|
15983
16000
|
// Case 1: We have a zero config install
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vercel/next",
|
3
|
-
"version": "4.7.
|
3
|
+
"version": "4.7.3",
|
4
4
|
"license": "Apache-2.0",
|
5
5
|
"main": "./dist/index",
|
6
6
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
|
@@ -30,7 +30,7 @@
|
|
30
30
|
"@types/semver": "6.0.0",
|
31
31
|
"@types/text-table": "0.2.1",
|
32
32
|
"@types/webpack-sources": "3.2.0",
|
33
|
-
"@vercel/build-utils": "10.3.
|
33
|
+
"@vercel/build-utils": "10.3.2",
|
34
34
|
"@vercel/routing-utils": "5.0.4",
|
35
35
|
"async-sema": "3.0.1",
|
36
36
|
"buffer-crc32": "0.2.13",
|