8000 [rush] Fix ensureConsistentVersions in common-versions (#5089) · OlliMartin/rushstack@8833ee1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8833ee1

Browse files
authored
[rush] Fix ensureConsistentVersions in common-versions (microsoft#5089)
Co-authored-by: David Michon <dmichon-msft@users.noreply.github.com>
1 parent 52d951e commit 8833ee1

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@microsoft/rush",
5+
"comment": "Fix support for \"ensureConsistentVersions\" in common-versions.json when subspaces features is not enabled.",
6+
"type": "none"
7+
}
8+
],
9+
"packageName": "@microsoft/rush"
10+
}

libraries/rush-lib/src/api/Subspace.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -326,16 +326,14 @@ export class Subspace {
326326
* @beta
327327
*/
328328
public shouldEnsureConsistentVersions(variant?: string): boolean {
329-
// If the subspaces feature is enabled, or the ensureConsistentVersions field is defined, return the value of the field
330-
if (this._rushConfiguration.subspacesFeatureEnabled) {
331-
const commonVersions: CommonVersionsConfiguration = this.getCommonVersions(variant);
332-
if (commonVersions.ensureConsistentVersions !== undefined) {
333-
return commonVersions.ensureConsistentVersions;
334-
}
329+
// If the ensureConsistentVersions field is defined, return the value of the field
330+
const commonVersions: CommonVersionsConfiguration = this.getCommonVersions(variant);
331+
if (commonVersions.ensureConsistentVersions !== undefined) {
332+
return commonVersions.ensureConsistentVersions;
335333
}
336334

337-
// Fallback to ensureConsistentVersions in rush.json if subspaces is not enabled,
338-
// or if the setting is not defined in the common-versions.json file
335+
// Fallback to ensureConsistentVersions in rush.json if the setting is not defined in
336+
// the common-versions.json file
339337
return this._rushConfiguration.ensureConsistentVersions;
340338
}
341339

0 commit comments

Comments
 (0)
0