@vercel/next 5.0.0 → 6.0.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.
Files changed (2) hide show
  1. package/dist/index.js +20 -22
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -11877,15 +11877,15 @@ async function createLambdaFromPseudoLayers({
11877
11877
  shouldDisableAutomaticFetchInstrumentation: process.env.VERCEL_TRACING_DISABLE_AUTOMATIC_FETCH_INSTRUMENTATION === "1"
11878
11878
  });
11879
11879
  }
11880
- function toPrerenderClassification(entry) {
11881
- const { routeType, response, compute, htmlSize } = entry;
11882
- if (!routeType || !response || !compute) {
11880
+ function toInitialMetadata(entry) {
11881
+ const { compute, htmlSize } = entry;
11882
+ if (!compute) {
11883
11883
  return void 0;
11884
11884
  }
11885
11885
  return {
11886
- routeType,
11887
- response,
11888
11886
  compute,
11887
+ // Zero is a real shell size — a shell that postponed everything — so
11888
+ // this tests for presence, not truthiness.
11889
11889
  ...htmlSize !== void 0 ? { htmlSize } : {}
11890
11890
  };
11891
11891
  }
@@ -12056,11 +12056,9 @@ async function getPrerenderManifest(entryPath, outputDirectory) {
12056
12056
  let prefetchDataRoute;
12057
12057
  let allowHeader;
12058
12058
  let renderingMode;
12059
- let prerenderClassification;
12059
+ let initialMetadata;
12060
12060
  if (manifest.version === 4) {
12061
- prerenderClassification = toPrerenderClassification(
12062
- manifest.routes[route]
12063
- );
12061
+ initialMetadata = toInitialMetadata(manifest.routes[route]);
12064
12062
  initialExpireSeconds = manifest.routes[route].initialExpireSeconds;
12065
12063
  initialStatus = manifest.routes[route].initialStatus;
12066
12064
  initialHeaders = manifest.routes[route].initialHeaders;
@@ -12073,7 +12071,7 @@ async function getPrerenderManifest(entryPath, outputDirectory) {
12073
12071
  allowHeader = void 0;
12074
12072
  }
12075
12073
  ret.staticRoutes[route] = {
12076
- prerenderClassification,
12074
+ initialMetadata,
12077
12075
  initialRevalidate: initialRevalidateSeconds === false ? false : Math.max(1, initialRevalidateSeconds),
12078
12076
  initialExpire: initialExpireSeconds,
12079
12077
  dataRoute,
@@ -12099,9 +12097,9 @@ async function getPrerenderManifest(entryPath, outputDirectory) {
12099
12097
  let fallbackRootParams;
12100
12098
  let allowHeader;
12101
12099
  let fallbackSourceRoute;
12102
- let prerenderClassification;
12100
+ let initialMetadata;
12103
12101
  if (manifest.version === 4) {
12104
- prerenderClassification = toPrerenderClassification(
12102
+ initialMetadata = toInitialMetadata(
12105
12103
  manifest.dynamicRoutes[lazyRoute]
12106
12104
  );
12107
12105
  experimentalBypassFor = manifest.dynamicRoutes[lazyRoute].experimentalBypassFor;
@@ -12120,7 +12118,7 @@ async function getPrerenderManifest(entryPath, outputDirectory) {
12120
12118
  }
12121
12119
  if (typeof fallback === "string") {
12122
12120
  ret.fallbackRoutes[lazyRoute] = {
12123
- prerenderClassification,
12121
+ initialMetadata,
12124
12122
  experimentalBypassFor,
12125
12123
  routeRegex,
12126
12124
  fallback,
@@ -12139,7 +12137,7 @@ async function getPrerenderManifest(entryPath, outputDirectory) {
12139
12137
  };
12140
12138
  } else if (fallback === null) {
12141
12139
  ret.blockingFallbackRoutes[lazyRoute] = {
12142
- prerenderClassification,
12140
+ initialMetadata,
12143
12141
  experimentalBypassFor,
12144
12142
  routeRegex,
12145
12143
  dataRoute,
@@ -12153,7 +12151,7 @@ async function getPrerenderManifest(entryPath, outputDirectory) {
12153
12151
  };
12154
12152
  } else {
12155
12153
  ret.omittedRoutes[lazyRoute] = {
12156
- prerenderClassification,
12154
+ initialMetadata,
12157
12155
  experimentalBypassFor,
12158
12156
  routeRegex,
12159
12157
  dataRoute,
@@ -12707,10 +12705,10 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
12707
12705
  let experimentalBypassFor;
12708
12706
  let renderingMode;
12709
12707
  let allowHeader;
12710
- let prerenderClassification;
12708
+ let initialMetadata;
12711
12709
  if (isFallback || isBlocking) {
12712
12710
  const pr = isFallback ? prerenderManifest.fallbackRoutes[routeKey] : prerenderManifest.blockingFallbackRoutes[routeKey];
12713
- prerenderClassification = pr.prerenderClassification;
12711
+ initialMetadata = pr.initialMetadata;
12714
12712
  initialRevalidate = 1;
12715
12713
  if (initialRevalidate === false) {
12716
12714
  throw new import_build_utils.NowBuildError({
@@ -12725,7 +12723,7 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
12725
12723
  renderingMode = pr.renderingMode;
12726
12724
  prefetchDataRoute = pr.prefetchDataRoute;
12727
12725
  } else if (isOmitted) {
12728
- prerenderClassification = prerenderManifest.omittedRoutes[routeKey].prerenderClassification;
12726
+ initialMetadata = prerenderManifest.omittedRoutes[routeKey].initialMetadata;
12729
12727
  initialRevalidate = false;
12730
12728
  srcRoute = routeKey;
12731
12729
  dataRoute = prerenderManifest.omittedRoutes[routeKey].dataRoute;
@@ -12735,7 +12733,7 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
12735
12733
  prefetchDataRoute = prerenderManifest.omittedRoutes[routeKey].prefetchDataRoute;
12736
12734
  } else {
12737
12735
  const pr = prerenderManifest.staticRoutes[routeKey];
12738
- prerenderClassification = pr.prerenderClassification;
12736
+ initialMetadata = pr.initialMetadata;
12739
12737
  ({
12740
12738
  initialRevalidate,
12741
12739
  initialExpire,
@@ -13057,11 +13055,11 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
13057
13055
  chain,
13058
13056
  allowHeader,
13059
13057
  partialFallback: partialFallback || void 0,
13060
- // The classification goes on the primary output only, so each route
13061
- // group has exactly one classified entry; the sibling data and
13058
+ // The metadata goes on the primary output only, so each route
13059
+ // group has exactly one carrying entry; the sibling data and
13062
13060
  // segment prerenders below are grouped back to it by `sourcePath`
13063
13061
  // downstream.
13064
- prerenderClassification,
13062
+ initialMetadata,
13065
13063
  ...isNotFound ? {
13066
13064
  initialStatus: 404
13067
13065
  } : {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/next",
3
- "version": "5.0.0",
3
+ "version": "6.0.0",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
@@ -16,7 +16,7 @@
16
16
  "@vercel/nft": "1.10.0"
17
17
  },
18
18
  "peerDependencies": {
19
- "@vercel/build-utils": "14.3.0"
19
+ "@vercel/build-utils": "14.4.0"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@next-community/adapter-vercel": "0.0.1-beta.27",
@@ -57,7 +57,7 @@
57
57
  "vite": "6.4.3",
58
58
  "vitest": "4.1.10",
59
59
  "webpack-sources": "3.2.3",
60
- "@vercel/build-utils": "14.3.0",
60
+ "@vercel/build-utils": "14.4.0",
61
61
  "@vercel/routing-utils": "6.5.0"
62
62
  },
63
63
  "scripts": {