@module-federation/runtime 0.0.14 → 0.0.16

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.cjs.js CHANGED
@@ -1605,7 +1605,7 @@ class FederationHost {
1605
1605
  // not used yet
1606
1606
  afterPreloadRemote: new AsyncHook()
1607
1607
  });
1608
- this.version = "0.0.14";
1608
+ this.version = "0.0.16";
1609
1609
  this.moduleCache = new Map();
1610
1610
  this.loaderHook = new PluginSystem({
1611
1611
  // FIXME: may not be suitable , not open to the public yet
package/dist/index.esm.js CHANGED
@@ -1603,7 +1603,7 @@ class FederationHost {
1603
1603
  // not used yet
1604
1604
  afterPreloadRemote: new AsyncHook()
1605
1605
  });
1606
- this.version = "0.0.14";
1606
+ this.version = "0.0.16";
1607
1607
  this.moduleCache = new Map();
1608
1608
  this.loaderHook = new PluginSystem({
1609
1609
  // FIXME: may not be suitable , not open to the public yet
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/runtime",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
4
4
  "author": "zhouxiao <codingzx@gmail.com>",
5
5
  "main": "./index.cjs.js",
6
6
  "module": "./index.esm.js",
package/dist/share.cjs.js CHANGED
@@ -19,10 +19,19 @@ function assert(condition, msg) {
19
19
  }
20
20
  }
21
21
  function error(msg) {
22
+ if (msg instanceof Error) {
23
+ msg.message = `${LOG_CATEGORY}: ${msg.message}`;
24
+ throw msg;
25
+ }
22
26
  throw new Error(`${LOG_CATEGORY}: ${msg}`);
23
27
  }
24
28
  function warn(msg) {
25
- console.warn(`${LOG_CATEGORY}: ${msg}`);
29
+ if (msg instanceof Error) {
30
+ msg.message = `${LOG_CATEGORY}: ${msg.message}`;
31
+ console.warn(msg);
32
+ } else {
33
+ console.warn(`${LOG_CATEGORY}: ${msg}`);
34
+ }
26
35
  }
27
36
 
28
37
  function addUniqueItem(arr, item) {
@@ -176,7 +185,7 @@ function getGlobalFederationConstructor() {
176
185
  function setGlobalFederationConstructor(FederationConstructor, isDebug = isDebugMode()) {
177
186
  if (isDebug) {
178
187
  globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = FederationConstructor;
179
- globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.0.14";
188
+ globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.0.16";
180
189
  }
181
190
  }
182
191
  // eslint-disable-next-line @typescript-eslint/ban-types
package/dist/share.esm.js CHANGED
@@ -17,10 +17,19 @@ function assert(condition, msg) {
17
17
  }
18
18
  }
19
19
  function error(msg) {
20
+ if (msg instanceof Error) {
21
+ msg.message = `${LOG_CATEGORY}: ${msg.message}`;
22
+ throw msg;
23
+ }
20
24
  throw new Error(`${LOG_CATEGORY}: ${msg}`);
21
25
  }
22
26
  function warn(msg) {
23
- console.warn(`${LOG_CATEGORY}: ${msg}`);
27
+ if (msg instanceof Error) {
28
+ msg.message = `${LOG_CATEGORY}: ${msg.message}`;
29
+ console.warn(msg);
30
+ } else {
31
+ console.warn(`${LOG_CATEGORY}: ${msg}`);
32
+ }
24
33
  }
25
34
 
26
35
  function addUniqueItem(arr, item) {
@@ -174,7 +183,7 @@ function getGlobalFederationConstructor() {
174
183
  function setGlobalFederationConstructor(FederationConstructor, isDebug = isDebugMode()) {
175
184
  if (isDebug) {
176
185
  globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = FederationConstructor;
177
- globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.0.14";
186
+ globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.0.16";
178
187
  }
179
188
  }
180
189
  // eslint-disable-next-line @typescript-eslint/ban-types
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/runtime",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
4
4
  "author": "zhouxiao <codingzx@gmail.com>",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.esm.js",
@@ -45,6 +45,6 @@
45
45
  }
46
46
  },
47
47
  "dependencies": {
48
- "@module-federation/sdk": "0.0.14"
48
+ "@module-federation/sdk": "0.0.16"
49
49
  }
50
50
  }