From 7c353d452ec79e3bd3a796995b3555fe91b1199a Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Sun, 18 Apr 2021 12:46:57 +0300 Subject: [PATCH] refactor(dev-infra): remove unused argument from `publish` script (#41688) Since recently, the `githubToken` parameter passed to the `ReleaseTool` constructor is no longer used. This commit removes the unused parameter and also the corresponding argument from the `publish` script. PR Close #41688 --- dev-infra/ng-dev.js | 7 +++---- dev-infra/release/publish/cli.ts | 4 ++-- dev-infra/release/publish/index.ts | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/dev-infra/ng-dev.js b/dev-infra/ng-dev.js index 2f99989ca8..692a5300fe 100755 --- a/dev-infra/ng-dev.js +++ b/dev-infra/ng-dev.js @@ -6619,10 +6619,9 @@ var CompletionState; CompletionState[CompletionState["MANUALLY_ABORTED"] = 2] = "MANUALLY_ABORTED"; })(CompletionState || (CompletionState = {})); class ReleaseTool { - constructor(_config, _github, _githubToken, _projectRoot) { + constructor(_config, _github, _projectRoot) { this._config = _config; this._github = _github; - this._githubToken = _githubToken; this._projectRoot = _projectRoot; /** The singleton instance of the GitClient. */ this._git = GitClient.getAuthenticatedInstance(); @@ -6782,13 +6781,13 @@ function builder$8(argv) { return addGithubTokenOption(argv); } /** Yargs command handler for staging a release. */ -function handler$8(args) { +function handler$8() { return tslib.__awaiter(this, void 0, void 0, function* () { const git = GitClient.getInstance(); const config = getConfig(); const releaseConfig = getReleaseConfig(config); const projectDir = git.baseDir; - const task = new ReleaseTool(releaseConfig, config.github, args.githubToken, projectDir); + const task = new ReleaseTool(releaseConfig, config.github, projectDir); const result = yield task.run(); switch (result) { case CompletionState.FATAL_ERROR: diff --git a/dev-infra/release/publish/cli.ts b/dev-infra/release/publish/cli.ts index b156a065be..3d1af58459 100644 --- a/dev-infra/release/publish/cli.ts +++ b/dev-infra/release/publish/cli.ts @@ -27,12 +27,12 @@ function builder(argv: Argv): Argv { } /** Yargs command handler for staging a release. */ -async function handler(args: Arguments) { +async function handler() { const git = GitClient.getInstance(); const config = getConfig(); const releaseConfig = getReleaseConfig(config); const projectDir = git.baseDir; - const task = new ReleaseTool(releaseConfig, config.github, args.githubToken, projectDir); + const task = new ReleaseTool(releaseConfig, config.github, projectDir); const result = await task.run(); switch (result) { diff --git a/dev-infra/release/publish/index.ts b/dev-infra/release/publish/index.ts index 63b46b75ae..2f6e14552e 100644 --- a/dev-infra/release/publish/index.ts +++ b/dev-infra/release/publish/index.ts @@ -35,7 +35,7 @@ export class ReleaseTool { constructor( protected _config: ReleaseConfig, protected _github: GithubConfig, - protected _githubToken: string, protected _projectRoot: string) {} + protected _projectRoot: string) {} /** Runs the interactive release tool. */ async run(): Promise {