strictVersion defaults to false for singleton modules

This commit is contained in:
Tobias Koppers 2020-05-27 15:16:44 +02:00
parent 6f5d229661
commit 4b61de7b14
9 changed files with 9 additions and 9 deletions

View File

@ -58,7 +58,7 @@ export interface SharedConfig {
*/
singleton?: boolean;
/**
* Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available, otherwise no, has no effect if there is not valid version specified).
* Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).
*/
strictVersion?: boolean;
/**

View File

@ -274,7 +274,7 @@ export interface SharedConfig {
*/
singleton?: boolean;
/**
* Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available, otherwise no, has no effect if there is not valid version specified).
* Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).
*/
strictVersion?: boolean;
/**

View File

@ -68,7 +68,7 @@ export interface ConsumesConfig {
*/
singleton?: boolean;
/**
* Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available, otherwise no, has no effect if there is not valid version specified).
* Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).
*/
strictVersion?: boolean;
}

View File

@ -68,7 +68,7 @@ export interface SharedConfig {
*/
singleton?: boolean;
/**
* Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available, otherwise no, has no effect if there is not valid version specified).
* Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).
*/
strictVersion?: boolean;
/**

View File

@ -77,7 +77,7 @@ class ConsumeSharedPlugin {
item.requiredVersion &&
(typeof item.strictVersion === "boolean"
? item.strictVersion
: item.import !== false),
: item.import !== false && !item.singleton),
singleton: !!item.singleton,
eager: !!item.eager
})

View File

@ -70,7 +70,7 @@
"type": "boolean"
},
"strictVersion": {
"description": "Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available, otherwise no, has no effect if there is not valid version specified).",
"description": "Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).",
"type": "boolean"
},
"version": {

View File

@ -390,7 +390,7 @@
"type": "boolean"
},
"strictVersion": {
"description": "Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available, otherwise no, has no effect if there is not valid version specified).",
"description": "Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).",
"type": "boolean"
},
"version": {

View File

@ -70,7 +70,7 @@
"type": "boolean"
},
"strictVersion": {
"description": "Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available, otherwise no, has no effect if there is not valid version specified).",
"description": "Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).",
"type": "boolean"
}
}

View File

@ -70,7 +70,7 @@
"type": "boolean"
},
"strictVersion": {
"description": "Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available, otherwise no, has no effect if there is not valid version specified).",
"description": "Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).",
"type": "boolean"
},
"version": {