@vercel/next 3.8.0 → 3.8.2

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 CHANGED
@@ -45881,17 +45881,21 @@ function normalizeRegions(regions) {
45881
45881
  // Explicitly mentioned as `global` is one of the explicit values for preferredRegion in Next.js.
45882
45882
  if (region === 'global') {
45883
45883
  // Uses `all` instead as that's how it's implemented on Vercel.
45884
- newRegions.push('all');
45885
- continue;
45884
+ // Returns here as when all is provided all regions will be matched.
45885
+ return 'all';
45886
45886
  }
45887
45887
  // Explicitly mentioned as `auto` is one of the explicit values for preferredRegion in Next.js.
45888
45888
  if (region === 'auto') {
45889
- newRegions.push('auto');
45890
- continue;
45889
+ // Returns here as when auto is provided all regions will be matched.
45890
+ return 'auto';
45891
45891
  }
45892
45892
  newRegions.push(region);
45893
45893
  }
45894
- return [];
45894
+ // Ensure we don't pass an empty array as that is not supported.
45895
+ if (newRegions.length === 0) {
45896
+ return undefined;
45897
+ }
45898
+ return newRegions;
45895
45899
  }
45896
45900
  async function getMiddlewareBundle({ entryPath, outputDirectory, routesManifest, isCorrectMiddlewareOrder, prerenderBypassToken, nextVersion, appPathRoutesManifest, }) {
45897
45901
  const middlewareManifest = await getMiddlewareManifest(entryPath, outputDirectory);
package/dist/utils.js CHANGED
@@ -1524,17 +1524,21 @@ function normalizeRegions(regions) {
1524
1524
  // Explicitly mentioned as `global` is one of the explicit values for preferredRegion in Next.js.
1525
1525
  if (region === 'global') {
1526
1526
  // Uses `all` instead as that's how it's implemented on Vercel.
1527
- newRegions.push('all');
1528
- continue;
1527
+ // Returns here as when all is provided all regions will be matched.
1528
+ return 'all';
1529
1529
  }
1530
1530
  // Explicitly mentioned as `auto` is one of the explicit values for preferredRegion in Next.js.
1531
1531
  if (region === 'auto') {
1532
- newRegions.push('auto');
1533
- continue;
1532
+ // Returns here as when auto is provided all regions will be matched.
1533
+ return 'auto';
1534
1534
  }
1535
1535
  newRegions.push(region);
1536
1536
  }
1537
- return [];
1537
+ // Ensure we don't pass an empty array as that is not supported.
1538
+ if (newRegions.length === 0) {
1539
+ return undefined;
1540
+ }
1541
+ return newRegions;
1538
1542
  }
1539
1543
  async function getMiddlewareBundle({ entryPath, outputDirectory, routesManifest, isCorrectMiddlewareOrder, prerenderBypassToken, nextVersion, appPathRoutesManifest, }) {
1540
1544
  const middlewareManifest = await getMiddlewareManifest(entryPath, outputDirectory);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/next",
3
- "version": "3.8.0",
3
+ "version": "3.8.2",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
@@ -60,5 +60,5 @@
60
60
  "text-table": "0.2.0",
61
61
  "webpack-sources": "3.2.3"
62
62
  },
63
- "gitHead": "b5db13c97035d0eae04a5e075ae74e488d1298d6"
63
+ "gitHead": "f8749e1ff1d69fe25421a1f0f9309542ea50ad6e"
64
64
  }