@modern-js/plugin-i18n 3.11.0 → 3.11.2
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/CHANGELOG.md +24 -0
- package/dist/cjs/runtime/i18n/backend/defaults.js +3 -4
- package/dist/cjs/runtime/i18n/backend/sdk-event.js +5 -6
- package/dist/cjs/runtime/i18n/instance.js +9 -9
- package/dist/cjs/shared/deepMerge.js +2 -2
- package/dist/cjs/shared/utils.js +5 -5
- package/dist/esm/server/index.mjs +1 -1
- package/dist/esm-node/server/index.mjs +1 -1
- package/package.json +14 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @modern-js/plugin-i18n
|
|
2
2
|
|
|
3
|
+
## 3.11.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- @modern-js/server-core@3.11.2
|
|
8
|
+
- @modern-js/server-runtime@3.11.2
|
|
9
|
+
- @modern-js/plugin@3.11.2
|
|
10
|
+
- @modern-js/runtime-utils@3.11.2
|
|
11
|
+
- @modern-js/types@3.11.2
|
|
12
|
+
- @modern-js/utils@3.11.2
|
|
13
|
+
|
|
14
|
+
## 3.11.1
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [fc6ee73]
|
|
19
|
+
- Updated dependencies [b11c3cd]
|
|
20
|
+
- @modern-js/plugin@3.11.1
|
|
21
|
+
- @modern-js/server-core@3.11.1
|
|
22
|
+
- @modern-js/types@3.11.1
|
|
23
|
+
- @modern-js/server-runtime@3.11.1
|
|
24
|
+
- @modern-js/runtime-utils@3.11.1
|
|
25
|
+
- @modern-js/utils@3.11.1
|
|
26
|
+
|
|
3
27
|
## 3.11.0
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
|
@@ -49,10 +49,9 @@ function convertBackendOptions(options) {
|
|
|
49
49
|
if (converted.addPath) converted.addPath = convertPath(converted.addPath);
|
|
50
50
|
return converted;
|
|
51
51
|
}
|
|
52
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
DEFAULT_I18NEXT_BACKEND_OPTIONS: DEFAULT_I18NEXT_BACKEND_OPTIONS
|
|
52
|
+
__webpack_require__.d(__webpack_exports__, {}, {
|
|
53
|
+
DEFAULT_I18NEXT_BACKEND_OPTIONS: DEFAULT_I18NEXT_BACKEND_OPTIONS,
|
|
54
|
+
convertBackendOptions: convertBackendOptions
|
|
56
55
|
});
|
|
57
56
|
exports.DEFAULT_I18NEXT_BACKEND_OPTIONS = __webpack_exports__.DEFAULT_I18NEXT_BACKEND_OPTIONS;
|
|
58
57
|
exports.convertBackendOptions = __webpack_exports__.convertBackendOptions;
|
|
@@ -47,12 +47,11 @@ function getI18nSdkBackendId(target) {
|
|
|
47
47
|
if (!target || 'object' != typeof target) return;
|
|
48
48
|
return target[I18N_SDK_BACKEND_ID_KEY];
|
|
49
49
|
}
|
|
50
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
I18N_SDK_RESOURCES_LOADED_EVENT: I18N_SDK_RESOURCES_LOADED_EVENT
|
|
50
|
+
__webpack_require__.d(__webpack_exports__, {}, {
|
|
51
|
+
I18N_SDK_RESOURCES_LOADED_EVENT: I18N_SDK_RESOURCES_LOADED_EVENT,
|
|
52
|
+
createI18nSdkBackendId: createI18nSdkBackendId,
|
|
53
|
+
getI18nSdkBackendId: getI18nSdkBackendId,
|
|
54
|
+
setI18nSdkBackendId: setI18nSdkBackendId
|
|
56
55
|
});
|
|
57
56
|
exports.I18N_SDK_RESOURCES_LOADED_EVENT = __webpack_exports__.I18N_SDK_RESOURCES_LOADED_EVENT;
|
|
58
57
|
exports.createI18nSdkBackendId = __webpack_exports__.createI18nSdkBackendId;
|
|
@@ -101,15 +101,15 @@ async function getI18nextProvider() {
|
|
|
101
101
|
return null;
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
105
|
-
getActualI18nextInstance:
|
|
106
|
-
getI18nInstance:
|
|
107
|
-
getI18nWrapperI18nextInstance:
|
|
108
|
-
getI18nextInstanceForProvider:
|
|
109
|
-
getI18nextProvider:
|
|
110
|
-
getInitReactI18next:
|
|
111
|
-
isI18nInstance:
|
|
112
|
-
isI18nWrapperInstance:
|
|
104
|
+
__webpack_require__.d(__webpack_exports__, {}, {
|
|
105
|
+
getActualI18nextInstance: getActualI18nextInstance,
|
|
106
|
+
getI18nInstance: getI18nInstance,
|
|
107
|
+
getI18nWrapperI18nextInstance: getI18nWrapperI18nextInstance,
|
|
108
|
+
getI18nextInstanceForProvider: getI18nextInstanceForProvider,
|
|
109
|
+
getI18nextProvider: getI18nextProvider,
|
|
110
|
+
getInitReactI18next: getInitReactI18next,
|
|
111
|
+
isI18nInstance: isI18nInstance,
|
|
112
|
+
isI18nWrapperInstance: isI18nWrapperInstance
|
|
113
113
|
});
|
|
114
114
|
exports.getActualI18nextInstance = __webpack_exports__.getActualI18nextInstance;
|
|
115
115
|
exports.getI18nInstance = __webpack_exports__.getI18nInstance;
|
|
@@ -46,8 +46,8 @@ function deepMerge(defaultOptions, userOptions) {
|
|
|
46
46
|
}
|
|
47
47
|
return merged;
|
|
48
48
|
}
|
|
49
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
50
|
-
deepMerge:
|
|
49
|
+
__webpack_require__.d(__webpack_exports__, {}, {
|
|
50
|
+
deepMerge: deepMerge
|
|
51
51
|
});
|
|
52
52
|
exports.deepMerge = __webpack_exports__.deepMerge;
|
|
53
53
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
package/dist/cjs/shared/utils.js
CHANGED
|
@@ -61,11 +61,11 @@ function getBackendOptions(entryName, backend) {
|
|
|
61
61
|
if ('backendOptionsByEntry' in fullConfig) return removeEntryConfigKey(fullConfig, 'backendOptionsByEntry');
|
|
62
62
|
return backend;
|
|
63
63
|
}
|
|
64
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
65
|
-
getBackendOptions:
|
|
66
|
-
getEntryConfig:
|
|
67
|
-
getLocaleDetectionOptions:
|
|
68
|
-
removeEntryConfigKey:
|
|
64
|
+
__webpack_require__.d(__webpack_exports__, {}, {
|
|
65
|
+
getBackendOptions: getBackendOptions,
|
|
66
|
+
getEntryConfig: getEntryConfig,
|
|
67
|
+
getLocaleDetectionOptions: getLocaleDetectionOptions,
|
|
68
|
+
removeEntryConfigKey: removeEntryConfigKey
|
|
69
69
|
});
|
|
70
70
|
exports.getBackendOptions = __webpack_exports__.getBackendOptions;
|
|
71
71
|
exports.getEntryConfig = __webpack_exports__.getEntryConfig;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DEFAULT_I18NEXT_DETECTION_OPTIONS, mergeDetectionOptions } from "../runtime/i18n/detection/config.mjs";
|
|
2
2
|
import { getLocaleDetectionOptions } from "../shared/utils.mjs";
|
|
3
3
|
import * as __rspack_external__modern_js_server_core_hono_0af3baa7 from "@modern-js/server-core/hono";
|
|
4
|
-
const { languageDetector
|
|
4
|
+
const { languageDetector } = __rspack_external__modern_js_server_core_hono_0af3baa7;
|
|
5
5
|
const convertToHonoLanguageDetectorOptions = (languages, fallbackLanguage, detectionOptions)=>{
|
|
6
6
|
const mergedDetection = detectionOptions ? mergeDetectionOptions(detectionOptions) : DEFAULT_I18NEXT_DETECTION_OPTIONS;
|
|
7
7
|
const order = (mergedDetection.order || []).filter((item)=>![
|
|
@@ -2,7 +2,7 @@ import "node:module";
|
|
|
2
2
|
import { DEFAULT_I18NEXT_DETECTION_OPTIONS, mergeDetectionOptions } from "../runtime/i18n/detection/config.mjs";
|
|
3
3
|
import { getLocaleDetectionOptions } from "../shared/utils.mjs";
|
|
4
4
|
import * as __rspack_external__modern_js_server_core_hono_0af3baa7 from "@modern-js/server-core/hono";
|
|
5
|
-
const { languageDetector
|
|
5
|
+
const { languageDetector } = __rspack_external__modern_js_server_core_hono_0af3baa7;
|
|
6
6
|
const convertToHonoLanguageDetectorOptions = (languages, fallbackLanguage, detectionOptions)=>{
|
|
7
7
|
const mergedDetection = detectionOptions ? mergeDetectionOptions(detectionOptions) : DEFAULT_I18NEXT_DETECTION_OPTIONS;
|
|
8
8
|
const order = (mergedDetection.order || []).filter((item)=>![
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "3.11.
|
|
18
|
+
"version": "3.11.2",
|
|
19
19
|
"engines": {
|
|
20
20
|
"node": ">=20"
|
|
21
21
|
},
|
|
@@ -80,24 +80,24 @@
|
|
|
80
80
|
},
|
|
81
81
|
"dependencies": {
|
|
82
82
|
"@swc/helpers": "^0.5.17",
|
|
83
|
-
"i18next-browser-languagedetector": "^8.
|
|
83
|
+
"i18next-browser-languagedetector": "^8.3.0",
|
|
84
84
|
"i18next-chained-backend": "^4.6.3",
|
|
85
85
|
"i18next-fs-backend": "^2.6.9",
|
|
86
|
-
"i18next-http-backend": "^4.0.
|
|
87
|
-
"i18next-http-middleware": "^3.
|
|
88
|
-
"@modern-js/
|
|
89
|
-
"@modern-js/
|
|
90
|
-
"@modern-js/
|
|
91
|
-
"@modern-js/
|
|
92
|
-
"@modern-js/
|
|
93
|
-
"@modern-js/
|
|
86
|
+
"i18next-http-backend": "^4.0.9",
|
|
87
|
+
"i18next-http-middleware": "^3.10.0",
|
|
88
|
+
"@modern-js/runtime-utils": "3.11.2",
|
|
89
|
+
"@modern-js/plugin": "3.11.2",
|
|
90
|
+
"@modern-js/utils": "3.11.2",
|
|
91
|
+
"@modern-js/types": "3.11.2",
|
|
92
|
+
"@modern-js/server-runtime": "3.11.2",
|
|
93
|
+
"@modern-js/server-core": "3.11.2"
|
|
94
94
|
},
|
|
95
95
|
"peerDependencies": {
|
|
96
96
|
"react": ">=18.3.1",
|
|
97
97
|
"react-dom": ">=18.3.1",
|
|
98
98
|
"i18next": ">=25.10.10",
|
|
99
99
|
"react-i18next": ">=15.7.4",
|
|
100
|
-
"@modern-js/runtime": "^3.11.
|
|
100
|
+
"@modern-js/runtime": "^3.11.2"
|
|
101
101
|
},
|
|
102
102
|
"peerDependenciesMeta": {
|
|
103
103
|
"i18next": {
|
|
@@ -115,9 +115,9 @@
|
|
|
115
115
|
"react-i18next": "15.7.4",
|
|
116
116
|
"ts-node": "^10.9.2",
|
|
117
117
|
"typescript": "^5",
|
|
118
|
-
"@modern-js/app-tools": "3.11.
|
|
119
|
-
"@modern-js/
|
|
120
|
-
"@modern-js/
|
|
118
|
+
"@modern-js/app-tools": "3.11.2",
|
|
119
|
+
"@modern-js/rslib": "3.11.2",
|
|
120
|
+
"@modern-js/runtime": "3.11.2"
|
|
121
121
|
},
|
|
122
122
|
"sideEffects": false,
|
|
123
123
|
"publishConfig": {
|