@module-federation/utilities 3.0.24 → 3.0.25

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
@@ -58,6 +58,10 @@ function _non_iterable_rest$3() {
58
58
  function _sliced_to_array$3(arr, i) {
59
59
  return _array_with_holes$3(arr) || _iterable_to_array_limit$3(arr, i) || _unsupported_iterable_to_array$3(arr, i) || _non_iterable_rest$3();
60
60
  }
61
+ function _type_of$2(obj) {
62
+ "@swc/helpers - typeof";
63
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
64
+ }
61
65
  function _unsupported_iterable_to_array$3(o, minLen) {
62
66
  if (!o) return;
63
67
  if (typeof o === "string") return _array_like_to_array$3(o, minLen);
@@ -166,7 +170,7 @@ var loadScript = function(keyOrRuntimeRemoteItem) {
166
170
  var getRuntimeRemotes$1 = function() {
167
171
  return Object.entries(remoteVars).reduce(function(acc, param) {
168
172
  var _param = _sliced_to_array$3(param, 2), key = _param[0], value = _param[1];
169
- if (typeof value === 'object' && typeof value.then === 'function') {
173
+ if ((typeof value === "undefined" ? "undefined" : _type_of$2(value)) === 'object' && typeof value.then === 'function') {
170
174
  acc[key] = {
171
175
  asyncContainer: value
172
176
  };
@@ -269,6 +273,10 @@ function _non_iterable_rest$2() {
269
273
  function _sliced_to_array$2(arr, i) {
270
274
  return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$2(arr, i) || _non_iterable_rest$2();
271
275
  }
276
+ function _type_of$1(obj) {
277
+ "@swc/helpers - typeof";
278
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
279
+ }
272
280
  function _unsupported_iterable_to_array$2(o, minLen) {
273
281
  if (!o) return;
274
282
  if (typeof o === "string") return _array_like_to_array$2(o, minLen);
@@ -538,7 +546,7 @@ var createContainerSharingScope = function(asyncContainer) {
538
546
  if (exportName) {
539
547
  return [
540
548
  2,
541
- mod && typeof mod === 'object' ? mod[exportName] : undefined
549
+ mod && (typeof mod === "undefined" ? "undefined" : _type_of$1(mod)) === 'object' ? mod[exportName] : undefined
542
550
  ];
543
551
  } else {
544
552
  return [
@@ -1124,6 +1132,10 @@ function _non_iterable_rest() {
1124
1132
  function _sliced_to_array(arr, i) {
1125
1133
  return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
1126
1134
  }
1135
+ function _type_of(obj) {
1136
+ "@swc/helpers - typeof";
1137
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
1138
+ }
1127
1139
  function _unsupported_iterable_to_array(o, minLen) {
1128
1140
  if (!o) return;
1129
1141
  if (typeof o === "string") return _array_like_to_array(o, minLen);
@@ -1137,7 +1149,7 @@ var getRuntimeRemotes = function() {
1137
1149
  return Object.entries(remoteVars).reduce(function(acc, item) {
1138
1150
  var _item = _sliced_to_array(item, 2), key = _item[0], value = _item[1];
1139
1151
  // if its an object with a thenable (eagerly executing function)
1140
- if (typeof value === 'object' && typeof value.then === 'function') {
1152
+ if ((typeof value === "undefined" ? "undefined" : _type_of(value)) === 'object' && typeof value.then === 'function') {
1141
1153
  acc[key] = {
1142
1154
  asyncContainer: value
1143
1155
  };
package/dist/index.esm.js CHANGED
@@ -36,6 +36,10 @@ function _non_iterable_rest$3() {
36
36
  function _sliced_to_array$3(arr, i) {
37
37
  return _array_with_holes$3(arr) || _iterable_to_array_limit$3(arr, i) || _unsupported_iterable_to_array$3(arr, i) || _non_iterable_rest$3();
38
38
  }
39
+ function _type_of$2(obj) {
40
+ "@swc/helpers - typeof";
41
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
42
+ }
39
43
  function _unsupported_iterable_to_array$3(o, minLen) {
40
44
  if (!o) return;
41
45
  if (typeof o === "string") return _array_like_to_array$3(o, minLen);
@@ -144,7 +148,7 @@ var loadScript = function(keyOrRuntimeRemoteItem) {
144
148
  var getRuntimeRemotes$1 = function() {
145
149
  return Object.entries(remoteVars).reduce(function(acc, param) {
146
150
  var _param = _sliced_to_array$3(param, 2), key = _param[0], value = _param[1];
147
- if (typeof value === 'object' && typeof value.then === 'function') {
151
+ if ((typeof value === "undefined" ? "undefined" : _type_of$2(value)) === 'object' && typeof value.then === 'function') {
148
152
  acc[key] = {
149
153
  asyncContainer: value
150
154
  };
@@ -247,6 +251,10 @@ function _non_iterable_rest$2() {
247
251
  function _sliced_to_array$2(arr, i) {
248
252
  return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$2(arr, i) || _non_iterable_rest$2();
249
253
  }
254
+ function _type_of$1(obj) {
255
+ "@swc/helpers - typeof";
256
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
257
+ }
250
258
  function _unsupported_iterable_to_array$2(o, minLen) {
251
259
  if (!o) return;
252
260
  if (typeof o === "string") return _array_like_to_array$2(o, minLen);
@@ -516,7 +524,7 @@ var createContainerSharingScope = function(asyncContainer) {
516
524
  if (exportName) {
517
525
  return [
518
526
  2,
519
- mod && typeof mod === 'object' ? mod[exportName] : undefined
527
+ mod && (typeof mod === "undefined" ? "undefined" : _type_of$1(mod)) === 'object' ? mod[exportName] : undefined
520
528
  ];
521
529
  } else {
522
530
  return [
@@ -1102,6 +1110,10 @@ function _non_iterable_rest() {
1102
1110
  function _sliced_to_array(arr, i) {
1103
1111
  return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
1104
1112
  }
1113
+ function _type_of(obj) {
1114
+ "@swc/helpers - typeof";
1115
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
1116
+ }
1105
1117
  function _unsupported_iterable_to_array(o, minLen) {
1106
1118
  if (!o) return;
1107
1119
  if (typeof o === "string") return _array_like_to_array(o, minLen);
@@ -1115,7 +1127,7 @@ var getRuntimeRemotes = function() {
1115
1127
  return Object.entries(remoteVars).reduce(function(acc, item) {
1116
1128
  var _item = _sliced_to_array(item, 2), key = _item[0], value = _item[1];
1117
1129
  // if its an object with a thenable (eagerly executing function)
1118
- if (typeof value === 'object' && typeof value.then === 'function') {
1130
+ if ((typeof value === "undefined" ? "undefined" : _type_of(value)) === 'object' && typeof value.then === 'function') {
1119
1131
  acc[key] = {
1120
1132
  asyncContainer: value
1121
1133
  };
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/utilities",
3
- "version": "3.0.24",
3
+ "version": "3.0.25",
4
4
  "type": "commonjs",
5
5
  "main": "./index.cjs.js",
6
6
  "types": "./dist/index.cjs.d.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/utilities",
3
- "version": "3.0.24",
3
+ "version": "3.0.25",
4
4
  "type": "commonjs",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "types": "./dist/index.cjs.d.ts",
@@ -17,7 +17,7 @@
17
17
  "react": "18.2.0"
18
18
  },
19
19
  "dependencies": {
20
- "@module-federation/sdk": "0.1.19"
20
+ "@module-federation/sdk": "0.1.20"
21
21
  },
22
22
  "peerDependencies": {
23
23
  "webpack": "^5.40.0",