astro-react-i18next 0.1.2 → 0.1.3

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.
Files changed (3) hide show
  1. package/README.md +6 -4
  2. package/dist/index.js +1 -1
  3. package/package.json +22 -18
package/README.md CHANGED
@@ -124,15 +124,17 @@ The content of the `locales/en-US/common.json` file should look like this:
124
124
 
125
125
  ## Dynamic Routes for Locales
126
126
 
127
- To manage dynamic routes for each locale, create a root route named `[...locale]` in the `src` directory.
127
+ To manage dynamic routes for each locale, create a root route named `[...locale]` in the `pages` directory.
128
128
 
129
129
  ```text
130
130
  /
131
131
  ├── public/
132
132
  ├── src/
133
- │ └── [...locale]/
134
- ├── ...
135
- └── index.jsx
133
+ │ └── pages/
134
+ └── [...locale]/
135
+ ├── index.astro
136
+ │ ├── page-a.astro
137
+ │ └── page-b.astro
136
138
  └── package.json
137
139
  ```
138
140
 
package/dist/index.js CHANGED
@@ -26,7 +26,7 @@ function buildI18nextInitScript({
26
26
  import Backend from "i18next-fs-backend";
27
27
  `;
28
28
  i18nextOptions = `
29
- initImmediate: false,
29
+ initAsync: false,
30
30
  `;
31
31
  }
32
32
  if (backendType === "http") {
package/package.json CHANGED
@@ -1,10 +1,13 @@
1
1
  {
2
2
  "name": "astro-react-i18next",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Integrates i18next and react-i18next seamlessly into your Astro website to provide robust i18n support for React components.",
5
5
  "keywords": [
6
6
  "astro-integration",
7
- "withastro"
7
+ "withastro",
8
+ "i18n",
9
+ "i18next",
10
+ "react"
8
11
  ],
9
12
  "author": "jeremyxgo",
10
13
  "license": "MIT",
@@ -12,10 +15,11 @@
12
15
  "type": "git",
13
16
  "url": "https://github.com/jeremyxgo/astro-react-i18next.git"
14
17
  },
15
- "type": "module",
16
18
  "files": [
17
19
  "dist"
18
20
  ],
21
+ "type": "module",
22
+ "types": "./dist/index.d.ts",
19
23
  "exports": {
20
24
  ".": "./dist/index.js",
21
25
  "./middleware/server": "./dist/middleware-server.js",
@@ -29,29 +33,29 @@
29
33
  "prepare": "husky"
30
34
  },
31
35
  "dependencies": {
32
- "i18next": "^23.15.1",
36
+ "i18next": "^24.0.2",
33
37
  "i18next-browser-languagedetector": "^8.0.0",
34
- "i18next-fs-backend": "^2.3.2",
35
- "i18next-http-backend": "^2.6.1",
36
- "react-i18next": "^15.0.2"
38
+ "i18next-fs-backend": "^2.6.0",
39
+ "i18next-http-backend": "^3.0.1",
40
+ "react-i18next": "^15.1.2"
37
41
  },
38
42
  "devDependencies": {
39
- "@types/node": "^22.7.4",
40
- "@typescript-eslint/eslint-plugin": "^8.7.0",
41
- "@typescript-eslint/parser": "^8.7.0",
42
- "astro": "^4.15.9",
43
- "astro-eslint-parser": "^1.0.3",
43
+ "@types/node": "^22.10.1",
44
+ "@typescript-eslint/eslint-plugin": "^8.16.0",
45
+ "@typescript-eslint/parser": "^8.16.0",
46
+ "astro": "^4.16.16",
47
+ "astro-eslint-parser": "^1.1.0",
44
48
  "esbuild": "^0.24.0",
45
49
  "eslint": "^8.57.1",
46
50
  "eslint-config-prettier": "^9.1.0",
47
- "eslint-plugin-astro": "^1.2.4",
48
- "eslint-plugin-import": "^2.30.0",
49
- "eslint-plugin-react": "^7.37.0",
50
- "husky": "^9.1.6",
51
+ "eslint-plugin-astro": "^1.3.1",
52
+ "eslint-plugin-import": "^2.31.0",
53
+ "eslint-plugin-react": "^7.37.2",
54
+ "husky": "^9.1.7",
51
55
  "lint-staged": "^15.2.10",
52
- "prettier": "^3.3.3",
56
+ "prettier": "^3.4.1",
53
57
  "prettier-plugin-astro": "^0.14.1",
54
- "typescript": "^5.5.4"
58
+ "typescript": "^5.7.2"
55
59
  },
56
60
  "engines": {
57
61
  "node": "^18.17.1 || ^20.3.0 || >=21.0.0"