@module-federation/runtime
Advanced tools
Comparing version 0.0.0-next-20231225073141 to 0.0.0-next-20231225094207
@@ -617,9 +617,10 @@ 'use strict'; | ||
from, | ||
shareConfig: { | ||
loading: null | ||
}, shareArgs, { | ||
shareConfig: _extends({ | ||
requiredVersion: `^${shareArgs.version}`, | ||
singleton: false, | ||
eager: false | ||
}, | ||
loading: null | ||
}, shareArgs, { | ||
eager: false, | ||
strictVersion: false | ||
}, shareArgs.shareConfig), | ||
get, | ||
@@ -727,5 +728,11 @@ loaded: 'lib' in shareArgs ? true : undefined, | ||
const defaultResolver = ()=>{ | ||
debugger; | ||
if (shareConfig.singleton) { | ||
if (typeof requiredVersion === 'string' && !satisfy(maxOrSingletonVersion, requiredVersion)) { | ||
warn(`Version ${maxOrSingletonVersion} from ${maxOrSingletonVersion && localShareScopeMap[sc][pkgName][maxOrSingletonVersion].from} of shared singleton module ${pkgName} does not satisfy the requirement of ${shareInfo.from} which needs ${requiredVersion})`); | ||
const msg = `Version ${maxOrSingletonVersion} from ${maxOrSingletonVersion && localShareScopeMap[sc][pkgName][maxOrSingletonVersion].from} of shared singleton module ${pkgName} does not satisfy the requirement of ${shareInfo.from} which needs ${requiredVersion})`; | ||
if (shareConfig.strictVersion) { | ||
error(msg); | ||
} else { | ||
warn(msg); | ||
} | ||
} | ||
@@ -732,0 +739,0 @@ return localShareScopeMap[sc][pkgName][maxOrSingletonVersion]; |
@@ -615,9 +615,10 @@ function getBuilderId() { | ||
from, | ||
shareConfig: { | ||
loading: null | ||
}, shareArgs, { | ||
shareConfig: _extends({ | ||
requiredVersion: `^${shareArgs.version}`, | ||
singleton: false, | ||
eager: false | ||
}, | ||
loading: null | ||
}, shareArgs, { | ||
eager: false, | ||
strictVersion: false | ||
}, shareArgs.shareConfig), | ||
get, | ||
@@ -725,5 +726,11 @@ loaded: 'lib' in shareArgs ? true : undefined, | ||
const defaultResolver = ()=>{ | ||
debugger; | ||
if (shareConfig.singleton) { | ||
if (typeof requiredVersion === 'string' && !satisfy(maxOrSingletonVersion, requiredVersion)) { | ||
warn(`Version ${maxOrSingletonVersion} from ${maxOrSingletonVersion && localShareScopeMap[sc][pkgName][maxOrSingletonVersion].from} of shared singleton module ${pkgName} does not satisfy the requirement of ${shareInfo.from} which needs ${requiredVersion})`); | ||
const msg = `Version ${maxOrSingletonVersion} from ${maxOrSingletonVersion && localShareScopeMap[sc][pkgName][maxOrSingletonVersion].from} of shared singleton module ${pkgName} does not satisfy the requirement of ${shareInfo.from} which needs ${requiredVersion})`; | ||
if (shareConfig.strictVersion) { | ||
error(msg); | ||
} else { | ||
warn(msg); | ||
} | ||
} | ||
@@ -730,0 +737,0 @@ return localShareScopeMap[sc][pkgName][maxOrSingletonVersion]; |
@@ -32,2 +32,3 @@ import type { RemoteWithEntry, RemoteWithVersion, Module, RemoteEntryType } from '@module-federation/sdk'; | ||
eager?: boolean; | ||
strictVersion?: boolean; | ||
} | ||
@@ -34,0 +35,0 @@ type SharedBaseArgs = { |
{ | ||
"name": "@module-federation/runtime", | ||
"version": "0.0.0-next-20231225073141", | ||
"version": "0.0.0-next-20231225094207", | ||
"author": "zhouxiao <codingzx@gmail.com>", | ||
@@ -48,4 +48,4 @@ "main": "./dist/index.cjs", | ||
"dependencies": { | ||
"@module-federation/sdk": "0.0.0-next-20231225073141" | ||
"@module-federation/sdk": "0.0.0-next-20231225094207" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
246640
5586
+ Added@module-federation/sdk@0.0.0-next-20231225094207(transitive)
- Removed@module-federation/sdk@0.0.0-next-20231225073141(transitive)