ci: components CI test should use local zone.js build (#45277)

CI components test install the angular package from the local
version, but still use the zone.js from npm, so this commit let
components also install zone.js from local too.

PR Close #45277
This commit is contained in:
JiaLiPassion
2022-03-05 21:06:03 +09:00
committed by Andrew Kushnir
parent 0bb55f8cb3
commit 886cfe82d0
2 changed files with 10 additions and 5 deletions
@@ -8,7 +8,7 @@
/*
* This script updates a package.json file by replacing all dependencies and devDependencies
* such that all packages from the @angular scope point to the packages-dist directory.
* such that all packages from the @angular scope and zone.js point to the packages-dist directory.
*
* Please be aware that updating of versions might introduce compatibility issues. For instance,
* if a peer dependency of Angular, e.g. "typescript" changes, the package.json that is updated
@@ -29,9 +29,11 @@ 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. 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') {
// We're only interested to update packages in the `@angular` scope and `zone.js`.
// 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 !== 'zone.js') ||
packageName === '@angular/dev-infra-private') {
continue;
}
@@ -51,7 +53,6 @@ function updateDeps(dependencies) {
}
}
// Update dependencies from @angular scope to those in the packages-dist folder
updateDeps(packageJson.dependencies);
updateDeps(packageJson.devDependencies);