Skip to content

feat: support edge runtime key #2036

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

Merged
merged 5 commits into from
Apr 12, 2023
Merged

feat: support edge runtime key #2036

merged 5 commits into from
Apr 12, 2023

Conversation

sarahetter
Copy link

@sarahetter sarahetter commented Apr 11, 2023

Summary

Adds support for

export const config = {
  runtime: 'edge',
}

before, only runtime: 'experimental-edge' was supported.

Test plan

  1. Visit the middleware Deploy Preview
  2. Go to the /api/edge route -> It should display "Hello world"

Relevant links (GitHub issues, Notion docs, etc.) or a picture of cute animal

Screenshot 2023-04-11 at 3 42 09 PM

Fixes #1936

Standard checks:

  • Check the Deploy Preview's Demo site for your PR's functionality
  • Add docs when necessary

🧪 Once merged, make sure to update the version if needed and that it was published correctly.

@sarahetter sarahetter requested a review from a team April 11, 2023 19:43
@netlify
Copy link

netlify bot commented Apr 11, 2023

Deploy Preview for netlify-plugin-nextjs-export-demo ready!

Name Link
🔨 Latest commit cea230c
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-export-demo/deploys/6436cd331127e8000893cec9
😎 Deploy Preview https://deploy-preview-2036--netlify-plugin-nextjs-export-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Apr 11, 2023

Deploy Preview for netlify-plugin-nextjs-nx-monorepo-demo ready!

Name Link
🔨 Latest commit cea230c
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-nx-monorepo-demo/deploys/6436cd3382c77a0008f970cd
😎 Deploy Preview https://deploy-preview-2036--netlify-plugin-nextjs-nx-monorepo-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Apr 11, 2023

Deploy Preview for netlify-plugin-nextjs-static-root-demo ready!

Name Link
🔨 Latest commit cea230c
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-static-root-demo/deploys/6436cd33810f6a0008306cdc
😎 Deploy Preview https://deploy-preview-2036--netlify-plugin-nextjs-static-root-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions github-actions bot added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Apr 11, 2023
@netlify
Copy link

netlify bot commented Apr 11, 2023

Deploy Preview for next-plugin-edge-middleware ready!

Name Link
🔨 Latest commit cea230c
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-edge-middleware/deploys/6436cd34f9abbe0008ea4755
😎 Deploy Preview https://deploy-preview-2036--next-plugin-edge-middleware.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Apr 11, 2023

Deploy Preview for nextjs-plugin-custom-routes-demo ready!

Name Link
🔨 Latest commit cea230c
🔍 Latest deploy log https://app.netlify.com/sites/nextjs-plugin-custom-routes-demo/deploys/6436cd345294da00082237d2
😎 Deploy Preview https://deploy-preview-2036--nextjs-plugin-custom-routes-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Apr 11, 2023

Deploy Preview for next-plugin-canary ready!

Name Link
🔨 Latest commit cea230c
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-canary/deploys/6436cd34f1cbd500084c348d
😎 Deploy Preview https://deploy-preview-2036--next-plugin-canary.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Apr 11, 2023

Deploy Preview for next-i18next-demo ready!

Name Link
🔨 Latest commit cea230c
🔍 Latest deploy log https://app.netlify.com/sites/next-i18next-demo/deploys/6436cd3453569400087be442
😎 Deploy Preview https://deploy-preview-2036--next-i18next-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Apr 11, 2023

Deploy Preview for netlify-plugin-nextjs-next-auth-demo ready!

Name Link
🔨 Latest commit cea230c
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-next-auth-demo/deploys/6436cd34d141af0007b05baf
😎 Deploy Preview https://deploy-preview-2036--netlify-plugin-nextjs-next-auth-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Apr 11, 2023

Deploy Preview for netlify-plugin-nextjs-demo ready!

Name Link
🔨 Latest commit cea230c
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-demo/deploys/6436cd3441666f0008a60949
😎 Deploy Preview https://deploy-preview-2036--netlify-plugin-nextjs-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link

@nickytonline nickytonline left a comment

Choose a reason for hiding this comment

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

Looks good! Left one dusty comment. :shipit:

@@ -39,7 +39,7 @@ export const validateConfigValue = (config: ApiConfig, apiFilePath: string): con
)
return false
}
if ((config as ApiConfig).runtime === 'experimental-edge') {
if (['experimental-edge', 'edge'].includes((config as ApiConfig).runtime)) {

Choose a reason for hiding this comment

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

[dust] ['experimental-edge', 'edge'].includes(config.runtime) is used in three spots in the codebase. Maybe add an isEdge(runtime) helper function.

@kodiakhq kodiakhq bot merged commit b7b9392 into main Apr 12, 2023
@kodiakhq kodiakhq bot deleted the edge-runtime branch April 12, 2023 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support edge runtime key for API Routes
3 participants