Skip to content

Commit 3c419dc

Browse files
committed
Update names of async functions to end with 'Async.'
1 parent d291fd8 commit 3c419dc

File tree

113 files changed

+927
-544
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+927
-544
lines changed

apps/api-documenter/src/start.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ console.log(
1919

2020
const parser: ApiDocumenterCommandLine = new ApiDocumenterCommandLine();
2121

22-
parser.execute().catch(console.error); // CommandLineParser.execute() should never reject the promise
22+
parser.executeAsync().catch(console.error); // CommandLineParser.executeAsync() should never reject the promise

apps/api-extractor/src/start.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ console.log(
1616

1717
const parser: ApiExtractorCommandLine = new ApiExtractorCommandLine();
1818

19-
parser.execute().catch((error) => {
19+
parser.executeAsync().catch((error) => {
2020
console.error(Colorize.red(`An unexpected error occurred: ${error}`));
2121
process.exit(1);
2222
});

apps/heft/src/cli/HeftCommandLineParser.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export class HeftCommandLineParser extends CommandLineParser {
9595
this._metricsCollector = new MetricsCollector();
9696
}
9797

98-
public async execute(args?: string[]): Promise<boolean> {
98+
public async executeAsync(args?: string[]): Promise<boolean> {
9999
// Defensively set the exit code to 1 so if the tool crashes for whatever reason,
100100
// we'll have a nonzero exit code.
101101
process.exitCode = 1;
@@ -166,9 +166,9 @@ export class HeftCommandLineParser extends CommandLineParser {
166166
this.addAction(aliasAction);
167167
}
168168

169-
return await super.execute(args);
169+
return await super.executeAsync(args);
170170
} catch (e) {
171-
await this._reportErrorAndSetExitCode(e as Error);
171+
await this._reportErrorAndSetExitCodeAsync(e as Error);
172172
return false;
173173
}
174174
}
@@ -195,7 +195,7 @@ export class HeftCommandLineParser extends CommandLineParser {
195195
};
196196
await super.onExecute();
197197
} catch (e) {
198-
await this._reportErrorAndSetExitCode(e as Error);
198+
await this._reportErrorAndSetExitCodeAsync(e as Error);
199199
}
200200

201201
// If we make it here, things are fine and reset the exit code back to 0
@@ -235,7 +235,7 @@ export class HeftCommandLineParser extends CommandLineParser {
235235
};
236236
}
237237

238-
private async _reportErrorAndSetExitCode(error: Error): Promise<void> {
238+
private async _reportErrorAndSetExitCodeAsync(error: Error): Promise<void> {
239239
if (!(error instanceof AlreadyReportedError)) {
240240
this.globalTerminal.writeErrorLine(error.toString());
241241
}

apps/heft/src/plugins/NodeServicePlugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export default class NodeServicePlugin implements IHeftTaskPlugin {
120120
);
121121
}
122122

123-
private async _loadStageConfiguration(
123+
private async _loadStageConfigurationAsync(
124124
taskSession: IHeftTaskSession,
125125
heftConfiguration: HeftConfiguration
126126
): Promise<void> {
@@ -187,7 +187,7 @@ export default class NodeServicePlugin implements IHeftTaskPlugin {
187187
taskSession: IHeftTaskSession,
188188
heftConfiguration: HeftConfiguration
189189
): Promise<void> {
190-
await this._loadStageConfiguration(taskSession, heftConfiguration);
190+
await this._loadStageConfigurationAsync(taskSession, heftConfiguration);
191191
if (!this._pluginEnabled) {
192192
return;
193193
}

apps/heft/src/start.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { HeftCommandLineParser } from './cli/HeftCommandLineParser';
88
const parser: HeftCommandLineParser = new HeftCommandLineParser();
99

1010
parser
11-
.execute()
11+
.executeAsync()
1212
.then(() => {
1313
// This should be removed when the issue with aria not tearing down
1414
process.exit(process.exitCode === undefined ? 0 : process.exitCode);

apps/rundown/src/start.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ console.log(`Rundown ${toolVersion} - https://rushstack.io`);
1212
console.log();
1313

1414
const commandLine: RundownCommandLine = new RundownCommandLine();
15-
commandLine.execute().catch((error) => {
15+
commandLine.executeAsync().catch((error) => {
1616
console.error(error);
1717
});

apps/trace-import/src/start.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ console.log(Colorize.bold(`trace-import ${toolVersion}`) + ' - ' + Colorize.cyan
1313
console.log();
1414

1515
const commandLine: TraceImportCommandLineParser = new TraceImportCommandLineParser();
16-
commandLine.execute().catch((error) => {
16+
commandLine.executeAsync().catch((error) => {
1717
console.error(error);
1818
});

build-tests/rush-redis-cobuild-plugin-integration-test/src/runRush.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ async function rushRush(args: string[]): Promise<void> {
3636
// eslint-disable-next-line no-console
3737
console.log(`Executing: rush ${args.join(' ')}`);
3838
await parser
39-
.execute(args)
39+
.executeAsync(args)
4040
// eslint-disable-next-line no-console
41-
.catch(console.error); // CommandLineParser.execute() should never reject the promise
41+
.catch(console.error); // CommandLineParser.executeAsync() should never reject the promise
4242
}
4343

4444
// eslint-disable-next-line no-console

build-tests/ts-command-line-test/src/BusinessLogic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// See LICENSE in the project root for license information.
33

44
export class BusinessLogic {
5-
public static async doTheWork(force: boolean, protocol: string): Promise<void> {
5+
public static async doTheWorkAsync(force: boolean, protocol: string): Promise<void> {
66
console.log(`Received parameters: force=${force}, protocol="${protocol}"`);
77
console.log(`Business logic did the work.`);
88
}

build-tests/ts-command-line-test/src/PushAction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export class PushAction extends CommandLineAction {
2424

2525
protected onExecute(): Promise<void> {
2626
// abstract
27-
return BusinessLogic.doTheWork(this._force.value, this._protocol.value);
27+
return BusinessLogic.doTheWorkAsync(this._force.value, this._protocol.value);
2828
}
2929

3030
protected onDefineParameters(): void {

0 commit comments

Comments
 (0)