Skip to content

Commit 652fdeb

Browse files
committed
update i18next dep
1 parent f0be9f2 commit 652fdeb

File tree

4 files changed

+18
-10
lines changed

4 files changed

+18
-10
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### 15.7.2
2+
3+
- update i18next dependency
4+
15
### 15.7.1
26

37
- Fix: \_EnableSelector type (for compatibility, enableSelector does not exist in TypeOptions) [1858](https://github.com/i18next/react-i18next/pull/1858)

package-lock.json

Lines changed: 9 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"html-parse-stringify": "^3.0.1"
6969
},
7070
"peerDependencies": {
71-
"i18next": ">= 23.4.0",
71+
"i18next": ">= 25.4.1",
7272
"react": ">= 16.8.0",
7373
"typescript": "^5"
7474
},
@@ -123,7 +123,7 @@
123123
"eslint-plugin-testing-library": "^6.5.0",
124124
"happy-dom": "^14.12.3",
125125
"husky": "^9.1.7",
126-
"i18next": "^25.4.0",
126+
"i18next": "^25.4.1",
127127
"lint-staged": "^15.5.2",
128128
"mkdirp": "^3.0.1",
129129
"prettier": "^3.6.2",

test/useTranslation.spec.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ describe('useTranslation', () => {
1919
const { result } = renderHook(() => useTranslation('translation', { i18n: i18nInstance }));
2020
const { t, i18n } = result.current;
2121
expect(t('key1')).toBe('test');
22+
expect(t(($) => $.key1)).toBe('test');
2223
expect(i18nInstance).toBe(i18n);
2324
});
2425
});
@@ -149,13 +150,15 @@ describe('useTranslation', () => {
149150
const { t: t1 } = result.current;
150151
expect(t1('key')).toBe('here_a!');
151152
expect(t1.keyPrefix).toBe('deeply.nested_a');
153+
expect(t1(($) => $.key)).toBe('here_a!');
152154

153155
keyPrefix = 'deeply.nested_b';
154156
rerender();
155157

156158
const { t: t2 } = result.current;
157159
expect(t2('key')).toBe('here_b!');
158160
expect(t2.keyPrefix).toBe('deeply.nested_b');
161+
expect(t2(($) => $.key)).toBe('here_b!');
159162
});
160163
});
161164

0 commit comments

Comments
 (0)