react-i18next 16.6.3 → 16.6.5

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,11 @@
1
+ ### 16.6.5
2
+
3
+ - fix(types): selector keyPrefix overload in `useTranslation` no longer matches when `keyPrefix` is absent, fixing `defaultNS: false` with explicit `ns` option [2412](https://github.com/i18next/i18next/issues/2412)
4
+
5
+ ### 16.6.4
6
+
7
+ - allow TypeScript 6 as peer dependency [1910](https://github.com/i18next/react-i18next/issues/1910)
8
+
1
9
  ### 16.6.3
2
10
 
3
11
  - fix(types): merge `TransSelector` overloads into a single signature so `typeof Trans` remains extendable [1909](https://github.com/i18next/react-i18next/issues/1909)
@@ -1 +1 @@
1
- {"type":"module","version":"16.6.3"}
1
+ {"type":"module","version":"16.6.5"}
package/index.d.ts CHANGED
@@ -238,11 +238,11 @@ interface UseTranslationLegacy {
238
238
  interface UseTranslationSelector {
239
239
  // Overload: selector function as keyPrefix — provides type-safe key narrowing
240
240
  <
241
- const Ns extends FlatNamespace | $Tuple<FlatNamespace> | undefined = undefined,
242
- const KPrefix extends KeyPrefixSelector<FallbackNs<Ns>> = KeyPrefixSelector<FallbackNs<Ns>>,
241
+ const Ns extends FlatNamespace | $Tuple<FlatNamespace> | undefined,
242
+ const KPrefix extends KeyPrefixSelector<FallbackNs<Ns>>,
243
243
  >(
244
244
  ns: Ns,
245
- options: UseTranslationOptions<KPrefix>,
245
+ options: UseTranslationOptions<KPrefix> & { keyPrefix: KPrefix },
246
246
  ): UseTranslationResponse<FallbackNs<Ns>, KPrefix>;
247
247
 
248
248
  // Overload: string or undefined keyPrefix (original behavior)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-i18next",
3
- "version": "16.6.3",
3
+ "version": "16.6.5",
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.mts",
@@ -74,7 +74,7 @@
74
74
  "peerDependencies": {
75
75
  "i18next": ">= 25.6.2",
76
76
  "react": ">= 16.8.0",
77
- "typescript": "^5"
77
+ "typescript": "^5 || ^6"
78
78
  },
79
79
  "peerDependenciesMeta": {
80
80
  "react-dom": {