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

fix: clean up edge functions during build #1588

Merged
merged 3 commits into from
Sep 5, 2022
Merged

fix: clean up edge functions during build #1588

merged 3 commits into from
Sep 5, 2022

Conversation

ascorbic
Copy link
Contributor

@ascorbic ascorbic commented Sep 2, 2022

Summary

Ensure edge functions directory is emptied during a build. This fixes the problem where a user with no middleware runs ntl dev and then builds. Previously the next-dev edge function was only cleaned up if other edge fucntions were being generated, and if none were then it wasn't cleaned up. This meant that the dev edge function could be deployed to production. This PR ensures that it is always emptied, even if edge functions aren't being generated.

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

capybara family

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.

Sorry, something went wrong.

@ascorbic ascorbic requested a review from a team September 2, 2022 12:14
@netlify
Copy link

netlify bot commented Sep 2, 2022

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

Name Link
🔨 Latest commit 6c71c2c
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-demo/deploys/6316206553895300096a2870
😎 Deploy Preview https://deploy-preview-1588--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.

@netlify
Copy link

netlify bot commented Sep 2, 2022

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

Name Link
🔨 Latest commit 6c71c2c
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-export-demo/deploys/63162066573c1f00083a1fbd
😎 Deploy Preview https://deploy-preview-1588--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 Sep 2, 2022

Deploy Preview for next-hp-edge-demo ready!

Name Link
🔨 Latest commit 6c71c2c
🔍 Latest deploy log https://app.netlify.com/sites/next-hp-edge-demo/deploys/63162066387f350008009193
😎 Deploy Preview https://deploy-preview-1588--next-hp-edge-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.

@@ -9,14 +9,14 @@
# the `language` matrix defined below to confirm you have the correct set of
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This had to be included because it would fail linting otherwise

@github-actions github-actions bot added the type: bug code to address defects in shipped code label Sep 2, 2022
@netlify
Copy link

netlify bot commented Sep 2, 2022

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

Name Link
🔨 Latest commit 6c71c2c
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-nx-monorepo-demo/deploys/63162065e8d09100084a992e
😎 Deploy Preview https://deploy-preview-1588--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 Sep 2, 2022

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

Name Link
🔨 Latest commit 6c71c2c
🔍 Latest deploy log https://app.netlify.com/sites/nextjs-plugin-custom-routes-demo/deploys/631620669b67110008cd3910
😎 Deploy Preview https://deploy-preview-1588--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 Sep 2, 2022

Deploy Preview for next-plugin-rsc-demo ready!

Name Link
🔨 Latest commit
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-rsc-demo/deploys/6316219ed8aeff01d833ff71
😎 Deploy Preview https://deploy-preview-1588--next-plugin-rsc-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 Sep 2, 2022

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

Name Link
🔨 Latest commit 6c71c2c
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-next-auth-demo/deploys/63162066d3135b0008e5fcbb
😎 Deploy Preview https://deploy-preview-1588--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 Sep 2, 2022

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

Name Link
🔨 Latest commit 6c71c2c
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-static-root-demo/deploys/63162066f07e4a0009a32833
😎 Deploy Preview https://deploy-preview-1588--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.

@netlify
Copy link

netlify bot commented Sep 2, 2022

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

Name Link
🔨 Latest commit 6c71c2c
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-edge-middleware/deploys/6316206653895300096a2874
😎 Deploy Preview https://deploy-preview-1588--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 Sep 2, 2022

Deploy Preview for next-i18next-demo ready!

Name Link
🔨 Latest commit 6c71c2c
🔍 Latest deploy log https://app.netlify.com/sites/next-i18next-demo/deploys/63162066780710000a569481
😎 Deploy Preview https://deploy-preview-1588--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 Sep 2, 2022

Deploy Preview for next-plugin-canary ready!

Name Link
🔨 Latest commit 6c71c2c
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-canary/deploys/63162066fd4e4c00081b7b6e
😎 Deploy Preview https://deploy-preview-1588--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.

orinokai
orinokai previously approved these changes Sep 5, 2022
Copy link
Contributor

@orinokai orinokai left a comment

Choose a reason for hiding this comment

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

Tested and all good :shipit:

@kodiakhq kodiakhq bot removed the automerge label Sep 5, 2022
@kodiakhq
Copy link
Contributor

kodiakhq bot commented Sep 5, 2022

This PR currently has a merge conflict. Please resolve this and then re-add the automerge label.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@kodiakhq kodiakhq bot merged commit ae2c103 into main Sep 5, 2022
@kodiakhq kodiakhq bot deleted the mk/cleanup-edge branch September 5, 2022 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants