chore(deps): update i18next to 26.2.0#23
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
c140c58 to
d2fe204
Compare
d2fe204 to
15c481c
Compare
15c481c to
96dc62c
Compare
96dc62c to
a8f706a
Compare
a8f706a to
becc2aa
Compare
e47ccd3 to
1661e69
Compare
1661e69 to
e5e606a
Compare
d105658 to
1445c93
Compare
1445c93 to
e24ccc6
Compare
e24ccc6 to
8d7a18b
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:
25.7.4→26.2.0Release Notes
i18next/i18next (i18next)
v26.2.0Compare Source
parseInterpolationTypeOption (defaulttrue). When set tofalseinCustomTypeOptions, the type-level extractor stops parsing translation strings for{{variable}}patterns. Required byi18next-icuusers — 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 byInterpolationOptionsand is unaffected. Fixes i18next-icu#85.enableSelectoronInitOptionssoi18next.init({ enableSelector: 'strict' })typechecks without a module augmentation. The runtime already readsopts?.enableSelectorfrom init options; this lands the matching type declaration next to the other selector-resolution knobs. Acceptsfalse | true | 'optimize' | 'strict'. Thanks @Faithfinder (#2431)v26.1.0Compare Source
enableSelector: 'strict'(TypeOptions + runtime option). Opt-in mode that drops the flattened-primary form fromNsResourceat 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 wheret($ => $.primary.foo)typechecks but doesn't resolve under the default mode (see #2429). Backward-compatible: defaultenableSelector: 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.10Compare Source
getFixedTaccepts a fourth optionalfixedOptsargument carryingscopeNs— the full namespace list the boundtwas created for. The selector API usesscopeNsto detect when a path's first segment is a namespace prefix, without changing resolution scope. Resolution still uses the boundns(a single primary string in the typical react-i18next setup), so plaint('key')lookups stay isolated to the primary namespace exactly as before — onlyt($ => $.secondaryNs.foo)selectors now route correctly underuseTranslation([nsA, nsB]). Fixes the runtime side of #2429 for thereact-i18nextdefault-nsModecase. The 4th argument is opt-in: existing 3-arggetFixedT(lng, ns, keyPrefix)callers see no behavior change.v26.0.9Compare Source
string | number(wasstring). i18next stringifies values at runtime, so requiring callers to wrap numbers inString(...)for plain{{var}}placeholders was unnecessary friction — and could mask the real problem when a non-string value was passed alongside multiple interpolation slots (thet()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. Thecountvariable remainsnumber-onlyv26.0.8Compare Source
ExistsFunctionshape so plain arrow functions can again be assigned toExistsFunction-typed variables (TypeScript cannot infer type predicates through multi-overload assignment). Directi18next.exists(key)calls still narrowkeytoSelectorKey— the predicate is now declared inline oni18n.exists. Custom wrappers that want the narrowing can type themselves astypeof i18next.exists2425v26.0.7Compare Source
missingKeydebug log now shows the actual plural-resolved key (e.g.foo.bar_manyfor Polishcount: 14) instead of the base key — making it obvious which plural category was expected and missing 2423@babel/runtimeruntime dependency. The build no longer generates any@babel/runtimeimports, so the package is unused by consumers. Rollup now usesbabelHelpers: 'bundled'so any helpers that are ever needed in the future will be inlined rather than imported externally 2424dist/esm/i18next.bundled.js. It was byte-identical todist/esm/i18next.jsbecause no helpers were being imported 2424v26.0.6Compare Source
Security release — all issues found via an internal audit.
escapeValue: falsewith 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. redirectlng/ns). The defaultescapeValue: trueconfiguration is unaffected because HTML-escaping neutralises the quote beforeJSON.parse. See the security note in the Nesting docs for the full pattern and mitigationsregexEscapetounescapePrefix/unescapeSuffixon 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(,[,..env*and*.pem/*.keyfiles in.gitignorev26.0.5Compare Source
cloneInstance().changeLanguage()no longer fails to update language state when the target language is not yet loaded — a race betweeninit()'s deferredload()and the user'schangeLanguage()could overwriteisLanguageChangingTo, causingsetLngPropsto be skipped 2422v26.0.4Compare Source
v26.0.3Compare Source
v26.0.2Compare Source
v26.0.1Compare Source
v26.0.0Compare Source
v25.10.10Compare Source
v25.10.9Compare Source
v25.10.8Compare Source
v25.10.7Compare Source
v25.10.6Compare Source
v25.10.5Compare Source
keyPrefixingetFixedTnow provide full type-safe key narrowing — the returnedtfunction is scoped to the prefix subtree 2367v25.10.4Compare Source
exists()is now a type guard that narrows the key toSelectorKey, so a validated key can be passed directly tot()2364v25.10.3Compare Source
v25.10.2Compare Source
keyFromSelectoris now type-safe — the selector callback is constrained against your resource definitions, catching invalid keys at compile time. Supports optionalnsandkeyPrefixoptions for non-default namespace/prefix contexts 2364v25.10.1Compare Source
FilterKeysnow correctly excludes base keys that have context variants when the provided context doesn't match any of them (e.g. keysomewith variantsome_meis no longer accessible withcontext="one")v25.10.0Compare Source
keyFromSelectornow returns a brandedSelectorKeytype thatt()accepts directly, enabling pre-computed and reusable translation keys 2364keyPrefixingetFixedTand per-call options 2367{{val, number}}requiresnumber,{{val, datetime}}requiresDate,{{name}}requiresstring, etc. Custom formatters can be typed viainterpolationFormatTypeMapinCustomTypeOptions2378FilterKeysin selector mode now preserves non-context, non-plural leaf keys whencontextis provided, fixing incorrect type narrowing when combiningreturnObjects: truewithcontext2398v25.9.0Compare Source
{ count: number }when a key resolves to plural forms 2373v25.8.20Compare Source
getFixedT()selector now resolves namespaces against the effectivensrather than the global init options #2406v25.8.19Compare Source
nsand primary namespace in array #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 ofGetSourcev25.8.18Compare Source
v25.8.17Compare Source
v25.8.16Compare Source
on()method now correctly returnsthisinstead ofvoid, matching the runtime behavior and enabling proper method chaining in TypeScriptv25.8.15Compare Source
v25.8.14Compare Source
v25.8.13Compare Source
v25.8.12Compare Source
v25.8.11Compare Source
v25.8.10Compare Source
v25.8.9Compare Source
v25.8.8Compare Source
v25.8.7Compare Source
v25.8.6Compare Source
getFixedT()return value 2318v25.8.5Compare Source
v25.8.4Compare Source
v25.8.3Compare Source
v25.8.2Compare Source
v25.8.1Compare Source
v25.8.0Compare Source
Configuration
📅 Schedule: (UTC)
🚦 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.