@vercel/next 4.17.5 → 4.17.6

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.
Files changed (2) hide show
  1. package/dist/index.js +14 -6
  2. package/package.json +2 -2
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.0/node_modules/jsonfile/utils.js
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.0/node_modules/jsonfile/utils.js"(exports, module2) {
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.0/node_modules/jsonfile/index.js
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.0/node_modules/jsonfile/index.js"(exports, module2) {
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
- var jsonfile = {
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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/next",
3
- "version": "4.17.5",
3
+ "version": "4.17.6",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
@@ -54,7 +54,7 @@
54
54
  "vitest": "2.0.3",
55
55
  "webpack-sources": "3.2.3",
56
56
  "@vercel/routing-utils": "6.2.0",
57
- "@vercel/build-utils": "13.26.4"
57
+ "@vercel/build-utils": "13.28.0"
58
58
  },
59
59
  "scripts": {
60
60
  "build": "node build.mjs",