Skip to content

Commit

Permalink
fix: move i18next and react-i18next to peerDependencies, so that cons…
Browse files Browse the repository at this point in the history
…uming Yarn PnP projects don't have multiple instances of i18next

See i18next#1917
  • Loading branch information
rikkit committed Sep 15, 2022
1 parent a6affe3 commit ff66ca8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Now our Next.js app is fully translatable!
### 1. Installation

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

You need to also have `react` and `next` installed.
Expand Down
4 changes: 3 additions & 1 deletion 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": "^21.9.1",
"next": "12.2.5",
"next-i18next": "12.0.1",
"prop-types": "15.8.1",
"react": "18.2.0",
"react-dom": "18.2.0"
"react-dom": "18.2.0",
"react-i18next": "^11.18.4"
}
}
4 changes: 3 additions & 1 deletion examples/ssg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
"downloadLocales": "locize download --project-id=0842ada9-1d1d-4d48-ab27-08f6a132f558 --ver=latest --clean=true --path=./public/locales"
},
"dependencies": {
"i18next": "^21.9.1",
"next": "12.2.5",
"next-i18next": "12.0.1",
"next-language-detector": "1.0.2"
"next-language-detector": "1.0.2",
"react-i18next": "^11.18.4"
},
"devDependencies": {
"eslint-config-next": "12.2.5",
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": "^21.9.1",
"jest": "^26.6.3",
"next": "^12.2.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-i18next": "^11.18.4",
"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": {
"next": ">= 10.0.0",
"react": ">= 16.8.0"
"react": ">= 16.8.0",
"i18next": "^21.9.1",
"react-i18next": "^11.18.4"
},
"resolutions": {
"i18next": ">=21.8.14",
Expand Down

0 comments on commit ff66ca8

Please sign in to comment.