Skip to content

Commit

Permalink
revert(i18next-peer): reset i18next as package dependency
Browse files Browse the repository at this point in the history
Having i18next set as peer dependency prevents astro-i18next from accessing the same i18next
context. Keeping it as a direct dependency for now.

fixes #131
  • Loading branch information
yassinedoghri committed Mar 5, 2023
1 parent 97863e1 commit 7906e19
Show file tree
Hide file tree
Showing 12 changed files with 2,287 additions and 5,349 deletions.
18 changes: 18 additions & 0 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
plugins: [require.resolve("prettier-plugin-astro")],
overrides: [
{
files: "*.md",
options: {
proseWrap: "always",
},
},
{
files: "*.astro",
options: {
parser: "astro",
},
},
],
trailingComma: "es5",
};
11 changes: 0 additions & 11 deletions .prettierrc.json

This file was deleted.

10 changes: 6 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# [1.0.0-beta.18](https://github.com/yassinedoghri/astro-i18next/compare/v1.0.0-beta.17...v1.0.0-beta.18) (2023-02-26)


### Bug Fixes

* handle localizePath trailing slash depending on astro's trailingSlash config ([880666c](https://github.com/yassinedoghri/astro-i18next/commit/880666c83b7ef6ac304658546ce08407ddea4db2)), closes [#119](https://github.com/yassinedoghri/astro-i18next/issues/119)

- handle localizePath trailing slash depending on astro's trailingSlash config
([880666c](https://github.com/yassinedoghri/astro-i18next/commit/880666c83b7ef6ac304658546ce08407ddea4db2)),
closes [#119](https://github.com/yassinedoghri/astro-i18next/issues/119)

### Features

* **language-selector:** add languageMapping prop to rename languages of choice ([20d94e4](https://github.com/yassinedoghri/astro-i18next/commit/20d94e4b1b221cad02d15b68124dc9b03367bfb9)), closes [#116](https://github.com/yassinedoghri/astro-i18next/issues/116)
- **language-selector:** add languageMapping prop to rename languages of choice
([20d94e4](https://github.com/yassinedoghri/astro-i18next/commit/20d94e4b1b221cad02d15b68124dc9b03367bfb9)),
closes [#116](https://github.com/yassinedoghri/astro-i18next/issues/116)

# [1.0.0-beta.17](https://github.com/yassinedoghri/astro-i18next/compare/v1.0.0-beta.16...v1.0.0-beta.17) (2023-01-24)

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,19 @@ translate your astro websites!
### 1. Install

```bash
npm install astro-i18next i18next
npm install astro-i18next
```

or

```bash
pnpm add astro-i18next i18next
pnpm add astro-i18next
```

or

```bash
yarn add astro-i18next i18next
yarn add astro-i18next
```

### 2. Configure
Expand Down
1 change: 1 addition & 0 deletions build.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ require("esbuild")
"i18next-browser-languagedetector",
"i18next-fs-backend",
"i18next-http-backend",
"i18next",
"iso-639-1",
"locale-emoji",
],
Expand Down
2 changes: 1 addition & 1 deletion examples/react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
### 1. Install

```bash
npm install astro-i18next i18next @astrojs/react react-i18next
npm install astro-i18next @astrojs/react react-i18next
```

### 2. Configure
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@
},
"homepage": "https://astro-i18next.yassinedoghri.com/",
"peerDependencies": {
"astro": ">=1.0.0",
"i18next": "^22.4.0"
"astro": ">=1.0.0"
},
"dependencies": {
"@proload/core": "^0.3.3",
"@proload/plugin-tsm": "^0.2.1",
"i18next-browser-languagedetector": "^7.0.1",
"i18next-fs-backend": "^2.1.1",
"i18next-http-backend": "^2.1.1",
"i18next": "^22.4.10",
"iso-639-1": "^2.1.15",
"locale-emoji": "^0.3.0",
"pathe": "^1.1.0"
Expand All @@ -87,14 +87,14 @@
"@semantic-release/git": "^10.0.1",
"@types/fs-extra": "^11.0.1",
"@types/yargs": "^17.0.22",
"@typescript-eslint/eslint-plugin": "^5.53.0",
"@typescript-eslint/parser": "^5.53.0",
"@vitest/coverage-c8": "^0.29.1",
"@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/parser": "^5.54.0",
"@vitest/coverage-c8": "^0.29.2",
"all-contributors-cli": "^6.24.0",
"astro": "2.0.15",
"astro": "2.0.17",
"commitizen": "^4.3.0",
"cz-conventional-changelog": "^3.3.0",
"esbuild": "^0.17.10",
"esbuild": "^0.17.11",
"esbuild-plugin-fileloc": "^0.0.6",
"eslint": "^8.35.0",
"eslint-config-prettier": "^8.6.0",
Expand All @@ -112,14 +112,14 @@
"lint-staged": "^13.1.2",
"prettier": "2.8.4",
"prettier-plugin-astro": "^0.8.0",
"semantic-release": "^20.1.0",
"semantic-release": "^20.1.1",
"typescript": "^4.9.5",
"vitest": "^0.29.1",
"vitest": "^0.29.2",
"yargs": "^17.7.1"
},
"lint-staged": {
"*.{js,cjs,ts}": "eslint --ext js,cjs,ts . --cache --fix",
"*.{js,cjs,ts,astro,css,md}": "prettier --write"
"*.{js,cjs,ts,astro,css,md}": "prettier --write --ignore-path .prettierignore ."
},
"config": {
"commitizen": {
Expand Down
Loading

0 comments on commit 7906e19

Please sign in to comment.