test(ngcc): build `zone.js` from source in `scripts/build-packages-dist.sh` (#33733)

In #33046, internal uses of `zone.js` were switched to reference it
directly from source (built with Bazel) instead of npm. As a result, the
necessary scripts were updated to build `zone.js` as necessary. However,
some `integration/**/debug-test.sh` scripts were missed (apparently
because they are not used on CI, but only locally as helpers for
debugging the integration projects).

This commit updates the `scripts/build-packages-dist.sh` script to also
build `zone.js`, so that other scripts (such as the various
`debug-test.sh` scripts) can use it.

PR Close #33733
This commit is contained in:
George Kalpakas 2019-11-11 17:11:34 +02:00 committed by Kara Erickson
parent f1b0547f0a
commit 74b7d1ace1
40 changed files with 58 additions and 40 deletions

View File

@ -509,6 +509,7 @@ jobs:
root: *workspace_location
paths:
- ng/dist/packages-dist
- ng/dist/zone.js-dist
# Save dependencies and bazel repository cache to use on subsequent runs.
- save_cache:

View File

@ -25,7 +25,7 @@
"@angular/router": "file:../../dist/packages-dist/router",
"rxjs": "file:../../node_modules/rxjs",
"tslib": "file:../../node_modules/tslib",
"zone.js": "file:../../dist/bin/packages/zone.js/npm_package"
"zone.js": "file:../../dist/zone.js-dist/zone.js"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.900.0-rc.0",

View File

@ -8435,5 +8435,5 @@ yn@^2.0.0:
resolved "https://registry.yarnpkg.com/yn/-/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a"
integrity sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=
"zone.js@file:../../node_modules/zone.js":
"zone.js@file:../../dist/zone.js-dist/zone.js":
version "0.10.2"

View File

@ -31,7 +31,7 @@
"rxjs": "file:../../node_modules/rxjs",
"serve": "^11.2.0",
"tslib": "file:../../node_modules/tslib",
"zone.js": "file:../../dist/bin/packages/zone.js/npm_package"
"zone.js": "file:../../dist/zone.js-dist/zone.js"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.900.0-rc.0",

View File

@ -8427,5 +8427,5 @@ yn@^3.0.0:
resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"
integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==
"zone.js@file:../../node_modules/zone.js":
"zone.js@file:../../dist/zone.js-dist/zone.js":
version "0.10.2"

View File

@ -25,7 +25,7 @@
"@angular/router": "file:../../dist/packages-dist/router",
"rxjs": "file:../../node_modules/rxjs",
"tslib": "file:../../node_modules/tslib",
"zone.js": "file:../../dist/bin/packages/zone.js/npm_package"
"zone.js": "file:../../dist/zone.js-dist/zone.js"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.900.0-rc.0",

View File

@ -8435,5 +8435,5 @@ yn@^2.0.0:
resolved "https://registry.yarnpkg.com/yn/-/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a"
integrity sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=
"zone.js@file:../../node_modules/zone.js":
"zone.js@file:../../dist/zone.js-dist/zone.js":
version "0.10.2"

View File

@ -20,7 +20,7 @@
"@angular/router": "file:../../dist/packages-dist/router",
"rxjs": "file:../../node_modules/rxjs",
"tslib": "^1.10.0",
"zone.js": "file:../../dist/bin/packages/zone.js/npm_package"
"zone.js": "file:../../dist/zone.js-dist/zone.js"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.900.0-rc.0",

View File

@ -7910,5 +7910,5 @@ yn@^3.0.0:
resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"
integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==
"zone.js@file:../../node_modules/zone.js":
"zone.js@file:../../dist/zone.js-dist/zone.js":
version "0.10.2"

View File

@ -20,7 +20,7 @@
"@angular/router": "file:../../dist/packages-dist/router",
"rxjs": "file:../../node_modules/rxjs",
"tslib": "^1.10.0",
"zone.js": "file:../../dist/bin/packages/zone.js/npm_package"
"zone.js": "file:../../dist/zone.js-dist/zone.js"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.900.0-rc.0",

View File

@ -7910,5 +7910,5 @@ yn@^3.0.0:
resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"
integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==
"zone.js@file:../../node_modules/zone.js":
"zone.js@file:../../dist/zone.js-dist/zone.js":
version "0.10.2"

View File

@ -23,7 +23,7 @@
"@angular/router": "file:../../dist/packages-dist/router",
"rxjs": "file:../../node_modules/rxjs",
"tslib": "file:../../node_modules/tslib",
"zone.js": "file:../../dist/bin/packages/zone.js/npm_package"
"zone.js": "file:../../dist/zone.js-dist/zone.js"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.900.0-rc.0",

View File

@ -10348,5 +10348,5 @@ yn@^2.0.0:
resolved "https://registry.yarnpkg.com/yn/-/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a"
integrity sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=
"zone.js@file:../../node_modules/zone.js":
"zone.js@file:../../dist/zone.js-dist/zone.js":
version "0.10.2"

View File

@ -41,6 +41,6 @@
"core-js": "file:../../node_modules/core-js",
"rxjs": "file:../../node_modules/rxjs",
"systemjs": "file:../../node_modules/systemjs",
"zone.js": "file:../../dist/bin/packages/zone.js/npm_package"
"zone.js": "file:../../dist/zone.js-dist/zone.js"
}
}

