Skip to content

fix: check for existence of experimental images #1392

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 2 commits into from
Jun 14, 2022
Merged

Conversation

sarahetter
Copy link

Summary

Fixes error if next does not add an images object to experimental.

Test plan

  1. Visit the Deploy Preview (insert link to specific page) ...

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

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 June 14, 2022 18:43
@netlify
Copy link

netlify bot commented Jun 14, 2022

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

Name Link
🔨 Latest commit c1aa743
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-nx-monorepo-demo/deploys/62a8d94f466a8200089727bd
😎 Deploy Preview https://deploy-preview-1392--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 Jun 14, 2022

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

Name Link
🔨 Latest commit c1aa743
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-export-demo/deploys/62a8d94f34a9a8000a76a263
😎 Deploy Preview https://deploy-preview-1392--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 Jun 14, 2022

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

Name Link
🔨 Latest commit c1aa743
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-edge-middleware/deploys/62a8d94ff71330000c3e77eb
😎 Deploy Preview https://deploy-preview-1392--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 Jun 14, 2022

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

Name Link
🔨 Latest commit c1aa743
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-static-root-demo/deploys/62a8d94f7529f70008a036a7
😎 Deploy Preview https://deploy-preview-1392--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.

@sarahetter sarahetter added the type: bug code to address defects in shipped code label Jun 14, 2022
@netlify
Copy link

netlify bot commented Jun 14, 2022

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

Name Link
🔨 Latest commit c1aa743
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-rsc-demo/deploys/62a8d94f1b8e470008792e25
😎 Deploy Preview https://deploy-preview-1392--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 Jun 14, 2022

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

Name Link
🔨 Latest commit c1aa743
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-demo/deploys/62a8d94f5880a80008379cc6
😎 Deploy Preview https://deploy-preview-1392--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 Jun 14, 2022

Deploy Preview for next-plugin-canary ready!

Name Link
🔨 Latest commit c1aa743
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-canary/deploys/62a8d94f5880a80008379ccb
😎 Deploy Preview https://deploy-preview-1392--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 Jun 14, 2022

Deploy Preview for next-i18next-demo ready!

Name Link
🔨 Latest commit c1aa743
🔍 Latest deploy log https://app.netlify.com/sites/next-i18next-demo/deploys/62a8d94f3cb868000989a269
😎 Deploy Preview https://deploy-preview-1392--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 Jun 14, 2022

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

Name Link
🔨 Latest commit c1aa743
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-next-auth-demo/deploys/62a8d94f1b8e470008792e27
😎 Deploy Preview https://deploy-preview-1392--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.

@cypress
Copy link

cypress bot commented Jun 14, 2022



Test summary

7 0 0 0


Run details

Project netlify-plugin-nextjs-static-demo
Status Passed
Commit 1bdec55 ℹ️
Started Jun 14, 2022 6:58 PM
Ended Jun 14, 2022 6:59 PM
Duration 01:22 💡
OS Linux Ubuntu - 20.04
Browser Chrome 102

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@cypress
Copy link

cypress bot commented Jun 14, 2022



Test summary

21 0 0 0


Run details

Project netlify-plugin-nextjs-default-demo
Status Passed
Commit 1bdec55 ℹ️
Started Jun 14, 2022 6:58 PM
Ended Jun 14, 2022 6:59 PM
Duration 01:25 💡
OS Linux Ubuntu - 20.04
Browser Chrome 102

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@cypress
Copy link

cypress bot commented Jun 14, 2022



Test summary

2 0 0 0


Run details

Project netlify-plugin-nextjs-nx-monorepo-demo
Status Passed
Commit 1bdec55 ℹ️
Started Jun 14, 2022 6:59 PM
Ended Jun 14, 2022 7:00 PM
Duration 01:10 💡
OS Linux Ubuntu - 20.04
Browser Chrome 102

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

Copy link

@ericapisani ericapisani left a comment

Choose a reason for hiding this comment

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

Other than the one question the change makes sense. I'd like to see a test case for this behaviour, but given folks are currently blocked on this change if they're installing the latest version of the plugin I'm ok with seeing that in a follow up

)

if (experimental.images) {
experimentalRemotePatterns = experimental.images.remotePatterns

Choose a reason for hiding this comment

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

[potential boulder] Is it possible that remotePatterns might not be defined even if experimental.images exists?

If there's a dependency on experimentalRemotePatterns needing to be an array, then it might be worth doing the following as an added measure of safety

Suggested change
experimentalRemotePatterns = experimental.images.remotePatterns
experimentalRemotePatterns = experimental.images.remotePatterns ?? []

Copy link

@ericapisani ericapisani left a comment

Choose a reason for hiding this comment

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

🚀

@kodiakhq kodiakhq bot merged commit db004fa into main Jun 14, 2022
@kodiakhq kodiakhq bot deleted the remotepatterns-bug branch June 14, 2022 19:04
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.

2 participants