@vercel/next 4.4.1 → 4.4.2
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 +10 -5
- package/package.json +3 -3
package/dist/index.js
CHANGED
@@ -11769,17 +11769,24 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
|
|
11769
11769
|
const isOmittedOrNotFound = isOmitted || isNotFound;
|
11770
11770
|
let htmlFsRef = null;
|
11771
11771
|
let postponedPrerender;
|
11772
|
+
let didPostpone = false;
|
11772
11773
|
if (renderingMode === "PARTIALLY_STATIC" /* PARTIALLY_STATIC */ && appDir) {
|
11773
11774
|
const htmlPath = import_path2.default.join(appDir, `${routeFileNoExt}.html`);
|
11774
11775
|
const metaPath = import_path2.default.join(appDir, `${routeFileNoExt}.meta`);
|
11775
11776
|
if (import_fs_extra3.default.existsSync(htmlPath) && import_fs_extra3.default.existsSync(metaPath)) {
|
11776
11777
|
const meta = JSON.parse(await import_fs_extra3.default.readFile(metaPath, "utf8"));
|
11777
11778
|
if ("postponed" in meta && typeof meta.postponed === "string") {
|
11779
|
+
didPostpone = true;
|
11778
11780
|
postponedPrerender = meta.postponed;
|
11779
11781
|
initialHeaders ??= {};
|
11780
11782
|
initialHeaders["content-type"] = `application/x-nextjs-pre-render; state-length=${meta.postponed.length}`;
|
11781
11783
|
const html = await import_fs_extra3.default.readFileSync(htmlPath, "utf8");
|
11782
11784
|
postponedPrerender += html;
|
11785
|
+
} else {
|
11786
|
+
initialHeaders ??= {};
|
11787
|
+
initialHeaders["content-type"] = "text/html; charset=utf-8";
|
11788
|
+
const html = await import_fs_extra3.default.readFileSync(htmlPath, "utf8");
|
11789
|
+
postponedPrerender = html;
|
11783
11790
|
}
|
11784
11791
|
}
|
11785
11792
|
if (!dataRoute?.endsWith(".rsc")) {
|
@@ -12058,7 +12065,7 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
|
|
12058
12065
|
...isAppPathRoute ? {
|
12059
12066
|
"content-type": rscContentTypeHeader
|
12060
12067
|
} : {},
|
12061
|
-
...
|
12068
|
+
...didPostpone && rscDidPostponeHeader && !isFallback ? { [rscDidPostponeHeader]: "1" } : {}
|
12062
12069
|
}
|
12063
12070
|
} : {}
|
12064
12071
|
});
|
@@ -15026,8 +15033,7 @@ var build = async (buildOptions) => {
|
|
15026
15033
|
cliType,
|
15027
15034
|
lockfileVersion,
|
15028
15035
|
packageJsonPackageManager,
|
15029
|
-
turboSupportsCorepackHome
|
15030
|
-
detectedLockfile
|
15036
|
+
turboSupportsCorepackHome
|
15031
15037
|
} = await (0, import_build_utils3.scanParentDirs)(entryPath, true);
|
15032
15038
|
spawnOpts.env = (0, import_build_utils3.getEnvForPackageManager)({
|
15033
15039
|
cliType,
|
@@ -15035,8 +15041,7 @@ var build = async (buildOptions) => {
|
|
15035
15041
|
packageJsonPackageManager,
|
15036
15042
|
nodeVersion,
|
15037
15043
|
env: spawnOpts.env || {},
|
15038
|
-
turboSupportsCorepackHome
|
15039
|
-
detectedLockfile
|
15044
|
+
turboSupportsCorepackHome
|
15040
15045
|
});
|
15041
15046
|
const nowJsonPath = await (0, import_find_up.default)(["now.json", "vercel.json"], {
|
15042
15047
|
cwd: entryPath
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vercel/next",
|
3
|
-
"version": "4.4.
|
3
|
+
"version": "4.4.2",
|
4
4
|
"license": "Apache-2.0",
|
5
5
|
"main": "./dist/index",
|
6
6
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
|
@@ -13,7 +13,7 @@
|
|
13
13
|
"dist"
|
14
14
|
],
|
15
15
|
"dependencies": {
|
16
|
-
"@vercel/nft": "0.27.
|
16
|
+
"@vercel/nft": "0.27.10"
|
17
17
|
},
|
18
18
|
"devDependencies": {
|
19
19
|
"@types/aws-lambda": "8.10.19",
|
@@ -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": "9.0.
|
33
|
+
"@vercel/build-utils": "9.0.1",
|
34
34
|
"@vercel/routing-utils": "5.0.0",
|
35
35
|
"async-sema": "3.0.1",
|
36
36
|
"buffer-crc32": "0.2.13",
|