@bleedingdev/modern-js-plugin-i18n 3.9.3-ultramodern.17 → 3.9.3-ultramodern.19

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.
@@ -32,10 +32,10 @@ __webpack_require__.d(__webpack_exports__, {
32
32
  });
33
33
  const runtime_namespaceObject = require("@modern-js/runtime");
34
34
  const merge_namespaceObject = require("@modern-js/runtime-utils/merge");
35
- const index_js_namespaceObject = require("./i18n/index.js");
36
- const backend_index_js_namespaceObject = require("./i18n/backend/index.js");
35
+ const index_js_namespaceObject = require("./i18n/backend/index.js");
37
36
  const detection_index_js_namespaceObject = require("./i18n/detection/index.js");
38
37
  const middleware_js_namespaceObject = require("./i18n/detection/middleware.js");
38
+ const instance_js_namespaceObject = require("./i18n/instance.js");
39
39
  const external_utils_js_namespaceObject = require("./utils.js");
40
40
  let i18nLifecycleHelpersPromise;
41
41
  function loadI18nLifecycleHelpers() {
@@ -54,7 +54,7 @@ function loadI18nLifecycleHelpers() {
54
54
  async function setupI18nBeforeRender(context, options) {
55
55
  const { api, userI18nInstance, initOptions, backend, backendEnabled, i18nextDetector, detection, localePathRedirect, languages, fallbackLanguage, resolveReactI18nextIntegration, setI18nextProvider } = options;
56
56
  const { useI18nextBackend, changeI18nLanguage, ensureLanguageMatch, initializeI18nInstance, setupClonedInstance } = await loadI18nLifecycleHelpers();
57
- let i18nInstance = await (0, index_js_namespaceObject.getI18nInstance)(userI18nInstance);
57
+ let i18nInstance = await (0, instance_js_namespaceObject.getI18nInstance)(userI18nInstance);
58
58
  const { i18n: otherConfig } = api.getRuntimeConfig();
59
59
  const { initOptions: otherInitOptions } = otherConfig || {};
60
60
  const userInitOptions = (0, merge_namespaceObject.merge)(otherInitOptions || {}, initOptions || {});
@@ -64,7 +64,7 @@ async function setupI18nBeforeRender(context, options) {
64
64
  const pathname = (0, external_utils_js_namespaceObject.getPathname)(context);
65
65
  if (i18nextDetector) (0, middleware_js_namespaceObject.useI18nextLanguageDetector)(i18nInstance);
66
66
  const mergedDetection = (0, detection_index_js_namespaceObject.mergeDetectionOptions)(i18nextDetector, detection, localePathRedirect, userInitOptions);
67
- const mergedBackend = (0, backend_index_js_namespaceObject.mergeBackendOptions)(backend, userInitOptions);
67
+ const mergedBackend = (0, index_js_namespaceObject.mergeBackendOptions)(backend, userInitOptions);
68
68
  const hasSdkConfig = 'function' == typeof userInitOptions?.backend?.sdk || mergedBackend?.sdk && 'function' == typeof mergedBackend.sdk;
69
69
  if (mergedBackend && (backendEnabled || hasSdkConfig)) useI18nextBackend(i18nInstance, mergedBackend);
70
70
  const { finalLanguage } = await (0, detection_index_js_namespaceObject.detectLanguageWithPriority)(i18nInstance, {
@@ -1,9 +1,9 @@
1
1
  import { isBrowser } from "@modern-js/runtime";
2
2
  import { merge } from "@modern-js/runtime-utils/merge";
3
- import { getI18nInstance } from "./i18n/index.mjs";
4
3
  import { mergeBackendOptions } from "./i18n/backend/index.mjs";
5
4
  import { detectLanguageWithPriority, exportServerLngToWindow, mergeDetectionOptions } from "./i18n/detection/index.mjs";
6
5
  import { useI18nextLanguageDetector } from "./i18n/detection/middleware.mjs";
6
+ import { getI18nInstance } from "./i18n/instance.mjs";
7
7
  import { getPathname } from "./utils.mjs";
8
8
  let i18nLifecycleHelpersPromise;
9
9
  function loadI18nLifecycleHelpers() {
@@ -1,10 +1,10 @@
1
1
  import "node:module";
2
2
  import { isBrowser } from "@modern-js/runtime";
3
3
  import { merge } from "@modern-js/runtime-utils/merge";
4
- import { getI18nInstance } from "./i18n/index.mjs";
5
4
  import { mergeBackendOptions } from "./i18n/backend/index.mjs";
6
5
  import { detectLanguageWithPriority, exportServerLngToWindow, mergeDetectionOptions } from "./i18n/detection/index.mjs";
7
6
  import { useI18nextLanguageDetector } from "./i18n/detection/middleware.mjs";
7
+ import { getI18nInstance } from "./i18n/instance.mjs";
8
8
  import { getPathname } from "./utils.mjs";
9
9
  let i18nLifecycleHelpersPromise;
10
10
  function loadI18nLifecycleHelpers() {
package/package.json CHANGED
@@ -17,7 +17,7 @@
17
17
  "modern",
18
18
  "modern.js"
19
19
  ],
20
- "version": "3.9.3-ultramodern.17",
20
+ "version": "3.9.3-ultramodern.19",
21
21
  "engines": {
22
22
  "node": ">=20"
23
23
  },
@@ -132,13 +132,13 @@
132
132
  }
133
133
  },
134
134
  "dependencies": {
135
- "@modern-js/i18n-runtime-extensions": "npm:@bleedingdev/modern-js-i18n-runtime-extensions@3.9.3-ultramodern.17",
136
- "@modern-js/plugin": "npm:@bleedingdev/modern-js-plugin@3.9.3-ultramodern.17",
137
- "@modern-js/runtime-utils": "npm:@bleedingdev/modern-js-runtime-utils@3.9.3-ultramodern.17",
138
- "@modern-js/server-core": "npm:@bleedingdev/modern-js-server-core@3.9.3-ultramodern.17",
139
- "@modern-js/server-runtime": "npm:@bleedingdev/modern-js-server-runtime@3.9.3-ultramodern.17",
140
- "@modern-js/types": "npm:@bleedingdev/modern-js-types@3.9.3-ultramodern.17",
141
- "@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.9.3-ultramodern.17",
135
+ "@modern-js/i18n-runtime-extensions": "npm:@bleedingdev/modern-js-i18n-runtime-extensions@3.9.3-ultramodern.19",
136
+ "@modern-js/plugin": "npm:@bleedingdev/modern-js-plugin@3.9.3-ultramodern.19",
137
+ "@modern-js/runtime-utils": "npm:@bleedingdev/modern-js-runtime-utils@3.9.3-ultramodern.19",
138
+ "@modern-js/server-core": "npm:@bleedingdev/modern-js-server-core@3.9.3-ultramodern.19",
139
+ "@modern-js/server-runtime": "npm:@bleedingdev/modern-js-server-runtime@3.9.3-ultramodern.19",
140
+ "@modern-js/types": "npm:@bleedingdev/modern-js-types@3.9.3-ultramodern.19",
141
+ "@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.9.3-ultramodern.19",
142
142
  "@swc/helpers": "^0.5.23",
143
143
  "i18next-browser-languagedetector": "^8.2.1",
144
144
  "i18next-chained-backend": "^5.0.6",
@@ -147,7 +147,7 @@
147
147
  "i18next-http-middleware": "^3.9.9"
148
148
  },
149
149
  "peerDependencies": {
150
- "@modern-js/runtime": "3.9.3-ultramodern.17",
150
+ "@modern-js/runtime": "3.9.3-ultramodern.19",
151
151
  "i18next": ">=25.10.10",
152
152
  "react": "^19.3.1",
153
153
  "react-dom": "^19.3.1",
@@ -162,9 +162,9 @@
162
162
  }
163
163
  },
164
164
  "devDependencies": {
165
- "@modern-js/app-tools": "npm:@bleedingdev/modern-js-app-tools@3.9.3-ultramodern.17",
166
- "@modern-js/runtime": "npm:@bleedingdev/modern-js-runtime@3.9.3-ultramodern.17",
167
- "@modern-js/runtime-extensions": "npm:@bleedingdev/modern-js-runtime-extensions@3.9.3-ultramodern.17",
165
+ "@modern-js/app-tools": "npm:@bleedingdev/modern-js-app-tools@3.9.3-ultramodern.19",
166
+ "@modern-js/runtime": "npm:@bleedingdev/modern-js-runtime@3.9.3-ultramodern.19",
167
+ "@modern-js/runtime-extensions": "npm:@bleedingdev/modern-js-runtime-extensions@3.9.3-ultramodern.19",
168
168
  "@rslib/core": "1.0.3",
169
169
  "@scripts/rstest-config": "2.66.0",
170
170
  "@types/node": "^26.6.5",
@@ -6,7 +6,6 @@ import type {
6
6
  BaseLocaleDetectionOptions,
7
7
  } from '../shared/type';
8
8
  import type { I18nInitOptions, I18nInstance } from './i18n';
9
- import { getI18nInstance } from './i18n';
10
9
  import { mergeBackendOptions } from './i18n/backend';
11
10
  import {
12
11
  detectLanguageWithPriority,
@@ -14,6 +13,7 @@ import {
14
13
  mergeDetectionOptions,
15
14
  } from './i18n/detection';
16
15
  import { useI18nextLanguageDetector } from './i18n/detection/middleware';
16
+ import { getI18nInstance } from './i18n/instance';
17
17
  import type { ReactI18nextIntegration } from './reactI18next';
18
18
  import { getPathname } from './utils';
19
19