From 24a92472bf06e5473ce4fe1d7566bd6a480a6992 Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Mon, 30 Mar 2020 10:33:37 -0700 Subject: [PATCH] ci: use dev-infra cli from local sources (#36326) Use dev-infra cli from local sources rather than loading from @angular/dev-infra-private builds. PR Close #36326 --- .circleci/config.yml | 2 +- dev-infra/commit-message/cli.ts | 5 +++-- dev-infra/ng-dev | 11 +++++++++++ package.json | 1 - yarn.lock | 4 ---- 5 files changed, 15 insertions(+), 8 deletions(-) create mode 100755 dev-infra/ng-dev diff --git a/.circleci/config.yml b/.circleci/config.yml index b6b5065b71..3b564587e1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -280,7 +280,7 @@ jobs: - run: yarn lint --branch $CI_GIT_BASE_REVISION - run: yarn ts-circular-deps:check - - run: yarn -s ng-dev pullapprove:verify + - run: yarn -s ng-dev pullapprove verify test: executor: diff --git a/dev-infra/commit-message/cli.ts b/dev-infra/commit-message/cli.ts index c4443396be..83bd1b8a66 100644 --- a/dev-infra/commit-message/cli.ts +++ b/dev-infra/commit-message/cli.ts @@ -11,8 +11,9 @@ import {validateFile} from './validate-file'; /** Build the parser for the commit-message commands. */ export function buildCommitMessageParser(localYargs: yargs.Argv) { return localYargs.help().strict().command( - 'pre-commit-validate', 'Validate the most recent commit message', {}, - () => { validateFile('.git/COMMIT_EDITMSG'); }); + 'pre-commit-validate', 'Validate the most recent commit message', {}, () => { + validateFile('.git/COMMIT_EDITMSG'); + }); } if (require.main == module) { diff --git a/dev-infra/ng-dev b/dev-infra/ng-dev new file mode 100755 index 0000000000..819654870a --- /dev/null +++ b/dev-infra/ng-dev @@ -0,0 +1,11 @@ +#!/usr/bin/env ts-node +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +// Loads the ng-dev cli, automatically executing it. +require('./cli.ts'); diff --git a/package.json b/package.json index c6f06d854d..820fe626f1 100644 --- a/package.json +++ b/package.json @@ -148,7 +148,6 @@ "// 2": "devDependencies are not used under Bazel. Many can be removed after test.sh is deleted.", "devDependencies": { "@angular/cli": "9.0.3", - "@angular/dev-infra-private": "angular/dev-infra-private-builds#3724a71", "@bazel/bazelisk": "^1.3.0", "@bazel/buildifier": "^0.29.0", "@bazel/ibazel": "^0.12.3", diff --git a/yarn.lock b/yarn.lock index f2cf823a84..4f7cb92181 100644 --- a/yarn.lock +++ b/yarn.lock @@ -153,10 +153,6 @@ universal-analytics "^0.4.20" uuid "^3.3.2" -"@angular/dev-infra-private@angular/dev-infra-private-builds#3724a71": - version "0.0.0" - resolved "https://codeload.github.com/angular/dev-infra-private-builds/tar.gz/3724a71047361d85f4131d990f00a5aecdbc3ddc" - "@babel/code-frame@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8"