react-i18next 11.15.6 β†’ 11.15.7

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/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 11.15.7
2
+
3
+ - types: add nsSeparator to CustomTypeOptions [1471](https://github.com/i18next/react-i18next/pull/1471)
4
+
1
5
  ### 11.15.6
2
6
 
3
7
  - fix error for typescript 4.6 [1453](https://github.com/i18next/react-i18next/pull/1463)
package/README.md CHANGED
@@ -144,10 +144,10 @@ Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds
144
144
  <!-- markdownlint-disable -->
145
145
  <table>
146
146
  <tr>
147
- <td align="center"><a href="http://twitter.com/jamuhl"><img src="https://avatars3.githubusercontent.com/u/977772?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jan MΓΌhlemann</b></sub></a><br /><a href="https://github.com/i18next/react-i18next/commits?author=jamuhl" title="Code">πŸ’»</a> <a href="#example-jamuhl" title="Examples">πŸ’‘</a> <a href="https://github.com/i18next/react-i18next/commits?author=jamuhl" title="Documentation">πŸ“–</a> <a href="#question-jamuhl" title="Answering Questions">πŸ’¬</a></td>
148
- <td align="center"><a href="http://twitter.com/#!/adrirai"><img src="https://avatars0.githubusercontent.com/u/1086194?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Adriano Raiano</b></sub></a><br /><a href="https://github.com/i18next/react-i18next/commits?author=adrai" title="Code">πŸ’»</a> <a href="#example-adrai" title="Examples">πŸ’‘</a> <a href="https://github.com/i18next/react-i18next/commits?author=adrai" title="Documentation">πŸ“–</a> <a href="#question-adrai" title="Answering Questions">πŸ’¬</a></td>
149
- <td align="center"><a href="https://tigerabrodi.dev/"><img src="https://avatars1.githubusercontent.com/u/49603590?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tiger Abrodi</b></sub></a><br /><a href="#question-tigerabrodi" title="Answering Questions">πŸ’¬</a> <a href="https://github.com/i18next/react-i18next/commits?author=tigerabrodi" title="Code">πŸ’»</a> <a href="https://github.com/i18next/react-i18next/pulls?q=is%3Apr+reviewed-by%3Atigerabrodi" title="Reviewed Pull Requests">πŸ‘€</a></td>
150
- <td align="center"><a href="https://github.com/pedrodurek"><img src="https://avatars1.githubusercontent.com/u/12190482?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Pedro Durek</b></sub></a><br /><a href="https://github.com/i18next/react-i18next/commits?author=pedrodurek" title="Code">πŸ’»</a> <a href="#example-pedrodurek" title="Examples">πŸ’‘</a></td>
147
+ <td align="center"><a href="http://twitter.com/jamuhl"><img src="https://avatars3.githubusercontent.com/u/977772?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jan MΓΌhlemann</b></sub></a><br /><a href="https://github.com/i18next/react-i18next/commits?author=jamuhl" title="Code">πŸ’»</a> <a href="#example-jamuhl" title="Examples">πŸ’‘</a> <a href="https://github.com/i18next/react-i18next/pulls?q=is%3Apr+reviewed-by%3Ajamuhl+" title="Reviewed Pull Requests">πŸ‘€</a> <a href="https://github.com/i18next/react-i18next/commits?author=jamuhl" title="Documentation">πŸ“–</a> <a href="#question-jamuhl" title="Answering Questions">πŸ’¬</a></td>
148
+ <td align="center"><a href="http://twitter.com/#!/adrirai"><img src="https://avatars0.githubusercontent.com/u/1086194?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Adriano Raiano</b></sub></a><br /><a href="https://github.com/i18next/react-i18next/commits?author=adrai" title="Code">πŸ’»</a> <a href="#example-adrai" title="Examples">πŸ’‘</a> <a href="https://github.com/i18next/react-i18next/pulls?q=is%3Apr+reviewed-by%3Aadrai+" title="Reviewed Pull Requests">πŸ‘€</a> <a href="https://github.com/i18next/react-i18next/commits?author=adrai" title="Documentation">πŸ“–</a> <a href="#question-adrai" title="Answering Questions">πŸ’¬</a></td>
149
+ <td align="center"><a href="https://github.com/pedrodurek"><img src="https://avatars1.githubusercontent.com/u/12190482?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Pedro Durek</b></sub></a><br /><a href="https://github.com/i18next/react-i18next/commits?author=pedrodurek" title="Code">πŸ’»</a> <a href="#example-pedrodurek" title="Examples">πŸ’‘</a> <a href="https://github.com/i18next/react-i18next/pulls?q=is%3Apr+reviewed-by%3Apedrodurek+" title="Reviewed Pull Requests">πŸ‘€</a> <a href="#question-pedrodurek" title="Answering Questions">πŸ’¬</a></td>
150
+ <td align="center"><a href="https://tigerabrodi.dev/"><img src="https://avatars1.githubusercontent.com/u/49603590?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tiger Abrodi</b></sub></a><br /><a href="https://github.com/i18next/react-i18next/commits?author=tigerabrodi" title="Code">πŸ’»</a> <a href="https://github.com/i18next/react-i18next/pulls?q=is%3Apr+reviewed-by%3Atigerabrodi" title="Reviewed Pull Requests">πŸ‘€</a></td>
151
151
  </tr>
152
152
  </table>
153
153
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-i18next",
3
- "version": "11.15.6",
3
+ "version": "11.15.7",
4
4
  "description": "Internationalization for react done right. Using the i18next i18n ecosystem.",
5
5
  "main": "dist/commonjs/index.js",
6
6
  "types": "./index.d.ts",
package/ts4.1/index.d.ts CHANGED
@@ -37,6 +37,7 @@ export interface Resources {}
37
37
  * defaultNS: 'custom';
38
38
  * returnNull: false;
39
39
  * returnEmptyString: false;
40
+ * nsSeparator: ':';
40
41
  * keySeparator: '.';
41
42
  * jsonFormat: 'v4';
42
43
  * resources: {
@@ -57,6 +58,7 @@ type TypeOptions = MergeBy<
57
58
  returnNull: true;
58
59
  returnEmptyString: true;
59
60
  keySeparator: '.';
61
+ nsSeparator: ':';
60
62
  defaultNS: 'translation';
61
63
  jsonFormat: 'v4';
62
64
  resources: Resources;
@@ -121,15 +123,16 @@ type Normalize2<T, K = keyof T> = K extends keyof T
121
123
  type Normalize<T> = WithOrWithoutPlural<keyof T> | Normalize2<T>;
122
124
 
123
125
  // Normalize multiple namespaces
126
+ type KeyWithNSSeparator<N, K, S extends string = TypeOptions['nsSeparator']> = `${N &
127
+ string}${S}${K & string}`;
124
128
  type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void
125
129
  ? I
126
130
  : never;
127
131
  type LastOf<T> = UnionToIntersection<T extends any ? () => T : never> extends () => infer R
128
132
  ? R
129
133
  : never;
130
- type AppendNS<N, K> = `${N & string}:${K & string}`;
131
134
  type NormalizeMulti<T, U extends keyof T, L = LastOf<U>> = L extends U
132
- ? AppendNS<L, Normalize<T[L]>> | NormalizeMulti<T, Exclude<U, L>>
135
+ ? KeyWithNSSeparator<L, Normalize<T[L]>> | NormalizeMulti<T, Exclude<U, L>>
133
136
  : never;
134
137
 
135
138
  interface CustomTypeParameters {