From 57865b352ac958d2baec86abbc28b4d76d91dff9 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Mon, 24 May 2021 17:07:07 +0200 Subject: [PATCH] ci: do not update shared dev-infra package in components-repo-unit-tests job (#42268) The shared dev-infra package from `HEAD` should not be installed when running the `components-repo-unit-tests` job. This is done because otherwise changes to the dev-infra package can result in build setup issues for the CI job (while the goal of the CI job is to test the framework) PR Close #42268 --- .circleci/config.yml | 4 ++-- docs/DEBUG_COMPONENTS_REPO_IVY.md | 2 +- ...packages.js => update-framework-deps-to-dist-packages.js} | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) rename scripts/ci/{update-deps-to-dist-packages.js => update-framework-deps-to-dist-packages.js} (89%) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8986ca1c02..b9ad76e0c1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -737,8 +737,8 @@ jobs: - run: # Updates the `angular/components` `package.json` file to refer to the release output # inside the `packages-dist` directory. - name: Setting up release packages. - command: node scripts/ci/update-deps-to-dist-packages.js ${COMPONENTS_REPO_TMP_DIR}/package.json dist/packages-dist/ + name: Setting up framework release packages. + command: node scripts/ci/update-framework-deps-to-dist-packages.js ${COMPONENTS_REPO_TMP_DIR}/package.json dist/packages-dist/ - run: # Run `yarn install` again to install the Angular packages from `packages-dist/` and update the lockfile. # NOTE: We cannot rely on Bazel to run `yarn install`, because it uses the `--frozen-lockfile` flag and fails. diff --git a/docs/DEBUG_COMPONENTS_REPO_IVY.md b/docs/DEBUG_COMPONENTS_REPO_IVY.md index 16bed8268f..ddad1a598d 100644 --- a/docs/DEBUG_COMPONENTS_REPO_IVY.md +++ b/docs/DEBUG_COMPONENTS_REPO_IVY.md @@ -13,7 +13,7 @@ the `angular/angular` repo. command in the `angular/angular` repo: ```bash -node ./scripts/ci/update-deps-to-dist-packages.js {COMPONENTS_REPO}/package.json ./dist/packages-dist +node ./scripts/ci/update-framework-deps-to-dist-packages.js {COMPONENTS_REPO}/package.json ./dist/packages-dist ``` 4\) Switch into the `angular/components` repository and run the tests by using the diff --git a/scripts/ci/update-deps-to-dist-packages.js b/scripts/ci/update-framework-deps-to-dist-packages.js similarity index 89% rename from scripts/ci/update-deps-to-dist-packages.js rename to scripts/ci/update-framework-deps-to-dist-packages.js index 022bf8ab7b..6f96714d8b 100644 --- a/scripts/ci/update-deps-to-dist-packages.js +++ b/scripts/ci/update-framework-deps-to-dist-packages.js @@ -29,8 +29,9 @@ const updated = []; const skipped = []; function updateDeps(dependencies) { for (const packageName of Object.keys(dependencies)) { - // We're only interested to update packages in the @angular scope - if (!packageName.startsWith('@angular/')) { + // We're only interested to update packages in the `@angular` scope. The shared dev-infra + // package is not updated as it's not a package that is part of the Angular framework. + if (!packageName.startsWith('@angular/') || packageName === '@angular/dev-infra-private') { continue; }