Skip to content

fix: now data routes for dynamic routes filter even when null when creating the RSC data router #2041

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
Apr 13, 2023

Conversation

nickytonline
Copy link

@nickytonline nickytonline commented Apr 13, 2023

Summary

There was a TypeScript error that was not picked up as we copy them for the build. I've added some tests to cover this like we did in #2018.

Closes #1940

Test plan

  1. Ensure the deploy previews are green.
  2. There are tests that cover this fix.

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.

someone petting an alapaca

@netlify
Copy link

netlify bot commented Apr 13, 2023

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

Name Link
🔨 Latest commit 2d71951
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-export-demo/deploys/643861a6288f2a0008d3d3e7
😎 Deploy Preview https://deploy-preview-2041--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 13, 2023

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

Name Link
🔨 Latest commit 2d71951
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-nx-monorepo-demo/deploys/643861a66ada190007aaec22
😎 Deploy Preview https://deploy-preview-2041--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.

@nickytonline nickytonline changed the title nickytonline/add check for null rsc data route fix: now data routes for dynamic routes filter even when null when creating the RSC data router Apr 13, 2023
@github-actions github-actions bot added the type: bug code to address defects in shipped code label Apr 13, 2023
@netlify
Copy link

netlify bot commented Apr 13, 2023

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

Name Link
🔨 Latest commit 2d71951
🔍 Latest deploy log https://app.netlify.com/sites/nextjs-plugin-custom-routes-demo/deploys/643861a64a9afc0008e66102
😎 Deploy Preview https://deploy-preview-2041--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 13, 2023

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

Name Link
🔨 Latest commit 2d71951
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-demo/deploys/643861a69fce0f00081e5bc0
😎 Deploy Preview https://deploy-preview-2041--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 Apr 13, 2023

Deploy Preview for next-i18next-demo ready!

Name Link
🔨 Latest commit 2d71951
🔍 Latest deploy log https://app.netlify.com/sites/next-i18next-demo/deploys/643861a6242f790008ff39b8
😎 Deploy Preview https://deploy-preview-2041--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 13, 2023

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

Name Link
🔨 Latest commit 2d71951
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-edge-middleware/deploys/643861a6c71c6800088e9681
😎 Deploy Preview https://deploy-preview-2041--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 13, 2023

Deploy Preview for next-plugin-canary ready!

Name Link
🔨 Latest commit 2d71951
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-canary/deploys/643861a635e7120008d21ed3
😎 Deploy Preview https://deploy-preview-2041--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 13, 2023

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

Name Link
🔨 Latest commit 2d71951
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-next-auth-demo/deploys/643861a6f34ac000088970b2
😎 Deploy Preview https://deploy-preview-2041--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 13, 2023

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

Name Link
🔨 Latest commit 2d71951
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-static-root-demo/deploys/643861a6ffb84900083fa988
😎 Deploy Preview https://deploy-preview-2041--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.

@nickytonline nickytonline marked this pull request as ready for review April 13, 2023 20:14
@nickytonline nickytonline requested a review from a team April 13, 2023 20:14
@nickytonline nickytonline self-assigned this Apr 13, 2023
@@ -44,7 +44,7 @@ export const getRscDataRouter = ({ routes: staticRoutes, dynamicRoutes }: Preren
)

const dynamicRouteMatcher = Object.values(dynamicRoutes)
.filter(({ dataRoute }) => dataRoute.endsWith('.rsc'))
.filter(({ dataRoute }) => dataRoute?.endsWith('.rsc'))
Copy link
Author

Choose a reason for hiding this comment

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

As mentioned in the description of the PR this wasn't being caught during compilation of the Next runtime as this file is copied.

@kodiakhq kodiakhq bot merged commit 5fa1435 into main Apr 13, 2023
@kodiakhq kodiakhq bot deleted the nickytonline/add-check-for-null-rsc-data-route branch April 13, 2023 20:27
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.

Bug: appDir applications can have dataRoute: null
2 participants