X Tutup
Skip to content

Update dependency i18next to v26#20

Open
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/i18next-26.x
Open

Update dependency i18next to v26#20
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/i18next-26.x

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate bot commented Mar 28, 2026

This PR contains the following updates:

Package Change Age Confidence
i18next (source) ^24.0.0^26.0.0 age confidence

Release Notes

i18next/i18next (i18next)

v26.0.1

Compare Source

  • fix: Formatter no longer crashes when alwaysFormat is true and no format specifier is present (format is undefined)
  • fix: Formatter now returns undefined/null values as-is instead of producing NaN when the value is missing

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

v25.10.10

Compare Source

  • feat: suppress support notice automatically in production environments (NODE_ENV=production)

v25.10.9

Compare Source

  • feat(types): export SelectorParam<Ns, KPrefix> helper type — a stable, readable alternative to Parameters<TFunction<Ns>>[0] for typing selector function props 2414

v25.10.8

Compare Source

  • fix(types): reorder TFunctionSelector overloads so Parameters<TFunction> resolves to the general selector signature instead of the branded SelectorKey type 2412

v25.10.7

Compare Source

v25.10.6

Compare Source

v25.10.5

Compare Source

  • 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

v25.10.4

Compare Source

  • 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

v25.10.3

Compare Source

  • check also for I18NEXT_NO_SUPPORT_NOTICE env variable

v25.10.2

Compare Source

  • 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

v25.10.1

Compare Source

  • 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")

v25.10.0

Compare Source

  • feat(types): keyFromSelector now returns a branded SelectorKey type that t() accepts directly, enabling pre-computed and reusable translation keys 2364
  • feat: support selector syntax for keyPrefix in getFixedT and per-call options 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
  • 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

v25.9.0

Compare Source

  • feat(types): selector API now enforces { count: number } when a key resolves to plural forms 2373
  • fix(types): string unions with invalid members are now correctly detected as type errors when used as context option 2172

v25.8.20

Compare Source

    • fix: getFixedT() selector now resolves namespaces against the effective ns rather than the global init options #​2406

v25.8.19

Compare Source

  • fix: selector API namespace resolution regression for single-string ns and 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 of GetSource

v25.8.18

Compare Source

  • improve selector api to accept array of selector functions, analogous to array of keys 2404

v25.8.17

Compare Source

  • update deps

v25.8.16

Compare Source

  • fix(types): on() method now correctly returns this instead of void, matching the runtime behavior and enabling proper method chaining in TypeScript

v25.8.15

Compare Source

  • fix: Selector API unable to resolve namespaces #​2402

v25.8.14

Compare Source

  • fix: getCleanedCode now replaces all underscores

v25.8.13

Compare Source

  • improve support notice shown logic

v25.8.12

Compare Source

  • improve support notice shown logic

v25.8.11

Compare Source

  • revert fix: compatibility with moduleResolution bundler (issue 2380) 2381

v25.8.10

Compare Source

  • fix(interpolator): guard null matchedDoubleQuotes in nesting option parsing 2395

v25.8.9

Compare Source

  • fix(interpolator): escape nestingOptionsSeparator in nesting option parsing 2394

v25.8.8

Compare Source

  • types(i18n): add missing toJSON() declaration 2393

v25.8.7

Compare Source

  • avoid crash due to ReferenceError without Intl API 2391

v25.8.6

Compare Source

  • ts: address incomplete type definition for getFixedT() return value 2318

v25.8.5

Compare Source

  • fix: compatibility with moduleResolution bundler (issue 2380) 2381

v25.8.4

Compare Source

  • fix: crashes when backend in backends array has no name property 2386

v25.8.3

Compare Source

  • ts: document option to suppress the support message 2385

v25.8.2

Compare Source

  • option to suppress the support message 2385

v25.8.1

Compare Source

  • fix(types): Selector API - fix Namespace inference for selector ns option 2384

v25.8.0

Compare Source

  • fix: TFunctionReturn fallback 2360

v25.7.4

