Skip to content

fix: tracing root use appDir as fallback #2136

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 9 commits into from
May 30, 2023
Merged

Conversation

Skn0tt
Copy link
Contributor

@Skn0tt Skn0tt commented May 25, 2023

Description

We were relying on values relativeAppDir and outputFileTracingRoot that were optional, and don't exist for every version of Next.js.

relativeAppDir was introduced in vercel/next.js#46393.
appDir was introduced in vercel/next.js#22915.
outputFileTracingRoot was introduced in vercel/next.js#30857.

This PR makes it so that we fall back to use appDir if outputFileTracingRoot and relativeAppDir aren't available.

Documentation

Tests

You can test this change yourself like so:

  1. TODO

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

@Skn0tt Skn0tt requested a review from a team as a code owner May 25, 2023 07:06
@netlify
Copy link

netlify bot commented May 25, 2023

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

Name Link
🔨 Latest commit 6902d07
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-nx-monorepo-demo/deploys/6475b7d594e3f800089cc069
😎 Deploy Preview https://deploy-preview-2136--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 May 25, 2023

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

Name Link
🔨 Latest commit 6902d07
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-next-auth-demo/deploys/6475b7d5c1721800085daa6a
😎 Deploy Preview https://deploy-preview-2136--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.

@github-actions github-actions bot added the type: bug code to address defects in shipped code label May 25, 2023
@netlify
Copy link

netlify bot commented May 25, 2023

Deploy Preview for next-plugin-canary ready!

Name Link
🔨 Latest commit 6902d07
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-canary/deploys/6475b7d58203570008d45142
😎 Deploy Preview https://deploy-preview-2136--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 May 25, 2023

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

Name Link
🔨 Latest commit 6902d07
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-export-demo/deploys/6475b7d5e353740008458da3
😎 Deploy Preview https://deploy-preview-2136--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 May 25, 2023

Deploy Preview for next-i18next-demo ready!

Name Link
🔨 Latest commit 6902d07
🔍 Latest deploy log https://app.netlify.com/sites/next-i18next-demo/deploys/6475b7d5a51f790008e342d8
😎 Deploy Preview https://deploy-preview-2136--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 May 25, 2023

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

Name Link
🔨 Latest commit 6902d07
🔍 Latest deploy log https://app.netlify.com/sites/nextjs-plugin-custom-routes-demo/deploys/6475b7d536e904000888e87c
😎 Deploy Preview https://deploy-preview-2136--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 May 25, 2023

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

Name Link
🔨 Latest commit 6902d07
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-demo/deploys/6475b7d58203570008d45147
😎 Deploy Preview https://deploy-preview-2136--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 May 25, 2023

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

Name Link
🔨 Latest commit 6902d07
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-static-root-demo/deploys/6475b7d5ba388800071224a4
😎 Deploy Preview https://deploy-preview-2136--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 May 25, 2023

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

Name Link
🔨 Latest commit 6902d07
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-edge-middleware/deploys/6475b7d5e13ea800086f3df3
😎 Deploy Preview https://deploy-preview-2136--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.

@Skn0tt
Copy link
Contributor Author

Skn0tt commented May 25, 2023

We could've caught this earlier, if strictNullChecks were enabled:

https://github.com/netlify/next-runtime/blob/8e1936f352eb9b8b040e82a6c7e9713a02787333/tsconfig.json#L31

@orinokai do you think it'd make sense to enable TypeScript strict mode for this repo?

@Skn0tt
Copy link
Contributor Author

Skn0tt commented May 25, 2023

Ha, looks like there's failures! Turning into a draft.

@Skn0tt Skn0tt marked this pull request as draft May 25, 2023 08:58
@Skn0tt Skn0tt marked this pull request as ready for review May 30, 2023 07:41
@Skn0tt Skn0tt merged commit 64280e5 into main May 30, 2023
@Skn0tt Skn0tt deleted the relativeAppDir-default-values branch May 30, 2023 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants