next-i18next-static-site 0.2.3 → 0.2.4

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.
package/dist/index.js CHANGED
@@ -129,17 +129,17 @@ var I18nProvider = (props) => {
129
129
  (0, import_react.useEffect)(() => {
130
130
  i18n2.services.resourceStore.data = props.i18n.locales;
131
131
  i18n2.changeLanguage(language);
132
- }, [props.i18n.locales]);
132
+ }, [i18n2, language, props.i18n.locales]);
133
133
  (0, import_react.useEffect)(() => {
134
134
  loaded = true;
135
135
  i18n2.changeLanguage(language);
136
- }, [language]);
136
+ }, [i18n2, language]);
137
137
  (0, import_react.useEffect)(() => {
138
138
  const hasWindow = typeof window !== "undefined";
139
139
  if (hasWindow && options.allowHydration) {
140
140
  setHydration(true);
141
141
  }
142
- }, []);
142
+ }, [options.allowHydration]);
143
143
  return hydration ? props.children : null;
144
144
  };
145
145
  function getAllLanguageSlugs() {
package/dist/index.mjs CHANGED
@@ -92,17 +92,17 @@ var I18nProvider = (props) => {
92
92
  useEffect(() => {
93
93
  i18n2.services.resourceStore.data = props.i18n.locales;
94
94
  i18n2.changeLanguage(language);
95
- }, [props.i18n.locales]);
95
+ }, [i18n2, language, props.i18n.locales]);
96
96
  useEffect(() => {
97
97
  loaded = true;
98
98
  i18n2.changeLanguage(language);
99
- }, [language]);
99
+ }, [i18n2, language]);
100
100
  useEffect(() => {
101
101
  const hasWindow = typeof window !== "undefined";
102
102
  if (hasWindow && options.allowHydration) {
103
103
  setHydration(true);
104
104
  }
105
- }, []);
105
+ }, [options.allowHydration]);
106
106
  return hydration ? props.children : null;
107
107
  };
108
108
  function getAllLanguageSlugs() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-i18next-static-site",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "i18next solution for static sites build with Next.js (static HTML export / next export)",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -28,13 +28,15 @@
28
28
  "build": "rm -rf dist && mkdir dist && tsup src/index.tsx --format esm,cjs --dts --external react",
29
29
  "dev": "tsup src/index.tsx --format esm,cjs --watch --dts",
30
30
  "lint": "TIMING=1 eslint \"**/*.ts*\"",
31
- "test": "echo \"Error: no test specified\" && exit 1"
31
+ "test": "echo \"Error: no test specified\" && exit 1",
32
+ "release": "release-it"
32
33
  },
33
34
  "devDependencies": {
34
35
  "@types/react": "^17.0.37",
35
36
  "@types/react-dom": "^17.0.11",
36
37
  "eslint": "^7.32.0",
37
38
  "eslint-config-custom": "*",
39
+ "release-it": "^15.5.0",
38
40
  "tsconfig": "*",
39
41
  "typescript": "^4.5.2"
40
42
  },
@@ -42,8 +44,8 @@
42
44
  "@types/js-cookie": "^3.0.2",
43
45
  "i18next": "^21.10.0",
44
46
  "js-cookie": "^3.0.1",
45
- "react": "^18.2.0",
46
47
  "next": "^13.0.0",
48
+ "react": "^18.2.0",
47
49
  "react-i18next": "^11.18.6",
48
50
  "tsup": "^6.3.0"
49
51
  },