diff --git a/dev-infra/release/publish/actions/configure-next-as-major.ts b/dev-infra/release/publish/actions/configure-next-as-major.ts index b4ced15a52..09e993f916 100644 --- a/dev-infra/release/publish/actions/configure-next-as-major.ts +++ b/dev-infra/release/publish/actions/configure-next-as-major.ts @@ -44,7 +44,7 @@ export class ConfigureNextAsMajorAction extends ReleaseAction { info(yellow(` Please ask team members to review: ${pullRequest.url}.`)); } - static async isActive(active: ActiveReleaseTrains) { + static override async isActive(active: ActiveReleaseTrains) { // The `next` branch can always be switched to a major version, unless it already // is targeting a new major. A major can contain minor changes, so we can always // change the target from a minor to a major. diff --git a/dev-infra/release/publish/actions/cut-lts-patch.ts b/dev-infra/release/publish/actions/cut-lts-patch.ts index 8777ca8329..05dfda8597 100644 --- a/dev-infra/release/publish/actions/cut-lts-patch.ts +++ b/dev-infra/release/publish/actions/cut-lts-patch.ts @@ -74,7 +74,7 @@ export class CutLongTermSupportPatchAction extends ReleaseAction { return {name: `v${branch.version.major} (from ${branch.name})`, value: branch}; } - static async isActive(active: ActiveReleaseTrains) { + static override async isActive(active: ActiveReleaseTrains) { // LTS patch versions can be only cut if there are release trains in LTS phase. // This action is always selectable as we support publishing of old LTS branches, // and have prompt for selecting an LTS branch when the action performs. diff --git a/dev-infra/release/publish/actions/cut-new-patch.ts b/dev-infra/release/publish/actions/cut-new-patch.ts index 6498dc997c..32db9ccc50 100644 --- a/dev-infra/release/publish/actions/cut-new-patch.ts +++ b/dev-infra/release/publish/actions/cut-new-patch.ts @@ -36,7 +36,7 @@ export class CutNewPatchAction extends ReleaseAction { await this.cherryPickChangelogIntoNextBranch(releaseNotes, branchName); } - static async isActive(active: ActiveReleaseTrains) { + static override async isActive(active: ActiveReleaseTrains) { // Patch versions can be cut at any time. See: // https://hackmd.io/2Le8leq0S6G_R5VEVTNK9A#Release-prompt-options. return true; diff --git a/dev-infra/release/publish/actions/cut-next-prerelease.ts b/dev-infra/release/publish/actions/cut-next-prerelease.ts index 60c97dac11..d652172d82 100644 --- a/dev-infra/release/publish/actions/cut-next-prerelease.ts +++ b/dev-infra/release/publish/actions/cut-next-prerelease.ts @@ -64,7 +64,7 @@ export class CutNextPrereleaseAction extends ReleaseAction { } } - static async isActive() { + static override async isActive() { // Pre-releases for the `next` NPM dist tag can always be cut. Depending on whether // there is a feature-freeze/release-candidate branch, the next pre-releases are either // cut from such a branch, or from the actual `next` release-train branch (i.e. master). diff --git a/dev-infra/release/publish/actions/cut-release-candidate.ts b/dev-infra/release/publish/actions/cut-release-candidate.ts index 8f31bc3f3c..7a4b37cdd3 100644 --- a/dev-infra/release/publish/actions/cut-release-candidate.ts +++ b/dev-infra/release/publish/actions/cut-release-candidate.ts @@ -34,7 +34,7 @@ export class CutReleaseCandidateAction extends ReleaseAction { await this.cherryPickChangelogIntoNextBranch(releaseNotes, branchName); } - static async isActive(active: ActiveReleaseTrains) { + static override async isActive(active: ActiveReleaseTrains) { // A release-candidate can be cut for an active release-train currently // in the feature-freeze phase. return active.releaseCandidate !== null && diff --git a/dev-infra/release/publish/actions/cut-stable.ts b/dev-infra/release/publish/actions/cut-stable.ts index d6905f28b6..0d20ba28de 100644 --- a/dev-infra/release/publish/actions/cut-stable.ts +++ b/dev-infra/release/publish/actions/cut-stable.ts @@ -73,7 +73,7 @@ export class CutStableAction extends ReleaseAction { return semver.parse(`${version.major}.${version.minor}.${version.patch}`)!; } - static async isActive(active: ActiveReleaseTrains) { + static override async isActive(active: ActiveReleaseTrains) { // A stable version can be cut for an active release-train currently in the // release-candidate phase. Note: It is not possible to directly release from // feature-freeze phase into a stable version. diff --git a/dev-infra/release/publish/actions/move-next-into-feature-freeze.ts b/dev-infra/release/publish/actions/move-next-into-feature-freeze.ts index 02bd4badb3..5d2652b3b2 100644 --- a/dev-infra/release/publish/actions/move-next-into-feature-freeze.ts +++ b/dev-infra/release/publish/actions/move-next-into-feature-freeze.ts @@ -100,7 +100,7 @@ export class MoveNextIntoFeatureFreezeAction extends ReleaseAction { info(yellow(` Please ask team members to review: ${nextUpdatePullRequest.url}.`)); } - static async isActive(active: ActiveReleaseTrains) { + static override async isActive(active: ActiveReleaseTrains) { // A new feature-freeze/release-candidate branch can only be created if there // is no active release-train in feature-freeze/release-candidate phase. return active.releaseCandidate === null; diff --git a/dev-infra/release/publish/actions/tag-recent-major-as-latest.ts b/dev-infra/release/publish/actions/tag-recent-major-as-latest.ts index 742cd8170b..98db8206fa 100644 --- a/dev-infra/release/publish/actions/tag-recent-major-as-latest.ts +++ b/dev-infra/release/publish/actions/tag-recent-major-as-latest.ts @@ -35,7 +35,7 @@ export class TagRecentMajorAsLatest extends ReleaseAction { await invokeSetNpmDistCommand('latest', this.active.latest.version); } - static async isActive({latest}: ActiveReleaseTrains, config: ReleaseConfig) { + static override async isActive({latest}: ActiveReleaseTrains, config: ReleaseConfig) { // If the latest release-train does currently not have a major version as version. e.g. // the latest branch is `10.0.x` with the version being `10.0.2`. In such cases, a major // has not been released recently, and this action should never become active. diff --git a/dev-infra/release/publish/test/release-notes/release-notes-utils.ts b/dev-infra/release/publish/test/release-notes/release-notes-utils.ts index 49190cd796..1f7a4ad32d 100644 --- a/dev-infra/release/publish/test/release-notes/release-notes-utils.ts +++ b/dev-infra/release/publish/test/release-notes/release-notes-utils.ts @@ -16,23 +16,23 @@ import {ReleaseNotes} from '../../../notes/release-notes'; * returning versioned entry strings. */ class MockReleaseNotes extends ReleaseNotes { - static async fromRange(version: semver.SemVer, startingRef: string, endingRef: string) { + static override async fromRange(version: semver.SemVer, startingRef: string, endingRef: string) { return new MockReleaseNotes(version, startingRef, endingRef); } - async getChangelogEntry() { + override async getChangelogEntry() { return `Changelog Entry for ${this.version}`; } - async getGithubReleaseEntry() { + override async getGithubReleaseEntry() { return `Github Release Entry for ${this.version}`; } // Overrides of utility functions which call out to other tools and are unused in this mock. - protected async getCommitsInRange(from: string, to?: string) { + protected override async getCommitsInRange(from: string, to?: string) { return []; } - protected getReleaseConfig(config?: Partial) { + protected override getReleaseConfig(config?: Partial) { return {} as ReleaseConfig; } } diff --git a/dev-infra/utils/git/authenticated-git-client.ts b/dev-infra/utils/git/authenticated-git-client.ts index 24d5744cbe..7cc3987b32 100644 --- a/dev-infra/utils/git/authenticated-git-client.ts +++ b/dev-infra/utils/git/authenticated-git-client.ts @@ -31,19 +31,19 @@ export class AuthenticatedGitClient extends GitClient { private _cachedOauthScopes: Promise|null = null; /** Instance of an authenticated github client. */ - readonly github = new AuthenticatedGithubClient(this.githubToken); + override readonly github = new AuthenticatedGithubClient(this.githubToken); protected constructor(readonly githubToken: string, baseDir?: string, config?: NgDevConfig) { super(baseDir, config); } /** Sanitizes a given message by omitting the provided Github token if present. */ - sanitizeConsoleOutput(value: string): string { + override sanitizeConsoleOutput(value: string): string { return value.replace(this._githubTokenRegex, ''); } /** Git URL that resolves to the configured repository. */ - getRepoGitUrl() { + override getRepoGitUrl() { return getRepositoryGitUrl(this.remoteConfig, this.githubToken); } @@ -102,7 +102,7 @@ export class AuthenticatedGitClient extends GitClient { * Static method to get the singleton instance of the `AuthenticatedGitClient`, * creating it if it has not yet been created. */ - static get(): AuthenticatedGitClient { + static override get(): AuthenticatedGitClient { if (!AuthenticatedGitClient._authenticatedInstance) { throw new Error('No instance of `AuthenticatedGitClient` has been set up yet.'); } diff --git a/dev-infra/utils/testing/virtual-git-client.ts b/dev-infra/utils/testing/virtual-git-client.ts index b67fba69c3..ad8cbcc963 100644 --- a/dev-infra/utils/testing/virtual-git-client.ts +++ b/dev-infra/utils/testing/virtual-git-client.ts @@ -78,12 +78,12 @@ export class VirtualGitClient extends AuthenticatedGitClient { * Override the actual GitClient getLatestSemverTag, as an actual tag cannot be retrieved in * testing. */ - getLatestSemverTag() { + override getLatestSemverTag() { return new SemVer('0.0.0'); } /** Override for the actual Git client command execution. */ - runGraceful(args: string[], options: SpawnSyncOptions = {}): SpawnSyncReturns { + override runGraceful(args: string[], options: SpawnSyncOptions = {}): SpawnSyncReturns { const [command, ...rawArgs] = args; switch (command) { case 'push':