@module-federation/runtime 0.11.3 → 0.12.0

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.
@@ -7,9 +7,13 @@ var runtimeCore = require('@module-federation/runtime-core');
7
7
 
8
8
 
9
9
  exports.default = runtimeCore;
10
- Object.keys(runtimeCore).forEach(function (k) {
11
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
10
+ Object.prototype.hasOwnProperty.call(runtimeCore, '__proto__') &&
11
+ !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
12
+ Object.defineProperty(exports, '__proto__', {
12
13
  enumerable: true,
13
- get: function () { return runtimeCore[k]; }
14
+ value: runtimeCore['__proto__']
14
15
  });
16
+
17
+ Object.keys(runtimeCore).forEach(function (k) {
18
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = runtimeCore[k];
15
19
  });
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var polyfills = require('./polyfills.cjs.js');
3
+ var polyfills = require('./polyfills.cjs.cjs');
4
4
  var runtimeCore = require('@module-federation/runtime-core');
5
- var utils = require('./utils.cjs.js');
5
+ var utils = require('./utils.cjs.cjs');
6
6
 
7
7
  var helpers = {
8
8
  global: polyfills._extends({}, runtimeCore.helpers.global, {
@@ -1,6 +1,6 @@
1
- import { _ as _extends } from './polyfills.esm.mjs';
1
+ import { _ as _extends } from './polyfills.esm.js';
2
2
  import { helpers as helpers$1 } from '@module-federation/runtime-core';
3
- import { g as getGlobalFederationInstance } from './utils.esm.mjs';
3
+ import { g as getGlobalFederationInstance } from './utils.esm.js';
4
4
 
5
5
  var helpers = {
6
6
  global: _extends({}, helpers$1.global, {
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var runtimeCore = require('@module-federation/runtime-core');
4
- var utils = require('./utils.cjs.js');
4
+ var utils = require('./utils.cjs.cjs');
5
5
 
6
6
  let FederationInstance = null;
7
7
  function init(options) {
@@ -61,34 +61,13 @@ function getInstance() {
61
61
  // Inject for debug
62
62
  runtimeCore.setGlobalFederationConstructor(runtimeCore.FederationHost);
63
63
 
64
- Object.defineProperty(exports, "FederationHost", {
65
- enumerable: true,
66
- get: function () { return runtimeCore.FederationHost; }
67
- });
68
- Object.defineProperty(exports, "Module", {
69
- enumerable: true,
70
- get: function () { return runtimeCore.Module; }
71
- });
72
- Object.defineProperty(exports, "getRemoteEntry", {
73
- enumerable: true,
74
- get: function () { return runtimeCore.getRemoteEntry; }
75
- });
76
- Object.defineProperty(exports, "getRemoteInfo", {
77
- enumerable: true,
78
- get: function () { return runtimeCore.getRemoteInfo; }
79
- });
80
- Object.defineProperty(exports, "loadScript", {
81
- enumerable: true,
82
- get: function () { return runtimeCore.loadScript; }
83
- });
84
- Object.defineProperty(exports, "loadScriptNode", {
85
- enumerable: true,
86
- get: function () { return runtimeCore.loadScriptNode; }
87
- });
88
- Object.defineProperty(exports, "registerGlobalPlugins", {
89
- enumerable: true,
90
- get: function () { return runtimeCore.registerGlobalPlugins; }
91
- });
64
+ exports.FederationHost = runtimeCore.FederationHost;
65
+ exports.Module = runtimeCore.Module;
66
+ exports.getRemoteEntry = runtimeCore.getRemoteEntry;
67
+ exports.getRemoteInfo = runtimeCore.getRemoteInfo;
68
+ exports.loadScript = runtimeCore.loadScript;
69
+ exports.loadScriptNode = runtimeCore.loadScriptNode;
70
+ exports.registerGlobalPlugins = runtimeCore.registerGlobalPlugins;
92
71
  exports.getInstance = getInstance;
93
72
  exports.init = init;
94
73
  exports.loadRemote = loadRemote;
@@ -1,6 +1,6 @@
1
1
  import { setGlobalFederationConstructor, FederationHost, getGlobalFederationConstructor, setGlobalFederationInstance, assert } from '@module-federation/runtime-core';
2
2
  export { FederationHost, Module, getRemoteEntry, getRemoteInfo, loadScript, loadScriptNode, registerGlobalPlugins } from '@module-federation/runtime-core';
3
- import { g as getGlobalFederationInstance } from './utils.esm.mjs';
3
+ import { g as getGlobalFederationInstance } from './utils.esm.js';
4
4
 
5
5
  let FederationInstance = null;
6
6
  function init(options) {
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ var types = require('@module-federation/runtime-core/types');
4
+
5
+
6
+
7
+ Object.prototype.hasOwnProperty.call(types, '__proto__') &&
8
+ !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
9
+ Object.defineProperty(exports, '__proto__', {
10
+ enumerable: true,
11
+ value: types['__proto__']
12
+ });
13
+
14
+ Object.keys(types).forEach(function (k) {
15
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = types[k];
16
+ });
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@module-federation/runtime",
3
- "version": "0.11.3",
3
+ "version": "0.12.0",
4
+ "type": "module",
4
5
  "author": "zhouxiao <codingzx@gmail.com>",
5
- "main": "./dist/index.cjs.js",
6
- "module": "./dist/index.esm.mjs",
6
+ "main": "./dist/index.cjs.cjs",
7
+ "module": "./dist/index.esm.js",
7
8
  "types": "./dist/index.cjs.d.ts",
8
9
  "license": "MIT",
9
10
  "publishConfig": {
@@ -20,24 +21,44 @@
20
21
  ],
21
22
  "exports": {
22
23
  ".": {
23
- "types": "./dist/index.cjs.d.ts",
24
- "import": "./dist/index.esm.mjs",
25
- "require": "./dist/index.cjs.js"
24
+ "import": {
25
+ "types": "./dist/index.esm.d.ts",
26
+ "default": "./dist/index.esm.js"
27
+ },
28
+ "require": {
29
+ "types": "./dist/index.cjs.d.ts",
30
+ "default": "./dist/index.cjs.cjs"
31
+ }
26
32
  },
27
33
  "./helpers": {
28
- "types": "./dist/helpers.cjs.d.ts",
29
- "import": "./dist/helpers.esm.mjs",
30
- "require": "./dist/helpers.cjs.js"
34
+ "import": {
35
+ "types": "./dist/helpers.esm.d.ts",
36
+ "default": "./dist/helpers.esm.js"
37
+ },
38
+ "require": {
39
+ "types": "./dist/helpers.cjs.d.ts",
40
+ "default": "./dist/helpers.cjs.cjs"
41
+ }
31
42
  },
32
43
  "./types": {
33
- "types": "./dist/types.cjs.d.ts",
34
- "import": "./dist/types.esm.mjs",
35
- "require": "./dist/types.cjs.js"
44
+ "import": {
45
+ "types": "./dist/types.esm.d.ts",
46
+ "default": "./dist/types.esm.js"
47
+ },
48
+ "require": {
49
+ "types": "./dist/types.cjs.d.ts",
50
+ "default": "./dist/types.cjs.cjs"
51
+ }
36
52
  },
37
53
  "./core": {
38
- "types": "./dist/core.cjs.d.ts",
39
- "import": "./dist/core.esm.mjs",
40
- "require": "./dist/core.cjs.js"
54
+ "import": {
55
+ "types": "./dist/core.esm.d.ts",
56
+ "default": "./dist/core.esm.js"
57
+ },
58
+ "require": {
59
+ "types": "./dist/core.cjs.d.ts",
60
+ "default": "./dist/core.cjs.cjs"
61
+ }
41
62
  },
42
63
  "./*": "./*"
43
64
  },
@@ -58,8 +79,8 @@
58
79
  }
59
80
  },
60
81
  "dependencies": {
61
- "@module-federation/sdk": "0.11.3",
62
- "@module-federation/error-codes": "0.11.3",
63
- "@module-federation/runtime-core": "0.11.3"
82
+ "@module-federation/sdk": "0.12.0",
83
+ "@module-federation/runtime-core": "0.12.0",
84
+ "@module-federation/error-codes": "0.12.0"
64
85
  }
65
86
  }
package/dist/types.cjs.js DELETED
@@ -1,12 +0,0 @@
1
- 'use strict';
2
-
3
- var types = require('@module-federation/runtime-core/types');
4
-
5
-
6
-
7
- Object.keys(types).forEach(function (k) {
8
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
9
- enumerable: true,
10
- get: function () { return types[k]; }
11
- });
12
- });
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes