Skip to content

Commit 67458ed

Browse files
committed
Rename "parallelized" to "enableParallelism" everywhere
1 parent 0a8de7f commit 67458ed

5 files changed

Lines changed: 18 additions & 18 deletions

File tree

apps/rush-lib/src/cli/actions/CustomCommandFactory.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class CustomCommandFactory {
4040
parser: parser,
4141
commandLineConfiguration: commandLineConfiguration,
4242

43-
parallelized: true,
43+
enableParallelism: true,
4444
ignoreMissingScript: false
4545
}));
4646

@@ -52,7 +52,7 @@ export class CustomCommandFactory {
5252
parser: parser,
5353
commandLineConfiguration: commandLineConfiguration,
5454

55-
parallelized: true,
55+
enableParallelism: true,
5656
ignoreMissingScript: false
5757
}));
5858

@@ -73,7 +73,7 @@ export class CustomCommandFactory {
7373
parser: parser,
7474
commandLineConfiguration: commandLineConfiguration,
7575

76-
parallelized: command.parallelized,
76+
enableParallelism: command.enableParallelism,
7777
ignoreMissingScript: command.ignoreMissingScript || false
7878
}));
7979
break;

apps/rush-lib/src/cli/actions/CustomRushAction.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ import { ParameterJson } from '../../data/CommandLineJson';
2626
import { RushConstants } from '../../RushConstants';
2727

2828
export interface ICustomRushActionOptions extends IRushCommandLineActionOptions {
29-
parallelized: boolean;
29+
enableParallelism: boolean;
3030
ignoreMissingScript: boolean;
3131
commandLineConfiguration: CommandLineConfiguration;
3232
}
3333

3434
export class CustomRushAction extends BaseRushAction {
35-
private _parallelized: boolean;
35+
private _enableParallelism: boolean;
3636
private _ignoreMissingScript: boolean;
3737
private _commandLineConfiguration: CommandLineConfiguration;
3838

@@ -49,7 +49,7 @@ export class CustomRushAction extends BaseRushAction {
4949
options: ICustomRushActionOptions
5050
) {
5151
super(options);
52-
this._parallelized = options.parallelized;
52+
this._enableParallelism = options.enableParallelism;
5353
this._ignoreMissingScript = options.ignoreMissingScript;
5454
this._commandLineConfiguration = options.commandLineConfiguration;
5555
}
@@ -66,8 +66,8 @@ export class CustomRushAction extends BaseRushAction {
6666
const isQuietMode: boolean = !(this._verboseParameter.value);
6767

6868
// if this is parallizable, then use the value from the flag (undefined or a number),
69-
// if this is not parallelized, then use 1 core
70-
const parallelism: string | undefined = this._isParallelized()
69+
// if parallelism is not enabled, then restrict to 1 core
70+
const parallelism: string | undefined = this._isParallelismEnabled()
7171
? this._parallelismParameter!.value
7272
: '1';
7373

@@ -113,7 +113,7 @@ export class CustomRushAction extends BaseRushAction {
113113
}
114114

115115
protected onDefineParameters(): void {
116-
if (this._isParallelized()) {
116+
if (this._isParallelismEnabled()) {
117117
this._parallelismParameter = this.defineStringParameter({
118118
parameterLongName: '--parallelism',
119119
parameterShortName: '-p',
@@ -209,10 +209,10 @@ export class CustomRushAction extends BaseRushAction {
209209
return projects;
210210
}
211211

212-
private _isParallelized(): boolean {
212+
private _isParallelismEnabled(): boolean {
213213
return this.actionName === 'build'
214214
|| this.actionName === 'rebuild'
215-
|| this._parallelized;
215+
|| this._enableParallelism;
216216
}
217217

218218
private _doBeforeTask(): void {

apps/rush-lib/src/cli/actions/test/repo/common/config/rush/command-line.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"commandKind": "bulk",
66
"summary": "Imports translated strings into each project.",
77
"description": "Requests translated strings from the translation service and imports them into each project.",
8-
"parallelized": true
8+
"enableParallelism": true
99
},
1010
{
1111
"name": "deploy",

apps/rush-lib/src/data/CommandLineJson.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export interface IBaseCommandJson {
1616
*/
1717
export interface IBulkCommandJson extends IBaseCommandJson {
1818
commandKind: 'bulk';
19-
parallelized: boolean;
19+
enableParallelism: boolean;
2020
ignoreMissingScript?: boolean;
2121
}
2222

apps/rush-lib/src/schemas/command-line.schema.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@
5353
{
5454
"type": "object",
5555
"additionalProperties": true,
56-
"required": [ "parallelized" ],
56+
"required": [ "enableParallelism" ],
5757
"properties": {
5858
"commandKind": {
5959
"enum": [ "bulk" ]
6060
},
61-
"parallelized": {
62-
"title": "Parallelized",
63-
"description": "Describes whether or not this command can be run in parallel (i.e. executed simultaneously for multiple projects).",
61+
"enableParallelism": {
62+
"title": "enableParallelism",
63+
"description": "If true then this command can be run in parallel, i.e. executed simultaneously for multiple projects.",
6464
"type": "boolean"
6565
},
6666
"ignoreMissingScript": {
@@ -79,7 +79,7 @@
7979
"summary": { "$ref": "#/definitions/anything" },
8080
"description": { "$ref": "#/definitions/anything" },
8181

82-
"parallelized": { "$ref": "#/definitions/anything" },
82+
"enableParallelism": { "$ref": "#/definitions/anything" },
8383
"ignoreMissingScript": { "$ref": "#/definitions/anything" }
8484
}
8585
}

0 commit comments

Comments
 (0)