Repository navigation
chore(deps): update i18next to v27.2.3 - #3720
Merged
Merged
Conversation
renovate
Bot
force-pushed
the
renovate/i18next-27.x
branch
from
November 24, 2026 23:14
d405f10 to
46fd8df
Compare
|
setchy
approved these changes
Nov 25, 2026
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:
27.1.1→27.2.3Release Notes
i18next/i18next (i18next)
v27.2.3Compare Source
$t(key, { "name": "{{name}}" })is escaped once. With the defaultescapeValue: trueit was escaped for HTML before the options were parsed and again by the nestedt(), soTom & Jerrycame out asTom & Jerry(and react-i18next'sTranshas shownTom & Jerrysince 17.1.10, withescapeValue: falsetoo). These variables are now escaped for the options' JSON, whateverescapeValueis, and the nestedt()escapes them like the values of a direct call;defaultValueandjoinArraysthere, which it does not interpolate, stay escaped once. A value with",',\or a line break no longer breaks the options, withescapeValue: falsea value can no longer inject options such aslng, and withskipOnVariablesa{{placeholder}}inside a value is no longer interpolated a second time. The warning added in 26.0.6 now covers{{- var}}in these options, the one form still inserted unescaped, instead ofescapeValue: false.v27.2.2Compare Source
setDefaultNamespace()works on a clone. A clone's translator keeps its own options object, so the call changedi18n.options.defaultNSwhilet()kept using the old default namespace. i18next-http-middleware hands every request a clone, soreq.i18n.setDefaultNamespace()did nothing there. (#2106)supportedLngsworks in any casing. Every other language code is formatted (pt-brtopt-BR,ENtoen, all lowercase withlowerCaseLng), butsupportedLngswas compared as written, sosupportedLngs: ['pt-br'],['EN'], or['pt-BR']withlowerCaseLng: truerefused that language and fell back. They are now compared in that formatted form (also byloadLanguages()), whileoptions.supportedLngsstays as written. (#1791)interfaces get their nested keys. The key types only walked into objects with an index signature, which a type alias has and an interface does not, sot('nested.key')failed with TS2345 whilet('nested')compiled. Interfaces now give the same keys as type aliases, sot('nested')withoutreturnObjectsis rejected for them too. (#2326)strictNullChecks: false. Without strict null checksundefinedpassesextends string, so the key prefix, namespace and context checks took a missingkeyPrefix,nsorcontextfor a value:t('title')was rejected (onlyt('ns:title')compiled),t()returnedstring, and react-i18next'sTransaccepted noi18nKey. A new type test project compiles withstrictNullChecks: false; with strict null checks the types resolve as before. (#2085)v27.2.1Compare Source
undefinedrenders as an empty string when its placeholder has a format too ({{amount, number}}), as{{amount}}already did. The placeholder stayed in the result with the defaultskipOnVariables: true, and debug mode logged "missed to pass in variable" with either setting. Thanks @Vineet829 (#2479)v27.2.0Compare Source
init,changeLanguage,loadNamespacesorloadLanguages, or alanguageChanged/loadedlistener) is no longer handed back to the backend connector as if the read had failed. With a backend whosereadreturns a value or a promise, the connector got that error a second time: the namespace that had loaded was marked as failed,failedLoadingwas emitted with your error and the count of running reads dropped to -1. The error now reaches your app: it is thrown from the call that started the load for areadthat returns a value, and it is an unhandled rejection for areadthat returns a promise, which ends a Node.js process unless you handleunhandledRejection. Thanks @SudeepGowda55 (#2477)loadedevent is still emitted, and the error is thrown on after that. A secondloadNamespaces()for the same namespace never called back before.addResourceBundle(lng, ns, resources, true, true)overwrites numbers and booleans too. Only strings were replaced, so{ n: 0 }stayed 0 after adding{ n: 5 }, and adding an object where the bundle had a number, boolean or null threwCannot create property ... on number, also withoutoverwrite. Withoverwrite, a number, boolean or null now also replaces a nested object, as a string already did. Thanks @SudeepGowda55 (#2476)keySeparator: false, a namespace separator inside the key after the namespace is kept.t('common:errors:required')looked up'errorsfalserequired'instead of the flat key'errors:required'that i18next-cli extracts (also for a selector like$ => $.common['errors:required']), and reported the missing key under that name. This dates back to 11.3. Thanks @SudeepGowda55 (#2478)v27.1.5Compare Source
off(event, listener)removes a listener added withonce().once()registers a wrapper, sooff()with the listener itself found nothing and the listener still ran on the next event. Aonce()listener is now also removed before it runs, so one that emits the same event again (like callingchangeLanguage()fromlanguageChanged) or throws runs only once. Thanks @SudeepGowda55 (#2475)v27.1.4Compare Source
enableSelector, assigning atfunction to a widerTFunction(TFunction<'ns'>toTFunction<'ns', string>orTFunction<Namespace>, or a key prefix to a wider one) failed with TS2590 "Expression produces a union type that is too complex to represent" once the namespaces had about 600 top-level keys together. This started in 26.3.3. Selector results for JSON arrays that mix arrays with objects or strings also keep the inner arrays as arrays. Thanks @reckter (#2474)v27.1.3Compare Source
hasOwnProperty,isPrototypeOf,toLocaleString,__defineGetter__, ...) made the backend connector throwobj[k].push is not a functionwhen its load finished. A language detector passes such a code on from a request (?lng=hasOwnProperty), and with an asynchronous backend nothing caught the throw, so one request ended a Node.js server process (in a browser,init()never resolved). Now these codes load like any other unknown language. Thanks @superbot-helper (GHSA-q76c-gcvw-89x9)fallbackLng, a language code named like anObject.prototypeproperty (constructor,toString,hasOwnProperty,constructor-US) gets thedefaultfallback instead of makingt(),exists(),getFixedT()andchangeLanguage()throwfallbackCodes.forEach is not a function. Thanks @cyphercodes (#2473, #2472)v27.1.2Compare Source
supportedLngs: false, every made-up language a detector found (?lng=xx1,?lng=xx2, ...) or every made-up namespace requested from i18next-http-middleware'sgetResourcesHandleradded about 180 bytes for good. Now only the most recent 1000 failed loads are kept (an older one is read again when it is needed), and both caches are emptied at 1000 codes, as the formatted language codes already were. Pairs with i18next-http-middleware 3.10.1 (GHSA-mjcw-gfh6-3cxm).Configuration
📅 Schedule: (UTC)
* 0-3 * * 1)🚦 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.