Skip to content
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

chore: upgrade to next v13.4 #2080

Merged
merged 92 commits into from
Jun 13, 2023
Merged

chore: upgrade to next v13.4 #2080

merged 92 commits into from
Jun 13, 2023

Conversation

taty2010
Copy link
Contributor

@taty2010 taty2010 commented May 1, 2023

Summary

  • Updates our next dependencies to 13.4
  • Ensures compatibility with 13.4 (support for some features still en route, e.g. streaming content and edge rendering)
  • Updates Next tests
  • Uses pre-bundled React for app router paths

Test plan

Ensure current tests pass

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

Fixes https://github.com/netlify/pod-ecosystem-frameworks/issues/473
Fixes https://github.com/netlify/pod-ecosystem-frameworks/issues/489

BEGIN_COMMIT_OVERRIDE
fix: ensures compatibility with Next.js 13.4 (support for some features still en-route)
fix: uses pre-bundled React modules for App Router paths
END_COMMIT_OVERRIDE

@netlify
Copy link

netlify bot commented May 1, 2023

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

Name Link
🔨 Latest commit ca0cca7
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-export-demo/deploys/648899bbe32ce10007bfaa7a
😎 Deploy Preview https://deploy-preview-2080--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 1, 2023

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

Name Link
🔨 Latest commit ca0cca7
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-nx-monorepo-demo/deploys/648899bbf7cd680008391591
😎 Deploy Preview https://deploy-preview-2080--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.

@github-actions github-actions bot added the type: chore work needed to keep the product and development running smoothly label May 1, 2023
@netlify
Copy link

netlify bot commented May 1, 2023

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

Name Link
🔨 Latest commit ca0cca7
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-next-auth-demo/deploys/648899bb8e9aa50008bd8043
😎 Deploy Preview https://deploy-preview-2080--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 May 1, 2023

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

Name Link
🔨 Latest commit ca0cca7
🔍 Latest deploy log https://app.netlify.com/sites/nextjs-plugin-custom-routes-demo/deploys/648899bb13c6000008abccb4
😎 Deploy Preview https://deploy-preview-2080--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 1, 2023

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

Name Link
🔨 Latest commit ca0cca7
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-demo/deploys/648899bb8edfc60008832f03
😎 Deploy Preview https://deploy-preview-2080--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 1, 2023

Deploy Preview for next-plugin-canary ready!

Name Link
🔨 Latest commit ca0cca7
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-canary/deploys/648899bbd297700008aa6e79
😎 Deploy Preview https://deploy-preview-2080--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 1, 2023

Deploy Preview for next-i18next-demo ready!

Name Link
🔨 Latest commit ca0cca7
🔍 Latest deploy log https://app.netlify.com/sites/next-i18next-demo/deploys/648899bb3e9ca8000839e091
😎 Deploy Preview https://deploy-preview-2080--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 1, 2023

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

Name Link
🔨 Latest commit ca0cca7
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-static-root-demo/deploys/648899bb43ca6b0008eccd46
😎 Deploy Preview https://deploy-preview-2080--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 1, 2023

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

Name Link
🔨 Latest commit ca0cca7
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-edge-middleware/deploys/648899bb2c79660008591f38
😎 Deploy Preview https://deploy-preview-2080--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.

@taty2010 taty2010 self-assigned this May 1, 2023
@@ -48,6 +49,16 @@ const fetch /* type {typeof globalThis.fetch} */ = async (url, init) => {
}
}

// Turbopack aliases "Buffer" to a module import, so we need to provide a shim for that
if (typeof require === 'undefined') {

Choose a reason for hiding this comment

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

This is the work in #2050. We can get your PR in tomorrow @orinokai and keep working in here for the upgrade.

@nickytonline
Copy link

Since Next.js 13.4 is stable, we should switch to that version in this PR and continue with that.

@taty2010 taty2010 marked this pull request as ready for review June 1, 2023 17:25
@taty2010 taty2010 requested a review from a team as a code owner June 1, 2023 17:25
cypress/e2e/default/rewrites-redirects.cy.ts Show resolved Hide resolved
demos/middleware/netlify.toml Show resolved Hide resolved
packages/runtime/src/helpers/files.ts Show resolved Hide resolved
packages/runtime/src/templates/getHandler.ts Show resolved Hide resolved
packages/runtime/src/templates/server.ts Show resolved Hide resolved
return <p>Node!</p>
}

export const runtime = 'edge'

Choose a reason for hiding this comment

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

nit: new line at end of file

}
return <p>Node!</p>
}

Choose a reason for hiding this comment

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

nit: new line at end of file

@@ -929,32 +915,6 @@ describe('app dir', () => {
})
})

describe('previewData function', () => {

Choose a reason for hiding this comment

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

Are these test removals because the test suite in Next.js removed them?

Copy link
Contributor

Choose a reason for hiding this comment

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

no, we need to overhaul our tests because our current scaffolding doesn't work with many of the new app-dir tests - i think it's important to get a basic level of support shipped and then work on getting these tests in, but shout if you disagree

Choose a reason for hiding this comment

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

Sounds good. I created #2161 for this.

const endTime = Date.now()
const duration = endTime - startTime
// Each part takes 5 seconds so it should be below 10 seconds
// Using 7 seconds to ensure external factors causing slight slowness don't fail the tests
expect(duration < 7000).toBe(true)
expect(duration).toBeLessThan(10000)

Choose a reason for hiding this comment

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

Did this get slower, hence the bump to less than 10000?

@@ -71,7 +81,7 @@ beforeAll(() => {
})

describe('the netlify next server', () => {
it('does not revalidate a request without an `x-prerender-revalidate` header', async () => {
it.skip('does not revalidate a request without an `x-prerender-revalidate` header', async () => {

Choose a reason for hiding this comment

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

Do we have issues created for the skipped tests?

Copy link
Contributor

Choose a reason for hiding this comment

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

this is all part of the on-demand revalidation that needs to be completed reworked 😬
i've left the tests there in case we need to reference them in future but it'll need to be revisited when we look at on-demand revalidation next

Copy link

@nickytonline nickytonline left a comment

Choose a reason for hiding this comment

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

This looks great. Thanks for answering my questions @orinokai.

🚢 :shipit: 🚢 :shipit: 🚢 :shipit: 🚢 :shipit:

@@ -929,32 +915,6 @@ describe('app dir', () => {
})
})

describe('previewData function', () => {

Choose a reason for hiding this comment

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

Sounds good. I created #2161 for this.

@kodiakhq kodiakhq bot merged commit 9f85472 into main Jun 13, 2023
99 checks passed
@kodiakhq kodiakhq bot deleted the tn/nextjs-v13.3.4 branch June 13, 2023 17:47
@bentrynning
Copy link

bentrynning commented Jun 13, 2023

This merge seams to breack backward compatibility. Now Next version running version less then version 13.4.0 breaks and sites return 500.

I downgraded my site yesterday to 13.3.0 and the site work expect for hard refresh on navigation. Today after the merge website just gives me 500.

@LekoArts
Copy link

@bentrynning While this PR was merged, it wasn't released yet. So unless you somehow use GitHub as a source, you won't use this just yet.

@bentrynning
Copy link

@LekoArts
My bad I was a bit to quick to conclude with the web site not working yesterday, but was most likely related to the AWS problem you addressed.

Looking forward to test this this update when it's release and hopefully this will resolve the ongoing issue here:
#2089

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge type: chore work needed to keep the product and development running smoothly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants