Skip to content

Update i18next (major) - #2196

Open
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/major-i18next
Open

renovate[bot] wants to merge 1 commit into
masterfrom
renovate/major-i18next

Conversation

@renovate

@renovate renovate Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

ℹ️ Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Confidence
i18next (source) ^25.0.0^26.0.0 age confidence
react-i18next ^16.0.0^17.0.0 age confidence

Release Notes

i18next/i18next (i18next)

v26.4.2

Compare Source

  • fix: $&, $`, $' and $$ inside a nested value ($t(key)) now stay literal. nest() handed the resolved value straight to String.replace as the replacement argument, so those sequences were read as replacement patterns: $& re-inserted the $t(...) match, $` / $' inserted the text before / after it, and $$ collapsed to $. Through t() the $& case was worse than a wrong string: the nested lookup resets the shared nesting regexp, so the re-inserted $t(...) was matched again on every pass and t() never returned — also under the default escapeValue: true when the value arrives via a variable forwarded through nesting options ($t(key, { "name": "{{name}}" }) with a name containing $&). The value is now $-escaped at the String.replace call, the same guard interpolate() already has, and a non-string value returned by a formatter in the nesting chain ($t(key, myFormat)) is stringified before that. Nested values are still not HTML-escaped (#​854). Thanks @​mahirhir (#​2447).

v26.4.1

Compare Source

  • fix(types): the selector-form keyPrefix overload of getFixedT() is now available under enableSelector: 'strict'. Its constraint was gated on true | 'optimize' only, so under 'strict' it collapsed to never, the overload dropped out, and the returned t silently lost its keyPrefix scope (t(($) => $.deep) failed with Property 'deep' does not exist on type '{}'). The same call already typechecked under true and 'optimize'. Thanks @​hovelopin (#​2446).

v26.4.0

Compare Source

  • perf: cache toResolveHierarchy results per (code, fallbackCode) pair. The hierarchy resolver runs on every t() call and calls Intl.getCanonicalLocales multiple times, which showed up prominently when profiling render-heavy UIs (e.g. virtualized data grids); with the cache the per-call cost drops from ~886 ns to ~41 ns. The cache is invalidated automatically when options.fallbackLng changes (reassignment or in-place array mutation); if you mutate other resolution-relevant options at runtime (load, lowerCaseLng, cleanCode, nonExplicitSupportedLngs), call i18next.services.languageUtils.clearCache() afterwards. Function-valued fallbackLng and per-call array/object fallbackLng options are never cached, so dynamic fallbacks keep working as before. Thanks @​equaterina (#​2444).
  • chore: update all devDependencies (Babel stays on 7.x until @rollup/plugin-babel supports 8, eslint on 9.x for neostandard). Removed the unused coveralls package (CI uses the Coveralls GitHub Action) and replaced sinon with nise + vitest.spyOn in the v1 compatibility tests, which resolves all open npm audit findings (0 vulnerabilities) and should close the dependabot alerts on the lockfile.

v26.3.6

Compare Source

  • fix: allow TypeScript 7 in the optional typescript peer dependency range (^5 || ^6 || ^7). With typescript@7.0.2 in a project, npm install failed with an ERESOLVE peer conflict. The published types are TS7-compatible as-is: every test/typescript suite produces identical results under 6.0 and 7.0.2. Reported in react-i18next#1927, thanks @​andikapradanaarif.

v26.3.5

Compare Source

  • fix: $t() nesting options blocks that span multiple lines are now parsed. nest() decided where the nested key ends by testing match[1] with /{.*}/, whose dot does not cross line breaks — so a $t(key, { ... }) options object containing a newline was treated as having no options, mis-split as formatters, and the nested lookup ran without its options (placeholders stayed unresolved). The nesting regexp itself already matches newlines inside $t(...); adding the s (dotAll) flag makes multiline options behave like the single-line form. Thanks @​spokodev (#​2440).
  • fix: getUsedParamsDetails (the returnDetails: true path) no longer mutates the passed replace object. It wrote count straight onto options.replace so the returned usedParams would include it — a caller reusing one replace object across t() calls then carried a stale count into later interpolations (e.g. a previous call's count: 5 rendered instead of the current call's value). The details are now built from a copy; usedParams still includes count. Thanks @​spokodev (#​2441).
  • fix: with the default skipOnVariables: true + escapeValue: true, a {{placeholder}} carried inside an interpolated value now stays literal even when the value contains escapable characters. The skip logic advanced the regex lastIndex by the raw value length, but the escaped text written into the string is longer, so lastIndex landed inside the inserted value and a trailing {{placeholder}} in it got interpolated — leaking another in-scope variable that should have stayed literal (values without escapable characters were already skipped correctly). The advance now uses the escaped length that is actually written, and the regex-safe $-doubling is applied only at the String.replace call so it can't distort the length arithmetic. Thanks @​spokodev (#​2442).

v26.3.4

Compare Source

  • fix(security): deepExtend (used by addResourceBundle(..., deep, overwrite)) no longer recurses into inherited properties. It checked key existence with the in operator, which walks the prototype chain, so a source key matching an inherited built-in (e.g. hasOwnProperty, toString) caused recursion into the shared Object.prototype function and, with overwrite: true, could overwrite e.g. Object.prototype.hasOwnProperty.call with a non-callable value — corrupting a shared built-in process-wide (DoS). Existence is now checked with Object.prototype.hasOwnProperty.call, so such keys are copied as plain own data instead. This complements the existing __proto__/constructor guard and is also strictly more correct for an own-property merge. Only affects applications that pass attacker-controlled data with deep: true and overwrite: true; no standard backend/integration does this. Distinct from CVE-2026-48713 / CVE-2026-48714 (different packages, setPath mechanism). See advisory GHSA-6jcc-5g8w-32mx, CVSS 5.9 (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H). Thanks to zx (Jace) @​manus-use for the responsible disclosure.

v26.3.3

Compare Source

  • fix(types): selector t($ => $.arr, { returnObjects: true, context }) on a JSON array of heterogeneous objects now preserves each element's full shape (e.g. { transKey1: string; transKey2: string }[]) instead of collapsing to a union of partial element types. Two type-level causes: (1) FilterKeys evaluated the whole array element type at once, so keyof (A | B) only saw the keys common to every element — it now distributes over the object union and filters each element independently; (2) when TypeScript merges mismatched array element types it injects phantom optional undefined keys (e.g. transKey1_withContext?: undefined on elements that don't define it), which the context-detection helpers mistook for real context variants — they now skip keys typed as undefined. Also adds a dedicated context + returnObjects: true selector overload using const Fn + ReturnType<Fn>, so Target is no longer collapsed to unknown via ApplyTarget. Resolves Problem 1 of #​2398 (Problem 2 was already fixed on master). Thanks @​sauravgupta-dotcom (#​2438). Fixes #​2398.

v26.3.2

Compare Source

  • fix: chained formatters with a parenthesised option that contains the format separator (e.g. join(separator: ', ')) now work at any position in the chain, not just first. Previously the comma-in-parens reassembly only repaired formats[0], so {{v, uppercase, join(separator: ', ')}} split the join(...) option on the inner comma and never rejoined it, producing corrupt output. Replaced the first-position-only repair with a position-independent pass that re-joins fragments until each open paren closes. Thanks @​spokodev (#​2437).

v26.3.1

Compare Source

  • fix(types): t() with a keyPrefix no longer pollutes its return type with sibling keys' values. A regression in 26.3.0 — the [Res] extends [never] guards added to KeysBuilderWithReturnObjects / KeysBuilderWithoutReturnObjects turned the builders into deferred conditional types, so KeyPrefix<Ns> stopped resolving to a literal union and keyPrefix inference widened to the whole namespace. Symptom: useTranslation(ns, { keyPrefix: 'a.b' }) then t('title') would resolve to '<a.b>.title' | '<other.path>.title' | ... instead of just the scoped value. Affected every react-i18next user using keyPrefix. Restored to the eager 26.2.0 form. The same-namespace conflict handling from #​2434 still works via _DropConflictKeys at the merge layer (in options.d.ts). Thanks @​aaronrosenthal (#​2436).

v26.3.0

Compare Source

  • feat(types): introduce ResourceNamespaceMap — a separate mergeable augmentation surface for namespace resource types, designed for monorepos where multiple packages each want to contribute their own namespaces. Previously, every package had to coordinate on a single CustomTypeOptions.resources declaration (or fall back to typing dependency namespaces as any) because resources is a single property of an interface and TypeScript reports TS2717 when two declarations of the same property disagree. The new interface merges naturally across declare module 'i18next' blocks, so each package can ship its own i18next.d.ts independently. Per-property merge handles same-namespace contributions from multiple packages, and same-key/different-literal conflicts are silently dropped to avoid poisoning t() overload resolution. Fully backwards-compatible — existing CustomTypeOptions.resources augmentations continue to work, and both surfaces can coexist. Scalar options (defaultNS, returnNull, enableSelector, etc.) still belong on CustomTypeOptions. Thanks @​sh3xu (#​2434). Fixes #​2409.

v26.2.0

Compare Source

  • feat(types): new parseInterpolation TypeOption (default true). When set to false in CustomTypeOptions, the type-level extractor stops parsing translation strings for {{variable}} patterns. Required by i18next-icu users — the default extractor mistakes ICU MessageFormat nested-brace plurals like {count, plural, one {{count} row} other {{count} rows}} for an interpolation block and demands a phantom variable name. The flag is type-only; runtime interpolation is governed by InterpolationOptions and is unaffected. Fixes i18next-icu#85.
  • fix(types): expose enableSelector on InitOptions so i18next.init({ enableSelector: 'strict' }) typechecks without a module augmentation. The runtime already reads opts?.enableSelector from init options; this lands the matching type declaration next to the other selector-resolution knobs. Accepts false | true | 'optimize' | 'strict'. Thanks @​Faithfinder (#​2431)

v26.1.0

Compare Source

  • feat: enableSelector: 'strict' (TypeOptions + runtime option). Opt-in mode that drops the flattened-primary form from NsResource at the type level — every namespace (primary included) is exposed only under its own key on $, uniformly across single- and multi-ns hooks. At runtime, a leading selector path segment matching the scope's namespace list is always rewritten as a namespace prefix, including the primary. Eliminates the silent-miss surface area where t($ => $.primary.foo) typechecks but doesn't resolve under the default mode (see #​2429). Backward-compatible: default enableSelector: false | true | 'optimize' behavior is unchanged. Note: strict mode is incompatible with the #​2405 pattern (keys whose names match sibling namespaces) — those users should stay on default mode.

v26.0.10

Compare Source

  • feat: getFixedT accepts a fourth optional fixedOpts argument carrying scopeNs — the full namespace list the bound t was created for. The selector API uses scopeNs to detect when a path's first segment is a namespace prefix, without changing resolution scope. Resolution still uses the bound ns (a single primary string in the typical react-i18next setup), so plain t('key') lookups stay isolated to the primary namespace exactly as before — only t($ => $.secondaryNs.foo) selectors now route correctly under useTranslation([nsA, nsB]). Fixes the runtime side of #​2429 for the react-i18next default-nsMode case. The 4th argument is opt-in: existing 3-arg getFixedT(lng, ns, keyPrefix) callers see no behavior change.

v26.0.9

Compare Source

  • fix(types): unformatted interpolation values are now typed as string | number (was string). i18next stringifies values at runtime, so requiring callers to wrap numbers in String(...) for plain {{var}} placeholders was unnecessary friction — and could mask the real problem when a non-string value was passed alongside multiple interpolation slots (the t() overload resolution would fall through to the 3-arg form and report a confusing "not assignable to string" error against the options object). Typed format specifiers like {{x, number}}, {{x, currency}}, {{x, datetime}}, etc. keep their precise types; this only relaxes the no-format default. The count variable remains number-only

v26.0.8

Compare Source

  • fix(types): restore the pre-v25.10.4 ExistsFunction shape so plain arrow functions can again be assigned to ExistsFunction-typed variables (TypeScript cannot infer type predicates through multi-overload assignment). Direct i18next.exists(key) calls still narrow key to SelectorKey — the predicate is now declared inline on i18n.exists. Custom wrappers that want the narrowing can type themselves as typeof i18next.exists 2425

v26.0.7

Compare Source

  • fix: when a plural lookup misses, the missingKey debug log now shows the actual plural-resolved key (e.g. foo.bar_many for Polish count: 14) instead of the base key — making it obvious which plural category was expected and missing 2423
  • chore: drop @babel/runtime runtime dependency. The build no longer generates any @babel/runtime imports, so the package is unused by consumers. Rollup now uses babelHelpers: 'bundled' so any helpers that are ever needed in the future will be inlined rather than imported externally 2424
  • chore: stop emitting dist/esm/i18next.bundled.js. It was byte-identical to dist/esm/i18next.js because no helpers were being imported 2424

v26.0.6

Compare Source

Security release — all issues found via an internal audit.

  • security: warn when a translation string combines escapeValue: false with interpolated variables inside a $t(key, { ... "{{var}}" ... }) nesting-options block. In that narrow combination, attacker-controlled string values containing " can break out of the JSON options literal and inject additional nesting options (e.g. redirect lng/ns). The default escapeValue: true configuration is unaffected because HTML-escaping neutralises the quote before JSON.parse. See the security note in the Nesting docs for the full pattern and mitigations
  • security: apply regexEscape to unescapePrefix / unescapeSuffix on par with the other interpolation delimiters. Prevents ReDoS (catastrophic-backtracking) when a misconfigured delimiter contains regex metacharacters, and fixes silent breakage of the {{- var}} syntax when the delimiter contains characters like (, [, .
  • security: strip CR/LF/NUL and other C0/C1 control characters from string log arguments to prevent log forging via user-controlled translation keys, language codes, namespaces, or interpolation variable names (CWE-117)
  • chore: ignore .env* and *.pem/*.key files in .gitignore

v26.0.5

Compare Source

  • fix: cloneInstance().changeLanguage() no longer fails to update language state when the target language is not yet loaded — a race between init()'s deferred load() and the user's changeLanguage() could overwrite isLanguageChangingTo, causing setLngProps to be skipped 2422

v26.0.4

Compare Source

  • fix(types): inline formatting options like {{price, currency(EUR)}} are now correctly resolved to their base format type (e.g. number for currency) instead of falling back to string 2378

v26.0.3

Compare Source

  • fix(types): addResourceBundle now accepts an optional 6th options parameter ({ silent?: boolean; skipCopy?: boolean }) matching the runtime API 2419

v26.0.2

Compare Source

  • fix(types): t("key", {} as TOptions) no longer produces a type error — the context constraint now bypasses strict checking when context is unknown (e.g. from TOptions) 2418

v26.0.1

Compare Source

  • feat: getFixedT accepts a fourth optional fixedOpts argument carrying scopeNs — the full namespace list the bound t was created for. The selector API uses scopeNs to detect when a path's first segment is a namespace prefix, without changing resolution scope. Resolution still uses the bound ns (a single primary string in the typical react-i18next setup), so plain t('key') lookups stay isolated to the primary namespace exactly as before — only t($ => $.secondaryNs.foo) selectors now route correctly under useTranslation([nsA, nsB]). Fixes the runtime side of #​2429 for the react-i18next default-nsMode case. The 4th argument is opt-in: existing 3-arg getFixedT(lng, ns, keyPrefix) callers see no behavior change.

v26.0.0

Compare Source

This is a major breaking release:

Breaking Changes
  • Remove deprecated initImmediate option — the backward-compatibility mapping from initImmediate to initAsync (introduced in v24) has been removed. Use initAsync instead.
  • Remove legacy interpolation.format function — the old monolithic format function (interpolation: { format: (value, format, lng) => ... }) is no longer supported. The built-in Formatter (or a custom Formatter module via .use()) is now always used. Migrate to the new formatting approach using i18next.services.formatter.add() or .addCached() for custom formatters.
  • Remove console support notice — the console support notice introduced in v25.8.0 has been removed, along with the showSupportNotice option and all related internal suppression logic (globalThis.__i18next_supportNoticeShown, I18NEXT_NO_SUPPORT_NOTICE env var). See our blog post for the full story.
  • Remove simplifyPluralSuffix option — this option was unused by the core PluralResolver (which relies entirely on Intl.PluralRules). It only had an effect in the old v1/v2/v3 compatibility layer. The v4 test compatibility layer now defaults to true internally.
  • Remove deprecated @babel/polyfill from devDependencies.
Improvements
  • Code modernization across all source files:
    • Replace indexOf() > -1 / indexOf() < 0 with .includes() (~40+ occurrences)
    • Replace indexOf() === 0 with .startsWith() where appropriate
    • Replace var with const, '' + object with String(object), .substring() with .slice()
    • Replace .apply(observer, [event, ...args]) with direct call observer(event, ...args)
    • Remove unnecessary .call(this, ...) in BackendConnector retry logic
    • Fix array-callback-return in LanguageUtils getBestMatchFromCodes
    • Clean up all stale eslint-disable comments from source files
  • EventEmitter: add once() method for one-time event subscriptions
  • Memory leak fix: move module-level checkedLoadedFor cache to Translator instance, preventing cross-instance state leakage
  • TypeScript: fix BackendModule generic parameter naming inconsistency between CJS and ESM type definitions
  • TypeScript: add once() method to i18n and ResourceStore type interfaces
  • ESLint 9: migrate from ESLint 8 (airbnb-base) to ESLint 9 flat config with neostandard
  • Vitest 4: upgrade from vitest 3 to vitest 4, migrate workspace files to test.projects config
i18next/react-i18next (react-i18next)

v17.0.14

Compare Source

  • fix: the i18n object returned by useTranslation was only refreshed when i18n.language changed, so a resolvedLanguage (or languages) change of its own kept handing components the previous snapshot. That happens whenever the translations for the current language arrive after the switch — i18next resolves to the fallback until its store has them — and components reading i18n.resolvedLanguage (language switchers, for example) then stayed one switch behind. The cached wrapper is now keyed on all three language fields, which are exactly the ones the surrounding useMemo already depends on; wrapper identity still only changes when the language state does, so the caching from #​1885 is unaffected. Reported via next-i18next#2348.

v17.0.13

Compare Source

  • fix(types): the selector-form keyPrefix overload of useTranslation() is now available under enableSelector: 'strict'. useTranslation was gated on true | 'optimize' only, so under 'strict' it resolved to the legacy signature and the selector overload disappeared entirely (keyPrefix: ($) => $.ns.foo failed with Type '($: any) => any' is not assignable to type 'undefined'). Trans already handled all three modes. Companion to the same fix for getFixedT in i18next#2446. Thanks @​hovelopin (#​1930).

v17.0.12

Compare Source

  • fix(IcuTrans): key-less icu.macro nodes (<Trans>Welcome, {name}!</Trans>, <Select>, <Plural> without i18nKey) rendered an empty string since 17.0.0. The macro now emits <IcuTrans defaultTranslation="…"> without a key and IcuTrans passed undefined to t(), which returns ''. Like Trans, IcuTrans now uses defaultTranslation as the key when i18nKey is not provided.

v17.0.11

Compare Source

  • chore: html-parse-stringify updated to ^4.0.1. The parser powering <Trans> is now actively maintained under the i18next org (i18next/html-parse-stringify) after years without upstream releases. 4.x brings modern dual ESM/CJS packaging with an exports map, zero runtime dependencies, reworked TypeScript types and a long list of parser fixes (literal < in text, multiline/CRLF attribute values, comments containing >, doctype handling, quote-aware bracket handling).
  • refactor(Trans): the internal escapeLiteralLessThan scanner (~80 lines) is replaced by the parser's new allowedTags option with identical semantics: only numbered tags, kept basic HTML tags and known component names are parsed as markup, any other tag-shaped sequence in the translation stays literal text. Rendered output is unchanged (all 493 tests pass, including the #​1880 and #​1893 escaping cases).

v17.0.10

Compare Source

  • fix(warnings): the useTranslation and Trans "You will need to pass in an i18next instance" warnings now match the useSSR wording, mentioning the props/context alternatives and the most common unexplained cause at scale: duplicate react-i18next copies in monorepo setups. The Trans variant also referenced the internal i18nextReactModule name; it now points to the public initReactI18next API.
  • feat(warnings): development-only warning (SUSPENDED_WHILE_LOADING, logged once) right before useTranslation suspends while translations are loading. With the default useSuspense: true and no <Suspense> boundary this previously surfaced as a blank screen or a cryptic React error; the warning now names both fixes (add a <Suspense> boundary or set react.useSuspense: false). No-op in production builds; the process.env.NODE_ENV check is wrapped so runtimes without a process global (raw ESM in the browser, some edge runtimes) stay silent instead of throwing.
  • ci: weekly workflow typechecking the test suite against @types/react@next / @types/react-dom@next, so the next React major's type changes (like the React 18 TFunctionResult/children wave) surface before user reports.

v17.0.9

Compare Source

  • fix: allow TypeScript 7 in the optional typescript peer dependency range (^5 || ^6 || ^7). With typescript@7.0.2 in a project, npm install failed with an ERESOLVE peer conflict. Fixes #​1927, thanks @​andikapradanaarif.
  • fix(types): <Trans t={t} ns="ns" …> with a t from useTranslation(['ns']) now typechecks under TypeScript 7. TS7 intersects the Ns inference candidates coming from the t prop (readonly ['ns']) and the ns prop ('ns') into an unsatisfiable 'ns' & readonly ['ns'], where TS6 resolved them. The ns prop on TransProps, TransSelectorProps and IcuTransWithoutContextProps now also accepts a single namespace out of an array-typed Ns (Ns | (Ns extends readonly (infer S extends string)[] ? S : never)) — which matches runtime behavior and is unchanged under TS5/TS6.

v17.0.8

Compare Source

  • fix(types): <Trans i18nKey={$ => ...}> now typechecks under enableSelector: 'strict'. The Trans component's conditional type was gated on _EnableSelector extends true | 'optimize', excluding 'strict' and falling back to the legacy string-key signature. Runtime was already correct (it calls keyFromSelector(i18nKey) whenever typeof i18nKey === 'function'); this is a type-only fix that widens the conditional to include 'strict'. Thanks @​Faithfinder (#​1921)

v17.0.7

Compare Source

  • feat: useTranslation([nsA, nsB, ...]) now passes its full namespace list to getFixedT via the new scopeNs opt (requires i18next ≥ v26.0.10). This makes selector calls with a secondary-namespace prefix resolve correctly under default nsMode: t($ => $.nsB.foo) previously missed silently because the bound ns was the primary string only and i18next's selector rewrite needed an array. Resolution semantics are unchanged — plain t('key') lookups still stay isolated to the primary namespace by default; use nsMode: 'fallback' to opt into multi-ns fallback resolution as before. Fixes i18next#2429 for useTranslation-based callers.

v17.0.6

Compare Source

  • fix: restore the v17 nodesToString output format consumed by i18next-cli's extractor while still rendering 1919 correctly
    • 17.0.5 fixed 1919 by changing what nodesToString produced, which inadvertently changed the extracted translation strings for keep-tags wrapping non-keep React elements
    • The fix now lives in the renderer: indexed <N> placeholders nested inside a keep-tag are scoped to that tag's own original React children (matching kept tags by name and positional occurrence at each level), so the translation string format produced by nodesToString is unchanged

v17.0.5

Compare Source

  • fix: <Trans /> no longer breaks child rendering when a kept HTML node (transKeepBasicHtmlNodesFor) wraps a non-keep React element 1919 — superseded by 17.0.6, which keeps the same runtime fix without changing the nodesToString output

v17.0.4

Compare Source

  • fix: avoid React does not recognize the 'i18nIsDynamicList' prop on a DOM element warning 1915

v17.0.3

Compare Source

  • fix: avoid invalid prop on React.Fragment inside <Trans /> 1914

v17.0.2

Compare Source

  • fix(types): values prop on <Trans /> now only requires interpolation variables for the specific i18nKey, not all variables in the namespace 1913

v17.0.1

Compare Source

  • chore: bump minimum i18next peer dependency to >= 26.0.1 (forgot to do it in last version)
  • fix: migrate test setup from removed legacy interpolation.format to i18n.services.formatter.add() (i18next v26)

v17.0.0

Compare Source

Potentially breaking changes
  • fix: transKeepBasicHtmlNodesFor now correctly preserves HTML tag names when children contain interpolations or mixed content 230
    • Previously, <strong>{{name}}</strong> was incorrectly serialized as <1>{{name}}</1> — the tag name was only preserved for plain string children
    • This bug existed since the feature was introduced and affects auto-generated keys (when no explicit i18nKey is provided)
    • If you rely on auto-generated Trans keys containing indexed tags for kept HTML elements with interpolation children, you will need to update your translation files
Other changes
  • updated dev dependencies (vitest, rollup plugins, happy-dom, typescript, etc.)
16.6.6
  • fix(peer-deps): bump i18next peer dependency to >= 25.10.9 to match required type exports (ConstrainTarget, ApplyTarget, GetSource) used by TransSelector 1911
16.6.5
  • fix(types): selector keyPrefix overload in useTranslation no longer matches when keyPrefix is absent, fixing defaultNS: false with explicit ns option 2412
16.6.4
  • allow TypeScript 6 as peer dependency 1910
16.6.3
  • fix(types): merge TransSelector overloads into a single signature so typeof Trans remains extendable 1909
16.6.2
  • feat(types): useTranslation now accepts selector functions as keyPrefix with full type-safe key narrowing when enableSelector is enabled 2367
16.6.1
  • feat(types): i18nKey of <Trans i18nKey={sk} /> to accept a SelectorKey 2364
16.6.0
  • warn when t is called before ready with useSuspense: false 1896
  • type-safe values prop on <Trans /> component — interpolation variables are now inferred from the translation string when custom types are configured 1772
16.5.8
  • A selector function cannot be resolved without an i18n instance... returning empty string is safer than leaking the raw function reference. 1907
16.5.7
  • fix: <Trans> component with enableSelector: true does not support multiple selectors for fallbacks 1907
16.5.6
  • fix: prevent crash in useSSR when init() hasn't been called before useSSR — now logs a warning instead of throwing 1604
16.5.5
  • fix: prevent crash in useSSR, getInitialProps and Translation when no i18next instance is available (e.g. in monorepo setups with duplicate react-i18next copies) — now logs a clear warning instead of throwing 1604
16.5.4
  • fix: Overriding React component props not working 1902
16.5.3
  • fix: Trans named tags with underscore 1901
16.5.2
  • fix: Type errors when you've declared a resources type 1899 via 1900
16.5.1
16.5.0
  • Add configuration option transDefaultProps to set default props for the Trans component (e.g. tOptions, shouldUnescape, values) 1895
16.4.1
  • fix(Trans): prevent double-escaping of interpolated values in component props (e.g. title). Unescape HTML entities before passing prop values to React to avoid rendered output like &amp;quot; / &amp;#&#8203;39;. 1893
16.4.0
  • <Trans count> prop: optional - infer count from children 1891
16.3.5
  • fix runaway effect in useTranslation 1888 by 1889
16.3.4
  • Fix: avoid the "ref is not a prop" warning when a user ref is placed on an element inside <Trans> 1887, by still trying to fix element.ref access issue with react 19 1846
16.3.3
  • improve useTranslation to fix "Maximum update depth exceeded" but still support new react-compiler 1885 1863
16.3.2
  • fix: avoid "Uncaught TypeError: Cannot redefine property: __original"
16.3.1
  • revert fix: Incosistent behaviour of Trans and t. Trans set defaultValue when t call doesn't set the field. 1876 f22d478
16.3.0
  • fix: add i18n wrapper for React Compiler and React.memo compatibility 1884
16.2.4
  • try to fix "Trans component do not render anymore children as default value in test environment" 1883 by also respecting 1876
16.2.3
  • fix hyphened component break issue 1882
16.2.2
  • fix trans component break with less than sign 1880, closes 1734
16.2.1
  • fix regression in v16.2.0: bindI18nStore does not work correctly 1879
16.2.0
  • try to address: useTranslation hook violates React's rules of hooks by conditionally calling inner hooks 1863
16.1.6
  • fix: fix: handle spread props for inner components in Trans (icu) 1877
16.1.5
  • fix: Incosistent behaviour of Trans and t. Trans set defaultValue when t call doesn't set the field. 1876
  • Trans: use also defaultValue via tOptions as fallback
16.1.4
  • fix: detect pre-transformation use of interpolation like number/date/etc. 1875
16.1.3
  • fix: ensure invalid identifiers are quoted in the props object 1874
16.1.2
  • missing.js extensions for Icu imports
16.1.1
  • exports for IcuTrans component 1873
16.1.0
  • Introduce IcuTrans component 1869
16.0.1
  • fix: Using component with named tags throws error when Selector API is enabled 1867 with 1868
16.0.0
  • major upgrade i18next dep to address 1865
15.7.4
  • downgrade i18next dep to address 1865
15.7.3
  • exports TransSelectorProps 1862 to address 1861
15.7.2
  • update i18next dependency
15.7.1
  • Fix: _EnableSelector type (for compatibility, enableSelector does not exist in TypeOptions) 1858
15.7.0
  • add new selector API to improve TypeScript IDE performance 1852
    • read more about it here
15.6.1

avoid exception when passing bindI18n: false 1856

15.6.0

fix: passing components as object should still allow for indexed matching of children 1854

15.5.3

chore: update @babel/runtime 1851

15.5.2

fix element.ref access issue with react 19 1846

15.5.1

add typescript as optional peer dependency 1843

15.5.0

feat: use const type parameters for useTranslation() 1842

15.4.1

fix: unique key warning on componentized element 1835

15.4.0

feat: add meta with codes on warnings to allow conditional logging 1826

15.3.0

Uses the i18next logger instead of the default console logger, if there is a valid i18next instance. Now the debug i18next option is respected, and you can also inject your own logger module: https://www.i18next.com/misc/creating-own-plugins#logger

15.2.0

This version may be breaking if you still use React < v18 with TypeScript.
For JS users this version is equal to v15.1.4

  • fix: Global JSX namespace is deprecated 1823 with 1822
15.1.4
  • Fix: warning each child should have a unique key 1820
15.1.3
  • fix: Self-closing REACT components in translation strings should not attempt to replace the component's children 1815 1816
15.1.2
  • fix: Attempted to assign to readonly property 1813
15.1.1
  • fix: Not all namespaces are loaded when passing the lng option to useTranslate 1809
15.1.0
  • fix: <Trans /> warns 'Each child in a list should have a unique "key" prop.' for react 19 1806
15.0.3
15.0.2
  • try to fix Trans handling with alwaysFormat set to true 1801
15.0.1
  • revert arrow function in class property to address this
15.0.0
  • use optional chaining, nullish coalescing and nullish coalescing assignment 1774
  • Build config and optimizations 1769
  • some dependency updates 1768
  • use modern hasLoadedNamespace code (now requires at least i18next > v19.4.5 (introduced in june 2020))
14.1.3
  • create a isObject helper function 1766
  • optimize nodesToString 1765
  • Simplifies hasValidReactChildren 1764
  • create a isString helper to avoid code duplication 1763
  • use arrow functions where possible 1762
  • use the commented out async code 1761
14.1.2
  • bring back internal interpolationOverride handling for Trans component (if there are childrens), fixes 1754
14.1.1
  • do not modify passed tOptions context property to address 1745
14.1.0
  • types(Trans): add typechecking on context prop 1732 (might break if using "internal" Trans or TransProps)
14.0.8
  • fix: issue 1728 when useSuspense is false and default ns 1731
14.0.7
  • try to get rid of internal interpolationOverride handling for Trans component, fixes 1729
14.0.6
  • align context handling of Trans component with t function, fixes 1729
14.0.5
  • Fix 1691 for strict mode, by preserving change language binding 1720
14.0.4
  • fix interpolation of the count prop 1719
14.0.3
  • revert changes done in v14.0.2 since it breaks normal language change render updates
14.0.2
  • Fix/bug 1691 make returned t function identical upon second effect run in strict mode 1716
14.0.1
  • types: fix typo in CustomInstanceExtensions 1713
14.0.0
  • types: reportNamespaces is now optional, should fix 1693
13.5.0
  • self-closing components in translation strings should not attempt to replace the component's children 1695
13.4.1
  • types: use CustomInstanceExtenstions to extend reportNamespaces
13.4.0
  • fix: separate cjs and mjs typings
13.3.2
  • types: fix consider importing '*.js'
13.3.1
  • optimize defaultVariables feature introduced in last release
13.3.0
  • Respect defaultVariables in the interpolation options 1685
13.2.2
  • Fix missing TransWithoutContext type 1672
13.2.1
  • types: Allow iterable ReactI18NextChildren as children 1669
13.2.0
  • Don't use defaults prop as default key 1664
13.1.2
  • postpone usage of newer ES syntax
13.1.1
  • Render all children regardless of type when using i18nIsDynamicList prop 1661
13.1.0
  • Fix non-list dynamic content in Trans component 1660
13.0.3
  • fix unescape is not consistently called for all values 1657
13.0.2
  • export icu.macro 1652
13.0.1
  • types: Fix performance issue in Trans component 1646
13.0.0
  • Update types to support t function redesign 1615
  • requires i18next >= v23.0.1
12.3.1
  • optimization for optional lng prop for useTranslation, should now prevent missings when lazy loading translations 1637
12.3.0
  • optional lng prop for useTranslation (helping on server side 1637)
12.2.2
  • try to fix conditional exports in package.json
12.2.1
  • type fix: the type of defaultNS in I18nextProvider should support string[] 1633
12.2.0
  • if defaultValue is passed in not ready t functio (via useTranslation) return that instead of the key, even though the user-land could should be fixed 1618
12.1.5
12.1.4
  • fix crash in gatsby 1594
12.1.3
  • fix fallback of t function in Trans component
12.1.2
  • fix cras

Important

✂ PR body was truncated to here.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • Between 12:00 AM and 03:59 AM, only on Monday (* 0-3 * * 1)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot force-pushed the renovate/major-i18next branch from 8b83556 to 666fa8c Compare September 20, 2026 16:52

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants