Repository navigation
chore(deps): update i18next packages - #151
Merged
Merged
Conversation
renovate
Bot
force-pushed
the
renovate/i18next-packages
branch
4 times, most recently
from
October 26, 2026 05:38
4c757b5 to
c646b0b
Compare
renovate
Bot
force-pushed
the
renovate/i18next-packages
branch
from
October 26, 2026 06:49
c646b0b to
357f261
Compare
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:
26.4.7→26.5.217.0.19→17.1.0Release Notes
i18next/i18next (i18next)
v26.5.2Compare Source
t()call with a missing, misspelled or wrongly typed option now reports that option again (Property 'album' is missing,Type 'string' is not assignable to type 'number'), as TypeScript 5 and 6 do. TypeScript 7 elaborated the error against the default-value signature instead and ended in'{ count: 3; albm: "Summer"; }' is not assignable to type 'string': on a failed call TypeScript explains the last of the equally matching signatures, and TypeScript 7 sorts the 3-element[key, defaultValue, options?]last. It is now written as two signatures,[key, defaultValue]and[key, defaultValue, options]. This affects the default key checks with i18next{{name}}messages as well asparseInterpolation: 'icu'and'mf2'. Which calls compile, their return types and the error positions are unchanged on TypeScript 5.9, 6 and 7.v26.5.1Compare Source
false,0or''is now returned when a flat key with the same dotted name also exists. With{ a: { b: false }, 'a.b': 'flat' },getResource('en', 'translation', 'a.b')andt('a.b')returned'flat': the nested result was checked for truthiness, so these present values fell through to the flat-key lookup. Without such a flat key they were already returned. A nestednull, which is not a valid lookup by default (returnNull: false), still falls back to the flat key. Thanks @lprnmns (#2461).v26.5.0Compare Source
parseInterpolation: 'icu'andparseInterpolation: 'mf2'typet()options from the message's ICU MessageFormat arguments (i18next-icu) or MessageFormat 2 variables (i18next-mf2), so ICU and MF2 users no longer needparseInterpolation: falseand lose argument checking. Missing, misspelled and wrongly typed arguments fail, and so does leaving out the options for a message with arguments (t('greeting')); that error names the missing arguments. Opt-in, defaulttrueis unchanged.{name}takesstring | number,{n, number},pluralandselectordinaltakenumber,{d, date}and{t, time}takeDate,selecttakes its case keys or any string (forother), and arguments nested in cases are required too.#and tags are not arguments, apostrophe quoting is read like intl-messageformat does.{$name}takesstring | number, a variable annotated with:number,:integer,:currency,:percentor:unit(inline or through.input/.local) takesnumber,:datetime,:dateand:timetakeDate,:stringtakesstring, option and markup variables (minimumFractionDigits=$digits,{#link href=$url}) are required too,.localvariables are not arguments, and|quoted literals|and\{escapes are skipped.interpolationFormatTypeMapoverrides a type by ICU format or MF2 function name, e.g.date: Date | numberor a customuppercase: string.t(),getFixedT(),i18n.t, key prefixes, namespaces, the selector API and react-i18next'sTransvalues. Messages need literal types, as the resources file from i18next-cli'stypescommand has them.false(TypeScript 6), 0.5s instead of 0.26s with TypeScript 7. Messages that no call uses cost nothing.Property 'name' is missing) instead of'{ nmae: string }' is not assignable to type 'string'from the default-value overload.i18next/react-i18next (react-i18next)
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).Configuration
📅 Schedule: (in timezone Asia/Shanghai)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR was generated by Mend Renovate. View the repository job log.