From 8c6fb17d2973acebdc4ded5feecbf87c29721aec Mon Sep 17 00:00:00 2001 From: JiaLiPassion Date: Sun, 6 Oct 2019 12:06:53 +0900 Subject: [PATCH] build: reference zone.js from source directly instead of npm. (#33046) Close #32482 PR Close #33046 --- .circleci/config.yml | 1 + BUILD.bazel | 6 +++--- .../cli-hello-world-ivy-compat/package.json | 2 +- .../cli-hello-world-ivy-i18n/package.json | 2 +- .../cli-hello-world-ivy-minimal/package.json | 2 +- .../cli-hello-world-lazy-rollup/package.json | 2 +- integration/cli-hello-world-lazy/package.json | 2 +- integration/cli-hello-world/package.json | 2 +- integration/dynamic-compiler/package.json | 2 +- integration/hello_world__closure/package.json | 2 +- .../hello_world__systemjs_umd/package.json | 2 +- integration/i18n/package.json | 2 +- integration/injectable-def/package.json | 2 +- integration/ivy-i18n/package.json | 3 +-- integration/ng_elements/package.json | 2 +- integration/ng_update/package.json | 2 +- integration/ng_update_migrations/package.json | 2 +- integration/ngcc/package.json | 2 +- integration/platform-server/package.json | 2 +- integration/platform-server/src/server.ts | 2 +- integration/run_tests.sh | 4 ++++ .../service-worker-schema/package.json | 2 +- integration/terser/package.json | 2 +- integration/typings_test_ts36/package.json | 2 +- karma-js.conf.js | 6 +++--- .../benchmarks/src/class_bindings/BUILD.bazel | 2 +- .../benchmarks/src/expanding_rows/BUILD.bazel | 4 ++-- .../benchmarks/src/largeform/ng2/BUILD.bazel | 2 +- .../benchmarks/src/largetable/ng2/BUILD.bazel | 2 +- .../src/largetable/ng2_switch/BUILD.bazel | 2 +- modules/benchmarks/src/tree/ng2/BUILD.bazel | 2 +- .../src/tree/ng2_static/BUILD.bazel | 2 +- .../src/tree/ng2_switch/BUILD.bazel | 2 +- modules/benchmarks/src/views/BUILD.bazel | 6 ++++-- modules/benchmarks/src/views/index.html | 2 +- modules/playground/src/animate/BUILD.bazel | 2 +- modules/playground/src/async/BUILD.bazel | 2 +- modules/playground/src/gestures/BUILD.bazel | 2 +- .../playground/src/hello_world/BUILD.bazel | 2 +- modules/playground/src/http/BUILD.bazel | 2 +- modules/playground/src/jsonp/BUILD.bazel | 2 +- modules/playground/src/key_events/BUILD.bazel | 2 +- .../src/model_driven_forms/BUILD.bazel | 2 +- .../src/order_management/BUILD.bazel | 2 +- .../src/person_management/BUILD.bazel | 2 +- .../src/relative_assets/BUILD.bazel | 2 +- modules/playground/src/routing/BUILD.bazel | 7 +++++-- modules/playground/src/routing/index.html | 12 ++++++----- modules/playground/src/sourcemap/BUILD.bazel | 2 +- modules/playground/src/svg/BUILD.bazel | 2 +- .../src/template_driven_forms/BUILD.bazel | 2 +- modules/playground/src/todo/BUILD.bazel | 2 +- modules/playground/src/upgrade/BUILD.bazel | 2 +- .../playground/src/web_workers/BUILD.bazel | 2 +- .../src/web_workers/animations/BUILD.bazel | 2 +- .../src/web_workers/images/BUILD.bazel | 2 +- .../src/web_workers/input/BUILD.bazel | 4 ++-- .../src/web_workers/kitchen_sink/BUILD.bazel | 4 ++-- .../web_workers/message_broker/BUILD.bazel | 4 ++-- .../src/web_workers/router/BUILD.bazel | 4 ++-- .../src/web_workers/todo/BUILD.bazel | 4 ++-- .../src/web_workers/worker-configure.js | 4 ++-- .../src/zippy_component/BUILD.bazel | 2 +- package.json | 3 +-- packages/BUILD.bazel | 2 +- .../compiler-cli/integrationtest/BUILD.bazel | 9 ++++++++- .../compiler-cli/integrationtest/test/init.ts | 10 ++++------ .../integrationtest/test_helpers.js | 2 +- packages/compiler-cli/tsconfig-build.json | 3 +-- packages/core/BUILD.bazel | 2 +- packages/core/test/BUILD.bazel | 4 ++-- packages/core/test/acceptance/BUILD.bazel | 4 ++-- packages/core/test/render3/BUILD.bazel | 4 ++-- packages/core/test/render3/ivy/BUILD.bazel | 1 + packages/core/test/render3/load_domino.ts | 5 ++--- packages/core/testing/BUILD.bazel | 2 +- packages/elements/test/BUILD.bazel | 4 ++-- packages/examples/common/BUILD.bazel | 2 +- packages/examples/core/BUILD.bazel | 4 ++-- packages/examples/forms/BUILD.bazel | 2 +- .../router/activated-route/BUILD.bazel | 2 +- .../examples/service-worker/push/BUILD.bazel | 2 +- .../registration-options/BUILD.bazel | 2 +- packages/examples/upgrade/upgrade_example.bzl | 2 +- packages/platform-browser/BUILD.bazel | 2 +- packages/platform-server/BUILD.bazel | 2 +- packages/router/karma.conf.js | 4 ++-- packages/tsconfig.json | 4 ++-- packages/types.d.ts | 1 - packages/upgrade/BUILD.bazel | 2 +- packages/zone.js/BUILD.bazel | 2 +- packages/zone.js/dist/BUILD.bazel | 6 +++--- packages/zone.js/lib/BUILD.bazel | 20 +++++++++++++++---- packages/zone.js/lib/common/promise.ts | 2 +- tools/cjs-jasmine/index-tools.ts | 16 +++++++-------- tools/cjs-jasmine/index.ts | 16 +++++++-------- tools/defaults.bzl | 1 + tools/testing/BUILD.bazel | 1 + tools/testing/init_node_spec.ts | 16 +++++++-------- yarn.lock | 5 ----- 100 files changed, 181 insertions(+), 159 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 382aa270d7..037fd91f79 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -667,6 +667,7 @@ jobs: background: true - run: yarn tsc -p packages - run: yarn tsc -p modules + - run: yarn bazel build //packages/zone.js:npm_package # Waits for the Saucelabs tunnel to be ready. This ensures that we don't run tests # too early without Saucelabs not being ready. - run: ./scripts/saucelabs/wait-for-tunnel.sh diff --git a/BUILD.bazel b/BUILD.bazel index 1fdf2dd33e..c031b302ef 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -19,9 +19,9 @@ filegroup( # do not sort srcs = [ "@npm//:node_modules/core-js/client/core.js", - "@npm//:node_modules/zone.js/dist/zone.js", - "@npm//:node_modules/zone.js/dist/zone-testing.js", - "@npm//:node_modules/zone.js/dist/task-tracking.js", + "//packages/zone.js/dist:zone.js", + "//packages/zone.js/dist:zone-testing.js", + "//packages/zone.js/dist:task-tracking.js", "//:test-events.js", "//:shims_for_IE.js", # Including systemjs because it defines `__eval`, which produces correct stack traces. diff --git a/integration/cli-hello-world-ivy-compat/package.json b/integration/cli-hello-world-ivy-compat/package.json index c37c86e0d8..732599460c 100644 --- a/integration/cli-hello-world-ivy-compat/package.json +++ b/integration/cli-hello-world-ivy-compat/package.json @@ -25,7 +25,7 @@ "@angular/router": "file:../../dist/packages-dist/router", "rxjs": "file:../../node_modules/rxjs", "tslib": "file:../../node_modules/tslib", - "zone.js": "file:../../node_modules/zone.js" + "zone.js": "file:../../dist/bin/packages/zone.js/npm_package" }, "devDependencies": { "@angular-devkit/build-angular": "^0.900.0-rc.0", diff --git a/integration/cli-hello-world-ivy-i18n/package.json b/integration/cli-hello-world-ivy-i18n/package.json index ed80d4548e..dd806dadd1 100644 --- a/integration/cli-hello-world-ivy-i18n/package.json +++ b/integration/cli-hello-world-ivy-i18n/package.json @@ -31,7 +31,7 @@ "rxjs": "file:../../node_modules/rxjs", "serve": "^11.2.0", "tslib": "file:../../node_modules/tslib", - "zone.js": "file:../../node_modules/zone.js" + "zone.js": "file:../../dist/bin/packages/zone.js/npm_package" }, "devDependencies": { "@angular-devkit/build-angular": "^0.900.0-rc.0", diff --git a/integration/cli-hello-world-ivy-minimal/package.json b/integration/cli-hello-world-ivy-minimal/package.json index 8e73cc77e2..3e7991f1fb 100644 --- a/integration/cli-hello-world-ivy-minimal/package.json +++ b/integration/cli-hello-world-ivy-minimal/package.json @@ -25,7 +25,7 @@ "@angular/router": "file:../../dist/packages-dist/router", "rxjs": "file:../../node_modules/rxjs", "tslib": "file:../../node_modules/tslib", - "zone.js": "file:../../node_modules/zone.js" + "zone.js": "file:../../dist/bin/packages/zone.js/npm_package" }, "devDependencies": { "@angular-devkit/build-angular": "^0.900.0-rc.0", diff --git a/integration/cli-hello-world-lazy-rollup/package.json b/integration/cli-hello-world-lazy-rollup/package.json index cac129ea0b..538c14d775 100644 --- a/integration/cli-hello-world-lazy-rollup/package.json +++ b/integration/cli-hello-world-lazy-rollup/package.json @@ -20,7 +20,7 @@ "@angular/router": "file:../../dist/packages-dist/router", "rxjs": "file:../../node_modules/rxjs", "tslib": "^1.10.0", - "zone.js": "file:../../node_modules/zone.js" + "zone.js": "file:../../dist/bin/packages/zone.js/npm_package" }, "devDependencies": { "@angular-devkit/build-angular": "^0.900.0-rc.0", diff --git a/integration/cli-hello-world-lazy/package.json b/integration/cli-hello-world-lazy/package.json index 52e2ea4fc4..1cea88ce27 100644 --- a/integration/cli-hello-world-lazy/package.json +++ b/integration/cli-hello-world-lazy/package.json @@ -20,7 +20,7 @@ "@angular/router": "file:../../dist/packages-dist/router", "rxjs": "file:../../node_modules/rxjs", "tslib": "^1.10.0", - "zone.js": "file:../../node_modules/zone.js" + "zone.js": "file:../../dist/bin/packages/zone.js/npm_package" }, "devDependencies": { "@angular-devkit/build-angular": "^0.900.0-rc.0", diff --git a/integration/cli-hello-world/package.json b/integration/cli-hello-world/package.json index e2588ef034..beebc163a4 100644 --- a/integration/cli-hello-world/package.json +++ b/integration/cli-hello-world/package.json @@ -23,7 +23,7 @@ "@angular/router": "file:../../dist/packages-dist/router", "rxjs": "file:../../node_modules/rxjs", "tslib": "file:../../node_modules/tslib", - "zone.js": "file:../../node_modules/zone.js" + "zone.js": "file:../../dist/bin/packages/zone.js/npm_package" }, "devDependencies": { "@angular-devkit/build-angular": "^0.900.0-rc.0", diff --git a/integration/dynamic-compiler/package.json b/integration/dynamic-compiler/package.json index bfb1c8c756..c901814840 100644 --- a/integration/dynamic-compiler/package.json +++ b/integration/dynamic-compiler/package.json @@ -41,6 +41,6 @@ "core-js": "file:../../node_modules/core-js", "rxjs": "file:../../node_modules/rxjs", "systemjs": "file:../../node_modules/systemjs", - "zone.js": "file:../../node_modules/zone.js" + "zone.js": "file:../../dist/bin/packages/zone.js/npm_package" } } diff --git a/integration/hello_world__closure/package.json b/integration/hello_world__closure/package.json index fd304c7586..2b84f4edb4 100644 --- a/integration/hello_world__closure/package.json +++ b/integration/hello_world__closure/package.json @@ -13,7 +13,7 @@ "google-closure-compiler": "20180716.0.0", "rxjs": "file:../../node_modules/rxjs", "typescript": "file:../../node_modules/typescript", - "zone.js": "file:../../node_modules/zone.js" + "zone.js": "file:../../dist/bin/packages/zone.js/npm_package" }, "devDependencies": { "@types/jasmine": "2.5.41", diff --git a/integration/hello_world__systemjs_umd/package.json b/integration/hello_world__systemjs_umd/package.json index aa747f2d86..5b571e5c10 100644 --- a/integration/hello_world__systemjs_umd/package.json +++ b/integration/hello_world__systemjs_umd/package.json @@ -21,7 +21,7 @@ "rxjs": "file:../../node_modules/rxjs", "systemjs": "0.20.2", "typescript": "file:../../node_modules/typescript", - "zone.js": "file:../../node_modules/zone.js" + "zone.js": "file:../../dist/bin/packages/zone.js/npm_package" }, "devDependencies": { "@types/jasmine": "2.5.41", diff --git a/integration/i18n/package.json b/integration/i18n/package.json index 06ee78bcb0..126eda3b7c 100644 --- a/integration/i18n/package.json +++ b/integration/i18n/package.json @@ -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:../../node_modules/zone.js" + "zone.js": "file:../../dist/bin/packages/zone.js/npm_package" }, "devDependencies": { "@types/jasmine": "2.5.41", diff --git a/integration/injectable-def/package.json b/integration/injectable-def/package.json index e422acdf3c..7697c005ec 100644 --- a/integration/injectable-def/package.json +++ b/integration/injectable-def/package.json @@ -14,7 +14,7 @@ "@types/node": "file:../../node_modules/@types/node", "rxjs": "file:../../node_modules/rxjs", "typescript": "file:../../node_modules/typescript", - "zone.js": "file:../../node_modules/zone.js" + "zone.js": "file:../../dist/bin/packages/zone.js/npm_package" }, "devDependencies": { "@types/jasmine": "2.5.41", diff --git a/integration/ivy-i18n/package.json b/integration/ivy-i18n/package.json index ca48d602e8..6ec78ea07b 100644 --- a/integration/ivy-i18n/package.json +++ b/integration/ivy-i18n/package.json @@ -24,7 +24,6 @@ "translated:legacy:serve": "serve ../tmp/translations/legacy --listen 4200", "translated:legacy:e2e": "npm-run-all -p -r translated:legacy:serve \"ng e2e --configuration=translated-legacy\"", "translated:legacy:translate": "localize-translate -r \"dist/\" -s \"**/*\" -o \"../tmp/translations/{{LOCALE}}\"", - "translated:legacy-xlf:test": "yarn ng xi18n && yarn translated:legacy-xlf:update-translations && yarn ng build --configuration=translated-legacy && yarn translated:legacy:translate -t \"../tmp/legacy-locales/messages.legacy.xlf\" && yarn translated:legacy:e2e", "translated:legacy-xlf:update-translations": "sed -i.bak -e 's/source>/target>'/ -e 's/Hello/Bonjour/' -e 's/source-language=\"en-US\"/source-language=\"en-US\" target-language=\"legacy\"/' ../tmp/legacy-locales/messages.legacy.xlf", "translated:legacy-xmb:test": "yarn ng xi18n --format=xmb --outFile=messages.legacy.xmb && yarn translated:legacy-xmb:update-translations && yarn ng build --configuration=translated-legacy-xmb && yarn translated:legacy:translate -t \"../tmp/legacy-locales/messages.legacy.xtb\" && yarn translated:legacy:e2e", @@ -46,7 +45,7 @@ "rxjs": "file:../../node_modules/rxjs", "serve": "^11.2.0", "tslib": "file:../../node_modules/tslib", - "zone.js": "file:../../node_modules/zone.js" + "zone.js": "file:../../dist/bin/packages/zone.js/npm_package" }, "devDependencies": { "@angular-devkit/build-angular": "^0.900.0-rc.0", diff --git a/integration/ng_elements/package.json b/integration/ng_elements/package.json index 2efcd364ab..c9b28c5feb 100644 --- a/integration/ng_elements/package.json +++ b/integration/ng_elements/package.json @@ -14,7 +14,7 @@ "google-closure-compiler": "20180319.0.0", "rxjs": "file:../../node_modules/rxjs", "typescript": "file:../../node_modules/typescript", - "zone.js": "file:../../node_modules/zone.js" + "zone.js": "file:../../dist/bin/packages/zone.js/npm_package" }, "devDependencies": { "@types/jasmine": "2.5.41", diff --git a/integration/ng_update/package.json b/integration/ng_update/package.json index eadcb73950..d0d8a7e9e3 100644 --- a/integration/ng_update/package.json +++ b/integration/ng_update/package.json @@ -24,6 +24,6 @@ "@angular/upgrade": "file:../../dist/packages-dist/upgrade", "rxjs": "file:../../node_modules/rxjs", "typescript": "file:../../node_modules/typescript", - "zone.js": "file:../../node_modules/zone.js" + "zone.js": "file:../../dist/bin/packages/zone.js/npm_package" } } diff --git a/integration/ng_update_migrations/package.json b/integration/ng_update_migrations/package.json index 53b1805e1d..a2e82d8452 100644 --- a/integration/ng_update_migrations/package.json +++ b/integration/ng_update_migrations/package.json @@ -21,7 +21,7 @@ "@angular/router": "file:../../dist/packages-dist/router", "rxjs": "file:../../node_modules/rxjs", "tslib": "file:../../node_modules/tslib", - "zone.js": "file:../../node_modules/zone.js" + "zone.js": "file:../../dist/bin/packages/zone.js/npm_package" }, "devDependencies": { "@angular-devkit/build-angular": "^0.900.0-rc.0", diff --git a/integration/ngcc/package.json b/integration/ngcc/package.json index 97d67b03c7..8cbc63043a 100644 --- a/integration/ngcc/package.json +++ b/integration/ngcc/package.json @@ -17,7 +17,7 @@ "@types/node": "file:../../node_modules/@types/node", "rxjs": "file:../../node_modules/rxjs", "typescript": "file:../../node_modules/typescript", - "zone.js": "file:../../node_modules/zone.js" + "zone.js": "file:../../dist/bin/packages/zone.js/npm_package" }, "devDependencies": { "@types/jasmine": "2.5.41", diff --git a/integration/platform-server/package.json b/integration/platform-server/package.json index c866190b73..09bbe6a576 100644 --- a/integration/platform-server/package.json +++ b/integration/platform-server/package.json @@ -19,7 +19,7 @@ "express": "^4.14.1", "rxjs": "file:../../node_modules/rxjs", "typescript": "file:../../node_modules/typescript", - "zone.js": "file:../../node_modules/zone.js" + "zone.js": "file:../../dist/bin/packages/zone.js/npm_package" }, "devDependencies": { "@types/jasmine": "2.5.41", diff --git a/integration/platform-server/src/server.ts b/integration/platform-server/src/server.ts index 2c4a0280ed..8f4efcf0a0 100644 --- a/integration/platform-server/src/server.ts +++ b/integration/platform-server/src/server.ts @@ -41,4 +41,4 @@ app.get('/favicon.ico', (req, res) => { res.send(''); }); app.get('/helloworld', render(HelloWorldServerModuleNgFactory, helloworld)); app.get('/transferstate', render(TransferStateServerModuleNgFactory, transferstate)); -app.listen(9876, function() { console.log('Server listening on port 9876!'); }); \ No newline at end of file +app.listen(9876, function() { console.log('Server listening on port 9876!'); }); diff --git a/integration/run_tests.sh b/integration/run_tests.sh index 7b3deedda5..099b1648e1 100755 --- a/integration/run_tests.sh +++ b/integration/run_tests.sh @@ -9,6 +9,7 @@ cd "$(dirname "$0")" # basedir is the workspace root readonly basedir=$(pwd)/.. +readonly bazel_bin=$(yarn bin)/bazel # When running on the CI, we track the payload size of various integration output files. Also # we shard tests across multiple CI job instances. The script needs to be run with a shard index @@ -35,6 +36,9 @@ 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 diff --git a/integration/service-worker-schema/package.json b/integration/service-worker-schema/package.json index 4534c98d5c..cf712fd286 100644 --- a/integration/service-worker-schema/package.json +++ b/integration/service-worker-schema/package.json @@ -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:../../node_modules/zone.js" + "zone.js": "file:../../dist/bin/packages/zone.js/npm_package" } } diff --git a/integration/terser/package.json b/integration/terser/package.json index 955bea9ca4..ee47786d02 100644 --- a/integration/terser/package.json +++ b/integration/terser/package.json @@ -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:../../node_modules/zone.js" + "zone.js": "file:../../dist/bin/packages/zone.js/npm_package" } } diff --git a/integration/typings_test_ts36/package.json b/integration/typings_test_ts36/package.json index 3bd48b31de..b3afe8766f 100644 --- a/integration/typings_test_ts36/package.json +++ b/integration/typings_test_ts36/package.json @@ -22,7 +22,7 @@ "@types/jasmine": "2.5.41", "rxjs": "file:../../node_modules/rxjs", "typescript": "3.6.4", - "zone.js": "file:../../node_modules/zone.js" + "zone.js": "file:../../dist/bin/packages/zone.js/npm_package" }, "scripts": { "test": "tsc" diff --git a/karma-js.conf.js b/karma-js.conf.js index 1da6d90de9..fb827d1037 100644 --- a/karma-js.conf.js +++ b/karma-js.conf.js @@ -36,9 +36,9 @@ module.exports = function(config) { {pattern: 'node_modules/angular-mocks/angular-mocks.js', included: false, watched: false}, 'node_modules/core-js/client/core.js', - 'node_modules/zone.js/dist/zone.js', - 'node_modules/zone.js/dist/zone-testing.js', - 'node_modules/zone.js/dist/task-tracking.js', + 'dist/bin/packages/zone.js/npm_package/dist/zone.js', + 'dist/bin/packages/zone.js/npm_package/dist/zone-testing.js', + 'dist/bin/packages/zone.js/npm_package/dist/task-tracking.js', // Including systemjs because it defines `__eval`, which produces correct stack traces. 'test-events.js', diff --git a/modules/benchmarks/src/class_bindings/BUILD.bazel b/modules/benchmarks/src/class_bindings/BUILD.bazel index 6608e14b8c..3d31a6e196 100644 --- a/modules/benchmarks/src/class_bindings/BUILD.bazel +++ b/modules/benchmarks/src/class_bindings/BUILD.bazel @@ -44,7 +44,7 @@ ts_devserver( port = 4200, static_files = [ ":bundle.min_debug.es2015.js", - "@npm//:node_modules/zone.js/dist/zone.js", + "//packages/zone.js/dist:zone.js", ], ) diff --git a/modules/benchmarks/src/expanding_rows/BUILD.bazel b/modules/benchmarks/src/expanding_rows/BUILD.bazel index 4b5dba3dfd..ea7b593633 100644 --- a/modules/benchmarks/src/expanding_rows/BUILD.bazel +++ b/modules/benchmarks/src/expanding_rows/BUILD.bazel @@ -44,7 +44,7 @@ ts_devserver( index_html = "index.html", port = 4200, static_files = [ - "@npm//:node_modules/zone.js/dist/zone.js", + "//packages/zone.js/dist:zone.js", ], deps = [ ":bundle.min_debug.es2015.js", @@ -64,7 +64,7 @@ ts_devserver( "//tools/rxjs:rxjs_umd_modules", ], static_files = [ - "@npm//:node_modules/zone.js/dist/zone.js", + "//packages/zone.js/dist:zone.js", ], deps = [":application_lib"], ) diff --git a/modules/benchmarks/src/largeform/ng2/BUILD.bazel b/modules/benchmarks/src/largeform/ng2/BUILD.bazel index 3b31d5cc13..8ede44f9fe 100644 --- a/modules/benchmarks/src/largeform/ng2/BUILD.bazel +++ b/modules/benchmarks/src/largeform/ng2/BUILD.bazel @@ -33,8 +33,8 @@ ts_devserver( "//tools/rxjs:rxjs_umd_modules", ], static_files = [ - "@npm//:node_modules/zone.js/dist/zone.js", "@npm//:node_modules/reflect-metadata/Reflect.js", + "//packages/zone.js/dist:zone.js", ], tags = ["fixme-ivy-aot"], deps = [":ng2"], diff --git a/modules/benchmarks/src/largetable/ng2/BUILD.bazel b/modules/benchmarks/src/largetable/ng2/BUILD.bazel index 8f499ea80d..4e9cc0a8fa 100644 --- a/modules/benchmarks/src/largetable/ng2/BUILD.bazel +++ b/modules/benchmarks/src/largetable/ng2/BUILD.bazel @@ -37,7 +37,7 @@ ts_devserver( port = 4200, static_files = [ ":bundle.min_debug.es2015.js", - "@npm//:node_modules/zone.js/dist/zone.js", + "//packages/zone.js/dist:zone.js", ], ) diff --git a/modules/benchmarks/src/largetable/ng2_switch/BUILD.bazel b/modules/benchmarks/src/largetable/ng2_switch/BUILD.bazel index 51a6079511..73d85effd7 100644 --- a/modules/benchmarks/src/largetable/ng2_switch/BUILD.bazel +++ b/modules/benchmarks/src/largetable/ng2_switch/BUILD.bazel @@ -29,8 +29,8 @@ ts_devserver( "//tools/rxjs:rxjs_umd_modules", ], static_files = [ - "@npm//:node_modules/zone.js/dist/zone.js", "@npm//:node_modules/reflect-metadata/Reflect.js", + "//packages/zone.js/dist:zone.js", ], deps = [":ng2_switch"], ) diff --git a/modules/benchmarks/src/tree/ng2/BUILD.bazel b/modules/benchmarks/src/tree/ng2/BUILD.bazel index d1f6f8cfdd..ca4df157bc 100644 --- a/modules/benchmarks/src/tree/ng2/BUILD.bazel +++ b/modules/benchmarks/src/tree/ng2/BUILD.bazel @@ -37,7 +37,7 @@ ts_devserver( port = 4200, static_files = [ ":bundle.min_debug.es2015.js", - "@npm//:node_modules/zone.js/dist/zone.js", + "//packages/zone.js/dist:zone.js", ], ) diff --git a/modules/benchmarks/src/tree/ng2_static/BUILD.bazel b/modules/benchmarks/src/tree/ng2_static/BUILD.bazel index 1af159d4c3..c9766d7240 100644 --- a/modules/benchmarks/src/tree/ng2_static/BUILD.bazel +++ b/modules/benchmarks/src/tree/ng2_static/BUILD.bazel @@ -27,8 +27,8 @@ ts_devserver( "//tools/rxjs:rxjs_umd_modules", ], static_files = [ - "@npm//:node_modules/zone.js/dist/zone.js", "@npm//:node_modules/reflect-metadata/Reflect.js", + "//packages/zone.js/dist:zone.js", ], deps = [":ng2_static"], ) diff --git a/modules/benchmarks/src/tree/ng2_switch/BUILD.bazel b/modules/benchmarks/src/tree/ng2_switch/BUILD.bazel index 0f05f9a066..75ca9fe25d 100644 --- a/modules/benchmarks/src/tree/ng2_switch/BUILD.bazel +++ b/modules/benchmarks/src/tree/ng2_switch/BUILD.bazel @@ -29,8 +29,8 @@ ts_devserver( "//tools/rxjs:rxjs_umd_modules", ], static_files = [ - "@npm//:node_modules/zone.js/dist/zone.js", "@npm//:node_modules/reflect-metadata/Reflect.js", + "//packages/zone.js/dist:zone.js", ], deps = [":ng2_switch"], ) diff --git a/modules/benchmarks/src/views/BUILD.bazel b/modules/benchmarks/src/views/BUILD.bazel index 0cd2fd3b82..f6f3e0a197 100644 --- a/modules/benchmarks/src/views/BUILD.bazel +++ b/modules/benchmarks/src/views/BUILD.bazel @@ -30,13 +30,16 @@ ts_devserver( static_files = [ ":bundle.min_debug.es2015.js", ":bundle.min.es2015.js", - "@npm//:node_modules/zone.js/dist/zone.js", + "//packages/zone.js/dist:zone.js", "index.html", ], ) ts_devserver( name = "devserver", + data = [ + "//packages/zone.js/dist:zone.js", + ], entry_module = "angular/modules/benchmarks/src/views/index", index_html = "index.html", scripts = [ @@ -45,7 +48,6 @@ ts_devserver( ], serving_path = "/index.js", static_files = [ - "@npm//:node_modules/zone.js/dist/zone.js", "index.html", ], deps = [":application_lib"], diff --git a/modules/benchmarks/src/views/index.html b/modules/benchmarks/src/views/index.html index d9fba79e1d..41812705a7 100644 --- a/modules/benchmarks/src/views/index.html +++ b/modules/benchmarks/src/views/index.html @@ -35,4 +35,4 @@ - \ No newline at end of file + diff --git a/modules/playground/src/animate/BUILD.bazel b/modules/playground/src/animate/BUILD.bazel index 136c46f988..0accbfa6ac 100644 --- a/modules/playground/src/animate/BUILD.bazel +++ b/modules/playground/src/animate/BUILD.bazel @@ -25,7 +25,7 @@ ts_devserver( port = 4200, scripts = ["@npm//:node_modules/tslib/tslib.js"], static_files = [ - "@npm//:node_modules/zone.js/dist/zone.js", + "//packages/zone.js/dist:zone.js", "@npm//:node_modules/reflect-metadata/Reflect.js", ], deps = [":animate"], diff --git a/modules/playground/src/async/BUILD.bazel b/modules/playground/src/async/BUILD.bazel index 4ed589ea00..2fd9313899 100644 --- a/modules/playground/src/async/BUILD.bazel +++ b/modules/playground/src/async/BUILD.bazel @@ -26,7 +26,7 @@ ts_devserver( "//tools/rxjs:rxjs_umd_modules", ], static_files = [ - "@npm//:node_modules/zone.js/dist/zone.js", + "//packages/zone.js/dist:zone.js", "@npm//:node_modules/reflect-metadata/Reflect.js", ], deps = [":async"], diff --git a/modules/playground/src/gestures/BUILD.bazel b/modules/playground/src/gestures/BUILD.bazel index d6459424dd..8d64d4e81a 100644 --- a/modules/playground/src/gestures/BUILD.bazel +++ b/modules/playground/src/gestures/BUILD.bazel @@ -26,7 +26,7 @@ ts_devserver( scripts = ["@npm//:node_modules/tslib/tslib.js"], static_files = [ "@npm//:node_modules/hammerjs/hammer.js", - "@npm//:node_modules/zone.js/dist/zone.js", + "//packages/zone.js/dist:zone.js", "@npm//:node_modules/reflect-metadata/Reflect.js", ], deps = [":gestures"], diff --git a/modules/playground/src/hello_world/BUILD.bazel b/modules/playground/src/hello_world/BUILD.bazel index b8e5d80ab7..f58f8bfb91 100644 --- a/modules/playground/src/hello_world/BUILD.bazel +++ b/modules/playground/src/hello_world/BUILD.bazel @@ -26,7 +26,7 @@ ts_devserver( "//tools/rxjs:rxjs_umd_modules", ], static_files = [ - "@npm//:node_modules/zone.js/dist/zone.js", + "//packages/zone.js/dist:zone.js", "@npm//:node_modules/reflect-metadata/Reflect.js", ], deps = [":hello_world"], diff --git a/modules/playground/src/http/BUILD.bazel b/modules/playground/src/http/BUILD.bazel index 001febf9c3..95cbf53ae6 100644 --- a/modules/playground/src/http/BUILD.bazel +++ b/modules/playground/src/http/BUILD.bazel @@ -29,7 +29,7 @@ ts_devserver( "//tools/rxjs:rxjs_umd_modules", ], static_files = [ - "@npm//:node_modules/zone.js/dist/zone.js", + "//packages/zone.js/dist:zone.js", "@npm//:node_modules/reflect-metadata/Reflect.js", ], deps = [":http"], diff --git a/modules/playground/src/jsonp/BUILD.bazel b/modules/playground/src/jsonp/BUILD.bazel index b10104a99e..04ac7c119e 100644 --- a/modules/playground/src/jsonp/BUILD.bazel +++ b/modules/playground/src/jsonp/BUILD.bazel @@ -28,7 +28,7 @@ ts_devserver( "//tools/rxjs:rxjs_umd_modules", ], static_files = [ - "@npm//:node_modules/zone.js/dist/zone.js", + "//packages/zone.js/dist:zone.js", "@npm//:node_modules/reflect-metadata/Reflect.js", ], deps = [":jsonp"], diff --git a/modules/playground/src/key_events/BUILD.bazel b/modules/playground/src/key_events/BUILD.bazel index cda4df865a..f893575e6b 100644 --- a/modules/playground/src/key_events/BUILD.bazel +++ b/modules/playground/src/key_events/BUILD.bazel @@ -26,7 +26,7 @@ ts_devserver( "//tools/rxjs:rxjs_umd_modules", ], static_files = [ - "@npm//:node_modules/zone.js/dist/zone.js", + "//packages/zone.js/dist:zone.js", "@npm//:node_modules/reflect-metadata/Reflect.js", ], deps = [":key_events"], diff --git a/modules/playground/src/model_driven_forms/BUILD.bazel b/modules/playground/src/model_driven_forms/BUILD.bazel index f403ee6bf5..f7116d62fe 100644 --- a/modules/playground/src/model_driven_forms/BUILD.bazel +++ b/modules/playground/src/model_driven_forms/BUILD.bazel @@ -27,7 +27,7 @@ ts_devserver( "//tools/rxjs:rxjs_umd_modules", ], static_files = [ - "@npm//:node_modules/zone.js/dist/zone.js", + "//packages/zone.js/dist:zone.js", "@npm//:node_modules/reflect-metadata/Reflect.js", ], deps = [":model_driven_forms"], diff --git a/modules/playground/src/order_management/BUILD.bazel b/modules/playground/src/order_management/BUILD.bazel index 0e1e7d1049..c53cf7af57 100644 --- a/modules/playground/src/order_management/BUILD.bazel +++ b/modules/playground/src/order_management/BUILD.bazel @@ -27,7 +27,7 @@ ts_devserver( "//tools/rxjs:rxjs_umd_modules", ], static_files = [ - "@npm//:node_modules/zone.js/dist/zone.js", + "//packages/zone.js/dist:zone.js", "@npm//:node_modules/reflect-metadata/Reflect.js", ], deps = [":order_management"], diff --git a/modules/playground/src/person_management/BUILD.bazel b/modules/playground/src/person_management/BUILD.bazel index e30028e48f..ea1d37098f 100644 --- a/modules/playground/src/person_management/BUILD.bazel +++ b/modules/playground/src/person_management/BUILD.bazel @@ -27,7 +27,7 @@ ts_devserver( "//tools/rxjs:rxjs_umd_modules", ], static_files = [ - "@npm//:node_modules/zone.js/dist/zone.js", + "//packages/zone.js/dist:zone.js", "@npm//:node_modules/reflect-metadata/Reflect.js", ], deps = [":person_management"], diff --git a/modules/playground/src/relative_assets/BUILD.bazel b/modules/playground/src/relative_assets/BUILD.bazel index 3bf9f769dd..238d01e783 100644 --- a/modules/playground/src/relative_assets/BUILD.bazel +++ b/modules/playground/src/relative_assets/BUILD.bazel @@ -39,7 +39,7 @@ ts_devserver( "//tools/rxjs:rxjs_umd_modules", ], static_files = [ - "@npm//:node_modules/zone.js/dist/zone.js", + "//packages/zone.js/dist:zone.js", "@npm//:node_modules/reflect-metadata/Reflect.js", ], deps = [":relative_assets"], diff --git a/modules/playground/src/routing/BUILD.bazel b/modules/playground/src/routing/BUILD.bazel index 240c6caf68..03eea1f732 100644 --- a/modules/playground/src/routing/BUILD.bazel +++ b/modules/playground/src/routing/BUILD.bazel @@ -28,15 +28,18 @@ ts_devserver( "//third_party/fonts.google.com/open-sans", "@npm//:node_modules/rxjs/bundles/rxjs.umd.js", "@npm//:node_modules/tslib/tslib.js", + "//packages/zone.js/dist:zone.js", ] + glob(["**/*.css"]), port = 4200, static_files = [ "index.html", - "@npm//:node_modules/zone.js/dist/zone.js", "@npm//:node_modules/reflect-metadata/Reflect.js", "@npm//:node_modules/systemjs/dist/system.js", "//modules/playground:systemjs-config.js", "load-app.js", ], - deps = [":routing"], + deps = [ + ":routing", + "//packages/zone.js/lib", + ], ) diff --git a/modules/playground/src/routing/index.html b/modules/playground/src/routing/index.html index 49e677877a..99632b8b74 100644 --- a/modules/playground/src/routing/index.html +++ b/modules/playground/src/routing/index.html @@ -1,9 +1,10 @@ - Routing Example - - - +Routing Example + + + + Loading... @@ -14,9 +15,10 @@ This is because we want to use SystemJS instead of RequireJS and want to support lazy loading of routes. Read more in the "load-app.js" file. --> - + + diff --git a/modules/playground/src/sourcemap/BUILD.bazel b/modules/playground/src/sourcemap/BUILD.bazel index 22e9b0afcc..e354347ccc 100644 --- a/modules/playground/src/sourcemap/BUILD.bazel +++ b/modules/playground/src/sourcemap/BUILD.bazel @@ -30,7 +30,7 @@ ts_devserver( "//tools/rxjs:rxjs_umd_modules", ], static_files = [ - "@npm//:node_modules/zone.js/dist/zone.js", + "//packages/zone.js/dist:zone.js", "@npm//:node_modules/reflect-metadata/Reflect.js", ], deps = [":sourcemap"], diff --git a/modules/playground/src/svg/BUILD.bazel b/modules/playground/src/svg/BUILD.bazel index c86a2456c0..95092d0e47 100644 --- a/modules/playground/src/svg/BUILD.bazel +++ b/modules/playground/src/svg/BUILD.bazel @@ -26,7 +26,7 @@ ts_devserver( "//tools/rxjs:rxjs_umd_modules", ], static_files = [ - "@npm//:node_modules/zone.js/dist/zone.js", + "//packages/zone.js/dist:zone.js", "@npm//:node_modules/reflect-metadata/Reflect.js", ], deps = [":svg"], diff --git a/modules/playground/src/template_driven_forms/BUILD.bazel b/modules/playground/src/template_driven_forms/BUILD.bazel index 45169a3f44..88132dfd8e 100644 --- a/modules/playground/src/template_driven_forms/BUILD.bazel +++ b/modules/playground/src/template_driven_forms/BUILD.bazel @@ -27,7 +27,7 @@ ts_devserver( "//tools/rxjs:rxjs_umd_modules", ], static_files = [ - "@npm//:node_modules/zone.js/dist/zone.js", + "//packages/zone.js/dist:zone.js", "@npm//:node_modules/reflect-metadata/Reflect.js", ], deps = [":template_driven_forms"], diff --git a/modules/playground/src/todo/BUILD.bazel b/modules/playground/src/todo/BUILD.bazel index 24938d922e..b8d249af06 100644 --- a/modules/playground/src/todo/BUILD.bazel +++ b/modules/playground/src/todo/BUILD.bazel @@ -28,7 +28,7 @@ ts_devserver( port = 4200, scripts = ["@npm//:node_modules/tslib/tslib.js"], static_files = [ - "@npm//:node_modules/zone.js/dist/zone.js", + "//packages/zone.js/dist:zone.js", "@npm//:node_modules/reflect-metadata/Reflect.js", ], deps = [":todo"], diff --git a/modules/playground/src/upgrade/BUILD.bazel b/modules/playground/src/upgrade/BUILD.bazel index 4318e5093c..f96ebaba95 100644 --- a/modules/playground/src/upgrade/BUILD.bazel +++ b/modules/playground/src/upgrade/BUILD.bazel @@ -26,7 +26,7 @@ ts_devserver( "//tools/rxjs:rxjs_umd_modules", ], static_files = [ - "@npm//:node_modules/zone.js/dist/zone.js", + "//packages/zone.js/dist:zone.js", "@npm//:node_modules/reflect-metadata/Reflect.js", "@npm//:node_modules/angular/angular.js", ], diff --git a/modules/playground/src/web_workers/BUILD.bazel b/modules/playground/src/web_workers/BUILD.bazel index adce10e034..68f08a1840 100644 --- a/modules/playground/src/web_workers/BUILD.bazel +++ b/modules/playground/src/web_workers/BUILD.bazel @@ -6,8 +6,8 @@ filegroup( data = [ "//modules/playground:systemjs-config.js", "//modules/playground:systemjs-rxjs-operators.js", + "//packages/zone.js/dist:zone.js", "@npm//reflect-metadata", "@npm//systemjs", - "@npm//zone.js", ], ) diff --git a/modules/playground/src/web_workers/animations/BUILD.bazel b/modules/playground/src/web_workers/animations/BUILD.bazel index 4be78eaf3e..9bfcf4870f 100644 --- a/modules/playground/src/web_workers/animations/BUILD.bazel +++ b/modules/playground/src/web_workers/animations/BUILD.bazel @@ -29,6 +29,6 @@ ts_devserver( index_html = "index.html", port = 4200, scripts = ["@npm//:node_modules/tslib/tslib.js"], - static_files = ["@npm//:node_modules/zone.js/dist/zone.js"], + static_files = ["//packages/zone.js/dist:zone.js"], deps = [":animations"], ) diff --git a/modules/playground/src/web_workers/images/BUILD.bazel b/modules/playground/src/web_workers/images/BUILD.bazel index b375bd5e1f..e456bd3b8f 100644 --- a/modules/playground/src/web_workers/images/BUILD.bazel +++ b/modules/playground/src/web_workers/images/BUILD.bazel @@ -34,7 +34,7 @@ ts_devserver( port = 4200, scripts = ["@npm//:node_modules/tslib/tslib.js"], static_files = [ - "@npm//:node_modules/zone.js/dist/zone.js", + "//packages/zone.js/dist:zone.js", "@npm//:node_modules/materialize-css/dist/js/materialize.min.js", "@npm//:node_modules/materialize-css/dist/css/materialize.min.css", "@npm//:node_modules/jquery/dist/jquery.min.js", diff --git a/modules/playground/src/web_workers/input/BUILD.bazel b/modules/playground/src/web_workers/input/BUILD.bazel index f4e35a1f03..be129d0319 100644 --- a/modules/playground/src/web_workers/input/BUILD.bazel +++ b/modules/playground/src/web_workers/input/BUILD.bazel @@ -33,8 +33,8 @@ ts_devserver( ], static_files = [ "@npm//:node_modules/systemjs/dist/system.js", - "@npm//:node_modules/zone.js/dist/zone.js", - "@npm//:node_modules/zone.js/dist/long-stack-trace-zone.js", + "//packages/zone.js/dist:zone.js", + "//packages/zone.js/dist:long-stack-trace-zone.js", "@npm//:node_modules/reflect-metadata/Reflect.js", ], deps = [":input"], diff --git a/modules/playground/src/web_workers/kitchen_sink/BUILD.bazel b/modules/playground/src/web_workers/kitchen_sink/BUILD.bazel index 6b01c6d889..c1823823e7 100644 --- a/modules/playground/src/web_workers/kitchen_sink/BUILD.bazel +++ b/modules/playground/src/web_workers/kitchen_sink/BUILD.bazel @@ -33,8 +33,8 @@ ts_devserver( ], static_files = [ "@npm//:node_modules/systemjs/dist/system.js", - "@npm//:node_modules/zone.js/dist/zone.js", - "@npm//:node_modules/zone.js/dist/long-stack-trace-zone.js", + "//packages/zone.js/dist:zone.js", + "//packages/zone.js/dist:long-stack-trace-zone.js", "@npm//:node_modules/reflect-metadata/Reflect.js", ], deps = [":kitchen_sink"], diff --git a/modules/playground/src/web_workers/message_broker/BUILD.bazel b/modules/playground/src/web_workers/message_broker/BUILD.bazel index 404cf02af8..1ffb8bbc75 100644 --- a/modules/playground/src/web_workers/message_broker/BUILD.bazel +++ b/modules/playground/src/web_workers/message_broker/BUILD.bazel @@ -33,8 +33,8 @@ ts_devserver( ], static_files = [ "@npm//:node_modules/systemjs/dist/system.js", - "@npm//:node_modules/zone.js/dist/zone.js", - "@npm//:node_modules/zone.js/dist/long-stack-trace-zone.js", + "//packages/zone.js/dist:zone.js", + "//packages/zone.js/dist:long-stack-trace-zone.js", "@npm//:node_modules/reflect-metadata/Reflect.js", ], deps = [":message_broker"], diff --git a/modules/playground/src/web_workers/router/BUILD.bazel b/modules/playground/src/web_workers/router/BUILD.bazel index 9728217719..635c3d8a0b 100644 --- a/modules/playground/src/web_workers/router/BUILD.bazel +++ b/modules/playground/src/web_workers/router/BUILD.bazel @@ -36,8 +36,8 @@ ts_devserver( ], static_files = [ "@npm//:node_modules/systemjs/dist/system.js", - "@npm//:node_modules/zone.js/dist/zone.js", - "@npm//:node_modules/zone.js/dist/long-stack-trace-zone.js", + "//packages/zone.js/dist:zone.js", + "//packages/zone.js/dist:long-stack-trace-zone.js", "@npm//:node_modules/reflect-metadata/Reflect.js", ], deps = [":router"], diff --git a/modules/playground/src/web_workers/todo/BUILD.bazel b/modules/playground/src/web_workers/todo/BUILD.bazel index 37e45bee38..5cd0b8066c 100644 --- a/modules/playground/src/web_workers/todo/BUILD.bazel +++ b/modules/playground/src/web_workers/todo/BUILD.bazel @@ -36,8 +36,8 @@ ts_devserver( ], static_files = [ "@npm//:node_modules/systemjs/dist/system.js", - "@npm//:node_modules/zone.js/dist/zone.js", - "@npm//:node_modules/zone.js/dist/long-stack-trace-zone.js", + "//packages/zone.js/dist:zone.js", + "//packages/zone.js/dist:long-stack-trace-zone.js", "@npm//:node_modules/reflect-metadata/Reflect.js", ], deps = [":todo"], diff --git a/modules/playground/src/web_workers/worker-configure.js b/modules/playground/src/web_workers/worker-configure.js index 0f7906b156..27bc3bd1ec 100644 --- a/modules/playground/src/web_workers/worker-configure.js +++ b/modules/playground/src/web_workers/worker-configure.js @@ -7,8 +7,8 @@ */ importScripts('npm/node_modules/reflect-metadata/Reflect.js'); -importScripts('npm/node_modules/zone.js/dist/zone.js'); -importScripts('npm/node_modules/zone.js/dist/long-stack-trace-zone.js'); +importScripts('angular/packages/zone.js/dist/zone.js'); +importScripts('angular/packages/zone.js/dist/long-stack-trace-zone.js'); importScripts('npm/node_modules/systemjs/dist/system.js'); importScripts('angular/modules/playground/systemjs-config.js'); diff --git a/modules/playground/src/zippy_component/BUILD.bazel b/modules/playground/src/zippy_component/BUILD.bazel index f386c8ed19..c1e00f6d34 100644 --- a/modules/playground/src/zippy_component/BUILD.bazel +++ b/modules/playground/src/zippy_component/BUILD.bazel @@ -27,7 +27,7 @@ ts_devserver( "//tools/rxjs:rxjs_umd_modules", ], static_files = [ - "@npm//:node_modules/zone.js/dist/zone.js", + "//packages/zone.js/dist:zone.js", "@npm//:node_modules/reflect-metadata/Reflect.js", ], deps = [":zippy_component"], diff --git a/package.json b/package.json index a288280b46..60eb287f58 100644 --- a/package.json +++ b/package.json @@ -119,8 +119,7 @@ "tslint": "5.7.0", "typescript": "~3.6.4", "xhr2": "0.1.4", - "yargs": "13.1.0", - "zone.js": "^0.10.2" + "yargs": "13.1.0" }, "optionalDependencies": { "fsevents": "2.0.1" diff --git a/packages/BUILD.bazel b/packages/BUILD.bazel index d8c022c6f9..ff8c68c4fa 100644 --- a/packages/BUILD.bazel +++ b/packages/BUILD.bazel @@ -12,8 +12,8 @@ ts_library( name = "types", srcs = glob(["*.ts"]), deps = [ + "//packages/zone.js/lib:zone_d_ts", "@npm//@types/hammerjs", - "@npm//zone.js", ], ) diff --git a/packages/compiler-cli/integrationtest/BUILD.bazel b/packages/compiler-cli/integrationtest/BUILD.bazel index aeade7be60..450a81d041 100644 --- a/packages/compiler-cli/integrationtest/BUILD.bazel +++ b/packages/compiler-cli/integrationtest/BUILD.bazel @@ -38,10 +38,17 @@ nodejs_test( "@npm//rxjs", "@npm//tslib", "@npm//jasmine/bin:jasmine", - "@npm//zone.js", "@npm//xhr2", "@npm//@types/node", "@npm//@types/jasmine", + # we need to reference zone.d.ts typing file from zone.js build target + # instead of npm because angular repo will not depends on npm zone.js + # any longer. + "//packages/zone.js/lib:zone_d_ts", + # we need to reference zone.js npm_package build target + # instead of npm because angular repo will not depends on npm zone.js + # any longer, so we need to build a zone.js npm release first. + "//packages/zone.js:npm_package", "//packages/animations:npm_package", "//packages/common:npm_package", "//packages/compiler:npm_package", diff --git a/packages/compiler-cli/integrationtest/test/init.ts b/packages/compiler-cli/integrationtest/test/init.ts index 59e576a3c5..cbde2aedc8 100644 --- a/packages/compiler-cli/integrationtest/test/init.ts +++ b/packages/compiler-cli/integrationtest/test/init.ts @@ -6,12 +6,10 @@ * found in the LICENSE file at https://angular.io/license */ +// import zone.js from npm here because integration test will load zone.js +// from built npm_package instead of source +import 'zone.js/dist/zone-node'; +import 'zone.js/dist/zone-testing'; // Only needed to satisfy the check in core/src/util/decorators.ts // TODO(alexeagle): maybe remove that check? require('reflect-metadata'); - -require('zone.js/dist/zone-node.js'); -require('zone.js/dist/long-stack-trace-zone.js'); -require('zone.js/dist/sync-test.js'); -require('zone.js/dist/proxy.js'); -require('zone.js/dist/jasmine-patch.js'); diff --git a/packages/compiler-cli/integrationtest/test_helpers.js b/packages/compiler-cli/integrationtest/test_helpers.js index aab3bd25f8..a161c72957 100644 --- a/packages/compiler-cli/integrationtest/test_helpers.js +++ b/packages/compiler-cli/integrationtest/test_helpers.js @@ -56,7 +56,7 @@ const requiredNodeModules = { 'source-map': resolveNpmTreeArtifact('npm/node_modules/source-map'), 'source-map-support': resolveNpmTreeArtifact('npm/node_modules/source-map-support'), 'typescript': resolveNpmTreeArtifact('npm/node_modules/typescript'), - 'zone.js': resolveNpmTreeArtifact('npm/node_modules/zone.js'), + 'zone.js': resolveNpmTreeArtifact('angular/packages/zone.js/npm_package'), }; /** Sets up the temporary test directory and returns the path to the directory. */ diff --git a/packages/compiler-cli/tsconfig-build.json b/packages/compiler-cli/tsconfig-build.json index e057df2ed2..e0d3e458a5 100644 --- a/packages/compiler-cli/tsconfig-build.json +++ b/packages/compiler-cli/tsconfig-build.json @@ -34,7 +34,6 @@ "src/extract_i18n.ts", "src/language_services.ts", "../../node_modules/@types/node/index.d.ts", - "../../node_modules/@types/jasmine/index.d.ts", - "../../node_modules/zone.js/dist/zone.js.d.ts" + "../../node_modules/@types/jasmine/index.d.ts" ] } diff --git a/packages/core/BUILD.bazel b/packages/core/BUILD.bazel index 710fdcb05c..c732e19f78 100644 --- a/packages/core/BUILD.bazel +++ b/packages/core/BUILD.bazel @@ -18,8 +18,8 @@ ng_module( "//packages/core/src/reflection", "//packages/core/src/util", "//packages/localize", + "//packages/zone.js/lib:zone_d_ts", "@npm//rxjs", - "@npm//zone.js", ], ) diff --git a/packages/core/test/BUILD.bazel b/packages/core/test/BUILD.bazel index a249241bb6..f905742bc9 100644 --- a/packages/core/test/BUILD.bazel +++ b/packages/core/test/BUILD.bazel @@ -35,8 +35,8 @@ ts_library( "//packages/private/testing", "//packages/router", "//packages/router/testing", + "//packages/zone.js/lib:zone_d_ts", "@npm//rxjs", - "@npm//zone.js", ], ) @@ -66,10 +66,10 @@ jasmine_node_test( ":test_node_only_lib", "//packages/platform-server", "//packages/platform-server/testing", + "//packages/zone.js/lib:zone_d_ts", "//tools/testing:node", "@npm//base64-js", "@npm//source-map", - "@npm//zone.js", ], ) diff --git a/packages/core/test/acceptance/BUILD.bazel b/packages/core/test/acceptance/BUILD.bazel index 862c5eb34b..a491742ad0 100644 --- a/packages/core/test/acceptance/BUILD.bazel +++ b/packages/core/test/acceptance/BUILD.bazel @@ -28,8 +28,8 @@ ts_library( "//packages/platform-server", "//packages/private/testing", "//packages/router", + "//packages/zone.js/lib:zone_d_ts", "@npm//rxjs", - "@npm//zone.js", ], ) @@ -38,10 +38,10 @@ jasmine_node_test( bootstrap = ["angular/tools/testing/init_node_spec.js"], deps = [ ":acceptance_lib", + "//packages/zone.js/lib:zone_d_ts", "//tools/testing:node", "@npm//base64-js", "@npm//source-map", - "@npm//zone.js", ], ) diff --git a/packages/core/test/render3/BUILD.bazel b/packages/core/test/render3/BUILD.bazel index f8b0de5267..628ef72414 100644 --- a/packages/core/test/render3/BUILD.bazel +++ b/packages/core/test/render3/BUILD.bazel @@ -45,7 +45,7 @@ ts_library( "//packages/common", "//packages/compiler", "//packages/platform-server", - "@npm//zone.js", + "//packages/zone.js/lib:zone_d_ts", ], ) @@ -66,7 +66,7 @@ jasmine_node_test( ], deps = [ ":render3_node_lib", - "@npm//zone.js", + "//packages/zone.js/lib", ], ) diff --git a/packages/core/test/render3/ivy/BUILD.bazel b/packages/core/test/render3/ivy/BUILD.bazel index f5f2ecc499..9855dfd764 100644 --- a/packages/core/test/render3/ivy/BUILD.bazel +++ b/packages/core/test/render3/ivy/BUILD.bazel @@ -25,5 +25,6 @@ jasmine_node_test( deps = [ ":ivy_lib", "//packages/core/test/render3:domino", + "//packages/zone.js/lib", ], ) diff --git a/packages/core/test/render3/load_domino.ts b/packages/core/test/render3/load_domino.ts index 7aae75c0d8..8d9d549640 100644 --- a/packages/core/test/render3/load_domino.ts +++ b/packages/core/test/render3/load_domino.ts @@ -7,11 +7,10 @@ */ // Needed to run animation tests -require('zone.js/dist/zone-node.js'); - +import 'zone.js/lib/node/rollup-main'; import '@angular/compiler'; // For JIT mode. Must be in front of any other @angular/* imports. -import {DominoAdapter} from '@angular/platform-server/src/domino_adapter'; import {ɵgetDOM as getDOM} from '@angular/common'; +import {DominoAdapter} from '@angular/platform-server/src/domino_adapter'; if (typeof window == 'undefined') { const domino = require('domino'); diff --git a/packages/core/testing/BUILD.bazel b/packages/core/testing/BUILD.bazel index 2b1dde511c..dade59783e 100644 --- a/packages/core/testing/BUILD.bazel +++ b/packages/core/testing/BUILD.bazel @@ -14,7 +14,7 @@ ng_module( "//packages/compiler", "//packages/core", "//packages/localize", + "//packages/zone.js/lib:zone_d_ts", "@npm//@types/jasmine", - "@npm//zone.js", ], ) diff --git a/packages/elements/test/BUILD.bazel b/packages/elements/test/BUILD.bazel index 4a489ebb64..b919bdb166 100644 --- a/packages/elements/test/BUILD.bazel +++ b/packages/elements/test/BUILD.bazel @@ -25,8 +25,8 @@ filegroup( srcs = [ "@npm//:node_modules/@webcomponents/custom-elements/src/native-shim.js", "@npm//:node_modules/reflect-metadata/Reflect.js", - "@npm//:node_modules/zone.js/dist/zone.js", - "@npm//:node_modules/zone.js/dist/zone-testing.js", + "//packages/zone.js/dist:zone.js", + "//packages/zone.js/dist:zone-testing.js", ], ) diff --git a/packages/examples/common/BUILD.bazel b/packages/examples/common/BUILD.bazel index f0adbb5649..15b1efb8ee 100644 --- a/packages/examples/common/BUILD.bazel +++ b/packages/examples/common/BUILD.bazel @@ -45,7 +45,7 @@ ts_devserver( "//tools/rxjs:rxjs_umd_modules", ], static_files = [ - "@npm//:node_modules/zone.js/dist/zone.js", + "//packages/zone.js/dist:zone.js", ], deps = [":common_examples"], ) diff --git a/packages/examples/core/BUILD.bazel b/packages/examples/core/BUILD.bazel index 9f9b353cc3..8105dae426 100644 --- a/packages/examples/core/BUILD.bazel +++ b/packages/examples/core/BUILD.bazel @@ -61,8 +61,8 @@ ts_devserver( "//tools/rxjs:rxjs_umd_modules", ], static_files = [ - "@npm//:node_modules/zone.js/dist/zone.js", - "@npm//:node_modules/zone.js/dist/task-tracking.js", + "//packages/zone.js/dist:zone.js", + "//packages/zone.js/dist:task-tracking.js", ], deps = [":core_examples"], ) diff --git a/packages/examples/forms/BUILD.bazel b/packages/examples/forms/BUILD.bazel index 56922d491c..1d88fded72 100644 --- a/packages/examples/forms/BUILD.bazel +++ b/packages/examples/forms/BUILD.bazel @@ -45,7 +45,7 @@ ts_devserver( "//tools/rxjs:rxjs_umd_modules", ], static_files = [ - "@npm//:node_modules/zone.js/dist/zone.js", + "//packages/zone.js/dist:zone.js", ], deps = [":forms_examples"], ) diff --git a/packages/examples/router/activated-route/BUILD.bazel b/packages/examples/router/activated-route/BUILD.bazel index 636eaac826..f55d990320 100644 --- a/packages/examples/router/activated-route/BUILD.bazel +++ b/packages/examples/router/activated-route/BUILD.bazel @@ -29,7 +29,7 @@ ts_devserver( "//tools/rxjs:rxjs_umd_modules", ], static_files = [ - "@npm//:node_modules/zone.js/dist/zone.js", + "//packages/zone.js/dist:zone.js", ], deps = [":router_activated_route_examples"], ) diff --git a/packages/examples/service-worker/push/BUILD.bazel b/packages/examples/service-worker/push/BUILD.bazel index 9a5e400367..b670a4566a 100644 --- a/packages/examples/service-worker/push/BUILD.bazel +++ b/packages/examples/service-worker/push/BUILD.bazel @@ -44,7 +44,7 @@ ts_devserver( ], static_files = [ "ngsw-worker.js", - "@npm//:node_modules/zone.js/dist/zone.js", + "//packages/zone.js/dist:zone.js", ], deps = [":sw_push_examples"], ) diff --git a/packages/examples/service-worker/registration-options/BUILD.bazel b/packages/examples/service-worker/registration-options/BUILD.bazel index 882f546854..5b3c4c0657 100644 --- a/packages/examples/service-worker/registration-options/BUILD.bazel +++ b/packages/examples/service-worker/registration-options/BUILD.bazel @@ -44,7 +44,7 @@ ts_devserver( ], static_files = [ "ngsw-worker.js", - "@npm//:node_modules/zone.js/dist/zone.js", + "//packages/zone.js/dist:zone.js", ], deps = [":sw_registration_options_examples"], ) diff --git a/packages/examples/upgrade/upgrade_example.bzl b/packages/examples/upgrade/upgrade_example.bzl index f2e0f53377..940a614187 100644 --- a/packages/examples/upgrade/upgrade_example.bzl +++ b/packages/examples/upgrade/upgrade_example.bzl @@ -46,7 +46,7 @@ def create_upgrade_example_targets(name, srcs, e2e_srcs, entry_module, assets = port = 4200, entry_module = entry_module, static_files = [ - "@npm//:node_modules/zone.js/dist/zone.js", + "//packages/zone.js/dist:zone.js", "@npm//:node_modules/angular/angular.js", "@npm//:node_modules/reflect-metadata/Reflect.js", ], diff --git a/packages/platform-browser/BUILD.bazel b/packages/platform-browser/BUILD.bazel index bd75b0b111..c1f5d6ed59 100644 --- a/packages/platform-browser/BUILD.bazel +++ b/packages/platform-browser/BUILD.bazel @@ -14,8 +14,8 @@ ng_module( "//packages:types", "//packages/common", "//packages/core", + "//packages/zone.js/lib:zone_d_ts", "@npm//@types/hammerjs", - "@npm//zone.js", ], ) diff --git a/packages/platform-server/BUILD.bazel b/packages/platform-server/BUILD.bazel index eb9a2540ea..3d526ec260 100644 --- a/packages/platform-server/BUILD.bazel +++ b/packages/platform-server/BUILD.bazel @@ -19,9 +19,9 @@ ng_module( "//packages/platform-browser", "//packages/platform-browser-dynamic", "//packages/platform-browser/animations", + "//packages/zone.js/lib:zone_d_ts", "@npm//@types/node", "@npm//rxjs", - "@npm//zone.js", ], ) diff --git a/packages/router/karma.conf.js b/packages/router/karma.conf.js index a283ff240f..54dab9a9e0 100644 --- a/packages/router/karma.conf.js +++ b/packages/router/karma.conf.js @@ -35,8 +35,8 @@ module.exports = function(config) { 'node_modules/systemjs/dist/system.src.js', // Zone.js dependencies - 'node_modules/zone.js/dist/zone.js', - 'node_modules/zone.js/dist/zone-testing.js', + 'dist/bin/packages/zone.js/npm_package/dist/zone.js', + 'dist/bin/packages/zone.js/npm_package/dist/zone-testing.js', {pattern: 'node_modules/rxjs/**/*', included: false, watched: false}, diff --git a/packages/tsconfig.json b/packages/tsconfig.json index 67d052db68..96ae6af801 100644 --- a/packages/tsconfig.json +++ b/packages/tsconfig.json @@ -19,6 +19,7 @@ "selenium-webdriver": ["./node_modules/@types/selenium-webdriver/index.d.ts"], "rxjs/*": ["./node_modules/rxjs/*"], "@angular/*": ["./packages/*"], + "zone.js/*": ["./packages/zone.js/*"], "e2e_util/*": ["./modules/e2e_util/*"] }, "rootDir": ".", @@ -50,7 +51,6 @@ // strict flag. Until these packages are removed, we exclude them here. "platform-webworker/**", "platform-webworker-dynamic/**", - "router/test/aot_ngsummary_test", - "zone.js" + "router/test/aot_ngsummary_test" ] } diff --git a/packages/types.d.ts b/packages/types.d.ts index 87f212e64e..9a079114da 100644 --- a/packages/types.d.ts +++ b/packages/types.d.ts @@ -9,7 +9,6 @@ // This file contains all ambient imports needed to compile the packages/ source code /// -/// /// /// /// diff --git a/packages/upgrade/BUILD.bazel b/packages/upgrade/BUILD.bazel index 7e680f40f8..5d9727edf9 100644 --- a/packages/upgrade/BUILD.bazel +++ b/packages/upgrade/BUILD.bazel @@ -14,7 +14,7 @@ ng_module( "//packages/core", "//packages/platform-browser-dynamic", "//packages/upgrade/src/common", - "@npm//zone.js", + "//packages/zone.js/lib:zone_d_ts", ], ) diff --git a/packages/zone.js/BUILD.bazel b/packages/zone.js/BUILD.bazel index 45916e46a5..2e59149a38 100644 --- a/packages/zone.js/BUILD.bazel +++ b/packages/zone.js/BUILD.bazel @@ -26,7 +26,7 @@ npm_package( "README.md", "package.json", ], - visibility = ["//packages/zone.js/test:__pkg__"], + visibility = ["//visibility:public"], deps = [ ":LICENSE.wrapped", ":LICENSE_copy", diff --git a/packages/zone.js/dist/BUILD.bazel b/packages/zone.js/dist/BUILD.bazel index 10f5b02f63..df4075e319 100644 --- a/packages/zone.js/dist/BUILD.bazel +++ b/packages/zone.js/dist/BUILD.bazel @@ -1,7 +1,7 @@ load("//tools:defaults.bzl", "rollup_bundle") load("//packages/zone.js:bundles.bzl", "ES2015_BUNDLES", "ES5_BUNDLES", "ES5_GLOBAL_BUNDLES") -package(default_visibility = ["//packages/zone.js:__subpackages__"]) +package(default_visibility = ["//visibility:public"]) # copy this file from //lib to //dist genrule( @@ -13,9 +13,9 @@ genrule( genrule( name = "zone_d_ts", - srcs = ["//packages/zone.js/lib"], + srcs = ["//packages/zone.js/lib:zone_d_ts"], outs = ["zone.js.d.ts"], - cmd = "find $(SRCS) -name \"zone.d.ts\" -exec cp {} $(@D)/zone.js.d.ts \;", + cmd = "cp $< $@", ) [ diff --git a/packages/zone.js/lib/BUILD.bazel b/packages/zone.js/lib/BUILD.bazel index f7df99ff30..3e7f8e1f29 100644 --- a/packages/zone.js/lib/BUILD.bazel +++ b/packages/zone.js/lib/BUILD.bazel @@ -1,16 +1,28 @@ load("@npm_bazel_typescript//:index.bzl", "ts_library") -package(default_visibility = ["//packages/zone.js:__pkg__"]) +package(default_visibility = ["//visibility:public"]) exports_files(glob([ "**/*", ])) ts_library( - name = "lib", - srcs = glob(["**/*.ts"]), - visibility = ["//packages/zone.js:__subpackages__"], + name = "zone_d_ts", + srcs = [":zone.ts"], deps = [ + "@npm//@types/node", + ], +) + +ts_library( + name = "lib", + srcs = glob( + ["**/*.ts"], + exclude = ["zone.ts"], + ), + module_name = "zone.js/lib", + deps = [ + ":zone_d_ts", "@npm//@types/jasmine", "@npm//@types/node", "@npm//rxjs", diff --git a/packages/zone.js/lib/common/promise.ts b/packages/zone.js/lib/common/promise.ts index f1060664df..8f35e225b5 100644 --- a/packages/zone.js/lib/common/promise.ts +++ b/packages/zone.js/lib/common/promise.ts @@ -222,7 +222,7 @@ Zone.__load_patch('ZoneAwarePromise', (global: any, Zone: ZoneType, api: _ZonePr } function scheduleResolveOrReject( - promise: ZoneAwarePromise, zone: AmbientZone, chainPromise: ZoneAwarePromise, + promise: ZoneAwarePromise, zone: Zone, chainPromise: ZoneAwarePromise, onFulfilled?: ((value: R) => U1) | null | undefined, onRejected?: ((error: any) => U2) | null | undefined): void { clearRejectedNoCatch(promise); diff --git a/tools/cjs-jasmine/index-tools.ts b/tools/cjs-jasmine/index-tools.ts index 08501f2922..6fbbd70ccd 100644 --- a/tools/cjs-jasmine/index-tools.ts +++ b/tools/cjs-jasmine/index-tools.ts @@ -9,15 +9,15 @@ 'use strict'; const glob = require('glob'); -require('zone.js/dist/zone-node.js'); +import 'zone.js/lib/node/rollup-main'; const JasmineRunner = require('jasmine'); const path = require('path'); -require('zone.js/dist/long-stack-trace-zone.js'); -require('zone.js/dist/task-tracking.js'); -require('zone.js/dist/proxy.js'); -require('zone.js/dist/sync-test.js'); -require('zone.js/dist/async-test.js'); -require('zone.js/dist/fake-async-test.js'); +import 'zone.js/lib/zone-spec/long-stack-trace'; +import 'zone.js/lib/zone-spec/task-tracing'; +import 'zone.js/lib/zone-spec/proxy'; +import 'zone.js/lib/zone-spec/sync-test'; +import 'zone.js/lib/zone-spec/async-test'; +import 'zone.js/lib/zone-spec/fake-async-test'; const {generateSeed} = require('../../../tools/jasmine-seed-generator'); // Let TypeScript know this is a module @@ -25,7 +25,7 @@ export {}; const jrunner = new JasmineRunner({projectBaseDir: path.resolve(__dirname, '../../')}); (global as any)['jasmine'] = jrunner.jasmine; -require('zone.js/dist/jasmine-patch.js'); +import 'zone.js/lib/jasmine/jasmine'; // Turn on full stack traces in errors to help debugging (Error)['stackTraceLimit'] = Infinity; diff --git a/tools/cjs-jasmine/index.ts b/tools/cjs-jasmine/index.ts index 8b06bad1d6..9ba6d5c63d 100644 --- a/tools/cjs-jasmine/index.ts +++ b/tools/cjs-jasmine/index.ts @@ -9,16 +9,16 @@ 'use strict'; const glob = require('glob'); -require('zone.js/dist/zone-node.js'); +require('zone.js/lib/node/rollup-main.js'); const JasmineRunner = require('jasmine'); const path = require('path'); require('source-map-support').install(); -require('zone.js/dist/long-stack-trace-zone.js'); -require('zone.js/dist/task-tracking.js'); -require('zone.js/dist/proxy.js'); -require('zone.js/dist/sync-test.js'); -require('zone.js/dist/async-test.js'); -require('zone.js/dist/fake-async-test.js'); +require('zone.js/lib/zone-spec/long-stack-trace.js'); +require('zone.js/lib/zone-spec/task-tracking.js'); +require('zone.js/lib/zone-spec/proxy.js'); +require('zone.js/lib/zone-spec/sync-test.js'); +require('zone.js/lib/zone-spec/async-test.js'); +require('zone.js/lib/zone-spec/fake-async-test.js'); require('reflect-metadata/Reflect'); const {generateSeed} = require('../../../tools/jasmine-seed-generator'); @@ -27,7 +27,7 @@ export {}; const jrunner = new JasmineRunner({projectBaseDir: path.resolve(__dirname, '../../')}); (global as any)['jasmine'] = jrunner.jasmine; -require('zone.js/dist/jasmine-patch.js'); +require('zone.js/lib/jasmine/jasmine.js'); (global as any).isBrowser = false; (global as any).isNode = true; diff --git a/tools/defaults.bzl b/tools/defaults.bzl index 08c078de62..24b8b221df 100644 --- a/tools/defaults.bzl +++ b/tools/defaults.bzl @@ -221,6 +221,7 @@ def karma_web_test(bootstrap = [], deps = [], data = [], runtime_deps = [], **kw "@npm//karma-browserstack-launcher", "@npm//:node_modules/tslib/tslib.js", "//tools/rxjs:rxjs_umd_modules", + "//packages/zone.js:npm_package", ] + deps local_runtime_deps = [ "//tools/testing:browser", diff --git a/tools/testing/BUILD.bazel b/tools/testing/BUILD.bazel index 0df9a118a1..705e4d562b 100644 --- a/tools/testing/BUILD.bazel +++ b/tools/testing/BUILD.bazel @@ -23,6 +23,7 @@ ts_library( "//packages/core/testing", "//packages/platform-server", "//packages/platform-server/testing", + "//packages/zone.js/lib", "@npm//domino", ], ) diff --git a/tools/testing/init_node_spec.ts b/tools/testing/init_node_spec.ts index e28b9c5c3a..7a0aa0eec6 100644 --- a/tools/testing/init_node_spec.ts +++ b/tools/testing/init_node_spec.ts @@ -6,19 +6,19 @@ * found in the LICENSE file at https://angular.io/license */ -import 'zone.js/dist/zone-node.js'; -import 'zone.js/dist/long-stack-trace-zone.js'; -import 'zone.js/dist/proxy.js'; -import 'zone.js/dist/sync-test.js'; -import 'zone.js/dist/async-test.js'; -import 'zone.js/dist/fake-async-test.js'; -import 'zone.js/dist/task-tracking.js'; +import 'zone.js/lib/node/rollup-main'; +import 'zone.js/lib/zone-spec/long-stack-trace'; +import 'zone.js/lib/zone-spec/task-tracking'; +import 'zone.js/lib/zone-spec/proxy'; +import 'zone.js/lib/zone-spec/sync-test'; +import 'zone.js/lib/zone-spec/async-test'; +import 'zone.js/lib/zone-spec/fake-async-test'; import 'reflect-metadata/Reflect'; // Initialize jasmine with @bazel/jasmine boot() function. This will initialize // global.jasmine so that it can be patched by zone.js jasmine-patch.js. require('@bazel/jasmine').boot(); -import 'zone.js/dist/jasmine-patch.js'; +import 'zone.js/lib/jasmine/jasmine'; (global as any).isNode = true; (global as any).isBrowser = false; diff --git a/yarn.lock b/yarn.lock index 1afa82894d..df0566352a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12704,8 +12704,3 @@ zip-stream@^1.0.0, zip-stream@^1.1.0, zip-stream@^1.2.0: compress-commons "^1.2.0" lodash "^4.8.0" readable-stream "^2.0.0" - -zone.js@^0.10.2: - version "0.10.2" - resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.10.2.tgz#67ca084b3116fc33fc40435e0d5ea40a207e392e" - integrity sha512-UAYfiuvxLN4oyuqhJwd21Uxb4CNawrq6fPS/05Su5L4G+1TN+HVDJMUHNMobVQDFJRir2cLAODXwluaOKB7HFg==