Repository navigation
fix(deps): update dependency react-i18next to v18 - #70
Closed
renovate[bot] wants to merge 1 commit into
Closed
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
force-pushed
the
renovate/react-i18next-18.x
branch
2 times, most recently
from
November 22, 2026 15:04
d7de298 to
6d0f332
Compare
renovate
Bot
force-pushed
the
renovate/react-i18next-18.x
branch
from
November 25, 2026 17:32
6d0f332 to
65b9b2d
Compare
Master3307
added a commit
that referenced
this pull request
Nov 25, 2026
- katex 0.18.2 (security fix) - i18next 27, react-i18next 18, dotenv 18, web-push 4, undici 8 (override) - three 0.187: Clock -> Timer, PCFSoftShadowMap -> PCFShadowMap (soft by shadow.radius now; the old type only logged a warning) - nodemailer 10.6.1, discord-api-types 0.38, unicode-emoji-json 0.9, capacitor 8.6.2, express-rate-limit 8.7.5, pnpm 12.23.0 Replaces #46, #50, #52, #53, #57, #58, #59, #63, #68, #69, #70, #71, #72, #73. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
|
Included in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^17.1.13→^18.0.0Release Notes
i18next/react-i18next (react-i18next)
v18.0.3Compare Source
Transwith children andvalues(orcount) no longer fills a placeholder that came in with a value. The textt()returned was interpolated a second time after parsing, with all variables, sovalues={{ name: '{{otherVar}}', otherVar: 'x' }}renderedxinstead of{{otherVar}}, and a value containing its own placeholder was filled twice.interpolation.skipOnVariablesnow holds as int(). Text thatt()did not interpolate (cimode, atthat returns the key, a format plugin,skipInterpolation) is still filled after parsing (#1950)v18.0.2Compare Source
useTranslation,TransandIcuTransre-render for abindI18nStoreevent that fires after they rendered but before they subscribed (a bundle added in a parent's layout effect, for example). They kept the old text, because only the events their own subscription received changed their snapshot (#1949)v18.0.1Compare Source
@types/reactas an optional peer dependency. The type declarations import fromreact, and with pnpm's global virtual store (virtualStoreType: global) TypeScript resolved that to the untypedreact/index.js, so every React type in them becameany: wrong props compiled, callback parameters failed with TS7006. Under the default pnpm layout it only worked through pnpm's hidden hoisting. The range is*, so projects without TypeScript install nothing extra and an older@types/reactdoes not make npm fail (#1948)>= 27.0.1), which keeps at most 1000 formatters in each cached formatv18.0.0Compare Source
Released together with i18next 27. The migration guide lists every change with what to do: https://react.i18next.com/latest/migrating-v17-to-v18
Breaking changes
>= 27.0.0) and React 18 or later (peer>= 18.0.0). React 16 and 17 apps stay on react-i18next 17: on i18next 27, use react-i18next 17.1.13 or later (it brings the types of thereactinit options), or 18.useSyncExternalStorecomes from React itself, souse-sync-external-storeis no longer a dependency.Transoutput no longer depends oninterpolation.escapeValue: it always decodes HTML entities after parsing, asIcuTransdoes, in text and in attribute values, both withreact.unescape(attribute values used the built-in decoder before). With i18next's defaultescapeValue: true, a valueTom & Jerryrendered asTom & Jerryand a date17/12/2025as17/12/2025; both now render as written, and so do entities in the translation itself (&,<, , ...). Values still render as text, never as markup (since 17.1.10). TheshouldUnescapeprop andreact.transDefaultProps.shouldUnescapeare ignored and warn (DEPRECATED_OPTION, in development and withdebug: true); remove them. Snapshot tests that contain entities insideTransoutput need an update (#1903, #1893).TransandIcuTransre-render on language change by themselves: they subscribe to thereact.bindI18n(defaultlanguageChanged) andreact.bindI18nStoreevents, likeuseTranslation. Before, they only updated when a parent re-rendered (#1710). They still neither load translations nor suspend; with atprop, thattstill decides the language.TransWithoutContextandIcuTransWithoutContextstay hook-free.reactoptions of an instance stay on that instance.initReactI18nextcopied them into module-wide defaults, so a second instance withoutreactoptions inherited, for example, the first one'suseSuspense: false. Set them on every instance, or callsetDefaults()once.i18nreturned byuseTranslation(and passed bywithTranslationandTranslation) forwards reads and writes to the instance. It was a copy taken when the language changed, so afterawait i18n.changeLanguage('de')the copy still saiden, and properties set on it never reached the instance. It is still a new object whenever the language changes, for dependency arrays and the React Compiler. Because the old object now reads the current language too, a check likeprevProps.i18n.language !== this.props.i18n.language(or the language of ausePrevious(i18n)) no longer sees a change: compare the objects (prevProps.i18n !== this.props.i18n) or keep the previous language yourself.useSSRandwithSSRcall i18next'shydrate()instead of writingresourceStore.data,options.ns,initializedStoreOnce,isInitializedandinitializedLanguageOncethemselves. Same behavior with real instances, including the opt-out for cloned instances. Test mocks ofi18nused withuseSSR/withSSRnow need ahydratemethod, mocks that load beforeinit()needonce, and mocks used withTransorIcuTransneedonandoff, since both subscribe to events now (withbindI18nStoreset, alsostore.onandstore.off): a minimal mock like{ t, options, language }throwsi18n.on is not a function.react-i18next/icu.macroBabel macro (deprecated since 17.0.21) is removed, with the placeholder exportsdate,time,number,select,pluralandselectOrdinal. WriteIcuTransdirectly.HTMLAttributes['children']augmentation forallowObjectInHTMLChildrenmoved to the opt-inreact-i18next/augment-react. Default installs no longer change React's DOM types. WithallowObjectInHTMLChildren: true, addimport 'react-i18next/augment-react';next to yourCustomTypeOptions; with current@types/reactit needsskipLibCheck: true(#1928).I18nContextis typed{ i18n: i18n; defaultNS?: string | string[] } | undefined, as at runtime:useContext(I18nContext)isundefinedoutside anI18nextProvider.getI18n()keeps its type.reactinit options. i18next 27 keeps an emptyReactOptionsinterface that react-i18next fills in, soimport type { ReactOptions } from 'i18next'keeps working, andReactOptionsis also exported fromreact-i18next. ThedefaultTransParentdocs no longer claim a'div'default.i18next(load i18next's UMD build first) and shrinks from 71.3 KB to 26.2 KB minified. The AMD build (dist/amd) is removed; AMD loaders can use the UMD file.engines.nodeis>=22, and the build targets ES2020 syntax with a fixed browser list instead of browserslistdefaults.Other changes
react-serverexport condition forreact-i18next. In a React Server Component,import { Trans } from 'react-i18next'failed withcreateContext is not a function; it now resolves to an entry withTransandIcuTrans(the variants without React context),TransWithoutContext,IcuTransWithoutContext,nodesToString,initReactI18next,setI18n/getI18nandsetDefaults/getDefaults. Hooks, HOCs,Translation,I18nextProviderand the SSR helpers stay client-only, so importing them there is a build error. Without ani18nprop, the serverTransandIcuTransuse the global instance (the oneinitReactI18nextregistered), which is the wrong one with an instance per request: pass that instance asi18n(tis optional). Atalone is not enough, because atfromgetFixedTcarries no instance. In development and withdebug: truethey warn about it (GLOBAL_INSTANCE_ON_SERVER) (#1759, #1840).<0/>) with children of its own is no longer remounted on every render.Transcreated a new component type for it each time, so its state and effects were reset.cloneInstance(), for example one per request in i18next-http-middleware) share their parent's, as they share its logger, so they do not repeat them.init()usesi18n.once('initialized')instead of removing its listener with a delay.keySeparator: falseand a key prefix (useTranslation(ns, { keyPrefix }),getFixedT), thevaluesofTransandIcuTransare typed from the right key. The prefix and the key were joined with the textfalse(nestedfalsec), so no variables were checked; they are now joined with., asgetFixedTdoes.useSSRtakes its third argument{ i18n }, and theuseTranslationoptions takebindI18nStore, as at runtime.ErrorCodelistsI18N_NOT_INITIALIZED,ICU_TRANS_RENDER_ERRORandGLOBAL_INSTANCE_ON_SERVER.fileswhitelist replaces.npmignore;@babel/runtimeis no longer a dependency.Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.