diff --git a/aio/content/examples/http/src/main-specs.ts b/aio/content/examples/http/src/main-specs.ts index e1ab261f4c..0190a64610 100644 --- a/aio/content/examples/http/src/main-specs.ts +++ b/aio/content/examples/http/src/main-specs.ts @@ -6,7 +6,7 @@ declare var jasmine; import './polyfills'; -import 'zone.js/dist/zone-testing'; +import 'zone.js/testing'; import { getTestBed } from '@angular/core/testing'; import { diff --git a/aio/content/examples/testing/src/app/demo/async-helper.spec.ts b/aio/content/examples/testing/src/app/demo/async-helper.spec.ts index afbe27645e..8d9305fc60 100644 --- a/aio/content/examples/testing/src/app/demo/async-helper.spec.ts +++ b/aio/content/examples/testing/src/app/demo/async-helper.spec.ts @@ -131,7 +131,7 @@ describe('Angular async helper', () => { // #docregion fake-async-test-rxjs it('should get Date diff correctly in fakeAsync with rxjs scheduler', fakeAsync(() => { - // need to add `import 'zone.js/dist/zone-patch-rxjs-fake-async' + // need to add `import 'zone.js/plugins/zone-patch-rxjs-fake-async' // to patch rxjs scheduler let result = null; of('hello').pipe(delay(1000)).subscribe(v => { @@ -156,7 +156,7 @@ describe('Angular async helper', () => { // #docregion fake-async-test-clock describe('use jasmine.clock()', () => { // need to config __zone_symbol__fakeAsyncPatchLock flag - // before loading zone.js/dist/zone-testing + // before loading zone.js/testing beforeEach(() => { jasmine.clock().install(); }); @@ -180,7 +180,7 @@ describe('Angular async helper', () => { // do a jsonp call which is not zone aware } // need to config __zone_symbol__supportWaitUnResolvedChainedPromise flag - // before loading zone.js/dist/zone-testing + // before loading zone.js/testing it('should wait until promise.then is called', waitForAsync(() => { let finished = false; new Promise((res, rej) => { diff --git a/aio/content/examples/testing/src/app/shared/canvas.component.ts b/aio/content/examples/testing/src/app/shared/canvas.component.ts index fdfd9db8b0..c118af2a91 100644 --- a/aio/content/examples/testing/src/app/shared/canvas.component.ts +++ b/aio/content/examples/testing/src/app/shared/canvas.component.ts @@ -3,7 +3,7 @@ // Import patch to make async `HTMLCanvasElement` methods (such as `.toBlob()`) Zone.js-aware. // Either import in `polyfills.ts` (if used in more than one places in the app) or in the component // file using `HTMLCanvasElement` (if it is only used in a single file). -import 'zone.js/dist/zone-patch-canvas'; +import 'zone.js/plugins/zone-patch-canvas'; // #enddocregion import-canvas-patch // #docregion main import { Component, AfterViewInit, ViewChild, ElementRef } from '@angular/core'; diff --git a/aio/content/examples/testing/src/main-specs.ts b/aio/content/examples/testing/src/main-specs.ts index b9632512f8..6e7170ca47 100644 --- a/aio/content/examples/testing/src/main-specs.ts +++ b/aio/content/examples/testing/src/main-specs.ts @@ -6,7 +6,7 @@ declare var jasmine; import './polyfills'; -import 'zone.js/dist/zone-testing'; +import 'zone.js/testing'; import { getTestBed } from '@angular/core/testing'; import { diff --git a/aio/content/examples/universal/server.ts b/aio/content/examples/universal/server.ts index 7f4aace2fa..8b9339e753 100644 --- a/aio/content/examples/universal/server.ts +++ b/aio/content/examples/universal/server.ts @@ -1,4 +1,4 @@ -import 'zone.js/dist/zone-node'; +import 'zone.js/node'; import { ngExpressEngine } from '@nguniversal/express-engine'; import * as express from 'express'; diff --git a/aio/content/guide/ivy.md b/aio/content/guide/ivy.md index 8ea0979c39..884444ca62 100644 --- a/aio/content/guide/ivy.md +++ b/aio/content/guide/ivy.md @@ -142,7 +142,7 @@ The following example shows how you modify the `server.ts` file to provide the ` * Set `bootstrap: AppServerModuleNgFactory` in the `ngExpressEngine` call. -import 'zone.js/dist/zone-node'; +import 'zone.js/node'; import { ngExpressEngine } from '@nguniversal/express-engine'; import * as express from 'express'; diff --git a/aio/content/guide/testing-components-scenarios.md b/aio/content/guide/testing-components-scenarios.md index a0a720fb3d..0e0cff413f 100644 --- a/aio/content/guide/testing-components-scenarios.md +++ b/aio/content/guide/testing-components-scenarios.md @@ -371,7 +371,7 @@ value becomes available. The test must become _asynchronous_. #### Async test with _fakeAsync()_ -To use `fakeAsync()` functionality, you must import `zone.js/dist/zone-testing` in your test setup file. +To use `fakeAsync()` functionality, you must import `zone.js/testing` in your test setup file. If you created your project with the Angular CLI, `zone-testing` is already imported in `src/test.ts`. The following test confirms the expected behavior when the service returns an `ErrorObservable`. @@ -453,7 +453,7 @@ If you use the Angular CLI, configure this flag in `src/test.ts`. ``` (window as any)['__zone_symbol__fakeAsyncPatchLock'] = true; -import 'zone.js/dist/zone-testing'; +import 'zone.js/testing'; ``` @@ -583,7 +583,7 @@ Then you can assert that the quote element displays the expected text. #### Async test with _waitForAsync()_ -To use `waitForAsync()` functionality, you must import `zone.js/dist/zone-testing` in your test setup file. +To use `waitForAsync()` functionality, you must import `zone.js/testing` in your test setup file. If you created your project with the Angular CLI, `zone-testing` is already imported in `src/test.ts`.
diff --git a/aio/content/guide/upgrade-setup.md b/aio/content/guide/upgrade-setup.md index 59e938cd38..e385c2fcdc 100644 --- a/aio/content/guide/upgrade-setup.md +++ b/aio/content/guide/upgrade-setup.md @@ -308,7 +308,7 @@ So when IE is refreshed (manually or automatically by `ng serve`), sometimes the ## Appendix: Test using `fakeAsync()/waitForAsync()` -If you use the `fakeAsync()/waitForAsync()` helper function to run unit tests (for details, read the [Testing guide](guide/testing-components-scenarios#fake-async)), you need to import `zone.js/dist/zone-testing` in your test setup file. +If you use the `fakeAsync()/waitForAsync()` helper function to run unit tests (for details, read the [Testing guide](guide/testing-components-scenarios#fake-async)), you need to import `zone.js/testing` in your test setup file.
If you create project with `Angular/CLI`, it is already imported in `src/test.ts`. @@ -317,12 +317,12 @@ If you create project with `Angular/CLI`, it is already imported in `src/test.ts And in the earlier versions of `Angular`, the following files were imported or added in your html file: ``` -import 'zone.js/dist/long-stack-trace-zone'; -import 'zone.js/dist/proxy'; -import 'zone.js/dist/sync-test'; -import 'zone.js/dist/jasmine-patch'; -import 'zone.js/dist/async-test'; -import 'zone.js/dist/fake-async-test'; +import 'zone.js/plugins/long-stack-trace-zone'; +import 'zone.js/plugins/proxy'; +import 'zone.js/plugins/sync-test'; +import 'zone.js/plugins/jasmine-patch'; +import 'zone.js/plugins/async-test'; +import 'zone.js/plugins/fake-async-test'; ``` You can still load those files separately, but the order is important, you must import `proxy` before `sync-test`, `async-test`, `fake-async-test` and `jasmine-patch`. And you also need to import `sync-test` before `jasmine-patch`, so it is recommended to just import `zone-testing` instead of loading those separated files. diff --git a/aio/content/guide/user-input.md b/aio/content/guide/user-input.md index 28858ed869..3e088c49f0 100644 --- a/aio/content/guide/user-input.md +++ b/aio/content/guide/user-input.md @@ -323,7 +323,7 @@ Angular also supports passive event listeners. For example, you can use the foll ``` import './zone-flags'; -import 'zone.js/dist/zone'; // Included with Angular CLI. +import 'zone.js'; // Included with Angular CLI. ``` After those steps, if you add event listeners for the `scroll` event, the listeners will be `passive`. diff --git a/aio/content/guide/zone.md b/aio/content/guide/zone.md index 8bb7dea840..6b1d89ce65 100644 --- a/aio/content/guide/zone.md +++ b/aio/content/guide/zone.md @@ -352,7 +352,7 @@ If you are using the Angular CLI, this step is done automatically, and you will /*************************************************************************************************** * Zone JS is required by default for Angular itself. */ -import 'zone.js/dist/zone'; // Included with Angular CLI. +import 'zone.js'; // Included with Angular CLI. ``` Before importing the `zone.js` package, you can set the following configurations: @@ -380,7 +380,7 @@ Next, import `zone-flags` before you import `zone.js` in the `polyfills.ts`: * Zone JS is required by default for Angular. */ import `./zone-flags`; -import 'zone.js/dist/zone'; // Included with Angular CLI. +import 'zone.js'; // Included with Angular CLI. ``` For more information about what you can configure, see the [Zone.js](https://github.com/angular/angular/tree/master/packages/zone.js) documentation. @@ -406,7 +406,7 @@ To remove Zone.js, make the following changes. /*************************************************************************************************** * Zone JS is required by default for Angular itself. */ - // import 'zone.js/dist/zone'; // Included with Angular CLI. + // import 'zone.js'; // Included with Angular CLI. ``` 2. Bootstrap Angular with the `noop` zone in `src/main.ts`: diff --git a/aio/package.json b/aio/package.json index 760d204adf..3c7b97eb00 100644 --- a/aio/package.json +++ b/aio/package.json @@ -103,7 +103,7 @@ "@webcomponents/custom-elements": "1.2.1", "rxjs": "^6.5.3", "tslib": "^2.0.0", - "zone.js": "~0.11.3" + "zone.js": "~0.11.4" }, "devDependencies": { "@angular-devkit/build-angular": "0.1100.1", diff --git a/aio/src/polyfills.ts b/aio/src/polyfills.ts index 5508a41d96..391e18748f 100644 --- a/aio/src/polyfills.ts +++ b/aio/src/polyfills.ts @@ -55,7 +55,7 @@ /*************************************************************************************************** * Zone JS is required by default for Angular itself. */ -import 'zone.js/dist/zone'; // Included with Angular CLI. +import 'zone.js'; // Included with Angular CLI. /*************************************************************************************************** diff --git a/aio/src/test.ts b/aio/src/test.ts index 1c2f3fced5..3ee82289a1 100644 --- a/aio/src/test.ts +++ b/aio/src/test.ts @@ -1,6 +1,6 @@ // This file is required by karma.conf.js and loads recursively all the .spec and framework files -import 'zone.js/dist/zone-testing'; +import 'zone.js/testing'; import { getTestBed } from '@angular/core/testing'; import { BrowserDynamicTestingModule, diff --git a/aio/tools/examples/shared/boilerplate/cli-ajs/package.json b/aio/tools/examples/shared/boilerplate/cli-ajs/package.json index 7976895e6f..e85bf9dffe 100644 --- a/aio/tools/examples/shared/boilerplate/cli-ajs/package.json +++ b/aio/tools/examples/shared/boilerplate/cli-ajs/package.json @@ -26,7 +26,7 @@ "angular-route": "1.8.0", "rxjs": "~6.6.0", "tslib": "^2.0.0", - "zone.js": "~0.10.3" + "zone.js": "~0.11.4" }, "devDependencies": { "@angular-devkit/build-angular": "~0.1100.2", diff --git a/aio/tools/examples/shared/boilerplate/cli/package.json b/aio/tools/examples/shared/boilerplate/cli/package.json index 650e25fa45..b77ad97a8b 100644 --- a/aio/tools/examples/shared/boilerplate/cli/package.json +++ b/aio/tools/examples/shared/boilerplate/cli/package.json @@ -24,7 +24,7 @@ "angular-in-memory-web-api": "~0.11.0", "rxjs": "~6.6.0", "tslib": "^2.0.0", - "zone.js": "~0.10.3" + "zone.js": "~0.11.4" }, "devDependencies": { "@angular-devkit/build-angular": "~0.1100.2", diff --git a/aio/tools/examples/shared/boilerplate/cli/src/environments/environment.ts b/aio/tools/examples/shared/boilerplate/cli/src/environments/environment.ts index 7b4f817adb..30d7bccb19 100644 --- a/aio/tools/examples/shared/boilerplate/cli/src/environments/environment.ts +++ b/aio/tools/examples/shared/boilerplate/cli/src/environments/environment.ts @@ -13,4 +13,4 @@ export const environment = { * This import should be commented out in production mode because it will have a negative impact * on performance if an error is thrown. */ -// import 'zone.js/dist/zone-error'; // Included with Angular CLI. +// import 'zone.js/plugins/zone-error'; // Included with Angular CLI. diff --git a/aio/tools/examples/shared/boilerplate/cli/src/polyfills.ts b/aio/tools/examples/shared/boilerplate/cli/src/polyfills.ts index f38ef7d0e5..0eda6f23d9 100644 --- a/aio/tools/examples/shared/boilerplate/cli/src/polyfills.ts +++ b/aio/tools/examples/shared/boilerplate/cli/src/polyfills.ts @@ -57,7 +57,7 @@ /*************************************************************************************************** * Zone JS is required by default for Angular itself. */ -import 'zone.js/dist/zone'; // Included with Angular CLI. +import 'zone.js'; // Included with Angular CLI. /*************************************************************************************************** * APPLICATION IMPORTS diff --git a/aio/tools/examples/shared/boilerplate/cli/src/test.ts b/aio/tools/examples/shared/boilerplate/cli/src/test.ts index 50193eb0f2..2042356408 100644 --- a/aio/tools/examples/shared/boilerplate/cli/src/test.ts +++ b/aio/tools/examples/shared/boilerplate/cli/src/test.ts @@ -1,6 +1,6 @@ // This file is required by karma.conf.js and loads recursively all the .spec and framework files -import 'zone.js/dist/zone-testing'; +import 'zone.js/testing'; import { getTestBed } from '@angular/core/testing'; import { BrowserDynamicTestingModule, diff --git a/aio/tools/examples/shared/boilerplate/elements/package.json b/aio/tools/examples/shared/boilerplate/elements/package.json index 9d1f1edd39..2be24254a2 100644 --- a/aio/tools/examples/shared/boilerplate/elements/package.json +++ b/aio/tools/examples/shared/boilerplate/elements/package.json @@ -26,7 +26,7 @@ "angular-in-memory-web-api": "~0.11.0", "rxjs": "~6.6.0", "tslib": "^2.0.0", - "zone.js": "~0.10.3" + "zone.js": "~0.11.4" }, "devDependencies": { "@angular-devkit/build-angular": "~0.1100.2", diff --git a/aio/tools/examples/shared/boilerplate/elements/src/polyfills.ts b/aio/tools/examples/shared/boilerplate/elements/src/polyfills.ts index 08b4d9cd60..0cbc235b5d 100644 --- a/aio/tools/examples/shared/boilerplate/elements/src/polyfills.ts +++ b/aio/tools/examples/shared/boilerplate/elements/src/polyfills.ts @@ -57,7 +57,7 @@ /*************************************************************************************************** * Zone JS is required by default for Angular itself. */ -import 'zone.js/dist/zone'; // Included with Angular CLI. +import 'zone.js'; // Included with Angular CLI. /*************************************************************************************************** * APPLICATION IMPORTS diff --git a/aio/tools/examples/shared/boilerplate/i18n/package.json b/aio/tools/examples/shared/boilerplate/i18n/package.json index 00d0b723f8..1bf9886fbf 100644 --- a/aio/tools/examples/shared/boilerplate/i18n/package.json +++ b/aio/tools/examples/shared/boilerplate/i18n/package.json @@ -28,7 +28,7 @@ "angular-in-memory-web-api": "~0.11.0", "rxjs": "~6.6.0", "tslib": "^2.0.0", - "zone.js": "~0.10.3" + "zone.js": "~0.11.4" }, "devDependencies": { "@angular-devkit/build-angular": "~0.1100.2", diff --git a/aio/tools/examples/shared/boilerplate/i18n/src/polyfills.ts b/aio/tools/examples/shared/boilerplate/i18n/src/polyfills.ts index 3424b9d3f4..baa1b8bd36 100644 --- a/aio/tools/examples/shared/boilerplate/i18n/src/polyfills.ts +++ b/aio/tools/examples/shared/boilerplate/i18n/src/polyfills.ts @@ -61,7 +61,7 @@ import '@angular/localize/init'; /*************************************************************************************************** * Zone JS is required by default for Angular itself. */ -import 'zone.js/dist/zone'; // Included with Angular CLI. +import 'zone.js'; // Included with Angular CLI. /*************************************************************************************************** * APPLICATION IMPORTS diff --git a/aio/tools/examples/shared/boilerplate/service-worker/package.json b/aio/tools/examples/shared/boilerplate/service-worker/package.json index a2857856f9..0944c066c2 100644 --- a/aio/tools/examples/shared/boilerplate/service-worker/package.json +++ b/aio/tools/examples/shared/boilerplate/service-worker/package.json @@ -25,7 +25,7 @@ "angular-in-memory-web-api": "~0.11.0", "rxjs": "~6.6.0", "tslib": "^2.0.0", - "zone.js": "~0.10.3" + "zone.js": "~0.11.4" }, "devDependencies": { "@angular-devkit/build-angular": "~0.1100.2", diff --git a/aio/tools/examples/shared/boilerplate/systemjs/package.json b/aio/tools/examples/shared/boilerplate/systemjs/package.json index 74268723ea..d7f606185e 100644 --- a/aio/tools/examples/shared/boilerplate/systemjs/package.json +++ b/aio/tools/examples/shared/boilerplate/systemjs/package.json @@ -39,7 +39,7 @@ "core-js": "^2.5.4", "rxjs": "~6.6.0", "tslib": "^2.0.0", - "zone.js": "~0.10.3" + "zone.js": "~0.11.4" }, "devDependencies": { "@angular/compiler-cli": "~11.0.1", diff --git a/aio/tools/examples/shared/boilerplate/universal/package.json b/aio/tools/examples/shared/boilerplate/universal/package.json index 95d746fcaa..225affe31a 100644 --- a/aio/tools/examples/shared/boilerplate/universal/package.json +++ b/aio/tools/examples/shared/boilerplate/universal/package.json @@ -31,7 +31,7 @@ "express": "^4.15.2", "rxjs": "~6.6.0", "tslib": "^2.0.0", - "zone.js": "~0.10.3" + "zone.js": "~0.11.4" }, "devDependencies": { "@angular-devkit/build-angular": "~0.1100.2", diff --git a/aio/tools/examples/shared/package.json b/aio/tools/examples/shared/package.json index e83be372d6..19d377d9ea 100644 --- a/aio/tools/examples/shared/package.json +++ b/aio/tools/examples/shared/package.json @@ -44,7 +44,7 @@ "rxjs": "~6.6.0", "systemjs": "0.19.39", "tslib": "^2.0.0", - "zone.js": "~0.10.3" + "zone.js": "~0.11.4" }, "devDependencies": { "@angular-devkit/build-angular": "~0.1100.2", diff --git a/aio/tools/examples/shared/yarn.lock b/aio/tools/examples/shared/yarn.lock index e7005fe0ab..d2bc19e4ec 100644 --- a/aio/tools/examples/shared/yarn.lock +++ b/aio/tools/examples/shared/yarn.lock @@ -12663,3 +12663,10 @@ zone.js@~0.10.3: version "0.10.3" resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.10.3.tgz#3e5e4da03c607c9dcd92e37dd35687a14a140c16" integrity sha512-LXVLVEq0NNOqK/fLJo3d0kfzd4sxwn2/h67/02pjCjfKDxgx1i9QqpvtHD8CrBnSSwMw5+dy11O7FRX5mkO7Cg== + +zone.js@~0.11.4: + version "0.11.4" + resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.11.4.tgz#0f70dcf6aba80f698af5735cbb257969396e8025" + integrity sha512-DDh2Ab+A/B+9mJyajPjHFPWfYU1H+pdun4wnnk0OcQTNjem1XQSZ2CDW+rfZEUDjv5M19SBqAkjZi0x5wuB5Qw== + dependencies: + tslib "^2.0.0" diff --git a/aio/yarn.lock b/aio/yarn.lock index ddf6d70652..6196040838 100644 --- a/aio/yarn.lock +++ b/aio/yarn.lock @@ -14704,9 +14704,9 @@ zone.js@~0.10.3: resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.10.3.tgz#3e5e4da03c607c9dcd92e37dd35687a14a140c16" integrity sha512-LXVLVEq0NNOqK/fLJo3d0kfzd4sxwn2/h67/02pjCjfKDxgx1i9QqpvtHD8CrBnSSwMw5+dy11O7FRX5mkO7Cg== -zone.js@~0.11.3: - version "0.11.3" - resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.11.3.tgz#255a6313174731cc014d63233ef04fd9858da375" - integrity sha512-Y4hTHoh4VcxU5BDGAqEoOnOiyT254w6CiHtpQxAJUSMZPyVgdbKf+5R7Mwz6xsPhMIeBXk5rTopRZDpjssTCUg== +zone.js@~0.11.4: + version "0.11.4" + resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.11.4.tgz#0f70dcf6aba80f698af5735cbb257969396e8025" + integrity sha512-DDh2Ab+A/B+9mJyajPjHFPWfYU1H+pdun4wnnk0OcQTNjem1XQSZ2CDW+rfZEUDjv5M19SBqAkjZi0x5wuB5Qw== dependencies: tslib "^2.0.0" diff --git a/scripts/release/post-check-next b/scripts/release/post-check-next index c45f95911f..2480437ddf 100755 --- a/scripts/release/post-check-next +++ b/scripts/release/post-check-next @@ -7,7 +7,7 @@ mkdir tmp cd tmp npm init -y -npm install typescript@~3.8.3 rxjs@^6.5.3 zone.js@~0.11.3 @bazel/typescript@^1.0.0 rollup@^1.20.0 rollup-plugin-commonjs@^9.0.0 rollup-plugin-node-resolve@^4.2.0 rollup-plugin-sourcemaps@0.4.0 @angular/{animations,bazel,common,compiler,compiler-cli,core,elements,forms,language-service,localize,platform-browser,platform-browser-dynamic,platform-server,router,service-worker,upgrade}@next --save +npm install typescript@~3.8.3 rxjs@^6.5.3 zone.js@~0.11.4 @bazel/typescript@^1.0.0 rollup@^1.20.0 rollup-plugin-commonjs@^9.0.0 rollup-plugin-node-resolve@^4.2.0 rollup-plugin-sourcemaps@0.4.0 @angular/{animations,bazel,common,compiler,compiler-cli,core,elements,forms,language-service,localize,platform-browser,platform-browser-dynamic,platform-server,router,service-worker,upgrade}@next --save cd .. rm -rf tmp