next-i18next 15.3.0 → 15.4.0

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.
@@ -19,6 +19,10 @@ var defaultConfig = exports.defaultConfig = {
19
19
  locales: LOCALES
20
20
  },
21
21
  get initImmediate() {
22
+ // i18next < 24
23
+ return typeof window !== 'undefined';
24
+ },
25
+ get initAsync() {
22
26
  return typeof window !== 'undefined';
23
27
  },
24
28
  interpolation: {
@@ -33,9 +33,13 @@ var _default = exports["default"] = function _default(config) {
33
33
  instance = globalInstance.cloneInstance(_objectSpread(_objectSpread({}, config), {}, {
34
34
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
35
35
  // @ts-ignore
36
- initImmediate: false
36
+ initAsync: false,
37
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
38
+ // @ts-ignore
39
+ initImmediate: false // i18next < 24
37
40
  }));
38
41
  }
42
+
39
43
  var initPromise;
40
44
  if (!instance.isInitialized) {
41
45
  var _config$use, _config$use2;
@@ -12,6 +12,10 @@ export const defaultConfig = {
12
12
  locales: LOCALES
13
13
  },
14
14
  get initImmediate() {
15
+ // i18next < 24
16
+ return typeof window !== 'undefined';
17
+ },
18
+ get initAsync() {
15
19
  return typeof window !== 'undefined';
16
20
  },
17
21
  interpolation: {
@@ -12,9 +12,13 @@ export default (config => {
12
12
  ...config,
13
13
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
14
14
  // @ts-ignore
15
- initImmediate: false
15
+ initAsync: false,
16
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
17
+ // @ts-ignore
18
+ initImmediate: false // i18next < 24
16
19
  });
17
20
  }
21
+
18
22
  let initPromise;
19
23
  if (!instance.isInitialized) {
20
24
  const hasCustomBackend = config?.use?.some(b => b.type === 'backend');
@@ -12,6 +12,10 @@ export var defaultConfig = {
12
12
  locales: LOCALES
13
13
  },
14
14
  get initImmediate() {
15
+ // i18next < 24
16
+ return typeof window !== 'undefined';
17
+ },
18
+ get initAsync() {
15
19
  return typeof window !== 'undefined';
16
20
  },
17
21
  interpolation: {
@@ -14,9 +14,13 @@ export default (function (config) {
14
14
  instance = globalInstance.cloneInstance(_objectSpread(_objectSpread({}, config), {}, {
15
15
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
16
16
  // @ts-ignore
17
- initImmediate: false
17
+ initAsync: false,
18
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
19
+ // @ts-ignore
20
+ initImmediate: false // i18next < 24
18
21
  }));
19
22
  }
23
+
20
24
  var initPromise;
21
25
  if (!instance.isInitialized) {
22
26
  var _config$use, _config$use2;
@@ -6,6 +6,7 @@ export declare const defaultConfig: {
6
6
  locales: string[];
7
7
  };
8
8
  readonly initImmediate: boolean;
9
+ readonly initAsync: boolean;
9
10
  interpolation: {
10
11
  escapeValue: boolean;
11
12
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-i18next",
3
- "version": "15.3.0",
3
+ "version": "15.4.0",
4
4
  "repository": "git@github.com:i18next/next-i18next.git",
5
5
  "author": "i18next",
6
6
  "funding": [
@@ -116,7 +116,7 @@
116
116
  "eslint-plugin-typescript-sort-keys": "^3.1.0",
117
117
  "gh-release": "7.0.2",
118
118
  "husky": "^8.0.3",
119
- "i18next": "^23.7.16",
119
+ "i18next": "^24.0.0",
120
120
  "jest": "^29.7.0",
121
121
  "jest-environment-jsdom": "^29.7.0",
122
122
  "next": "^14.0.1",
@@ -124,7 +124,7 @@
124
124
  "prettier": "3.0.3",
125
125
  "react": "^18.2.0",
126
126
  "react-dom": "^18.2.0",
127
- "react-i18next": "^14.0.0",
127
+ "react-i18next": "^15.1.1",
128
128
  "rimraf": "^5.0.5",
129
129
  "size-limit": "^10.0.2",
130
130
  "start-server-and-test": "^2.0.1",
@@ -136,7 +136,7 @@
136
136
  "@types/hoist-non-react-statics": "^3.3.4",
137
137
  "core-js": "^3",
138
138
  "hoist-non-react-statics": "^3.3.2",
139
- "i18next-fs-backend": "^2.3.1"
139
+ "i18next-fs-backend": "^2.6.0"
140
140
  },
141
141
  "peerDependencies": {
142
142
  "i18next": ">= 23.7.13",