New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[next] Add support for home
and global
as edge function regions
#9869
Conversation
* Normalizes the regions config that comes from the Next.js edge functions manifest. | ||
* Ensures that config like `home` and `global` are converted to the corresponding Vercel region config. | ||
* In the future we'll want to make `home` and `global` part of the Build Output API. | ||
* - `home` refers to the regions set in vercel.json or on the Vercel dashboard project config. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
omfg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have context in the home
/global
requirements, but from the code and comments, this makes sense to me.
* - `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[] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (soft-blocking): add tests
In this or a follow-up PR: Can we add tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can look at tests in a follow-up yeah
3ca9da9
to
7f7a0dc
Compare
58b3ed8
to
84043d9
Compare
84043d9
to
b0f1df1
Compare
b0f1df1
to
95f1df6
Compare
95f1df6
to
27e2094
Compare
…ome-region-config
…/vercel into add/global-and-home-region-config
home
and global
as edge function regionshome
and global
as edge function regions
Adds
home
andglobal
as supported values forregions
when coming from Next.js. We'll port these to the build output API at a later time.Related Next.js changes: vercel/next.js#48959