@vercel/next 4.15.32 → 4.15.33

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 +15 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -12167,6 +12167,17 @@ function addLocaleOrDefault(pathname, routesManifest, locale) {
12167
12167
  locale = routesManifest.i18n.defaultLocale;
12168
12168
  return locale ? `/${locale}${pathname === "/index" ? "" : pathname}` : pathname;
12169
12169
  }
12170
+ function compareRegions(a, b) {
12171
+ if (a === void 0 && b === void 0)
12172
+ return true;
12173
+ if (a === void 0 || b === void 0)
12174
+ return false;
12175
+ if (a.length !== b.length)
12176
+ return false;
12177
+ const sortedA = [...a].sort();
12178
+ const sortedB = [...b].sort();
12179
+ return sortedA.every((val, idx) => val === sortedB[idx]);
12180
+ }
12170
12181
  async function getPageLambdaGroups({
12171
12182
  entryPath,
12172
12183
  config,
@@ -12194,7 +12205,8 @@ async function getPageLambdaGroups({
12194
12205
  const isExperimentalPPR = experimentalPPRRoutes?.has(routeName) ?? false;
12195
12206
  let opts = {};
12196
12207
  if (functionsConfigManifest && functionsConfigManifest.functions[routeName]) {
12197
- opts = functionsConfigManifest.functions[routeName];
12208
+ const { regions: _regions, ...manifestOpts } = functionsConfigManifest.functions[routeName];
12209
+ opts = manifestOpts;
12198
12210
  }
12199
12211
  if (config && config.functions) {
12200
12212
  const sourceFile = await getSourceFilePathFromPage({
@@ -12239,7 +12251,7 @@ async function getPageLambdaGroups({
12239
12251
  }
12240
12252
  }
12241
12253
  let matchingGroup = experimentalAllowBundling ? void 0 : groups.find((group) => {
12242
- const matches = group.maxDuration === opts.maxDuration && group.memory === opts.memory && group.isPrerenders === isPrerenderRoute && group.isExperimentalPPR === isExperimentalPPR && JSON.stringify(group.experimentalTriggers) === JSON.stringify(opts.experimentalTriggers) && group.supportsCancellation === opts.supportsCancellation;
12254
+ const matches = group.maxDuration === opts.maxDuration && group.memory === opts.memory && compareRegions(group.regions, opts.regions) && group.isPrerenders === isPrerenderRoute && group.isExperimentalPPR === isExperimentalPPR && JSON.stringify(group.experimentalTriggers) === JSON.stringify(opts.experimentalTriggers) && group.supportsCancellation === opts.supportsCancellation;
12243
12255
  if (matches) {
12244
12256
  let newTracedFilesUncompressedSize = group.pseudoLayerUncompressedBytes;
12245
12257
  for (const newPage of newPages) {
@@ -15220,6 +15232,7 @@ ${JSON.stringify(
15220
15232
  ),
15221
15233
  operationType,
15222
15234
  memory: group.memory,
15235
+ regions: group.regions,
15223
15236
  runtime: nodeVersion.runtime,
15224
15237
  maxDuration: group.maxDuration,
15225
15238
  supportsCancellation: group.supportsCancellation,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/next",
3
- "version": "4.15.32",
3
+ "version": "4.15.33",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",