mirror of
https://github.com/authelia/authelia.git
synced 2026-10-28 09:34:52 +08:00
build(deps): update dependency i18next to v26.5.2 (#13524)
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [i18next](https://www.i18next.com) ([source](https://redirect.github.com/i18next/i18next)) | [`26.4.7` → `26.5.2`](https://renovatebot.com/diffs/npm/i18next/26.4.7/26.5.2) |  |  | --- ### Release Notes <details> <summary>i18next/i18next (i18next)</summary> ### [`v26.5.2`](https://redirect.github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#2652) [Compare Source](https://redirect.github.com/i18next/i18next/compare/v26.5.1...v26.5.2) - fix(types): on TypeScript 7, a `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 as `parseInterpolation: 'icu'` and `'mf2'`. Which calls compile, their return types and the error positions are unchanged on TypeScript 5.9, 6 and 7. ### [`v26.5.1`](https://redirect.github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#2651) [Compare Source](https://redirect.github.com/i18next/i18next/compare/v26.5.0...v26.5.1) - perf(types): type-checking `t()` calls against a large namespace is no longer quadratic in the number of keys. TypeScript does not cache `keyof` of an object type, and the types rebuilt the union of all keys of a namespace once per key while building the key union, and again in every `t()` call to look up the return type. Both now use a cached key union, and a literal key is looked up directly instead of being intersected with every key. With 5,000 keys in one namespace and one call per key, the check time went from 14.8s to 1.1s (TypeScript 6); with 1,000 keys from 0.75s to 0.27s. Keys, return types and errors are unchanged. - perf(types): the selector API (`enableSelector: true` / `'strict'`) with `context` is no longer quadratic in the size of an object. To decide which keys a context keeps, the types scanned all keys of the object once for every key, also when TypeScript checks the selector with `context` widened to `string`. With 1,000 keys plus one context variant each, a namespace took 18.7s and failed with "Type instantiation is excessively deep and possibly infinite" (TS2589); 2,500 and more ran out of memory. The context variants of an object are now collected once, in one pass over its keys: 1,000 keys check in 0.69s, 5,000 in 3.1s. Long keys (whole sentences with `keySeparator: false`) work as before. Selected values and errors are unchanged. ### [`v26.5.0`](https://redirect.github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#2650) [Compare Source](https://redirect.github.com/i18next/i18next/compare/v26.4.7...v26.5.0) - feat(types): `parseInterpolation: 'icu'` and `parseInterpolation: 'mf2'` type `t()` options from the message's ICU MessageFormat arguments (i18next-icu) or MessageFormat 2 variables (i18next-mf2), so ICU and MF2 users no longer need `parseInterpolation: false` and 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, default `true` is unchanged. - ICU: `{name}` takes `string | number`, `{n, number}`, `plural` and `selectordinal` take `number`, `{d, date}` and `{t, time}` take `Date`, `select` takes its case keys or any string (for `other`), and arguments nested in cases are required too. `#` and tags are not arguments, apostrophe quoting is read like intl-messageformat does. - MF2: `{$name}` takes `string | number`, a variable annotated with `:number`, `:integer`, `:currency`, `:percent` or `:unit` (inline or through `.input` / `.local`) takes `number`, `:datetime`, `:date` and `:time` take `Date`, `:string` takes `string`, option and markup variables (`minimumFractionDigits=$digits`, `{#link href=$url}`) are required too, `.local` variables are not arguments, and `|quoted literals|` and `\{` escapes are skipped. - `interpolationFormatTypeMap` overrides a type by ICU format or MF2 function name, e.g. `date: Date | number` or a custom `uppercase: string`. - Applies to `t()`, `getFixedT()`, `i18n.t`, key prefixes, namespaces, the selector API and react-i18next's `Trans` `values`. Messages need literal types, as the resources file from i18next-cli's `types` command has them. - Type-check cost with 1,000 messages and one call each: 1.35s instead of 0.86s with `false` (TypeScript 6), 0.5s instead of 0.26s with TypeScript 7. Messages that no call uses cost nothing. - fix(types): with the default (non-strict) key checks, an options object with a missing or misspelled interpolation variable now reports the missing variable (`Property 'name' is missing`) instead of `'{ nmae: string }' is not assignable to type 'string'` from the default-value overload. </details> --- ### Configuration 📅 **Schedule**: (UTC) - 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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/authelia/authelia). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xNjQuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjE2NC4xIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyIsImphdmFzY3JpcHQiXX0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
6c707c5098
commit
e14db7d79c
2 files changed
+9
-9
No files matched your search
+1
-1
@@ -14,7 +14,7 @@
|
||||
"broadcast-channel": "7.4.0",
|
||||
"class-variance-authority": "0.7.1",
|
||||
"cn": "0.5.0",
|
||||
"i18next": "26.4.7",
|
||||
"i18next": "26.5.2",
|
||||
"i18next-browser-languagedetector": "8.2.1",
|
||||
"i18next-http-backend": "4.0.4",
|
||||
"lucide-react": "1.59.0",
|
||||
|
||||
Generated
+8
-8
@@ -38,8 +38,8 @@ importers:
|
||||
specifier: 0.5.0
|
||||
version: 0.5.0
|
||||
i18next:
|
||||
specifier: 26.4.7
|
||||
version: 26.4.7(@typescript/typescript6@6.0.2)
|
||||
specifier: 26.5.2
|
||||
version: 26.5.2(@typescript/typescript6@6.0.2)
|
||||
i18next-browser-languagedetector:
|
||||
specifier: 8.2.1
|
||||
version: 8.2.1
|
||||
@@ -60,7 +60,7 @@ importers:
|
||||
version: 19.3.1(react@19.3.1)
|
||||
react-i18next:
|
||||
specifier: 17.0.21
|
||||
version: 17.0.21(@typescript/typescript6@6.0.2)(i18next@26.4.7(@typescript/typescript6@6.0.2))(react-dom@19.3.1(react@19.3.1))(react@19.3.1)
|
||||
version: 17.0.21(@typescript/typescript6@6.0.2)(i18next@26.5.2(@typescript/typescript6@6.0.2))(react-dom@19.3.1(react@19.3.1))(react@19.3.1)
|
||||
react-router:
|
||||
specifier: 8.4.0
|
||||
version: 8.4.0(react-dom@19.3.1(react@19.3.1))(react@19.3.1)
|
||||
@@ -2533,8 +2533,8 @@ packages:
|
||||
resolution: {integrity: sha512-nG9OQKvUsPiTVUBg1rCGmvmWhzxC9GOxVbGdTYyejHVMSUjutt1hiBNVSzhB/ZE7keL9Xkb880kUfhDovV5T5g==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
i18next@26.4.7:
|
||||
resolution: {integrity: sha512-p/3hqy6EcuqRs6wNwBYwGGC1fzBJSMxV9zMuN814ab/7QjdZbXfjXwuPZdQbngX6KDOTxM01uUiZyqmMB8ghZg==}
|
||||
i18next@26.5.2:
|
||||
resolution: {integrity: sha512-6fIXt//2MZNok3tULyjnypxe3vbsy3pV1bVg8p2x3yKrzZvp7z3T+wXx/88LQsATRdhyJeAUAvUxEtxsHdJ29w==}
|
||||
peerDependencies:
|
||||
typescript: ^5 || ^6 || ^7
|
||||
peerDependenciesMeta:
|
||||
@@ -6515,7 +6515,7 @@ snapshots:
|
||||
|
||||
i18next-http-backend@4.0.4: {}
|
||||
|
||||
i18next@26.4.7(@typescript/typescript6@6.0.2):
|
||||
i18next@26.5.2(@typescript/typescript6@6.0.2):
|
||||
optionalDependencies:
|
||||
typescript: '@typescript/typescript6@6.0.2'
|
||||
|
||||
@@ -7258,11 +7258,11 @@ snapshots:
|
||||
react: 19.3.1
|
||||
scheduler: 0.28.0
|
||||
|
||||
react-i18next@17.0.21(@typescript/typescript6@6.0.2)(i18next@26.4.7(@typescript/typescript6@6.0.2))(react-dom@19.3.1(react@19.3.1))(react@19.3.1):
|
||||
react-i18next@17.0.21(@typescript/typescript6@6.0.2)(i18next@26.5.2(@typescript/typescript6@6.0.2))(react-dom@19.3.1(react@19.3.1))(react@19.3.1):
|
||||
dependencies:
|
||||
'@babel/runtime': 7.29.7
|
||||
html-parse-stringify: 4.0.1
|
||||
i18next: 26.4.7(@typescript/typescript6@6.0.2)
|
||||
i18next: 26.5.2(@typescript/typescript6@6.0.2)
|
||||
react: 19.3.1
|
||||
use-sync-external-store: 1.7.0(react@19.3.1)
|
||||
optionalDependencies:
|
||||
|
||||
Reference in new issue
Block a user