@vercel/next 4.13.2 → 4.13.4
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 -20
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -12564,12 +12564,13 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
|
|
|
12564
12564
|
function normalizeDataRoute(route) {
|
|
12565
12565
|
let normalized = import_path3.default.posix.join(entryDirectory, route);
|
|
12566
12566
|
if (nonDynamicSsg || isFallback || isOmitted) {
|
|
12567
|
+
const pathToReplace = route.endsWith(routeFileNoExt + ".json") ? origRouteFileNoExt : routeFileNoExt;
|
|
12567
12568
|
normalized = normalized.replace(
|
|
12568
12569
|
new RegExp(`${(0, import_escape_string_regexp.default)(origRouteFileNoExt)}.json$`),
|
|
12569
12570
|
// ensure we escape "$" correctly while replacing as "$" is a special
|
|
12570
12571
|
// character, we need to do double escaping as first is for the initial
|
|
12571
12572
|
// replace on the routeFile and then the second on the outputPath
|
|
12572
|
-
`${
|
|
12573
|
+
`${pathToReplace.replace(/\$/g, "$$$$")}.json`
|
|
12573
12574
|
);
|
|
12574
12575
|
}
|
|
12575
12576
|
return normalized;
|
|
@@ -12796,27 +12797,27 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
|
|
|
12796
12797
|
}
|
|
12797
12798
|
if (outputPathData && renderingMode !== "PARTIALLY_STATIC" /* PARTIALLY_STATIC */) {
|
|
12798
12799
|
prerenders[normalizePathData(outputPathData)] = prerender;
|
|
12799
|
-
} else if (outputPathData && routesManifest?.rsc?.dynamicRSCPrerender && routesManifest?.ppr?.chain?.headers
|
|
12800
|
-
|
|
12801
|
-
|
|
12802
|
-
|
|
12803
|
-
|
|
12804
|
-
|
|
12805
|
-
|
|
12800
|
+
} else if (outputPathData && routesManifest?.rsc?.dynamicRSCPrerender && routesManifest?.ppr?.chain?.headers) {
|
|
12801
|
+
let contentType = rscContentTypeHeader;
|
|
12802
|
+
if (postponedState) {
|
|
12803
|
+
contentType = `application/x-nextjs-pre-render; state-length=${postponedState.length}; origin=${JSON.stringify(
|
|
12804
|
+
rscContentTypeHeader
|
|
12805
|
+
)}`;
|
|
12806
|
+
}
|
|
12807
|
+
const rdcRSCAllowQuery = isAppClientParamParsingEnabled ? htmlAllowQuery : allowQuery;
|
|
12808
|
+
let fallback = null;
|
|
12809
|
+
if (rdcRSCAllowQuery && rdcRSCAllowQuery.length === 0 && postponedState) {
|
|
12810
|
+
fallback = new import_build_utils.FileBlob({
|
|
12811
|
+
data: postponedState,
|
|
12812
|
+
contentType
|
|
12813
|
+
});
|
|
12806
12814
|
}
|
|
12807
12815
|
prerenders[normalizePathData(outputPathData)] = new import_build_utils.Prerender({
|
|
12808
12816
|
expiration: initialRevalidate,
|
|
12809
12817
|
staleExpiration: initialExpire,
|
|
12810
12818
|
lambda,
|
|
12811
12819
|
allowQuery: rdcRSCAllowQuery,
|
|
12812
|
-
fallback
|
|
12813
|
-
// Use the fallback value for the RSC route if the route doesn't
|
|
12814
|
-
// vary based on the route parameters.
|
|
12815
|
-
rdcRSCAllowQuery && rdcRSCAllowQuery.length === 0 ? new import_build_utils.FileBlob({
|
|
12816
|
-
data: postponedState,
|
|
12817
|
-
contentType
|
|
12818
|
-
}) : null
|
|
12819
|
-
),
|
|
12820
|
+
fallback,
|
|
12820
12821
|
group: prerenderGroup,
|
|
12821
12822
|
bypassToken: prerenderManifest.bypassToken,
|
|
12822
12823
|
experimentalBypassFor,
|
|
@@ -12848,10 +12849,7 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
|
|
|
12848
12849
|
appDir,
|
|
12849
12850
|
routeFileNoExt + prefetchSegmentDirSuffix
|
|
12850
12851
|
);
|
|
12851
|
-
|
|
12852
|
-
if (isAppClientParamParsingEnabled && (isFallback || isBlocking)) {
|
|
12853
|
-
segmentAllowQuery = [];
|
|
12854
|
-
}
|
|
12852
|
+
const segmentAllowQuery = isAppClientParamParsingEnabled ? htmlAllowQuery : allowQuery;
|
|
12855
12853
|
for (const segmentPath of meta.segmentPaths) {
|
|
12856
12854
|
const outputSegmentPath = import_path3.default.join(
|
|
12857
12855
|
outputPathPage + prefetchSegmentDirSuffix,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/next",
|
|
3
|
-
"version": "4.13.
|
|
3
|
+
"version": "4.13.4",
|
|
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": "12.1.
|
|
33
|
+
"@vercel/build-utils": "12.1.3",
|
|
34
34
|
"@vercel/routing-utils": "5.2.0",
|
|
35
35
|
"async-sema": "3.0.1",
|
|
36
36
|
"buffer-crc32": "0.2.13",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
},
|
|
58
58
|
"scripts": {
|
|
59
59
|
"build": "node build.mjs",
|
|
60
|
-
"test": "
|
|
60
|
+
"test": "jest --reporters=default --reporters=jest-junit --env node --verbose --bail --runInBand --testTimeout=360000",
|
|
61
61
|
"test-unit": "pnpm test test/unit/",
|
|
62
62
|
"test-next-local": "pnpm test test/integration/*.test.js test/integration/*.test.ts",
|
|
63
63
|
"test-next-local-legacy": "pnpm test test/integration/legacy/*.test.js",
|