View File

@ -3648,5 +3648,5 @@ yeast@0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419"
"zone.js@file:../../node_modules/zone.js":
"zone.js@file:../../dist/zone.js-dist/zone.js":
version "0.10.2"

View File

@ -13,7 +13,7 @@
"google-closure-compiler": "20180716.0.0",
"rxjs": "file:../../node_modules/rxjs",
"typescript": "file:../../node_modules/typescript",
"zone.js": "file:../../dist/bin/packages/zone.js/npm_package"
"zone.js": "file:../../dist/zone.js-dist/zone.js"
},
"devDependencies": {
"@types/jasmine": "2.5.41",

View File

@ -4183,5 +4183,5 @@ yeast@0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419"
"zone.js@file:../../node_modules/zone.js":
"zone.js@file:../../dist/zone.js-dist/zone.js":
version "0.10.2"

View File

@ -21,7 +21,7 @@
"rxjs": "file:../../node_modules/rxjs",
"systemjs": "0.20.2",
"typescript": "file:../../node_modules/typescript",
"zone.js": "file:../../dist/bin/packages/zone.js/npm_package"
"zone.js": "file:../../dist/zone.js-dist/zone.js"
},
"devDependencies": {
"@types/jasmine": "2.5.41",

View File

@ -2404,5 +2404,5 @@ yeast@0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419"
"zone.js@file:../../node_modules/zone.js":
"zone.js@file:../../dist/zone.js-dist/zone.js":
version "0.10.2"

View File

@ -14,7 +14,7 @@
"google-closure-compiler": "git+https://github.com/alexeagle/closure-compiler.git#packagejson.dist",
"rxjs": "file:../../node_modules/rxjs",
"typescript": "file:../../node_modules/typescript",
"zone.js": "file:../../dist/bin/packages/zone.js/npm_package"
"zone.js": "file:../../dist/zone.js-dist/zone.js"
},
"devDependencies": {
"@types/jasmine": "2.5.41",

View File

@ -3595,5 +3595,5 @@ yeast@0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419"
"zone.js@file:../../node_modules/zone.js":
"zone.js@file:../../dist/zone.js-dist/zone.js":
version "0.10.2"

View File

@ -14,7 +14,7 @@
"@types/node": "file:../../node_modules/@types/node",
"rxjs": "file:../../node_modules/rxjs",
"typescript": "file:../../node_modules/typescript",
"zone.js": "file:../../dist/bin/packages/zone.js/npm_package"
"zone.js": "file:../../dist/zone.js-dist/zone.js"
},
"devDependencies": {
"@types/jasmine": "2.5.41",

View File

@ -3506,5 +3506,5 @@ yeast@0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419"
"zone.js@file:../../node_modules/zone.js":
"zone.js@file:../../dist/zone.js-dist/zone.js":
version "0.10.2"

View File

@ -45,7 +45,7 @@
"rxjs": "file:../../node_modules/rxjs",
"serve": "^11.2.0",
"tslib": "file:../../node_modules/tslib",
"zone.js": "file:../../dist/bin/packages/zone.js/npm_package"
"zone.js": "file:../../dist/zone.js-dist/zone.js"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.900.0-rc.0",

View File

@ -8427,5 +8427,5 @@ yn@^3.0.0:
resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"
integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==
"zone.js@file:../../node_modules/zone.js":
"zone.js@file:../../dist/zone.js-dist/zone.js":
version "0.10.2"

View File

@ -14,7 +14,7 @@
"google-closure-compiler": "20180319.0.0",
"rxjs": "file:../../node_modules/rxjs",
"typescript": "file:../../node_modules/typescript",
"zone.js": "file:../../dist/bin/packages/zone.js/npm_package"
"zone.js": "file:../../dist/zone.js-dist/zone.js"
},
"devDependencies": {
"@types/jasmine": "2.5.41",

View File

@ -3595,5 +3595,5 @@ yeast@0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419"
"zone.js@file:../../node_modules/zone.js":
"zone.js@file:../../dist/zone.js-dist/zone.js":
version "0.10.2"

View File

@ -24,6 +24,6 @@
"@angular/upgrade": "file:../../dist/packages-dist/upgrade",
"rxjs": "file:../../node_modules/rxjs",
"typescript": "file:../../node_modules/typescript",
"zone.js": "file:../../dist/bin/packages/zone.js/npm_package"
"zone.js": "file:../../dist/zone.js-dist/zone.js"
}
}

View File

@ -1578,5 +1578,5 @@ yargs@13.1.0:
y18n "^4.0.0"
yargs-parser "^13.0.0"
"zone.js@file:../../node_modules/zone.js":
"zone.js@file:../../dist/zone.js-dist/zone.js":
version "0.10.2"

