Skip to content

Commit ae65091

Browse files
author
Landis Huey
committed
changed name to exemptFromRushChange
1 parent b42ac89 commit ae65091

7 files changed

Lines changed: 16 additions & 13 deletions

File tree

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,13 @@
8080
"lockedMajor": 3,
8181

8282
/**
83-
* (Optional) If false, developers of the specified version policy will no longer
84-
* be prompted for changelog files during the rush change command.
83+
* (Optional) When publishing is managed by Rush, by default the "rush change" command will
84+
* request changes for any projects that are modified by a pull request. These change entries
85+
* will produce a CHANGELOG.md file. If you author your CHANGELOG.md manually or announce updates
86+
* in some other way, set "exemptFromRushChange" to true to tell "rush change" to ignore the projects
87+
* belonging to this version policy.
8588
*/
86-
"noChangeLogRequired": false
89+
"exemptFromRushChange": false
8790
}
8891
/*[END "DEMO"]*/
8992
]

‎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 _noChangeLogRequired: boolean;
55+
private _exemptFromRushChange: 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._noChangeLogRequired = versionPolicyJson.noChangeLogRequired || false;
84+
this._exemptFromRushChange = versionPolicyJson.exemptFromRushChange || 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 noChangeLogRequired(): boolean {
116-
return this._noChangeLogRequired;
115+
public get exemptFromRushChange(): boolean {
116+
return this._exemptFromRushChange;
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-
noChangeLogRequired?: boolean;
17+
exemptFromRushChange?: 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.noChangeLogRequired)
176+
.filter(project => !project.versionPolicy || !project.versionPolicy.exemptFromRushChange)
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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
"description": "The main project for this version policy",
8585
"type": "string"
8686
},
87-
"noChangeLogRequired": {
87+
"exemptFromRushChange": {
8888
"description": "If true, the version policy will not require changelog files.",
8989
"type": "boolean"
9090
}
@@ -110,7 +110,7 @@
110110
"description": "The locked major version",
111111
"type": "number"
112112
},
113-
"noChangeLogRequired": {
113+
"exemptFromRushChange": {
114114
"description": "If true, the version policy will not require changelog files.",
115115
"type": "boolean"
116116
}

‎common/changes/@microsoft/rush/master_2019-06-07-00-24.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"changes": [
33
{
4-
"comment": "[rush-lib] Add ability to opt out of changelog files for version policies.",
4+
"comment": "Add ability to opt out of changelog files for version policies.",
55
"packageName": "@microsoft/rush",
66
"type": "none"
77
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,14 +331,14 @@ export abstract class VersionPolicy {
331331
abstract bump(bumpType?: BumpType, identifier?: string): void;
332332
readonly definitionName: VersionPolicyDefinitionName;
333333
abstract ensure(project: IPackageJson, force?: boolean): IPackageJson | undefined;
334+
readonly exemptFromRushChange: boolean;
334335
readonly isLockstepped: boolean;
335336
// @internal
336337
abstract readonly _json: IVersionPolicyJson;
337338
// Warning: (ae-forgotten-export) The symbol "IVersionPolicyJson" needs to be exported by the entry point index.d.ts
338339
//
339340
// @internal
340341
static load(versionPolicyJson: IVersionPolicyJson): VersionPolicy | undefined;
341-
readonly noChangeLogRequired: boolean;
342342
readonly policyName: string;
343343
setDependenciesBeforeCommit(packageName: string, configuration: RushConfiguration): void;
344344
setDependenciesBeforePublish(packageName: string, configuration: RushConfiguration): void;

0 commit comments

Comments
 (0)