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

feat: support next@15 #426

Merged
merged 6 commits into from
Oct 28, 2024
Merged

feat: support next@15 #426

merged 6 commits into from
Oct 28, 2024

Conversation

blechatellier
Copy link
Contributor

This PR updates next-international to support async changes in next@15.

Copy link

vercel bot commented Oct 22, 2024

@blechatellier is attempting to deploy a commit to the Tom Labs Team on Vercel.

A member of the Team first needs to authorize it.

@blechatellier
Copy link
Contributor Author

@QuiiBz hey, would appreciate a review when available to be able to upgrade to next@15

@fstodulski
Copy link

☝️ I there a possibility to merge it ASAP?

Copy link
Owner

@QuiiBz QuiiBz left a comment

Choose a reason for hiding this comment

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

Thanks for the PR and sorry for the delay, I'm travelling away for a few days.

Since Next.js 15 contains several breaking changes to dynamic APIs and next-international's v2 version is still wip (I'm planning to work on it soon), we need to support both Next.js 14 and 15 on [email protected]. It might already just work with those changes in both versions given JavaScript allows non-promise values to be await'ed, but we need to double-check.

I left a comment for the next-app example that is currently broken, and the documentation also needs to be updated. I'll be able to do it on Monday once I'm back home, but feel free to update the PR before if you can so we can support Next.js 15 asap.

Copy link
Owner

Choose a reason for hiding this comment

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

This example needs to be updated, as the page is accessing params.locale without awaiting it.

@blechatellier blechatellier requested a review from QuiiBz October 27, 2024 21:11
@blechatellier
Copy link
Contributor Author

@QuiiBz thanks, I've updated the docs and example.

@cezarneaga
Copy link

nice one blechatellier. was about to make a PR too. thanks a lot!

@QuiiBz QuiiBz changed the title fix: next@15 feat: support next@15 Oct 28, 2024
Copy link

vercel bot commented Oct 28, 2024

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

Name Status Preview Updated (UTC)
next-international ✅ Ready (Inspect) Visit Preview Oct 28, 2024 6:02pm

Copy link
Owner

@QuiiBz QuiiBz left a comment

Choose a reason for hiding this comment

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

Updated the docs to still show how to use next-international with Next.js < 15, but the default will be with the new awaitable APIs.

I'm releasing [email protected] shortly after merging this PR, thanks!

edit: it's live: https://github.com/QuiiBz/next-international/releases/tag/1.3.0

@QuiiBz QuiiBz merged commit c332633 into QuiiBz:main Oct 28, 2024
5 checks passed
@blechatellier blechatellier deleted the fix/next-15 branch October 28, 2024 22:36
@blechatellier
Copy link
Contributor Author

Thanks @QuiiBz

@mxzinke
Copy link

mxzinke commented Oct 29, 2024

@QuiiBz @blechatellier

Did you miss the type safety for getCurrentLocale, since this now returns a promise?

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.

5 participants