View File

@ -21,7 +21,7 @@
"@angular/router": "file:../../dist/packages-dist/router",
"rxjs": "file:../../node_modules/rxjs",
"tslib": "file:../../node_modules/tslib",
"zone.js": "file:../../dist/bin/packages/zone.js/npm_package"
"zone.js": "file:../../dist/zone.js-dist/zone.js"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.900.0-rc.0",

View File

@ -7700,5 +7700,5 @@ yeast@0.1.2:
resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419"
integrity sha1-AI4G2AlDIMNy28L47XagymyKxBk=
"zone.js@file:../../node_modules/zone.js":
"zone.js@file:../../dist/zone.js-dist/zone.js":
version "0.10.2"

View File

@ -17,7 +17,7 @@
"@types/node": "file:../../node_modules/@types/node",
"rxjs": "file:../../node_modules/rxjs",
"typescript": "file:../../node_modules/typescript",
"zone.js": "file:../../dist/bin/packages/zone.js/npm_package"
"zone.js": "file:../../dist/zone.js-dist/zone.js"
},
"devDependencies": {
"@types/jasmine": "2.5.41",

View File

@ -3594,5 +3594,5 @@ yeast@0.1.2:
resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419"
integrity sha1-AI4G2AlDIMNy28L47XagymyKxBk=
"zone.js@file:../../node_modules/zone.js":
"zone.js@file:../../dist/zone.js-dist/zone.js":
version "0.10.2"

View File

@ -19,7 +19,7 @@
"express": "^4.14.1",
"rxjs": "file:../../node_modules/rxjs",
"typescript": "file:../../node_modules/typescript",
"zone.js": "file:../../dist/bin/packages/zone.js/npm_package"
"zone.js": "file:../../dist/zone.js-dist/zone.js"
},
"devDependencies": {
"@types/jasmine": "2.5.41",

View File

@ -4384,5 +4384,5 @@ yargs@~3.10.0:
decamelize "^1.0.0"
window-size "0.1.0"
"zone.js@file:../../node_modules/zone.js":
"zone.js@file:../../dist/zone.js-dist/zone.js":
version "0.10.2"

View File

@ -36,9 +36,6 @@ else
TEST_DIRS=$(ls | grep -v node_modules)
fi
# We need to build zone.js npm package because it is not built in build-packages-dist.sh
${bazel_bin} build //packages/zone.js:npm_package
# Workaround https://github.com/yarnpkg/yarn/issues/2165
# Yarn will cache file://dist URIs and not update Angular code
readonly cache=.yarn_local_cache

View File

@ -11,6 +11,6 @@
"@angular/core": "file:../../dist/packages-dist/core",
"@angular/service-worker": "file:../../dist/packages-dist/service-worker",
"rxjs": "file:../../node_modules/rxjs",
"zone.js": "file:../../dist/bin/packages/zone.js/npm_package"
"zone.js": "file:../../dist/zone.js-dist/zone.js"
}
}

View File

@ -11,6 +11,6 @@
"@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli",
"rxjs": "file:../../node_modules/rxjs",
"terser": "3.17.0",
"zone.js": "file:../../dist/bin/packages/zone.js/npm_package"
"zone.js": "file:../../dist/zone.js-dist/zone.js"
}
}

View File

@ -22,7 +22,7 @@
"@types/jasmine": "2.5.41",
"rxjs": "file:../../node_modules/rxjs",
"typescript": "3.6.4",
"zone.js": "file:../../dist/bin/packages/zone.js/npm_package"
"zone.js": "file:../../dist/zone.js-dist/zone.js"
},
"scripts": {
"test": "tsc"

View File

@ -4,3 +4,23 @@ source $(dirname $0)/package-builder.sh
# Build the legacy (view engine) npm packages into dist/packages-dist
buildTargetPackages "dist/packages-dist" "legacy" "Production"
# Build the `zone.js` npm package (into `dist/bin/packages/zone.js/npm_package/`), because it might be needed
# by other scripts/tests.
#
# NOTE: The `zone.js` package is not built as part of `buildTargetPackages()` above, nor is it
# copied into the `dist/packages-dist/` directory (despite its source's being in `packages/`),
# because it is not published to npm under the `@angular` scope (as happens for the rest of
# the packages).
echo "# Building zone.js npm package..."
yarn --silent bazel build //packages/zone.js:npm_package
# Copy artifacts to `dist/zone.js-dist/`, so they can be easier persisted on CI.
readonly buildOutputDir="$base_dir/dist/bin/packages/zone.js/npm_package"
readonly distTargetDir="$base_dir/dist/zone.js-dist/zone.js"
echo "# Copying artifacts to '$distTargetDir'..."
mkdir -p $distTargetDir
rm -rf $distTargetDir
cp -R $buildOutputDir $distTargetDir
chmod -R u+w $distTargetDir