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 15 #7155

Merged
merged 46 commits into from
Nov 16, 2024
Merged

chore: upgrade to next 15 #7155

merged 46 commits into from
Nov 16, 2024

Conversation

ovflowd
Copy link
Member

@ovflowd ovflowd commented Oct 30, 2024

This PR attempts to upgrade to Next.js 15 with the following changes:

  • Updated also dependencies, such as next-intl to the latest version, which required refactoring on its usage for compliance
  • Updated all our dynamic segments and routes to be more performant (build only what is needed in a minimal build, actually make it compatible with static exports)
    We avoid building OG on static exports as they are costly to compute. Static exports should not support OG images at the moment.
  • Updates usages of JSON imports to use with instead of assert
  • Updated all other dependencies and fixed issues as needed
  • Updated Storybook to use the plain React version of Storybook as we don't use any specific Next.js feature that should run on Storybook.

Copy link

vercel bot commented Oct 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Nov 16, 2024 0:40am

@ovflowd

This comment was marked as resolved.

@ovflowd

This comment was marked as resolved.

@ovflowd

This comment was marked as resolved.

@AugustinMauroy

This comment was marked as resolved.

@amannn

This comment was marked as resolved.

@ovflowd

This comment was marked as resolved.

@ovflowd

This comment was marked as resolved.

@ovflowd

This comment was marked as resolved.

@ovflowd ovflowd added the github_actions:pull-request Trigger Pull Request Checks label Oct 31, 2024
@github-actions github-actions bot removed the github_actions:pull-request Trigger Pull Request Checks label Oct 31, 2024
@ovflowd

This comment was marked as resolved.

@eps1lon

This comment was marked as resolved.

@ovflowd ovflowd added the github_actions:pull-request Trigger Pull Request Checks label Oct 31, 2024
@github-actions github-actions bot removed the github_actions:pull-request Trigger Pull Request Checks label Oct 31, 2024
@ovflowd

This comment was marked as resolved.

@ovflowd ovflowd marked this pull request as ready for review October 31, 2024 20:45
@ovflowd ovflowd requested review from a team as code owners October 31, 2024 20:45
@ovflowd

This comment was marked as resolved.

@ovflowd ovflowd added the github_actions:pull-request Trigger Pull Request Checks label Oct 31, 2024
@github-actions github-actions bot removed the github_actions:pull-request Trigger Pull Request Checks label Oct 31, 2024
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 49 out of 64 changed files in this pull request and generated 1 suggestion.

Files not reviewed (15)
  • .vscode/settings.json: Language not supported
  • apps/site/.storybook/preview-head.html: Language not supported
  • apps/site/components/Downloads/ChangelogModal/index.module.css: Language not supported
  • apps/site/app/[locale]/next-data/og/route.tsx: Evaluated as low risk
  • apps/site/app/[locale]/next-data/changelog-data/[version]/route.ts: Evaluated as low risk
  • apps/site/.storybook/preview.tsx: Evaluated as low risk
  • apps/site/app/[locale]/error.tsx: Evaluated as low risk
  • COLLABORATOR_GUIDE.md: Evaluated as low risk
  • apps/site/app/[locale]/layout.tsx: Evaluated as low risk
  • apps/site/components/Common/Tabs/tests/index.test.mjs: Evaluated as low risk
  • apps/site/app/global-error.tsx: Evaluated as low risk
  • apps/site/app/[locale]/next-data/api-data/route.ts: Evaluated as low risk
  • apps/site/.storybook/main.ts: Evaluated as low risk
  • apps/site/app/[locale]/feed/[feed]/route.ts: Evaluated as low risk
  • apps/site/app/[locale]/next-data/blog-data/[category]/[page]/route.ts: Evaluated as low risk

@avivkeller
Copy link
Member

Hey, I locally changed the instances of 300 to VERCEL_REVALIDATE, and I don't see any build failures? Is this a Vercel thing or a Next.js thing?

Copy link
Member

@avivkeller avivkeller left a comment

Choose a reason for hiding this comment

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

After updating all dependencies to their latest versions, the new package count is 1591, previously 1632.

@ovflowd

This comment was marked as resolved.

@AugustinMauroy

This comment was marked as resolved.

@ovflowd

This comment was marked as resolved.

@avivkeller
Copy link
Member

That's a really strange requirement. Regardless, as you said, that can be a followup (if it's even fixable). IMO for now the main thing is: Next.js 15 is working. The little kinks can be worked out in follow-ups if need be.

@ovflowd
Copy link
Member Author

ovflowd commented Nov 15, 2024

That's a really strange requirement. Regardless, as you said, that can be a followup (if it's even fixable). IMO for now the main thing is: Next.js 15 is working. The little kinks can be worked out in follow-ups if need be.

Yeah, agreed! Also regarding dependency updates we can do in a follow-up PR; BTW, feel free to test the website on the preview branch.

cc @nodejs/nodejs-website can we get another round of reviews?

Copy link
Member

@avivkeller avivkeller left a comment

Choose a reason for hiding this comment

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

Aside from the ESLint rule—which can easily be adjusted in a follow-up—this PR looks good to me

@ovflowd
Copy link
Member Author

ovflowd commented Nov 16, 2024

I am going to be the crazy person and hit the merge button.

@ovflowd ovflowd merged commit 7f751fd into main Nov 16, 2024
15 checks passed
@ovflowd ovflowd deleted the chore/nextjs-15 branch November 16, 2024 00:48
@ovflowd
Copy link
Member Author

ovflowd commented Nov 16, 2024

Next.js 15 🎉 here we are. Here's the significant changes brought within this PR:

  • We are not evalin'g JavaScript anymore within MDX; we've switched to using a non-eval approach with sval
  • We removed Sentry for the time being as it was causing bundling and compiling performance issues (to be debated, but we will potentially add it back once we finish discussions and investigations)
  • We've moved to the base storybook React framework without Next.js-specific feature sets.
  • We've simplified and optimized our Next.js configuration and other minor pieces that were slowing down the build.
  • We've removed the ChangelogModal component, which is redirecting to the release page of a Node.js release (cc @wesleytodd)
  • We added Vercel's native OpenTelemtry instrumentation implementation
  • We've optimized our MDX compilation and transpilation
  • We've optimized OG routes for static builds
  • We've optimized what gets build on the initial non-static build, even more benefitting from ISG/ISR
  • We've fixed links and language change on 404 pages
  • Several minor bug fixes and linting fixes
  • Updated several packages
  • Upgraded to Next.js 15.0.3

bmuenzenmeyer added a commit that referenced this pull request Nov 21, 2024
Co-authored-by: Claudio Wunder <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: RedYetiDev <[email protected]>
Co-authored-by: Jan Amann <[email protected]>
Co-authored-by: Brian Muenzenmeyer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants