i18next 23.4.3 → 23.4.4

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.
@@ -1 +1 @@
1
- {"type":"module","version":"23.4.3"}
1
+ {"type":"module","version":"23.4.4"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "i18next",
3
- "version": "23.4.3",
3
+ "version": "23.4.4",
4
4
  "description": "i18next internationalization framework",
5
5
  "main": "./dist/cjs/i18next.js",
6
6
  "module": "./dist/esm/i18next.js",
@@ -19,6 +19,7 @@ type _ReturnNull = TypeOptions['returnNull'];
19
19
  type _KeySeparator = TypeOptions['keySeparator'];
20
20
  type _NsSeparator = TypeOptions['nsSeparator'];
21
21
  type _PluralSeparator = TypeOptions['pluralSeparator'];
22
+ type _ContextSeparator = TypeOptions['contextSeparator'];
22
23
  type _FallbackNamespace = TypeOptions['fallbackNS'];
23
24
  type _Resources = TypeOptions['resources'];
24
25
  type _JSONFormat = TypeOptions['jsonFormat'];
@@ -104,7 +105,7 @@ type ParseKeysByFallbackNs<Keys extends $Dictionary> = _FallbackNamespace extend
104
105
  : Keys[_FallbackNamespace & string];
105
106
 
106
107
  type FilterKeysByContext<Keys, TOpt extends TOptions> = TOpt['context'] extends string
107
- ? Keys extends `${infer Prefix}_${TOpt['context']}${infer Suffix}`
108
+ ? Keys extends `${infer Prefix}${_ContextSeparator}${TOpt['context']}${infer Suffix}`
108
109
  ? `${Prefix}${Suffix}`
109
110
  : never
110
111
  : Keys;
@@ -156,7 +157,7 @@ type TReturnOptionalObjects<TOpt extends TOptions> = _ReturnObjects extends true
156
157
  type DefaultTReturn<TOpt extends TOptions> = TReturnOptionalObjects<TOpt> | TReturnOptionalNull;
157
158
 
158
159
  type KeyWithContext<Key, TOpt extends TOptions> = TOpt['context'] extends string
159
- ? `${Key & string}_${TOpt['context']}`
160
+ ? `${Key & string}${_ContextSeparator}${TOpt['context']}`
160
161
  : Key;
161
162
 
162
163
  export type TFunctionReturn<