diff --git a/.ng-dev/caretaker.ts b/.ng-dev/caretaker.ts index e9cc536d17a1..4c46bb37978d 100644 --- a/.ng-dev/caretaker.ts +++ b/.ng-dev/caretaker.ts @@ -1,4 +1,4 @@ -import {CaretakerConfig} from '@angular/dev-infra-private/ng-dev/caretaker/config'; +import {CaretakerConfig} from '@angular/dev-infra-private/ng-dev'; /** The configuration for `ng-dev caretaker` commands. */ export const caretaker: CaretakerConfig = { diff --git a/.ng-dev/commit-message.ts b/.ng-dev/commit-message.ts index 59fd200bfa64..0dc62f8c0b6c 100644 --- a/.ng-dev/commit-message.ts +++ b/.ng-dev/commit-message.ts @@ -1,4 +1,4 @@ -import {CommitMessageConfig} from '@angular/dev-infra-private/ng-dev/commit-message/config'; +import {CommitMessageConfig} from '@angular/dev-infra-private/ng-dev'; /** * The configuration for `ng-dev commit-message` commands. diff --git a/.ng-dev/format.ts b/.ng-dev/format.ts index 14bd51df0763..f3b3cbbfd971 100644 --- a/.ng-dev/format.ts +++ b/.ng-dev/format.ts @@ -1,4 +1,4 @@ -import {FormatConfig} from '@angular/dev-infra-private/ng-dev/format/config'; +import {FormatConfig} from '@angular/dev-infra-private/ng-dev'; /** * Configuration for the ng-dev format command. We currently only use the buildifier diff --git a/.ng-dev/github.ts b/.ng-dev/github.ts index b48fd6c7fa35..39c0203dd504 100644 --- a/.ng-dev/github.ts +++ b/.ng-dev/github.ts @@ -1,4 +1,4 @@ -import {GithubConfig} from '@angular/dev-infra-private/ng-dev/utils/config'; +import {GithubConfig} from '@angular/dev-infra-private/ng-dev'; /** * Github configuration for the ng-dev command. This repository is diff --git a/.ng-dev/pull-request.ts b/.ng-dev/pull-request.ts index 45006ba5035d..df8c1e74f483 100644 --- a/.ng-dev/pull-request.ts +++ b/.ng-dev/pull-request.ts @@ -1,4 +1,4 @@ -import {PullRequestConfig} from '@angular/dev-infra-private/ng-dev/pr/config'; +import {PullRequestConfig} from '@angular/dev-infra-private/ng-dev'; /** * Configuration for the pull request commands in `ng-dev`. This includes the diff --git a/.ng-dev/release.ts b/.ng-dev/release.ts index 038907f82acc..cd3993878860 100644 --- a/.ng-dev/release.ts +++ b/.ng-dev/release.ts @@ -1,12 +1,17 @@ -import {BuiltPackage, ReleaseConfig} from '@angular/dev-infra-private/ng-dev/release/config'; -import {ReleaseAction} from '@angular/dev-infra-private/ng-dev/release/publish/actions'; +import { + BuiltPackage, + ReleaseConfig, + FatalReleaseActionError, +} from '@angular/dev-infra-private/ng-dev'; import {SemVer} from 'semver'; import {assertValidNpmPackageOutput} from '../tools/release-checks/npm-package-output'; import {fork} from 'child_process'; import {join} from 'path'; -import {FatalReleaseActionError} from '@angular/dev-infra-private/ng-dev/release/publish/actions-error'; -const actionProto = ReleaseAction.prototype as any; +// 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 _origStageFn = actionProto.stageVersionForBranchAndCreatePullRequest; const _origVerifyFn = actionProto._verifyPackageVersions; diff --git a/scripts/build-packages-dist.ts b/scripts/build-packages-dist.ts index a473ccc92be1..da0b0b589080 100755 --- a/scripts/build-packages-dist.ts +++ b/scripts/build-packages-dist.ts @@ -8,7 +8,7 @@ import {execSync} from 'child_process'; import {join} from 'path'; -import {BuiltPackage} from '@angular/dev-infra-private/ng-dev/release/config'; +import {BuiltPackage} from '@angular/dev-infra-private/ng-dev'; import {chmod, cp, mkdir, rm, set, test} from 'shelljs'; // ShellJS should exit if a command fails. diff --git a/tools/release-checks/check-framework-peer-dependency.ts b/tools/release-checks/check-framework-peer-dependency.ts index 10b7ae599f34..9cf3823dabaa 100644 --- a/tools/release-checks/check-framework-peer-dependency.ts +++ b/tools/release-checks/check-framework-peer-dependency.ts @@ -1,5 +1,4 @@ -import {FatalReleaseActionError} from '@angular/dev-infra-private/ng-dev/release/publish/actions-error'; -import {error} from '@angular/dev-infra-private/ng-dev/utils/console'; +import {error, FatalReleaseActionError} from '@angular/dev-infra-private/ng-dev'; import {SemVer} from 'semver'; import {join} from 'path'; import {existsSync, readFileSync} from 'fs'; diff --git a/tools/release-checks/check-migration-collections.ts b/tools/release-checks/check-migration-collections.ts index 2c54c1675dff..45702f7b02f7 100644 --- a/tools/release-checks/check-migration-collections.ts +++ b/tools/release-checks/check-migration-collections.ts @@ -1,4 +1,4 @@ -import {error} from '@angular/dev-infra-private/ng-dev/utils/console'; +import {error} from '@angular/dev-infra-private/ng-dev'; import {dirname, join} from 'path'; import chalk from 'chalk'; import {releasePackages} from '../../.ng-dev/release'; diff --git a/tools/release-checks/npm-package-output/check-package.ts b/tools/release-checks/npm-package-output/check-package.ts index 67a50cc6761e..cc07807a7a70 100644 --- a/tools/release-checks/npm-package-output/check-package.ts +++ b/tools/release-checks/npm-package-output/check-package.ts @@ -1,4 +1,4 @@ -import {error} from '@angular/dev-infra-private/ng-dev/utils/console'; +import {error} from '@angular/dev-infra-private/ng-dev'; import chalk from 'chalk'; import {existsSync} from 'fs'; import {sync as glob} from 'glob'; diff --git a/tools/release-checks/npm-package-output/index.ts b/tools/release-checks/npm-package-output/index.ts index 524632640789..cef32ecb12c2 100644 --- a/tools/release-checks/npm-package-output/index.ts +++ b/tools/release-checks/npm-package-output/index.ts @@ -1,7 +1,6 @@ import {SemVer} from 'semver'; import {checkReleasePackage} from './check-package'; -import {BuiltPackage} from '@angular/dev-infra-private/ng-dev/release/config'; -import {error} from '@angular/dev-infra-private/ng-dev/utils/console'; +import {BuiltPackage, error} from '@angular/dev-infra-private/ng-dev'; import chalk from 'chalk'; /** Asserts that the given built packages are valid for public consumption. */