Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support i18next 22, react-i18next 12 and move both to peer-deps #1966

Merged
merged 29 commits into from
Oct 26, 2022
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
43d7a83
chore(deps): update to i18next ^22.0.0
belgattitude Oct 19, 2022
1653be1
chore: more react-i18next i18next to peer deps
belgattitude Oct 20, 2022
b82d6c2
docs: update installation for peer-dependencies
belgattitude Oct 20, 2022
6ac538b
docs: added UPGRADING notes
belgattitude Oct 20, 2022
40ce20d
docs: add upgrading
belgattitude Oct 20, 2022
6819783
docs: update upgrade notes
belgattitude Oct 20, 2022
310ed5a
Merge branch 'master' into update-i18next-22
belgattitude Oct 20, 2022
d96ced8
chore(deps): update example to react-i18next v12
belgattitude Oct 20, 2022
a103a0b
docs: changelog
belgattitude Oct 20, 2022
394675c
Merge branch 'master' into update-i18next-22
belgattitude Oct 20, 2022
2f64ff5
refactor!: drop export of Resources
belgattitude Oct 20, 2022
3d06e5f
Merge branch 'master' into update-i18next-22
belgattitude Oct 21, 2022
dd35ecf
chore(deps): update to i18next 22.0.2
belgattitude Oct 21, 2022
a8a05cf
chore(peer-deps): remove range and min i18next to 22.0.2
belgattitude Oct 21, 2022
1063789
feat(example): example on i18next new translation key
belgattitude Oct 21, 2022
91467ac
fix(examples): restore current way for keys typing
belgattitude Oct 21, 2022
46aba9a
Merge branch 'master' into update-i18next-22
belgattitude Oct 21, 2022
0d873f9
docs: changelog and upgrading updates
belgattitude Oct 21, 2022
98fe8bf
docs: rephrase
belgattitude Oct 21, 2022
c453ac2
Add @belgattitude as a contributor
belgattitude Oct 21, 2022
4369cd1
Merge branch 'master' into update-i18next-22
belgattitude Oct 26, 2022
062f4df
refactor: remove i18next type augmentation
belgattitude Oct 26, 2022
da82db5
Merge remote-tracking branch 'origin/master'
belgattitude Oct 26, 2022
195fc49
Merge branch 'master' into update-i18next-22
belgattitude Oct 26, 2022
b37086c
revert: lost range during merges
belgattitude Oct 26, 2022
1db5b73
Merge remote-tracking branch 'origin/master'
belgattitude Oct 26, 2022
b565be4
Merge remote-tracking branch 'origin/master'
belgattitude Oct 26, 2022
5243ae9
Merge branch 'master' into update-i18next-22
belgattitude Oct 26, 2022
f94278d
chore(deps): update to i18next-fs-backend@^2.0.0
belgattitude Oct 26, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ Now our Next.js app is fully translatable!

### 1. Installation

```jsx
yarn add next-i18next
```bash
yarn add next-i18next react-i18next i18next
```

You need to also have `react` and `next` installed.
Expand Down
20 changes: 20 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## Version 13.x

From version 13, both `i18next` and `react-i18next` have been moved to peerDependencies.
Be sure to install them in the consuming app or package by running:

```bash
yarn add react-i18next i18next
pnpm add react-i18next i18next --save
npm install react-i18next i18next --save
```

As of version 13.x, next-i18next supports i18next `^21.9.1 || ^22.0.1` range
react-i18next from `^11.18.4`. It's possible for the consuming application to
select a specific supported version, ie `yarn add 'i18next@^21.10.0'`.

> **Note**
> If you're facing issues after upgrading, please first check that your dependencies
> are properly deduplicated (ie: `yarn why react-i18next -R`, `pnpm why -r react-i18next i18next`...)
> or use `yarn dedupe --list`, `npx -y pnpm-dedpuplicate --list`, `npx -y yarn-deduplicate --list`.

2 changes: 2 additions & 0 deletions examples/simple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
"start": "next start -p ${PORT:=3000}"
},
"dependencies": {
"i18next": "22.0.1",
"next": "12.3.1",
"next-i18next": "12.1.0",
"prop-types": "15.8.1",
"react": "18.2.0",
"react-i18next": "11.18.6",
"react-dom": "18.2.0"
}
}
6 changes: 5 additions & 1 deletion examples/ssg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@
"downloadLocales": "locize download --project-id=0842ada9-1d1d-4d48-ab27-08f6a132f558 --ver=latest --clean=true --path=./public/locales"
},
"dependencies": {
"i18next": "22.0.1",
"next": "12.3.1",
"next-i18next": "12.1.0",
"next-language-detector": "1.0.2"
"next-language-detector": "1.0.2",
"react": "18.2.0",
"react-i18next": "11.18.6",
"react-dom": "18.2.0"
},
"devDependencies": {
"eslint-config-next": "12.3.1",
Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,12 @@
"eslint-plugin-typescript-sort-keys": "^2.1.0",
"gh-release": "6.0.4",
"husky": "^3.0.0",
"i18next": "^22.0.1",
"jest": "^26.6.3",
"next": "^12.2.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-i18next": "^11.18.6",
belgattitude marked this conversation as resolved.
Show resolved Hide resolved
"start-server-and-test": "^1.14.0",
"typescript": "^4.7.4"
},
Expand All @@ -129,13 +131,13 @@
"@types/hoist-non-react-statics": "^3.3.1",
"core-js": "^3",
"hoist-non-react-statics": "^3.3.2",
"i18next": "^21.9.1",
"i18next-fs-backend": "^1.1.5",
"react-i18next": "^11.18.4"
"i18next-fs-backend": "^1.1.5"
},
"peerDependencies": {
"i18next": "^21.9.1 || ^22.0.1",
belgattitude marked this conversation as resolved.
Show resolved Hide resolved
"next": ">= 10.0.0",
"react": ">= 16.8.0"
"react": "16.8.0",
"react-i18next": "^11.18.4"
},
"resolutions": {
"i18next": ">=21.8.14",
Expand Down