π Next-translate 3.0.0 Release Notes
First of all, I want to personally apologize for the long period this project has been without proper maintenance. Iβve been heavily involved in other projects during this time, but Iβve decided itβs time to give Next-translate the priority it deserves once again. From now on, you can expect a much more constant rhythm of updates, bug fixes, and feature improvements. Thank you for your incredible patience and for the community support that kept this project alive!
π Highlights
ποΈ Turbopack & Next.js 16 Support (Finally!)
Next-translate and next-translate-plugin now fully support Turbopack (Next.js 16+). We've resolved several compatibility issues related to re-export detection and internal logic to ensure a seamless experience with the new Rust-based bundler.
π App Router & Next.js 15+ Compatibility
Significant improvements have been made to the App Router (app directory) integration:
- Awaitable Params: Added support for Next.js 15+ where
paramsandsearchParamsare asynchronous on the server side. - Stability: Improved stability of the
tfunction and clearer patterns for server-side translation.
β¨ New Features
createTranslationhelper: A new specialized helper to simplify translations within the App Router context.- Enhanced
TransComponent: Added support for nested arrays and improved pluralization logic. formatElementsUtility: Now explicitly exported for custom formatting logic.- Improved Typings:
- Updated to TypeScript 5.3.3.
- Full type safety for
getTand better definitions forconfig.interpolation.format.
- Better TS Support: Improved loading of TypeScript configuration files relative to the project's current working directory.
- Metadata Support: Added official examples and fixes for using
useTranslationinside Next.jsgenerateMetadata.
π οΈ Bug Fixes
- Turbopack Integration: Fixed re-export detection logic that was causing issues in some Turbopack configurations.
- Package Exports: Formalized the
exportsfield inpackage.jsonfor reliable ESM/CJS compatibility. useContextErrors: Fixed recurring errors in certain Next.js edge cases and HMR scenarios.- Middleware Proxy Migration: Migrated to a more robust proxy-based approach for middleware.
β οΈ Breaking Changes
- Removed Pages-to-App Router Migration Support: support for the automatic migration logic between
pagesandapprouter has been removed to keep the plugin lean and focused on the new architecture. - Formalized Subpath Exports: You must now use formal entry points instead of deep internal paths.
- Next.js Minimum Version: Optimized for Next.js 13.5+. Support for asynchronous params requires Next.js 15+.
- TS Configurations: TypeScript files are now loaded relative to the CWD, which might change behavior in monorepos with non-standard structures.
What's Changed
- fix typo in README.md by @hydRAnger in #1174
- feat: add support for arrays and pluralization to Trans component by @acidfernando in #1179
- fix: fix useContext error + update example by @aralroca in #1182
- Add type safety for getT function by @clicktodev in #1184
- remove invalid entry by @clicktodev in #1188
- docs: fix mistake in docs by @aralroca in #1193
- refactor: provide better type for config.interpolation.format by @MonstraG in #1194
- Expose formatElements by @testerez in #1213
- fix: fix tarball by @aralroca in #1227
- fix(BREAKING-CHANGE): remove support migration from pages to app router by @aralroca in aralroca/next-translate-plugin#80
- feat(deps): update typescript to v5.3.3 by @lluiscab in aralroca/next-translate-plugin#78
- fix(utils): Load typescript files relative to process current working directory by @lluiscab in aralroca/next-translate-plugin#79
- Fix NextJS 15 issue with server side awaitable params and searchParams by @dimitribarbot in aralroca/next-translate-plugin#86
- params are always accessed with promise in app-dir by @timotew in aralroca/next-translate-plugin#87
- Turbopack support by @avens19 in aralroca/next-translate-plugin#89
- fix: resolve Next.js 16 and Turbopack compatibility issues by @aralroca in aralroca/next-translate-plugin#90
- Fix re-export detection for Turbopack compatibility by @aralroca in aralroca/next-translate-plugin#92
New Contributors
- @hydRAnger made their first contribution in #1174
- @acidfernando made their first contribution in #1179
- @clicktodev made their first contribution in #1184
- @lluiscab made their first contribution in aralroca/next-translate-plugin#78
- @dimitribarbot made their first contribution in aralroca/next-translate-plugin#86
- @timotew made their first contribution in aralroca/next-translate-plugin#87
- @avens19 made their first contribution in aralroca/next-translate-plugin#89
Full Changelog: 2.6.2...3.0.0
Full Changelog Next-translate-plugin: aralroca/next-translate-plugin@2.6.2...3.0.0