Skip to content

Commit 53c196a

Browse files
committed
refactor: remove unnecessary comments and license headers from test files
1 parent f8a7e2b commit 53c196a

6 files changed

Lines changed: 9 additions & 25 deletions

File tree

‎src/commands/executor.ts‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,12 +1534,6 @@ function isCommandOptionSpecified(option: any): boolean {
15341534

15351535
function getSdk(accessKey: string, headers: Headers, customServerUrl: string): AccountManager {
15361536
const sdk: any = new AccountManager(accessKey, CLI_HEADERS, customServerUrl);
1537-
/*
1538-
* If the server returns `Unauthorized`, it must be due to an invalid
1539-
* (or expired) access key. For convenience, we patch every SDK call
1540-
* to delete the cached connection so the user can simply
1541-
* login again instead of having to log out first.
1542-
*/
15431537
Object.getOwnPropertyNames(AccountManager.prototype).forEach((functionName: any) => {
15441538
if (typeof sdk[functionName] === "function") {
15451539
const originalFunction = sdk[functionName];

‎src/commands/parser.ts‎

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ function addCommonConfiguration(yargs: yargs.Argv): void {
118118
yargs
119119
.wrap(null)
120120
.string("_") // Interpret non-hyphenated arguments as strings (e.g. an app version of '1.10').
121-
.fail((msg: string) => showHelp()); // Suppress the default error message.
121+
.fail((msg: string) => showHelp());
122122
}
123123

124124
function appList(commandName: string, yargs: yargs.Argv): void {
@@ -291,7 +291,7 @@ yargs
291291
.command("rm", "Remove an existing access key", (yargs: yargs.Argv) => accessKeyRemove("rm", yargs))
292292
.command("list", "List the access keys associated with your account", (yargs: yargs.Argv) => accessKeyList("list", yargs))
293293
.command("ls", "List the access keys associated with your account", (yargs: yargs.Argv) => accessKeyList("ls", yargs))
294-
.check((argv: any, aliases: { [aliases: string]: string }): any => isValidCommand); // Report unrecognized, non-hyphenated command category.
294+
.check((argv: any, aliases: { [aliases: string]: string }): any => isValidCommand);
295295

296296
addCommonConfiguration(yargs);
297297
})
@@ -330,7 +330,7 @@ yargs
330330

331331
addCommonConfiguration(yargs);
332332
})
333-
.check((argv: any, aliases: { [aliases: string]: string }): any => isValidCommand); // Report unrecognized, non-hyphenated command category.
333+
.check((argv: any, aliases: { [aliases: string]: string }): any => isValidCommand);
334334

335335
addCommonConfiguration(yargs);
336336
})
@@ -351,7 +351,7 @@ yargs
351351
.command("rm", "Remove a collaborator from an app", (yargs: yargs.Argv) => removeCollaborator("rm", yargs))
352352
.command("list", "List the collaborators for an app", (yargs: yargs.Argv) => listCollaborators("list", yargs))
353353
.command("ls", "List the collaborators for an app", (yargs: yargs.Argv) => listCollaborators("ls", yargs))
354-
.check((argv: any, aliases: { [aliases: string]: string }): any => isValidCommand); // Report unrecognized, non-hyphenated command category.
354+
.check((argv: any, aliases: { [aliases: string]: string }): any => isValidCommand);
355355

356356
addCommonConfiguration(yargs);
357357
})
@@ -406,7 +406,7 @@ yargs
406406
.command("ls", "List the deployments associated with an app", (yargs: yargs.Argv) => deploymentList("ls", yargs))
407407
.command("history", "Display the release history for a deployment", (yargs: yargs.Argv) => deploymentHistory("history", yargs))
408408
.command("h", "Display the release history for a deployment", (yargs: yargs.Argv) => deploymentHistory("h", yargs))
409-
.check((argv: any, aliases: { [aliases: string]: string }): any => isValidCommand); // Report unrecognized, non-hyphenated command category.
409+
.check((argv: any, aliases: { [aliases: string]: string }): any => isValidCommand);
410410

411411
addCommonConfiguration(yargs);
412412
})
@@ -425,7 +425,7 @@ yargs
425425
"Access key to authenticate against the CodePush server with, instead of providing your username and password credentials",
426426
type: "string",
427427
})
428-
.check((argv: any, aliases: { [aliases: string]: string }): any => isValidCommand); // Report unrecognized, non-hyphenated command category.
428+
.check((argv: any, aliases: { [aliases: string]: string }): any => isValidCommand);
429429

430430
addCommonConfiguration(yargs);
431431
})
@@ -575,7 +575,7 @@ yargs
575575
.usage(USAGE_PREFIX + " register")
576576
.demand(0, 1)
577577
.example("register", "Registers a new CodePush account")
578-
.check((argv: any, aliases: { [aliases: string]: string }): any => isValidCommand); // Report unrecognized, non-hyphenated command category.
578+
.check((argv: any, aliases: { [aliases: string]: string }): any => isValidCommand);
579579

580580
addCommonConfiguration(yargs);
581581
})
@@ -861,7 +861,7 @@ yargs
861861
sessionList("list", yargs)
862862
)
863863
.command("ls", "List the current login sessions associated with your account", (yargs: yargs.Argv) => sessionList("ls", yargs))
864-
.check((argv: any, aliases: { [aliases: string]: string }): any => isValidCommand); // Report unrecognized, non-hyphenated command category.
864+
.check((argv: any, aliases: { [aliases: string]: string }): any => isValidCommand);
865865

866866
addCommonConfiguration(yargs);
867867
})
@@ -876,7 +876,7 @@ yargs
876876
.alias("v", "version")
877877
.version(packageJson.version)
878878
.wrap(null)
879-
.fail(() => showHelp(true)).argv; // Suppress the default error message.
879+
.fail(() => showHelp(true)).argv;
880880

881881
export function createCommand(): cli.ICommand {
882882
let cmd: cli.ICommand;
@@ -1136,7 +1136,6 @@ export function createCommand(): cli.ICommand {
11361136
patchCommand.appName = arg1;
11371137
patchCommand.deploymentName = arg2;
11381138
patchCommand.label = argv["label"] as any;
1139-
// Description must be set to null to indicate that it is not being patched.
11401139
patchCommand.description = argv["description"] ? unescapeDescription(argv["description"] as string) : null;
11411140
patchCommand.disabled = argv["disabled"] as any;
11421141
patchCommand.mandatory = argv["mandatory"] as any;
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +0,0 @@
1-
// Copyright (c) Microsoft Corporation.
2-
// Licensed under the MIT License.
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +0,0 @@
1-
// Copyright (c) Microsoft Corporation.
2-
// Licensed under the MIT License.
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +0,0 @@
1-
// Copyright (c) Microsoft Corporation.
2-
// Licensed under the MIT License.

‎tests/helpers/superagent-mock-config.js‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Copyright (c) Microsoft Corporation.
2-
// Licensed under the MIT License.
3-
41
// ./superagent-mock-config.js file
52
module.exports = [
63
{

0 commit comments

Comments
 (0)