Compare commits

..

2 Commits

Author SHA1 Message Date
Tim Neutkens
85947b658e Publish Stable
- vercel@29.0.2
 - @vercel/next@3.8.1
2023-04-30 11:47:04 +02:00
Tim Neutkens
7ab86a94fb [next] Fix return value in normalizeRegions (#9876)
Missed that the newRegions wasn't returned. Also added a check for empty
array, e.g. when `home` is not supported and such.
2023-04-30 11:45:28 +02:00
4 changed files with 12 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "vercel",
"version": "29.0.1",
"version": "29.0.2",
"preferGlobal": true,
"license": "Apache-2.0",
"description": "The command-line interface for Vercel",
@@ -35,7 +35,7 @@
"@vercel/build-utils": "6.7.2",
"@vercel/go": "2.5.1",
"@vercel/hydrogen": "0.0.64",
"@vercel/next": "3.8.0",
"@vercel/next": "3.8.1",
"@vercel/node": "2.14.0",
"@vercel/python": "3.1.60",
"@vercel/redwood": "1.1.15",

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/next",
"version": "3.8.0",
"version": "3.8.1",
"license": "Apache-2.0",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",

View File

@@ -2392,7 +2392,7 @@ if (vercelFunctionRegionsVar) {
* - `home` refers to the regions set in vercel.json or on the Vercel dashboard project config.
* - `global` refers to all regions.
*/
function normalizeRegions(regions: Regions): string[] {
function normalizeRegions(regions: Regions): undefined | string[] {
if (typeof regions === 'string') {
regions = [regions];
}
@@ -2423,7 +2423,13 @@ function normalizeRegions(regions: Regions): string[] {
newRegions.push(region);
}
return [];
// Ensure we don't pass an empty array as that is not supported.
if (newRegions.length === 0) {
return undefined;
}
return newRegions;
}
export async function getMiddlewareBundle({

2
pnpm-lock.yaml generated
View File

@@ -318,7 +318,7 @@ importers:
specifier: 0.0.64
version: link:../hydrogen
'@vercel/next':
specifier: 3.8.0
specifier: 3.8.1
version: link:../next
'@vercel/node':
specifier: 2.14.0