Skip to content

fix: handle routes-manifests without staticRoutes defined #1120

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 3 commits into from
Jan 13, 2022

Conversation

ascorbic
Copy link
Contributor

Summary

Pre-Next 12, static routes weren't included in the routes manifest. We deal with that here with an optional chain.

Test plan

  1. Check the unit test

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

capybara

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.

@netlify
Copy link

netlify bot commented Jan 13, 2022

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

🔨 Explore the source changes: abf69e6

🔍 Inspect the deploy log: https://app.netlify.com/sites/netlify-plugin-nextjs-export-demo/deploys/61e00849d777680007c333c6

😎 Browse the preview: https://deploy-preview-1120--netlify-plugin-nextjs-export-demo.netlify.app

@netlify
Copy link

netlify bot commented Jan 13, 2022

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

🔨 Explore the source changes: abf69e6

🔍 Inspect the deploy log: https://app.netlify.com/sites/netlify-plugin-nextjs-static-root-demo/deploys/61e0084957bc7100070013d0

😎 Browse the preview: https://deploy-preview-1120--netlify-plugin-nextjs-static-root-demo.netlify.app

@netlify
Copy link

netlify bot commented Jan 13, 2022

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

🔨 Explore the source changes: abf69e6

🔍 Inspect the deploy log: https://app.netlify.com/sites/netlify-plugin-nextjs-demo/deploys/61e0084967ae2f00081d8e73

😎 Browse the preview: https://deploy-preview-1120--netlify-plugin-nextjs-demo.netlify.app

@netlify
Copy link

netlify bot commented Jan 13, 2022

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

🔨 Explore the source changes: abf69e6

🔍 Inspect the deploy log: https://app.netlify.com/sites/netlify-plugin-nextjs-nx-monorepo-demo/deploys/61e008495a996d0007503e88

😎 Browse the preview: https://deploy-preview-1120--netlify-plugin-nextjs-nx-monorepo-demo.netlify.app

@ascorbic ascorbic requested a review from tiffafoo January 13, 2022 11:03
@ascorbic ascorbic self-assigned this Jan 13, 2022
@ascorbic ascorbic changed the title Mk/manifest default fix: handle routes-manifests without staticRoutes defined Jan 13, 2022
@github-actions github-actions bot added the type: bug code to address defects in shipped code label Jan 13, 2022
@cypress
Copy link

cypress bot commented Jan 13, 2022



Test summary

7 0 0 0


Run details

Project netlify-plugin-nextjs-static-demo
Status Passed
Commit be3905a
Started Jan 13, 2022 11:05 AM
Ended Jan 13, 2022 11:06 AM
Duration 01:19 💡
OS Linux Ubuntu - 20.04
Browser Custom chromium 90

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 Jan 13, 2022



Test summary

2 0 0 0


Run details

Project netlify-plugin-nextjs-nx-monorepo-demo
Status Passed
Commit be3905a
Started Jan 13, 2022 11:05 AM
Ended Jan 13, 2022 11:06 AM
Duration 01:09 💡
OS Linux Ubuntu - 20.04
Browser Custom chromium 90

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

@@ -46,7 +46,7 @@ export interface RoutesManifest {
redirects: Redirect[]
headers: Header[]
dynamicRoutes: DynamicRoute[]
staticRoutes: StaticRoute[]
staticRoutes?: StaticRoute[]

Choose a reason for hiding this comment

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

F

@cypress
Copy link

cypress bot commented Jan 13, 2022



Test summary

16 1 0 0


Run details

Project netlify-plugin-nextjs-default-demo
Status Failed
Commit be3905a
Started Jan 13, 2022 11:06 AM
Ended Jan 13, 2022 11:08 AM
Duration 02:37 💡
OS Linux Ubuntu - 20.04
Browser Custom chromium 90

View run in Cypress Dashboard ➡️

Failures are unavailable for this run. For more information, see the 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

@kodiakhq kodiakhq bot merged commit 96f3ccb into main Jan 13, 2022
@kodiakhq kodiakhq bot deleted the mk/manifest-default branch January 13, 2022 11:11
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