Compare Source

  • fix: Interpolation breaks when cloning an instance 2376

v25.7.3

Compare Source

v25.7.2

Compare Source

  • fix: Invalid overwrite of default value for overloadTranslationOptionHandler 2374.

v25.7.1

Compare Source

  • TS: remove wrong signature 2372.

v25.7.0

Compare Source

  • Enhance cloneInstance to create a new interpolator if interpolation options are passed in. This will address 2371.

v25.6.3

Compare Source

  • chore: dependency updates 2368

v25.6.2

Compare Source

  • types: export InterpolationMap

v25.6.1

Compare Source

  • fix: createInstance does not exist on an instance #​2366

v25.6.0

Compare Source

  • feat: exists() method now respects returnObjects option - returns false when accessing an object key with returnObjects: false, enabling detection of object vs string keys 2359

    Note: This is a potential behavior change. If you were previously calling exists() with returnObjects: false on object keys, those calls will now return false instead of true. This enables developers to detect whether a key points to an object or string value.

v25.5.3

Compare Source

  • export esm type declaration for keyFromSelector 2356

v25.5.2

Compare Source

  • fix last change => for cjs there is just 1 default export, no named exports, fixes 2348

v25.5.1

Compare Source

  • export keyFromSelector from index.cjs 2347

v25.5.0

Compare Source

  • export keyFromSelector function for testing purposes 2346

v25.4.2

Compare Source

  • fix: enableSelector: true doesn't work with custom keySeparator 2341

v25.4.1

Compare Source

  • fix: KeyPrefix not working with new selector api 2340

v25.4.0

Compare Source

  • add new selector API to improve TypeScript IDE performance 2322
    • To enable it, set enableSelector: true in your configuration options
    • With enableSelector: "optimize", i18next can now handle translation dictionaries of any size, without affecting IDE performance or build times
    • To assist with the migration, we've published the following packages:

v25.3.6

Compare Source

  • improve fix: Ordinals and non-ordinals don't work together 2337

v25.3.5

Compare Source

  • fix: Ordinals and non-ordinals don't work together 2337

v25.3.4

Compare Source

  • remove unnecessary debug logs

v25.3.3

Compare Source

  • fix: Brackets breaking nesting interpolation 2336

v25.3.2

Compare Source

  • fix dir() for non-Intl language codes 2330

v25.3.1

Compare Source

  • warn if legacy interpolation.format function is still used

v25.3.0

Compare Source

  • feat: support formatting function with plural and interpolation 2325
  • fix dir() for Latn language codes 2324

v25.2.1

Compare Source

  • streamline fallbackLng option of t call with the init options 2312

v25.2.0

Compare Source

  • introduce cacheInBuiltFormats option to address 2227

v25.1.3

Compare Source

  • Ensure nsSeparator is respected when appendNamespaceToMissingKey is true 2311, fixes 2310

v25.1.2

Compare Source

  • do not mutate t options, fixes 2307

v25.1.1

Compare Source

  • fix options type for parseMissingKeyHandler

v25.1.0

Compare Source

  • feat: parseMissingKeyHandler now takes options as parameter like in missingKeyHandler 2304

v25.0.2

Compare Source

  • fix cloneInstance with forkResourceStore: true addresses 2303

v25.0.1

Compare Source

  • optimize changeLanguage to correctly use getBestMatchFromCodes (string or array) 2299 and improve resolvedLanguage set for non canonical codes

v25.0.0

Compare Source

This is a potentially breaking release:

  • fix multiple changeLanguage call that may have result in wrong order in previous versions 1605 2298
  • adapt changeLanguage to always (string or array) use getBestMatchFromCodes 2299
  • getBestMatchFromCodes now tries to fallback to language code with same script 2299

v24.2.3

Compare Source

v24.2.2

Compare Source

  • fix: Interpolation fails with arrays (TypeError) and doesn't work with objects in defaultValue 1829

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), 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.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


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

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

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
far-away Error Error Mar 28, 2026 1:28pm

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants

X Tutup