Skip to content
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] use middleware manifest worker environments #11390

Merged

Conversation

ecklf
Copy link
Member

@ecklf ecklf commented Apr 5, 2024

This PR adds changes to the Next.js builder to pass the per-worker environment emitted from the Next.js middleware manifest to the created EdgeFunction resource.

Copy link

changeset-bot bot commented Apr 5, 2024

🦋 Changeset detected

Latest commit: 5a8dccf

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@vercel/next Minor
vercel Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ecklf ecklf marked this pull request as ready for review April 8, 2024 14:49
Copy link
Member

@styfle styfle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add tests

@ecklf
Copy link
Member Author

ecklf commented Apr 9, 2024

Please add tests

This depends on a new Next.js canary release and if we ship the Next.js change first then canary builds are failing because they don't know how to handle the new manifest version?

Can do a follow-up PR

@ecklf ecklf added the pr: automerge Automatically merge the PR when checks pass label Apr 10, 2024
@kodiakhq kodiakhq bot merged commit 2461b57 into main Apr 10, 2024
111 checks passed
@kodiakhq kodiakhq bot deleted the ecklf/ec-1958-vercelnext-create-edgefunctions-with-environment branch April 10, 2024 08:27
TooTallNate added a commit that referenced this pull request Apr 10, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.

- Add support for edge function environment variables
([#11390](#11390))

- fix flickering during interactive UI rerendering
([#11392](#11392))

- fix `vc ls` message to be `vc projects ls`
([#11400](#11400))

- Updated dependencies
\[[`2461b571a`](2461b57)]:
    -   @vercel/next@4.2.0
TooTallNate added a commit that referenced this pull request Apr 10, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.

- Add support for edge function environment variables
([#11390](#11390))

- fix flickering during interactive UI rerendering
([#11392](#11392))

- fix `vc ls` message to be `vc projects ls`
([#11400](#11400))

- Updated dependencies
\[[`2461b571a`](2461b57)]:
    -   @vercel/next@4.2.0
huozhi added a commit to vercel/next.js that referenced this pull request Apr 11, 2024
### What

Bump the edge runtime manifest version and add `environments` property
to each route for inlining values for deployment build.

### Why

In edge runtime, extract the preview props into edge functions manifest
that holding the non-deterministic inline values, then the output build
will be more deterministic that helps deployment speed

x-ref: vercel/vercel#11390
x-ref: vercel/vercel#11395
Closes NEXT-3012
Closes NEXT-1912
huozhi added a commit that referenced this pull request May 6, 2024
Rename `environment` property to `env` from middleware manifest added in
#11390.
Align with vercel/next.js#64521

The `environments` property wasn't working properly before due to
unfinished next.js changes, it should work now after testing with next
build from vercel/next.js#64521. We change it to
a better naming word `env`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: automerge Automatically merge the PR when checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants