This issue has been created
There are 8 updates.
 
 
XWiki Platform / cid:jira-generated-image-avatar-2e12125d-4b7c-435c-af1e-2f3e95da1de7 XWIKI-24170 Closed

Upgrade to react-i18next 16.6.6 and i18next to 25.10.10

 
View issue   ·   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-a1f5049e-419a-4da1-a037-47cd5e92bb17 Manuel Leduc created this issue on 27/Mar/26 14:26
 
Summary: Upgrade to react-i18next 16.6.6
Issue Type: cid:jira-generated-image-avatar-2e12125d-4b7c-435c-af1e-2f3e95da1de7 Bug
Affects Versions: 18.2.0-rc-1
Assignee: Unassigned
Components: Dependency Upgrades
Created: 27/Mar/26 14:26
Priority: cid:jira-generated-image-static-major-16784430-df0d-4d72-b95c-c9522a738e1d Major
Reporter: Manuel Leduc
Description:

v16.6.6

Compare Source

  • fix(peer-deps): bump i18next peer dependency to >= 25.10.9 to match required type exports (ConstrainTarget, ApplyTarget, GetSource) used by TransSelector 1911

v16.6.5

Compare Source

  • fix(types): selector keyPrefix overload in useTranslation no longer matches when keyPrefix is absent, fixing defaultNS: false with explicit ns option 2412

v16.6.4

Compare Source

  • allow TypeScript 6 as peer dependency 1910

v16.6.3

Compare Source

  • fix(types): merge TransSelector overloads into a single signature so typeof Trans remains extendable 1909

v16.6.2

Compare Source

  • feat(types): useTranslation now accepts selector functions as keyPrefix with full type-safe key narrowing when enableSelector is enabled 2367

v16.6.1

Compare Source

  • feat(types): i18nKey of <Trans i18nKey={sk} /> to accept a SelectorKey 2364

v16.6.0

Compare Source

  • 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

v16.5.8

Compare Source

  • A selector function cannot be resolved without an i18n instance... returning empty string is safer than leaking the raw function reference. 1907

v16.5.7

Compare Source

  • fix: <Trans> component with enableSelector: true does not support multiple selectors for fallbacks 1907

v16.5.6

Compare Source

  • fix: prevent crash in useSSR when init() hasn't been called before useSSR — now logs a warning instead of throwing 1604

v16.5.5

Compare Source

  • 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
 
 

8 updates

 
cid:jira-generated-image-avatar-a1f5049e-419a-4da1-a037-47cd5e92bb17 Changes by Manuel Leduc on 27/Mar/26 14:27
 
Summary: Upgrade to react-i18next 16.6.6 and i18next to 25.10.10
Fix Version: 18.3.0-rc-1
Documentation in Release Notes: N/A
Documentation: N/A
Description: h3. i18next/i18next (i18next)
h3.
[{{ v25.10.10}}|https://redirect.github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#251010]

[Compare Source|https://redirect.github.com/i18next/i18next/compare/v25.10.9...v25.10.10]
* feat: suppress support notice automatically in production environments ({{{}NODE_ENV=production{}}})

h3. [{{v25.10.9}}|https://redirect.github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#25109]

[Compare Source|https://redirect.github.com/i18next/i18next/compare/v25.10.8...v25.10.9]
* feat(types): export {{SelectorParam<Ns, KPrefix>}} helper type — a stable, readable alternative to {{Parameters<TFunction<Ns>>[0]}} for typing selector function props [2414|https://redirect.github.com/i18next/i18next/issues/2414]

h3. [{{v25.10.8}}|https://redirect.github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#25108]

[Compare Source|https://redirect.github.com/i18next/i18next/compare/v25.10.7...v25.10.8]
* fix(types): reorder {{TFunctionSelector}} overloads so {{Parameters<TFunction>}} resolves to the general selector signature instead of the branded {{SelectorKey}} type [2412|https://redirect.github.com/i18next/i18next/issues/2412]

h3. [{{v25.10.7}}|https://redirect.github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#25107]

[Compare Source|https://redirect.github.com/i18next/i18next/compare/v25.10.6...v25.10.7]
* feat(types): support typescript 6 to address [i18next/react-i18next#1910|https://redirect.github.com/i18next/react-i18next/issues/1910]

h3. [{{v25.10.6}}|https://redirect.github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#25106]

[Compare Source|https://redirect.github.com/i18next/i18next/compare/v25.10.5...v25.10.6]
* feat(types): support typescript 6 to address [i18next/react-i18next#1910|https://redirect.github.com/i18next/react-i18next/issues/1910]

h3. [{{v25.10.5}}|https://redirect.github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#25105]

[Compare Source|https://redirect.github.com/i18next/i18next/compare/v25.10.4...v25.10.5]
* feat(types): selector functions as {{keyPrefix}} in {{getFixedT}} now provide full type-safe key narrowing — the returned {{t}} function is scoped to the prefix subtree [2367|https://redirect.github.com/i18next/i18next/issues/2367]

h3. [{{v25.10.4}}|https://redirect.github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#25104]

[Compare Source|https://redirect.github.com/i18next/i18next/compare/v25.10.3...v25.10.4]
* feat(types): {{exists()}} is now a type guard that narrows the key to {{{}SelectorKey{}}}, so a validated key can be passed directly to {{t()}} [2364|https://redirect.github.com/i18next/i18next/issues/2364]

h3. [{{v25.10.3}}|https://redirect.github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#25103]

[Compare Source|https://redirect.github.com/i18next/i18next/compare/v25.10.2...v25.10.3]
* check also for I18NEXT_NO_SUPPORT_NOTICE env variable

h3. [{{v25.10.2}}|https://redirect.github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#25102]

[Compare Source|https://redirect.github.com/i18next/i18next/compare/v25.10.1...v25.10.2]
* feat(types): {{keyFromSelector}} is now type-safe — the selector callback is constrained against your resource definitions, catching invalid keys at compile time. Supports optional {{ns}} and {{keyPrefix}} options for non-default namespace/prefix contexts [2364|https://redirect.github.com/i18next/i18next/issues/2364]

h3. [{{v25.10.1}}|https://redirect.github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#25101]

[Compare Source|https://redirect.github.com/i18next/i18next/compare/v25.10.0...v25.10.1]
* fix(types): {{FilterKeys}} now correctly excludes base keys that have context variants when the provided context doesn't match any of them (e.g. key {{some}} with variant {{some_me}} is no longer accessible with {{{}context="one"{}}})

h3. [{{v25.10.0}}|https://redirect.github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#25100]

[Compare Source|https://redirect.github.com/i18next/i18next/compare/v25.9.0...v25.10.0]
* feat(types): {{keyFromSelector}} now returns a branded {{SelectorKey}} type that {{t()}} accepts directly, enabling pre-computed and reusable translation keys [2364|https://redirect.github.com/i18next/i18next/issues/2364]
* feat: support selector syntax for {{keyPrefix}} in {{getFixedT}} and per-call options [2367|https://redirect.github.com/i18next/i18next/issues/2367]
* feat(types): interpolation values are now automatically typed based on built-in format specifiers — {{{\{val, number}}}} requires {{{}number{}}}, {{{\{val, datetime}}}} requires {{{}Date{}}}, {{{\{name}}}} requires {{{}string{}}}, etc. Custom formatters can be typed via {{interpolationFormatTypeMap}} in {{CustomTypeOptions}} [2378|https://redirect.github.com/i18next/i18next/issues/2378]
* fix(types): {{FilterKeys}} in selector mode now preserves non-context, non-plural leaf keys when {{context}} is provided, fixing incorrect type narrowing when combining {{returnObjects: true}} with {{context}} [2398|https://redirect.github.com/i18next/i18next/issues/2398]

h3. [{{v25.9.0}}|https://redirect.github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#2590]

[Compare Source|https://redirect.github.com/i18next/i18next/compare/v25.8.20...v25.9.0]
* feat(types): selector API now enforces {{{ count: number }}} when a key resolves to plural forms [2373|https://redirect.github.com/i18next/i18next/issues/2373]
* fix(types): string unions with invalid members are now correctly detected as type errors when used as context option [2172|https://redirect.github.com/i18next/i18next/issues/2172]

h3. [{{v25.8.20}}|https://redirect.github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#25820]

[Compare Source|https://redirect.github.com/i18next/i18next/compare/v25.8.19...v25.8.20]
*
** fix: {{getFixedT()}} selector now resolves namespaces against the effective {{ns}} rather than the global init options [#​2406|https://redirect.github.com/i18next/i18next/issues/2406]

h3. [{{v25.8.19}}|https://redirect.github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#25819]

[Compare Source|https://redirect.github.com/i18next/i18next/compare/v25.8.18...v25.8.19]
* fix: selector API namespace resolution regression for single-string {{ns}} and primary namespace in array [#​2405|https://redirect.github.com/i18next/i18next/issues/2405]. Reverts the broad namespace-prefix rewrite from v25.8.15 and replaces it with a targeted fix that only rewrites paths starting with a secondary namespace in a multi-namespace array, matching the type-level contract of {{GetSource}}

h3. [{{v25.8.18}}|https://redirect.github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#25818]

[Compare Source|https://redirect.github.com/i18next/i18next/compare/v25.8.17...v25.8.18]
* improve selector api to accept array of selector functions, analogous to array of keys [2404|https://redirect.github.com/i18next/i18next/issues/2404]

h3. [{{v25.8.17}}|https://redirect.github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#25817]

[Compare Source|https://redirect.github.com/i18next/i18next/compare/v25.8.16...v25.8.17]
* update deps

h3. [{{v25.8.16}}|https://redirect.github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#25816]

[Compare Source|https://redirect.github.com/i18next/i18next/compare/v25.8.15...v25.8.16]
* fix(types): {{on()}} method now correctly returns {{this}} instead of {{{}void{}}}, matching the runtime behavior and enabling proper method chaining in TypeScript

h3. [{{v25.8.15}}|https://redirect.github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#25815]

[Compare Source|https://redirect.github.com/i18next/i18next/compare/v25.8.14...v25.8.15]
* fix: Selector API unable to resolve namespaces [#​2402|https://redirect.github.com/i18next/i18next/issues/2402]

h3. [{{v25.8.14}}|https://redirect.github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#25814]

[Compare Source|https://redirect.github.com/i18next/i18next/compare/v25.8.13...v25.8.14]
* fix: getCleanedCode now replaces all underscores

h3. reacti-i18next
h3. [{{
v16.6.6}}|https://redirect.github.com/i18next/react-i18next/blob/HEAD/CHANGELOG.md#1666]

[Compare Source|https://redirect.github.com/i18next/react-i18next/compare/v16.6.5...v16.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|https://redirect.github.com/i18next/react-i18next/issues/1911]

h3. [{{v16.6.5}}|https://redirect.github.com/i18next/react-i18next/blob/HEAD/CHANGELOG.md#1665]

[Compare Source|https://redirect.github.com/i18next/react-i18next/compare/v16.6.4...v16.6.5]
* fix(types): selector keyPrefix overload in {{useTranslation}} no longer matches when {{keyPrefix}} is absent, fixing {{defaultNS: false}} with explicit {{ns}} option [2412|https://redirect.github.com/i18next/i18next/issues/2412]

h3. [{{v16.6.4}}|https://redirect.github.com/i18next/react-i18next/blob/HEAD/CHANGELOG.md#1664]

[Compare Source|https://redirect.github.com/i18next/react-i18next/compare/v16.6.3...v16.6.4]
* allow TypeScript 6 as peer dependency [1910|https://redirect.github.com/i18next/react-i18next/issues/1910]

h3. [{{v16.6.3}}|https://redirect.github.com/i18next/react-i18next/blob/HEAD/CHANGELOG.md#1663]

[Compare Source|https://redirect.github.com/i18next/react-i18next/compare/v16.6.2...v16.6.3]
* fix(types): merge {{TransSelector}} overloads into a single signature so {{typeof Trans}} remains extendable [1909|https://redirect.github.com/i18next/react-i18next/issues/1909]

h3. [{{v16.6.2}}|https://redirect.github.com/i18next/react-i18next/blob/HEAD/CHANGELOG.md#1662]

[Compare Source|https://redirect.github.com/i18next/react-i18next/compare/v16.6.1...v16.6.2]
* feat(types): {{useTranslation}} now accepts selector functions as {{keyPrefix}} with full type-safe key narrowing when {{enableSelector}} is enabled [2367|https://redirect.github.com/i18next/i18next/issues/2367]

h3. [{{v16.6.1}}|https://redirect.github.com/i18next/react-i18next/blob/HEAD/CHANGELOG.md#1661]

[Compare Source|https://redirect.github.com/i18next/react-i18next/compare/v16.6.0...v16.6.1]
* feat(types): i18nKey of {{<Trans i18nKey=\{sk} />}} to accept a {{SelectorKey}} [2364|https://redirect.github.com/i18next/i18next/issues/2364]

h3. [{{v16.6.0}}|https://redirect.github.com/i18next/react-i18next/blob/HEAD/CHANGELOG.md#1660]

[Compare Source|https://redirect.github.com/i18next/react-i18next/compare/v16.5.8...v16.6.0]
* warn when {{t}} is called before {{ready}} with {{useSuspense: false}} [1896|https://redirect.github.com/i18next/react-i18next/issues/1896]
* type-safe {{values}} prop on {{<Trans />}} component — interpolation variables are now inferred from the translation string when custom types are configured [1772|https://redirect.github.com/i18next/react-i18next/issues/1772]

h3. [{{v16.5.8}}|https://redirect.github.com/i18next/react-i18next/blob/HEAD/CHANGELOG.md#1658]

[Compare Source|https://redirect.github.com/i18next/react-i18next/compare/v16.5.7...v16.5.8]
* A selector function cannot be resolved without an i18n instance... returning empty string is safer than leaking the raw function reference. [1907|https://redirect.github.com/i18next/react-i18next/issues/1907]

h3. [{{v16.5.7}}|https://redirect.github.com/i18next/react-i18next/blob/HEAD/CHANGELOG.md#1657]

[Compare Source|https://redirect.github.com/i18next/react-i18next/compare/v16.5.6...v16.5.7]
* fix: {{<Trans>}} component with {{enableSelector: true}} does not support multiple selectors for fallbacks [1907|https://redirect.github.com/i18next/react-i18next/issues/1907]

h3. [{{v16.5.6}}|https://redirect.github.com/i18next/react-i18next/blob/HEAD/CHANGELOG.md#1656]

[Compare Source|https://redirect.github.com/i18next/react-i18next/compare/v16.5.5...v16.5.6]
* fix: prevent crash in {{useSSR}} when {{init()}} hasn't been called before {{useSSR}} — now logs a warning instead of throwing [1604|https://redirect.github.com/i18next/react-i18next/discussions/1604]

h3. [{{v16.5.5}}|https://redirect.github.com/i18next/react-i18next/blob/HEAD/CHANGELOG.md#1655]

[Compare Source|https://redirect.github.com/i18next/react-i18next/compare/v16.5.4...v16.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|https://redirect.github.com/i18next/react-i18next/discussions/1604]
Assignee: Manuel Leduc
Resolution: Fixed
Status: Open Closed