@vercel/next 4.17.5 → 4.18.0
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 +40 -7
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -3516,12 +3516,15 @@ var require_ensure = __commonJS({
|
|
|
3516
3516
|
}
|
|
3517
3517
|
});
|
|
3518
3518
|
|
|
3519
|
-
// ../../node_modules/.pnpm/jsonfile@6.1
|
|
3519
|
+
// ../../node_modules/.pnpm/jsonfile@6.2.1/node_modules/jsonfile/utils.js
|
|
3520
3520
|
var require_utils2 = __commonJS({
|
|
3521
|
-
"../../node_modules/.pnpm/jsonfile@6.1
|
|
3521
|
+
"../../node_modules/.pnpm/jsonfile@6.2.1/node_modules/jsonfile/utils.js"(exports, module2) {
|
|
3522
3522
|
function stringify(obj, { EOL = "\n", finalEOL = true, replacer = null, spaces } = {}) {
|
|
3523
3523
|
const EOF = finalEOL ? EOL : "";
|
|
3524
3524
|
const str = JSON.stringify(obj, replacer, spaces);
|
|
3525
|
+
if (str === void 0) {
|
|
3526
|
+
throw new TypeError(`Converting ${typeof obj} value to JSON is not supported`);
|
|
3527
|
+
}
|
|
3525
3528
|
return str.replace(/\n/g, EOL) + EOF;
|
|
3526
3529
|
}
|
|
3527
3530
|
function stripBom(content) {
|
|
@@ -3533,9 +3536,9 @@ var require_utils2 = __commonJS({
|
|
|
3533
3536
|
}
|
|
3534
3537
|
});
|
|
3535
3538
|
|
|
3536
|
-
// ../../node_modules/.pnpm/jsonfile@6.1
|
|
3539
|
+
// ../../node_modules/.pnpm/jsonfile@6.2.1/node_modules/jsonfile/index.js
|
|
3537
3540
|
var require_jsonfile = __commonJS({
|
|
3538
|
-
"../../node_modules/.pnpm/jsonfile@6.1
|
|
3541
|
+
"../../node_modules/.pnpm/jsonfile@6.2.1/node_modules/jsonfile/index.js"(exports, module2) {
|
|
3539
3542
|
var _fs;
|
|
3540
3543
|
try {
|
|
3541
3544
|
_fs = require_graceful_fs();
|
|
@@ -3596,13 +3599,12 @@ var require_jsonfile = __commonJS({
|
|
|
3596
3599
|
const str = stringify(obj, options);
|
|
3597
3600
|
return fs5.writeFileSync(file, str, options);
|
|
3598
3601
|
}
|
|
3599
|
-
|
|
3602
|
+
module2.exports = {
|
|
3600
3603
|
readFile: readFile3,
|
|
3601
3604
|
readFileSync,
|
|
3602
3605
|
writeFile: writeFile2,
|
|
3603
3606
|
writeFileSync
|
|
3604
3607
|
};
|
|
3605
|
-
module2.exports = jsonfile;
|
|
3606
3608
|
}
|
|
3607
3609
|
});
|
|
3608
3610
|
|
|
@@ -12613,9 +12615,11 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
|
|
|
12613
12615
|
let postponedPrerender;
|
|
12614
12616
|
let postponedState = null;
|
|
12615
12617
|
let didPostpone = false;
|
|
12618
|
+
let hasPostponed;
|
|
12616
12619
|
if (renderingMode === "PARTIALLY_STATIC" /* PARTIALLY_STATIC */ && appDir && // TODO(NAR-402): Investigate omitted routes
|
|
12617
12620
|
!isBlocking) {
|
|
12618
12621
|
postponedState = getHTMLPostponedState({ appDir, routeFileNoExt });
|
|
12622
|
+
hasPostponed = Boolean(postponedState);
|
|
12619
12623
|
const htmlPath = import_path3.default.join(appDir, `${routeFileNoExt}.html`);
|
|
12620
12624
|
if (import_fs_extra3.default.existsSync(htmlPath)) {
|
|
12621
12625
|
const html = import_fs_extra3.default.readFileSync(htmlPath, "utf8");
|
|
@@ -12884,6 +12888,7 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
|
|
|
12884
12888
|
chain,
|
|
12885
12889
|
allowHeader,
|
|
12886
12890
|
partialFallback: partialFallback || void 0,
|
|
12891
|
+
hasPostponed,
|
|
12887
12892
|
...isNotFound ? {
|
|
12888
12893
|
initialStatus: 404
|
|
12889
12894
|
} : {},
|
|
@@ -12917,6 +12922,7 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
|
|
|
12917
12922
|
experimentalBypassFor,
|
|
12918
12923
|
allowHeader,
|
|
12919
12924
|
partialFallback: void 0,
|
|
12925
|
+
hasPostponed,
|
|
12920
12926
|
...isNotFound ? {
|
|
12921
12927
|
initialStatus: 404
|
|
12922
12928
|
} : {},
|
|
@@ -12971,6 +12977,7 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
|
|
|
12971
12977
|
experimentalBypassFor,
|
|
12972
12978
|
allowHeader,
|
|
12973
12979
|
partialFallback: void 0,
|
|
12980
|
+
hasPostponed,
|
|
12974
12981
|
chain: {
|
|
12975
12982
|
outputPath: normalizePathData(outputPathData),
|
|
12976
12983
|
headers: routesManifest.ppr.chain.headers
|
|
@@ -13037,6 +13044,7 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
|
|
|
13037
13044
|
group: prerenderGroup,
|
|
13038
13045
|
allowHeader,
|
|
13039
13046
|
partialFallback: void 0,
|
|
13047
|
+
hasPostponed,
|
|
13040
13048
|
// These routes are always only static, so they should not
|
|
13041
13049
|
// permit any bypass unless it's for preview
|
|
13042
13050
|
bypassToken: prerenderManifest.bypassToken,
|
|
@@ -16599,6 +16607,7 @@ var build = async (buildOptions) => {
|
|
|
16599
16607
|
const nodeVersion = await (0, import_build_utils3.getNodeVersion)(entryPath, void 0, config, meta);
|
|
16600
16608
|
const {
|
|
16601
16609
|
cliType,
|
|
16610
|
+
lockfilePath,
|
|
16602
16611
|
lockfileVersion,
|
|
16603
16612
|
packageJsonPackageManager,
|
|
16604
16613
|
turboSupportsCorepackHome
|
|
@@ -16818,6 +16827,21 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
|
|
|
16818
16827
|
if (buildCallback) {
|
|
16819
16828
|
await buildCallback(buildOptions);
|
|
16820
16829
|
}
|
|
16830
|
+
try {
|
|
16831
|
+
await (0, import_build_utils3.generateProjectManifest)({
|
|
16832
|
+
workPath,
|
|
16833
|
+
nodeVersion,
|
|
16834
|
+
cliType,
|
|
16835
|
+
lockfilePath,
|
|
16836
|
+
lockfileVersion,
|
|
16837
|
+
framework: config.framework ?? void 0,
|
|
16838
|
+
serviceType: buildOptions.service ? (0, import_build_utils3.getReportedServiceType)(buildOptions.service) : void 0
|
|
16839
|
+
});
|
|
16840
|
+
} catch (err) {
|
|
16841
|
+
(0, import_build_utils3.debug)(
|
|
16842
|
+
`Failed to write next manifest: ${err instanceof Error ? err.message : String(err)}`
|
|
16843
|
+
);
|
|
16844
|
+
}
|
|
16821
16845
|
let buildOutputVersion;
|
|
16822
16846
|
try {
|
|
16823
16847
|
const data = await (0, import_fs_extra6.readJSON)(
|
|
@@ -18626,11 +18650,13 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
|
|
|
18626
18650
|
...deploymentId && { deploymentId }
|
|
18627
18651
|
};
|
|
18628
18652
|
};
|
|
18653
|
+
var packageManifestDiagnostics = (0, import_build_utils3.createDiagnostics)("node");
|
|
18629
18654
|
var diagnostics = async ({
|
|
18630
18655
|
config,
|
|
18631
18656
|
entrypoint,
|
|
18632
18657
|
workPath,
|
|
18633
|
-
repoRootPath
|
|
18658
|
+
repoRootPath,
|
|
18659
|
+
...rest
|
|
18634
18660
|
}) => {
|
|
18635
18661
|
const entryDirectory = import_path6.default.dirname(entrypoint);
|
|
18636
18662
|
const entryPath = import_path6.default.join(workPath, entryDirectory);
|
|
@@ -18641,6 +18667,13 @@ var diagnostics = async ({
|
|
|
18641
18667
|
`Reading diagnostics file in diagnosticsEntrypoint=${diagnosticsEntrypoint}`
|
|
18642
18668
|
);
|
|
18643
18669
|
return {
|
|
18670
|
+
...await packageManifestDiagnostics({
|
|
18671
|
+
config,
|
|
18672
|
+
entrypoint,
|
|
18673
|
+
workPath,
|
|
18674
|
+
repoRootPath,
|
|
18675
|
+
...rest
|
|
18676
|
+
}),
|
|
18644
18677
|
// Collect output in `.next/diagnostics`
|
|
18645
18678
|
...await (0, import_build_utils3.glob)(
|
|
18646
18679
|
"*",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/next",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.18.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index",
|
|
6
6
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"text-table": "0.2.0",
|
|
54
54
|
"vitest": "2.0.3",
|
|
55
55
|
"webpack-sources": "3.2.3",
|
|
56
|
-
"@vercel/
|
|
57
|
-
"@vercel/
|
|
56
|
+
"@vercel/build-utils": "13.28.0",
|
|
57
|
+
"@vercel/routing-utils": "6.2.0"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"build": "node build.mjs",
|