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

Upgrade Next.js to v13 - Part I #5402

Draft
wants to merge 25 commits into
base: develop
Choose a base branch
from
Draft

Upgrade Next.js to v13 - Part I #5402

wants to merge 25 commits into from

Conversation

nabramow
Copy link
Collaborator

Part 1 of the Next.js v13 upgrade. I will break this into two. This is doing the minimum to upgrade, which includes keeping some legacy behavior. The pages folder system will also be merged into the app folder and a lot of config will change. This version supports both ways. In part 2 I will change to new structure.

Migration Guide:
https://nextjs.org/docs/pages/building-your-application/upgrading/version-13

I needed to upgrade these packages as well for this:

  • i18next
  • next-i18next
  • react-i18next
  • @sentry/nextjs
  • sentry-testkit

This means you'll want to pay attention to translations and sentry while testing.

Web frontend checklist

  • [ x ] Formatted my code with yarn format
  • There are no warnings from yarn lint --fix
  • There are no console warnings when running the app
  • [ x ] All tests pass
  • [ x ] Clicked around my changes running locally and it works
  • [ x ] Checked Desktop, Mobile and Tablet screen sizes

Copy link

vercel bot commented Dec 28, 2024

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

Name Status Preview Updated (UTC)
couchers ✅ Ready (Inspect) Visit Preview Dec 31, 2024 5:31pm

Comment on lines -48 to +49
//sentry testing was causing OOM for some reason
//const { testkit, sentryTransport } = sentryTestkit();
//global.testKit = testkit;
const { testkit } = sentryTestkit();
global.testKit = testkit;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Their next upgrade was focused mostly on performance and reducing bundle size so my guess was the OOM was happening due to that.

Comment on lines -3 to -5
import { TFunction } from "i18n";
import { StringMap, TOptions } from "i18next";
import i18n from "test/i18n";
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

They stopped exposing StringMap purposely (says in their docs). I tried to re-write this function but it was getting pretty gnarly, which is why I decided to just use the test instance of i18n in the tests and use the t function from there rather than mocking a separate one.

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.

1 participant