Repository navigation
Update dependency react-i18next to v17.1.8 - #4508
Merged
Merged
Conversation
Coverage Report for CI Build 40644851332Coverage remained the same at 47.808%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
renovate
Bot
force-pushed
the
renovate/react-i18next-17.x-lockfile
branch
from
October 18, 2026 20:54
204b991 to
b834917
Compare
renovate
Bot
force-pushed
the
renovate/react-i18next-17.x-lockfile
branch
2 times, most recently
from
October 19, 2026 09:34
a7083ba to
e158b3d
Compare
renovate
Bot
force-pushed
the
renovate/react-i18next-17.x-lockfile
branch
2 times, most recently
from
October 20, 2026 13:31
5d807c0 to
e0e7136
Compare
renovate
Bot
force-pushed
the
renovate/react-i18next-17.x-lockfile
branch
from
October 20, 2026 22:01
e0e7136 to
43b5a89
Compare
renovate
Bot
force-pushed
the
renovate/react-i18next-17.x-lockfile
branch
4 times, most recently
from
October 25, 2026 12:57
d1d3192 to
b70cf86
Compare
renovate
Bot
force-pushed
the
renovate/react-i18next-17.x-lockfile
branch
from
October 25, 2026 16:34
b70cf86 to
b772880
Compare
renovate
Bot
force-pushed
the
renovate/react-i18next-17.x-lockfile
branch
from
October 25, 2026 21:52
b772880 to
a3be188
Compare
renovate
Bot
force-pushed
the
renovate/react-i18next-17.x-lockfile
branch
from
October 26, 2026 15:07
a3be188 to
b466a33
Compare
renovate
Bot
force-pushed
the
renovate/react-i18next-17.x-lockfile
branch
from
October 26, 2026 22:35
b466a33 to
952a598
Compare
renovate
Bot
force-pushed
the
renovate/react-i18next-17.x-lockfile
branch
from
October 27, 2026 09:56
952a598 to
87a2ab4
Compare
renovate
Bot
force-pushed
the
renovate/react-i18next-17.x-lockfile
branch
from
October 27, 2026 14:24
87a2ab4 to
25bc22b
Compare
renovate
Bot
force-pushed
the
renovate/react-i18next-17.x-lockfile
branch
from
October 27, 2026 15:34
25bc22b to
f095e22
Compare
renovate
Bot
force-pushed
the
renovate/react-i18next-17.x-lockfile
branch
from
October 28, 2026 06:36
f095e22 to
f366d0f
Compare
martin-henz
approved these changes
Oct 28, 2026
martin-henz
left a comment
Member
There was a problem hiding this comment.
Patch/minor dependency update; CI green.
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.0.16→17.1.8Release Notes
i18next/react-i18next (react-i18next)
v17.1.8Compare Source
formatis no longer dropped.Transreadsformatin an interpolation object as the formatter name ({{ value, format }}), so with{{ format }}as the only key nothing was left:<Trans>Export as {{ format }}</Trans>warnedTRANS_INVALID_OBJand used the default stringExport asinstead ofExport as {{format}}. Whenformatis the object's only key it is now treated as the variable.{{ value, format }}works as before. Without ani18nKey, the key derived from the children changes accordingly, fromExport astoExport as {{format}}. i18next-cli serializesTranschildren with react-i18next, so extracting with this version produces the same key. Thanks @Pharex38 (#1944).v17.1.7Compare Source
"Write &#​169; to get &#​169;"renderedWrite © to get ©instead ofWrite &#​169; to get ©, and&#​60;rendered<instead of&#​60;. This also hit interpolated values withescapeValue: true, where a value containing&#​60;is escaped to&#​60;. Escaped named entities like&lt;already stayed<, as browsers andTransdecode them. Unknown named entities and entities above U+10FFFF still stay as written. Thanks @Pharex38 (#1943).v17.1.6Compare Source
countpassed intOptionsis now used.TransspreadtOptionsand then set its owncountprop, so a count only intOptionswas overwritten withundefined:<Trans i18nKey="items" tOptions={{ count: 5 }} />rendered the keyitemsinstead of5 items, and with childrenTranscould pick the wrong plural form. Likecontext,Transnow falls back totOptions.count, handled the same way as thecountprop. Acountprop, a count in the children orvalues.countstill take precedence, andtOptionsis not modified. Thanks @nk-batman21 (#1942).v17.1.5Compare Source
Transnow falls back to the last key when none of them has a translation, ast()does. It used the array itself asdefaultValue, which i18next handles as an object, so<Trans i18nKey={['notifications.crm_item_created', 'crm_item_created']} components={[<strong />]} />renderedkey 'crm_item_created (en)' returned an object instead of string.instead ofcrm_item_created. An array of selectors falls back to the key of the last selector. The first key that has a translation still wins, andchildren,defaultsandtOptions.defaultValueare used as before. WithsaveMissing, these calls now report the missing key, like a singlei18nKeydoes. Thanks @nk-batman21 (#1941).v17.1.4Compare Source
allowObjectInHTMLChildren, thechildrenof HTML elements now use React's own type (DOMAttributes<T>['children']) instead of theReactI18NextChildren | Iterable<ReactI18NextChildren>union. Both accept the same children, so nothing compiles differently. For default installs the globalHTMLAttributesaugmentation now repeats whatever@types/reactdeclares, so changes in React's types flow through instead of meeting a copy, and type errors on element children no longer list an extraIterable<...>. WithallowObjectInHTMLChildren: truenothing changes. First step of #1928.v17.1.3Compare Source
"Hello 👋 <0>friend</0> &#​127881;"rendered U+F44B and U+F389, private-use glyphs that usually show as a box, instead of 👋 and 🎉: the decoder usedString.fromCharCode, which keeps only the low 16 bits of the code point. This shows up with translations that a TMS or CMS exports HTML-encoded. Entities above U+10FFFF, which are no valid code points, now stay as written instead of becoming U+0000. Entities below U+10000, including surrogate pairs written as two entities, decode as before. Thanks @nk-batman21 (#1940).v17.1.2Compare Source
<Trans i18nKey="welcome">Welcome</Trans>with"Welcome <1>friend</1>"renderedWelcome e, anddefaults="Hi <1>there</1>"with the childHirenderedHi i. The fallback for a single object of components ({{ 1: <strong /> }}) looked the tag up on the string and rendered one of its characters. It now applies only when that child is an object, so{{ 1: <strong /> }}renders as before, and the tag falls back to its inner text, as it already did with several children or with a number or an element as the only child. This also stops a single-entry array child holdingnull({[null]}, e.g. from a.mapthat returnednull) from throwingCannot read properties of null. Thanks @Cayan (#1939).v17.1.1Compare Source
componentsas an object with index keys, the component for key0is now rendered.components={{ 0: <a href={path} /> }}with"You're eligible. <0>Get started here.</0>"rendered the text without the link, a self-closing<0/>rendered nothing, and in<0>a <1>b</1></0>both elements were lost, while keys1and up and the array form worked. The object was passed on as the indexed children, so<0>resolved to the object itself. It is now looked up by key, like a named components map. This also fixes an arraycomponentsnext toreact.transDefaultProps.components, which the merge turns into such an object ({ Bold, 0, 1 }) and so lost its first entry, and a self-closing named tag in a mixed object ({ 0: <a />, Bold: <b /> }with<Bold/>), which rendered as the text<Bold />. Arrays, named maps and index objects starting at1render as before. Thanks @nk-batman21 (#1938).v17.1.0Compare Source
parseInterpolation: 'icu'(or'mf2') type option (i18next v26.5.0), thevaluesofIcuTransandIcuTransWithoutContextare typed from the message ofi18nKey, like the options oft(): a misspelled argument, a value of the wrong type or a value meant for another key is a type error.valueswasRecord<string, any>before, and still is with any otherparseInterpolationsetting.valuesstays optional, as onTrans.useTranslation'standTransvaluesget the checks from i18next's types without changes here.IcuTransandIcuTransWithoutContextnow infer the literali18nKey(consttype parameter, asTransdoes), so props that depend on the key are checked against that key instead of all keys of the namespace.v17.0.21Compare Source
valuesnow win overinterpolation.defaultVariables, as they do int().IcuTransmerged them the other way round, so<IcuTrans values={{ user: 'John Doe' }} />rendered the configured default variableuserinstead ofJohn Doe.Transhad the same inverted merge and is fixed too. Compatibility note: only names that are set both invaluesand indefaultVariablesrender differently.react-i18next/IcuTransWithoutContext(with types) for React Server Components. ImportingIcuTransWithoutContextfromreact-i18nextin a Server Component could fail the build withcreateContext is not a function, because the main entry creates the React context when it is loaded. Likereact-i18next/TransWithoutContext, the new entry point does not.dist/es/package.jsonnow declares"sideEffects": false, like the rootpackage.jsonalready did. Bundlers use the nearestpackage.json, so the ESM build counted as having side effects and unused exports were kept: an app that only usesTransstill bundledIcuTranswith its HTML entity decoder,useTranslationanduse-sync-external-store. With esbuild, aTrans-only bundle (React and i18next external) goes from 20.9 KB to 11.6 KB minified, 8.3 KB to 5.0 KB gzipped.icu.macroBabel macro is now marked as deprecated in favour of usingIcuTransdirectly. It fails on Babel 8 (t.jSXIdentifier is not a function),<Plural count={count}>renders the raw ICU message, and a Reactkeyon<Plural>/<Select>becomes an ICU case. It keeps working on Babel 7 and is not removed. TheIcuTransdocs page has a corrected example and props table and covers Server Components.v17.0.20Compare Source
useTranslationno longer suspends when a missing namespace is loaded by a synchronous backend. WithuseSuspense(the default), a namespace that wasn't in the store yet always made the component throw the loading promise, even when the backend had already delivered the resources while that promise was being created. React then showed theSuspensefallback and rendered again right away, which appears as a fallback flash (a white flash in React Native) and costs performance. The hook now starts the load first, checks the store again and only suspends if the namespace is still missing. This helps every backend that calls back synchronously, for examplei18next-resources-to-backendwith a static resources object or a loader that returns the data directly. Async backends, and an instance that isn't initialized yet, still suspend as before. Thanks @oblador (#1937).v17.0.19Compare Source
useTranslationwith an inline selectorkeyPrefix(useTranslation('ns', { keyPrefix: ($) => $.role })) returned a newton every render, so every effect,useCallbackanduseMemodepending ontran again each time. The cachedtwas compared against thekeyPrefixfunction itself, and an inline arrow is a new function on every render. It is now compared against the key the selector resolves to (with the same options and namespace listgetFixedTresolves it with), sotkeeps its identity as long as the resolved prefix does, just like a stringkeyPrefix. A selector that resolves to a different key still gets a newt, and i18next still resolves the selector on eachtcall as before. Fixes #1936.useTranslationkept returning the previoustwhen only the namespace (useTranslation('a')→useTranslation('b')) or only the i18n instance (another instance with the same language, via props orI18nextProvider) changed on a mounted component. Thattkept resolving against the old namespace or instance until something else (the language, the ready state, a bound i18n event) produced a new one. Both are now part of the check that decides whether the cachedtcan be reused.v17.0.18Compare Source
shouldUnescape, the defaultunescapenow turns and&#​160;into a no-break space (U+00A0) instead of a regular space (U+0020). The regular space dropped what the entity is for:u násor10 kmcould wrap across lines, and consecutive s collapsed into one space. This also matchesIcuTrans, whose entity decoder already mapped to U+00A0. Compatibility note: only affectsshouldUnescape; snapshots or exacttextContentcomparisons of such text now contain U+00A0 (Testing Library's default normalizer still matches it as a space). A customreact.unescapefunction can restore the old mapping for text nodes. Thanks @lprnmns (#1935).v17.0.17Compare Source
useTranslationno longer unsubscribes and resubscribes its i18n listeners on every render. Thesubscribecallback handed touseSyncExternalStoredepended on the merged options object, which is rebuilt wheneverpropsis a new object: with no options (the{}default), with options passed inline (useTranslation('ns', { keyPrefix })), and throughwithTranslationand<Translation>. A newsubscribemakes React resubscribe, so each render of each caller rani18n.offandi18n.onin an extra effect. It now depends only on the instance and thebindI18n/bindI18nStoreevent names. No updates were ever missed, because React re-checks the snapshot after resubscribing; this only removes the churn, which adds up with many mounted components that re-render often. Reported via next-i18next#2349.Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, 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.