Skip to content

Commit b42ac89

Browse files
author
Landis Huey
committed
address feedback about naming/shortcuts
1 parent 50fd16a commit b42ac89

6 files changed

Lines changed: 18 additions & 12 deletions

File tree

‎apps/rush-lib/assets/rush-init/common/config/rush/version-policies.json‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,13 @@
7777
* inappropriately. The minor/patch version parts will be bumped independently according
7878
* to the types of changes made to each project, according to the "rush change" command.
7979
*/
80-
"lockedMajor": 3
80+
"lockedMajor": 3,
81+
82+
/**
83+
* (Optional) If false, developers of the specified version policy will no longer
84+
* be prompted for changelog files during the rush change command.
85+
*/
86+
"noChangeLogRequired": false
8187
}
8288
/*[END "DEMO"]*/
8389
]

‎apps/rush-lib/src/api/VersionPolicy.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export enum VersionPolicyDefinitionName {
5252
export abstract class VersionPolicy {
5353
private _policyName: string;
5454
private _definitionName: VersionPolicyDefinitionName;
55-
private _shouldSkipChangelogVerification: boolean;
55+
private _noChangeLogRequired: boolean;
5656
private _versionFormatForCommit: VersionFormatForCommit;
5757
private _versionFormatForPublish: VersionFormatForPublish;
5858

@@ -81,7 +81,7 @@ export abstract class VersionPolicy {
8181
constructor(versionPolicyJson: IVersionPolicyJson) {
8282
this._policyName = versionPolicyJson.policyName;
8383
this._definitionName = VersionPolicyDefinitionName[versionPolicyJson.definitionName];
84-
this._shouldSkipChangelogVerification = versionPolicyJson.shouldSkipChangelogVerification || false;
84+
this._noChangeLogRequired = versionPolicyJson.noChangeLogRequired || false;
8585

8686
const jsonDependencies: IVersionPolicyDependencyJson = versionPolicyJson.dependencies || { };
8787
this._versionFormatForCommit = jsonDependencies.versionFormatForCommit || VersionFormatForCommit.original;
@@ -112,8 +112,8 @@ export abstract class VersionPolicy {
112112
/**
113113
* Determines if a version policy wants to opt out of changelog files.
114114
*/
115-
public get shouldSkipChangelogVerification(): boolean {
116-
return this._shouldSkipChangelogVerification;
115+
public get noChangeLogRequired(): boolean {
116+
return this._noChangeLogRequired;
117117
}
118118

119119
/**

‎apps/rush-lib/src/api/VersionPolicyConfiguration.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export interface IVersionPolicyJson {
1414
policyName: string;
1515
definitionName: string;
1616
dependencies?: IVersionPolicyDependencyJson;
17-
shouldSkipChangelogVerification?: boolean;
17+
noChangeLogRequired?: boolean;
1818
}
1919

2020
/**

‎apps/rush-lib/src/cli/actions/ChangeAction.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export class ChangeAction extends BaseRushAction {
173173

174174
this.rushConfiguration.projects
175175
.filter(project => project.shouldPublish)
176-
.filter(project => project.versionPolicy ? !project.versionPolicy.shouldSkipChangelogVerification : true)
176+
.filter(project => !project.versionPolicy || !project.versionPolicy.noChangeLogRequired)
177177
.filter(project => this._hasProjectChanged(changedFolders, project))
178178
.forEach(project => {
179179
const hostName: string | undefined = this._projectHostMap.get(project.packageName);

‎apps/rush-lib/src/schemas/version-policies.schema.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,13 @@
8484
"description": "The main project for this version policy",
8585
"type": "string"
8686
},
87-
"shouldSkipChangelogVerification": {
87+
"noChangeLogRequired": {
8888
"description": "If true, the version policy will not require changelog files.",
8989
"type": "boolean"
9090
}
9191
},
9292
"required": ["policyName", "definitionName", "version", "nextBump"],
93-
"additionalProperties": true
93+
"additionalProperties": false
9494
},
9595

9696
"individualVersion": {
@@ -110,13 +110,13 @@
110110
"description": "The locked major version",
111111
"type": "number"
112112
},
113-
"shouldSkipChangelogVerification": {
113+
"noChangeLogRequired": {
114114
"description": "If true, the version policy will not require changelog files.",
115115
"type": "boolean"
116116
}
117117
},
118118
"required": ["policyName", "definitionName"],
119-
"additionalProperties": true
119+
"additionalProperties": false
120120
}
121121
}
122122
}

‎common/reviews/api/rush-lib.api.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,10 +338,10 @@ export abstract class VersionPolicy {
338338
//
339339
// @internal
340340
static load(versionPolicyJson: IVersionPolicyJson): VersionPolicy | undefined;
341+
readonly noChangeLogRequired: boolean;
341342
readonly policyName: string;
342343
setDependenciesBeforeCommit(packageName: string, configuration: RushConfiguration): void;
343344
setDependenciesBeforePublish(packageName: string, configuration: RushConfiguration): void;
344-
readonly shouldSkipChangelogVerification: boolean;
345345
abstract validate(versionString: string, packageName: string): void;
346346
}
347347

0 commit comments

Comments
 (0)