@vercel/next 4.2.15 → 4.2.17

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 +42 -3
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -12971,7 +12971,8 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
12971
12971
  routesManifest,
12972
12972
  isCorrectNotFoundRoutes,
12973
12973
  isEmptyAllowQueryForPrendered,
12974
- isAppPPREnabled
12974
+ isAppPPREnabled,
12975
+ hasActionOutputSupport
12975
12976
  } = prerenderRouteArgs;
12976
12977
  if (isBlocking && isFallback) {
12977
12978
  throw new import_build_utils.NowBuildError({
@@ -13299,6 +13300,12 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
13299
13300
  }
13300
13301
  } : {}
13301
13302
  });
13303
+ if (hasActionOutputSupport) {
13304
+ const actionOutputKey = `${import_path2.default.join("./", srcRoute || "")}.action`;
13305
+ if (srcRoute !== routeKey && lambdas[actionOutputKey]) {
13306
+ lambdas[`${routeKey}.action`] = lambdas[actionOutputKey];
13307
+ }
13308
+ }
13302
13309
  const normalizePathData = (pathData) => {
13303
13310
  if ((srcRoute === "/" || srcRoute == "/index") && pathData.endsWith(RSC_PREFETCH_SUFFIX)) {
13304
13311
  delete lambdas[pathData];
@@ -14451,7 +14458,7 @@ async function serverBuild({
14451
14458
  nextVersion,
14452
14459
  EMPTY_ALLOW_QUERY_FOR_PRERENDERED_VERSION
14453
14460
  );
14454
- const hasActionOutputSupport = import_semver3.default.gte(nextVersion, ACTION_OUTPUT_SUPPORT_VERSION) && Boolean(process.env.NEXT_EXPERIMENTAL_STREAMING_ACTIONS);
14461
+ const hasActionOutputSupport = import_semver3.default.gte(nextVersion, ACTION_OUTPUT_SUPPORT_VERSION) && Boolean(process.env.NEXT_EXPERIMENTAL_STREAMING_ACTIONS) && !routesManifest.i18n;
14455
14462
  const projectDir = requiredServerFilesManifest.relativeAppDir ? import_path4.default.join(baseDir, requiredServerFilesManifest.relativeAppDir) : requiredServerFilesManifest.appDir || entryPath;
14456
14463
  const inversedAppPathManifest = {};
14457
14464
  if (appPathRoutesManifest) {
@@ -15306,7 +15313,8 @@ async function serverBuild({
15306
15313
  hasPages404: routesManifest.pages404,
15307
15314
  isCorrectNotFoundRoutes,
15308
15315
  isEmptyAllowQueryForPrendered,
15309
- isAppPPREnabled
15316
+ isAppPPREnabled,
15317
+ hasActionOutputSupport
15310
15318
  });
15311
15319
  await Promise.all(
15312
15320
  Object.keys(prerenderManifest.staticRoutes).map(
@@ -15888,6 +15896,19 @@ async function serverBuild({
15888
15896
  check: true
15889
15897
  }
15890
15898
  ] : [],
15899
+ // before processing rewrites, remove any special `/index` routes that were added
15900
+ // as these won't be properly normalized by `afterFilesRewrites` / `dynamicRoutes`
15901
+ ...appPathRoutesManifest ? [
15902
+ {
15903
+ src: import_path4.default.posix.join(
15904
+ "/",
15905
+ entryDirectory,
15906
+ "/index(\\.action|\\.rsc)"
15907
+ ),
15908
+ dest: import_path4.default.posix.join("/", entryDirectory),
15909
+ continue: true
15910
+ }
15911
+ ] : [],
15891
15912
  // These need to come before handle: miss or else they are grouped
15892
15913
  // with that routing section
15893
15914
  ...afterFilesRewrites,
@@ -15918,10 +15939,28 @@ async function serverBuild({
15918
15939
  ),
15919
15940
  check: true
15920
15941
  },
15942
+ {
15943
+ src: import_path4.default.posix.join(
15944
+ "/",
15945
+ entryDirectory,
15946
+ "(.+)/\\.prefetch\\.rsc$"
15947
+ ),
15948
+ dest: import_path4.default.posix.join(
15949
+ "/",
15950
+ entryDirectory,
15951
+ `$1${RSC_PREFETCH_SUFFIX}`
15952
+ ),
15953
+ check: true
15954
+ },
15921
15955
  {
15922
15956
  src: import_path4.default.posix.join("/", entryDirectory, "/\\.rsc$"),
15923
15957
  dest: import_path4.default.posix.join("/", entryDirectory, `/index.rsc`),
15924
15958
  check: true
15959
+ },
15960
+ {
15961
+ src: import_path4.default.posix.join("/", entryDirectory, "(.+)/\\.rsc$"),
15962
+ dest: import_path4.default.posix.join("/", entryDirectory, "$1.rsc"),
15963
+ check: true
15925
15964
  }
15926
15965
  ] : [],
15927
15966
  { handle: "resource" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/next",
3
- "version": "4.2.15",
3
+ "version": "4.2.17",
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.0"
16
+ "@vercel/nft": "0.27.2"
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": "8.2.1",
33
+ "@vercel/build-utils": "8.2.2",
34
34
  "@vercel/routing-utils": "3.1.0",
35
35
  "async-sema": "3.0.1",
36
36
  "buffer-crc32": "0.2.13",