@module-federation/runtime 0.1.9 → 0.1.10
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/README.md +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/package.json +1 -1
- package/dist/share.cjs.js +19 -1
- package/dist/share.esm.js +19 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -10,4 +10,4 @@ See [https://module-federation.io/guide/basic/runtime.html](https://module-feder
|
|
|
10
10
|
|
|
11
11
|
## License
|
|
12
12
|
|
|
13
|
-
`@module-federation/runtime` is [MIT licensed](https://github.com/module-federation/
|
|
13
|
+
`@module-federation/runtime` is [MIT licensed](https://github.com/module-federation/core/blob/main/packages/runtime/LICENSE).
|
package/dist/index.cjs.js
CHANGED
|
@@ -1699,7 +1699,7 @@ class FederationHost {
|
|
|
1699
1699
|
// not used yet
|
|
1700
1700
|
afterPreloadRemote: new AsyncHook()
|
|
1701
1701
|
});
|
|
1702
|
-
this.version = "0.1.
|
|
1702
|
+
this.version = "0.1.10";
|
|
1703
1703
|
this.moduleCache = new Map();
|
|
1704
1704
|
this.loaderHook = new PluginSystem({
|
|
1705
1705
|
// FIXME: may not be suitable , not open to the public yet
|
package/dist/index.esm.js
CHANGED
|
@@ -1697,7 +1697,7 @@ class FederationHost {
|
|
|
1697
1697
|
// not used yet
|
|
1698
1698
|
afterPreloadRemote: new AsyncHook()
|
|
1699
1699
|
});
|
|
1700
|
-
this.version = "0.1.
|
|
1700
|
+
this.version = "0.1.10";
|
|
1701
1701
|
this.moduleCache = new Map();
|
|
1702
1702
|
this.loaderHook = new PluginSystem({
|
|
1703
1703
|
// FIXME: may not be suitable , not open to the public yet
|
package/dist/package.json
CHANGED
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.
|
|
193
|
+
globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.1.10";
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
@@ -293,7 +293,15 @@ const setPreloaded = (id)=>globalThis.__FEDERATION__.__PRELOADED_MAP__.set(id, t
|
|
|
293
293
|
const DEFAULT_SCOPE = 'default';
|
|
294
294
|
const DEFAULT_REMOTE_TYPE = 'global';
|
|
295
295
|
|
|
296
|
+
// fork from https://github.com/originjs/vite-plugin-federation/blob/v1.1.12/packages/lib/src/utils/semver/index.ts
|
|
296
297
|
// those constants are based on https://www.rubydoc.info/gems/semantic_range/3.0.0/SemanticRange#BUILDIDENTIFIER-constant
|
|
298
|
+
// Copyright (c)
|
|
299
|
+
// vite-plugin-federation is licensed under Mulan PSL v2.
|
|
300
|
+
// You can use this software according to the terms and conditions of the Mulan PSL v2.
|
|
301
|
+
// You may obtain a copy of Mulan PSL v2 at:
|
|
302
|
+
// http://license.coscl.org.cn/MulanPSL2
|
|
303
|
+
// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
|
304
|
+
// See the Mulan PSL v2 for more details.
|
|
297
305
|
const buildIdentifier = '[0-9A-Za-z-]+';
|
|
298
306
|
const build = `(?:\\+(${buildIdentifier}(?:\\.${buildIdentifier})*))`;
|
|
299
307
|
const numericIdentifier = '0|[1-9]\\d*';
|
|
@@ -324,6 +332,7 @@ const comparator = `^${gtlt}\\s*(${fullPlain})$|^$`;
|
|
|
324
332
|
// copy from semver package
|
|
325
333
|
const gte0 = '^\\s*>=\\s*0.0.0\\s*$';
|
|
326
334
|
|
|
335
|
+
// fork from https://github.com/originjs/vite-plugin-federation/blob/v1.1.12/packages/lib/src/utils/semver/index.ts
|
|
327
336
|
function parseRegex(source) {
|
|
328
337
|
return new RegExp(source);
|
|
329
338
|
}
|
|
@@ -344,6 +353,7 @@ function combineVersion(major, minor, patch, preRelease) {
|
|
|
344
353
|
return mainVersion;
|
|
345
354
|
}
|
|
346
355
|
|
|
356
|
+
// fork from https://github.com/originjs/vite-plugin-federation/blob/v1.1.12/packages/lib/src/utils/semver/index.ts
|
|
347
357
|
function parseHyphen(range) {
|
|
348
358
|
return range.replace(parseRegex(hyphenRange), (_range, from, fromMajor, fromMinor, fromPatch, _fromPreRelease, _fromBuild, to, toMajor, toMinor, toPatch, toPreRelease)=>{
|
|
349
359
|
if (isXVersion(fromMajor)) {
|
|
@@ -490,6 +500,14 @@ function parseGTE0(comparatorString) {
|
|
|
490
500
|
return comparatorString.trim().replace(parseRegex(gte0), '');
|
|
491
501
|
}
|
|
492
502
|
|
|
503
|
+
// fork from https://github.com/originjs/vite-plugin-federation/blob/v1.1.12/packages/lib/src/utils/semver/index.ts
|
|
504
|
+
// Copyright (c)
|
|
505
|
+
// vite-plugin-federation is licensed under Mulan PSL v2.
|
|
506
|
+
// You can use this software according to the terms and conditions of the Mulan PSL v2.
|
|
507
|
+
// You may obtain a copy of Mulan PSL v2 at:
|
|
508
|
+
// http://license.coscl.org.cn/MulanPSL2
|
|
509
|
+
// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
|
510
|
+
// See the Mulan PSL v2 for more details.
|
|
493
511
|
function compareAtom(rangeAtom, versionAtom) {
|
|
494
512
|
rangeAtom = Number(rangeAtom) || rangeAtom;
|
|
495
513
|
versionAtom = Number(versionAtom) || versionAtom;
|
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.
|
|
191
|
+
globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.1.10";
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
@@ -291,7 +291,15 @@ const setPreloaded = (id)=>globalThis.__FEDERATION__.__PRELOADED_MAP__.set(id, t
|
|
|
291
291
|
const DEFAULT_SCOPE = 'default';
|
|
292
292
|
const DEFAULT_REMOTE_TYPE = 'global';
|
|
293
293
|
|
|
294
|
+
// fork from https://github.com/originjs/vite-plugin-federation/blob/v1.1.12/packages/lib/src/utils/semver/index.ts
|
|
294
295
|
// those constants are based on https://www.rubydoc.info/gems/semantic_range/3.0.0/SemanticRange#BUILDIDENTIFIER-constant
|
|
296
|
+
// Copyright (c)
|
|
297
|
+
// vite-plugin-federation is licensed under Mulan PSL v2.
|
|
298
|
+
// You can use this software according to the terms and conditions of the Mulan PSL v2.
|
|
299
|
+
// You may obtain a copy of Mulan PSL v2 at:
|
|
300
|
+
// http://license.coscl.org.cn/MulanPSL2
|
|
301
|
+
// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
|
302
|
+
// See the Mulan PSL v2 for more details.
|
|
295
303
|
const buildIdentifier = '[0-9A-Za-z-]+';
|
|
296
304
|
const build = `(?:\\+(${buildIdentifier}(?:\\.${buildIdentifier})*))`;
|
|
297
305
|
const numericIdentifier = '0|[1-9]\\d*';
|
|
@@ -322,6 +330,7 @@ const comparator = `^${gtlt}\\s*(${fullPlain})$|^$`;
|
|
|
322
330
|
// copy from semver package
|
|
323
331
|
const gte0 = '^\\s*>=\\s*0.0.0\\s*$';
|
|
324
332
|
|
|
333
|
+
// fork from https://github.com/originjs/vite-plugin-federation/blob/v1.1.12/packages/lib/src/utils/semver/index.ts
|
|
325
334
|
function parseRegex(source) {
|
|
326
335
|
return new RegExp(source);
|
|
327
336
|
}
|
|
@@ -342,6 +351,7 @@ function combineVersion(major, minor, patch, preRelease) {
|
|
|
342
351
|
return mainVersion;
|
|
343
352
|
}
|
|
344
353
|
|
|
354
|
+
// fork from https://github.com/originjs/vite-plugin-federation/blob/v1.1.12/packages/lib/src/utils/semver/index.ts
|
|
345
355
|
function parseHyphen(range) {
|
|
346
356
|
return range.replace(parseRegex(hyphenRange), (_range, from, fromMajor, fromMinor, fromPatch, _fromPreRelease, _fromBuild, to, toMajor, toMinor, toPatch, toPreRelease)=>{
|
|
347
357
|
if (isXVersion(fromMajor)) {
|
|
@@ -488,6 +498,14 @@ function parseGTE0(comparatorString) {
|
|
|
488
498
|
return comparatorString.trim().replace(parseRegex(gte0), '');
|
|
489
499
|
}
|
|
490
500
|
|
|
501
|
+
// fork from https://github.com/originjs/vite-plugin-federation/blob/v1.1.12/packages/lib/src/utils/semver/index.ts
|
|
502
|
+
// Copyright (c)
|
|
503
|
+
// vite-plugin-federation is licensed under Mulan PSL v2.
|
|
504
|
+
// You can use this software according to the terms and conditions of the Mulan PSL v2.
|
|
505
|
+
// You may obtain a copy of Mulan PSL v2 at:
|
|
506
|
+
// http://license.coscl.org.cn/MulanPSL2
|
|
507
|
+
// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
|
508
|
+
// See the Mulan PSL v2 for more details.
|
|
491
509
|
function compareAtom(rangeAtom, versionAtom) {
|
|
492
510
|
rangeAtom = Number(rangeAtom) || rangeAtom;
|
|
493
511
|
versionAtom = Number(versionAtom) || versionAtom;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/runtime",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
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.
|
|
48
|
+
"@module-federation/sdk": "0.1.10"
|
|
49
49
|
}
|
|
50
50
|
}
|