@module-federation/runtime 0.1.6 → 0.1.8

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
@@ -1567,6 +1567,7 @@ class FederationHost {
1567
1567
  ]);
1568
1568
  // Merge plugin
1569
1569
  this.options.plugins = this.options.plugins.reduce((res, plugin)=>{
1570
+ if (!plugin) return res;
1570
1571
  if (res && !res.find((item)=>item.name === plugin.name)) {
1571
1572
  res.push(plugin);
1572
1573
  }
@@ -1698,7 +1699,7 @@ class FederationHost {
1698
1699
  // not used yet
1699
1700
  afterPreloadRemote: new AsyncHook()
1700
1701
  });
1701
- this.version = "0.1.6";
1702
+ this.version = "0.1.8";
1702
1703
  this.moduleCache = new Map();
1703
1704
  this.loaderHook = new PluginSystem({
1704
1705
  // FIXME: may not be suitable , not open to the public yet
package/dist/index.esm.js CHANGED
@@ -1565,6 +1565,7 @@ class FederationHost {
1565
1565
  ]);
1566
1566
  // Merge plugin
1567
1567
  this.options.plugins = this.options.plugins.reduce((res, plugin)=>{
1568
+ if (!plugin) return res;
1568
1569
  if (res && !res.find((item)=>item.name === plugin.name)) {
1569
1570
  res.push(plugin);
1570
1571
  }
@@ -1696,7 +1697,7 @@ class FederationHost {
1696
1697
  // not used yet
1697
1698
  afterPreloadRemote: new AsyncHook()
1698
1699
  });
1699
- this.version = "0.1.6";
1700
+ this.version = "0.1.8";
1700
1701
  this.moduleCache = new Map();
1701
1702
  this.loaderHook = new PluginSystem({
1702
1703
  // 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.1.6",
3
+ "version": "0.1.8",
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
@@ -190,7 +190,7 @@ function getGlobalFederationConstructor() {
190
190
  function setGlobalFederationConstructor(FederationConstructor, isDebug = isDebugMode()) {
191
191
  if (isDebug) {
192
192
  globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = FederationConstructor;
193
- globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.1.6";
193
+ globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.1.8";
194
194
  }
195
195
  }
196
196
  // eslint-disable-next-line @typescript-eslint/ban-types
@@ -657,7 +657,7 @@ function formatShare(shareArgs, from, name) {
657
657
  throw new Error(`Can not get shared '${name}'!`);
658
658
  });
659
659
  }
660
- var _shareArgs_version;
660
+ var _shareArgs_version, _shareArgs_scope;
661
661
  return _extends({
662
662
  deps: [],
663
663
  useIn: [],
@@ -674,7 +674,7 @@ function formatShare(shareArgs, from, name) {
674
674
  loaded: 'lib' in shareArgs ? true : undefined,
675
675
  version: (_shareArgs_version = shareArgs.version) != null ? _shareArgs_version : '0',
676
676
  scope: Array.isArray(shareArgs.scope) ? shareArgs.scope : [
677
- 'default'
677
+ (_shareArgs_scope = shareArgs.scope) != null ? _shareArgs_scope : 'default'
678
678
  ],
679
679
  strategy: shareArgs.strategy || 'version-first'
680
680
  });
package/dist/share.esm.js CHANGED
@@ -188,7 +188,7 @@ function getGlobalFederationConstructor() {
188
188
  function setGlobalFederationConstructor(FederationConstructor, isDebug = isDebugMode()) {
189
189
  if (isDebug) {
190
190
  globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = FederationConstructor;
191
- globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.1.6";
191
+ globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.1.8";
192
192
  }
193
193
  }
194
194
  // eslint-disable-next-line @typescript-eslint/ban-types
@@ -655,7 +655,7 @@ function formatShare(shareArgs, from, name) {
655
655
  throw new Error(`Can not get shared '${name}'!`);
656
656
  });
657
657
  }
658
- var _shareArgs_version;
658
+ var _shareArgs_version, _shareArgs_scope;
659
659
  return _extends({
660
660
  deps: [],
661
661
  useIn: [],
@@ -672,7 +672,7 @@ function formatShare(shareArgs, from, name) {
672
672
  loaded: 'lib' in shareArgs ? true : undefined,
673
673
  version: (_shareArgs_version = shareArgs.version) != null ? _shareArgs_version : '0',
674
674
  scope: Array.isArray(shareArgs.scope) ? shareArgs.scope : [
675
- 'default'
675
+ (_shareArgs_scope = shareArgs.scope) != null ? _shareArgs_scope : 'default'
676
676
  ],
677
677
  strategy: shareArgs.strategy || 'version-first'
678
678
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/runtime",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
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.1.6"
48
+ "@module-federation/sdk": "0.1.8"
49
49
  }
50
50
  }