Skip to content

build: fix standalone release checks failing due to missing global ReleaseAction instance #24509

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .ng-dev/release.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
BuiltPackage,
ReleaseConfig,
ReleaseAction as _ReleaseAction,
FatalReleaseActionError,
} from '@angular/dev-infra-private/ng-dev';
import {SemVer} from 'semver';
Expand All @@ -11,7 +12,7 @@ import {join} from 'path';
// The `ng-dev` release tool exposes the `ReleaseAction` instance through `global`,
// allowing it to be monkey-patched for our release checks. This can be removed
// when the release tool has a public API for release checks.
const actionProto = (global as any).ReleaseAction.prototype;
const actionProto = ((global as any).ReleaseAction ?? _ReleaseAction).prototype;
const _origStageFn = actionProto.stageVersionForBranchAndCreatePullRequest;
const _origVerifyFn = actionProto._verifyPackageVersions;

Expand Down