i18next 25.10.0 → 25.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/package.json +1 -1
- package/jsr.json +1 -1
- package/package.json +8 -8
- package/typescript/t.d.ts +14 -1
package/dist/esm/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"25.10.
|
|
1
|
+
{"type":"module","version":"25.10.1"}
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "i18next",
|
|
3
|
-
"version": "25.10.
|
|
3
|
+
"version": "25.10.1",
|
|
4
4
|
"description": "i18next internationalization framework",
|
|
5
5
|
"main": "./dist/cjs/i18next.js",
|
|
6
6
|
"module": "./dist/esm/i18next.js",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
}
|
|
50
50
|
],
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@babel/runtime": "^7.
|
|
52
|
+
"@babel/runtime": "^7.29.2"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"typescript": "^5"
|
|
@@ -66,16 +66,16 @@
|
|
|
66
66
|
"@babel/plugin-transform-modules-commonjs": "^7.28.6",
|
|
67
67
|
"@babel/plugin-transform-runtime": "^7.29.0",
|
|
68
68
|
"@babel/polyfill": "^7.12.1",
|
|
69
|
-
"@babel/preset-env": "^7.29.
|
|
69
|
+
"@babel/preset-env": "^7.29.2",
|
|
70
70
|
"@babel/preset-react": "^7.28.5",
|
|
71
71
|
"@babel/register": "^7.28.6",
|
|
72
72
|
"@rollup/plugin-babel": "^7.0.0",
|
|
73
73
|
"@rollup/plugin-commonjs": "^29.0.2",
|
|
74
74
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
75
75
|
"@rollup/plugin-terser": "^1.0.0",
|
|
76
|
-
"@types/node": "^25.
|
|
77
|
-
"@typescript-eslint/eslint-plugin": "^8.57.
|
|
78
|
-
"@typescript-eslint/parser": "^8.57.
|
|
76
|
+
"@types/node": "^25.5.0",
|
|
77
|
+
"@typescript-eslint/eslint-plugin": "^8.57.1",
|
|
78
|
+
"@typescript-eslint/parser": "^8.57.1",
|
|
79
79
|
"@vitest/coverage-v8": "^3.2.4",
|
|
80
80
|
"babelify": "^10.0.0",
|
|
81
81
|
"coveralls": "^3.1.1",
|
|
@@ -92,10 +92,10 @@
|
|
|
92
92
|
"i18next-http-backend": "^3.0.2",
|
|
93
93
|
"i18next-localstorage-cache": "^1.1.1",
|
|
94
94
|
"i18next-sprintf-postprocessor": "^0.2.2",
|
|
95
|
-
"lint-staged": "^16.
|
|
95
|
+
"lint-staged": "^16.4.0",
|
|
96
96
|
"prettier": "^3.8.1",
|
|
97
97
|
"rimraf": "^6.1.3",
|
|
98
|
-
"rollup": "^4.59.
|
|
98
|
+
"rollup": "^4.59.1",
|
|
99
99
|
"sinon": "^19.0.5",
|
|
100
100
|
"typescript": "^5.9.3",
|
|
101
101
|
"vitest": "^3.2.4"
|
package/typescript/t.d.ts
CHANGED
|
@@ -657,6 +657,17 @@ type _HasContextVariant<T, K extends string, Context> = [
|
|
|
657
657
|
? false
|
|
658
658
|
: true;
|
|
659
659
|
|
|
660
|
+
/** Checks whether key K has **any** context variant in T (excluding pure plural suffixes). */
|
|
661
|
+
type _IsContextualKey<T, K extends string> = [
|
|
662
|
+
Exclude<
|
|
663
|
+
keyof T & `${K}${_ContextSeparator}${string}`,
|
|
664
|
+
| `${K}${_PluralSeparator}${PluralSuffix}`
|
|
665
|
+
| `${K}${_PluralSeparator}ordinal${_PluralSeparator}${PluralSuffix}`
|
|
666
|
+
>,
|
|
667
|
+
] extends [never]
|
|
668
|
+
? false
|
|
669
|
+
: true;
|
|
670
|
+
|
|
660
671
|
type FilterKeys<T, Context> = never | T extends readonly any[]
|
|
661
672
|
? { [I in keyof T]: FilterKeys<T[I], Context> }
|
|
662
673
|
: $Prune<
|
|
@@ -674,7 +685,9 @@ type FilterKeys<T, Context> = never | T extends readonly any[]
|
|
|
674
685
|
: K extends string
|
|
675
686
|
? _HasContextVariant<T, K, Context> extends true
|
|
676
687
|
? never // context variant exists, drop base key (type 3 handles it)
|
|
677
|
-
:
|
|
688
|
+
: _IsContextualKey<T, K> extends true
|
|
689
|
+
? never // key has context variants but not for this context
|
|
690
|
+
: K // no context variants at all, keep base key
|
|
678
691
|
: K
|
|
679
692
|
: K extends `${string}${_PluralSeparator}${PluralSuffix}`
|
|
680
693
|
? never
|