Skip to content

fix: ensure appDir routes with null dataRoutes are not added to edge manifest for rsc-data #2044

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 6 commits into from
Apr 17, 2023

Conversation

orinokai
Copy link
Contributor

Summary

In #1940 and #2041 we fixed an error that was occurring because the rsc-data edge function was unable to handle null dataRoutes in the prerender-manifest.json. However, the problem of null data routes also affected our own .netlify/edge-functions/manifest.json because the edge functions bundler always expects a string.

This PR adds a condition so that appDir routes with falsy dataRoutes are not added to the edge manifest (and thus will not invoke the rsc-data edge function, which is the expected result).

Test plan

Tests added for the writeRscDataEdgeFunction

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

@orinokai orinokai requested a review from a team April 14, 2023 16:15
@netlify
Copy link

netlify bot commented Apr 14, 2023

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

Name Link
🔨 Latest commit e080d16
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-nx-monorepo-demo/deploys/643d4321c691300008d898ce
😎 Deploy Preview https://deploy-preview-2044--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 14, 2023

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

Name Link
🔨 Latest commit e080d16
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-static-root-demo/deploys/643d4321a153dc000846935e
😎 Deploy Preview https://deploy-preview-2044--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: bug code to address defects in shipped code label Apr 14, 2023
@netlify
Copy link

netlify bot commented Apr 14, 2023

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

Name Link
🔨 Latest commit e080d16
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-export-demo/deploys/643d43219ff8eb000863b7e0
😎 Deploy Preview https://deploy-preview-2044--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 14, 2023

Deploy Preview for next-i18next-demo ready!

Name Link
🔨 Latest commit e080d16
🔍 Latest deploy log https://app.netlify.com/sites/next-i18next-demo/deploys/643d432170b76c00083ffb6c
😎 Deploy Preview https://deploy-preview-2044--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 14, 2023

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

Name Link
🔨 Latest commit e080d16
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-demo/deploys/643d43210718e50008d5434e
😎 Deploy Preview https://deploy-preview-2044--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 14, 2023

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

Name Link
🔨 Latest commit e080d16
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-edge-middleware/deploys/643d4321548e200009002a4a
😎 Deploy Preview https://deploy-preview-2044--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 14, 2023

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

Name Link
🔨 Latest commit e080d16
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-next-auth-demo/deploys/643d4321590d390008c3e23a
😎 Deploy Preview https://deploy-preview-2044--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 14, 2023

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

Name Link
🔨 Latest commit e080d16
🔍 Latest deploy log https://app.netlify.com/sites/nextjs-plugin-custom-routes-demo/deploys/643d4321b2419000080f7342
😎 Deploy Preview https://deploy-preview-2044--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 14, 2023

Deploy Preview for next-plugin-canary ready!

Name Link
🔨 Latest commit e080d16
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-canary/deploys/643d43210718e50008d54349
😎 Deploy Preview https://deploy-preview-2044--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.

@kodiakhq kodiakhq bot merged commit 2f31acb into main Apr 17, 2023
@kodiakhq kodiakhq bot deleted the rs/fix-null-dataroutes branch April 17, 2023 13:05
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.

4 participants