From 17f7bdbd60708f43ea78bb1237268f6920448ba8 Mon Sep 17 00:00:00 2001 From: JiaLiPassion Date: Fri, 18 Jan 2019 09:52:34 +0900 Subject: [PATCH] build: update zone.js to 0.9.0 (#28219) The API changes are due to enabling strict checks in TypeScript (via `strict: true`). The payload size changes in `polyfills.js` are due to more browser APIs being patched in recent versions (e.g. `fetch`, `customElement v1`). PR Close #28219 --- aio/package.json | 2 +- aio/scripts/_payload-limits.json | 2 +- .../examples/shared/boilerplate/cli/package.json | 2 +- .../examples/shared/boilerplate/i18n/package.json | 2 +- .../shared/boilerplate/service-worker/package.json | 2 +- .../shared/boilerplate/universal/package.json | 2 +- aio/tools/examples/shared/package.json | 2 +- aio/tools/examples/shared/yarn.lock | 7 ++++--- aio/yarn.lock | 7 ++++--- integration/_payload-limits.json | 8 ++++---- integration/bazel/src/package.json | 2 +- integration/bazel/src/yarn.lock | 8 ++++---- package.json | 2 +- packages/core/package.json | 6 +++--- packages/core/src/testability/testability.ts | 2 +- packages/core/test/testability/testability_spec.ts | 11 ++++++----- packages/core/testing/src/async_fallback.ts | 4 ++-- yarn.lock | 8 ++++---- 18 files changed, 41 insertions(+), 38 deletions(-) diff --git a/aio/package.json b/aio/package.json index 0e26700275..fb09b2007b 100644 --- a/aio/package.json +++ b/aio/package.json @@ -93,7 +93,7 @@ "classlist.js": "^1.1.20150312", "core-js": "^2.4.1", "rxjs": "^6.3.0", - "zone.js": "^0.8.26" + "zone.js": "^0.9.0" }, "devDependencies": { "@angular-devkit/build-angular": "^0.12.1", diff --git a/aio/scripts/_payload-limits.json b/aio/scripts/_payload-limits.json index f8db1d02d6..7d1b3a4c69 100755 --- a/aio/scripts/_payload-limits.json +++ b/aio/scripts/_payload-limits.json @@ -4,7 +4,7 @@ "uncompressed": { "runtime": 3713, "main": 509261, - "polyfills": 53926 + "polyfills": 59197 } } } diff --git a/aio/tools/examples/shared/boilerplate/cli/package.json b/aio/tools/examples/shared/boilerplate/cli/package.json index e06993f14c..72a5364281 100644 --- a/aio/tools/examples/shared/boilerplate/cli/package.json +++ b/aio/tools/examples/shared/boilerplate/cli/package.json @@ -24,7 +24,7 @@ "core-js": "^2.5.4", "rxjs": "^6.3.0", "web-animations-js": "^2.3.1", - "zone.js": "~0.8.26" + "zone.js": "~0.9.0" }, "devDependencies": { "@angular-devkit/build-angular": "^0.10.0", diff --git a/aio/tools/examples/shared/boilerplate/i18n/package.json b/aio/tools/examples/shared/boilerplate/i18n/package.json index ec04e72201..2a9766fba7 100644 --- a/aio/tools/examples/shared/boilerplate/i18n/package.json +++ b/aio/tools/examples/shared/boilerplate/i18n/package.json @@ -27,7 +27,7 @@ "core-js": "^2.5.4", "rxjs": "^6.3.0", "web-animations-js": "^2.3.1", - "zone.js": "~0.8.26" + "zone.js": "~0.9.0" }, "devDependencies": { "@angular-devkit/build-angular": "^0.10.0", diff --git a/aio/tools/examples/shared/boilerplate/service-worker/package.json b/aio/tools/examples/shared/boilerplate/service-worker/package.json index 1b1f5756f2..029e7c55c9 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 @@ "core-js": "^2.5.4", "rxjs": "^6.3.0", "web-animations-js": "^2.3.1", - "zone.js": "~0.8.26" + "zone.js": "~0.9.0" }, "devDependencies": { "@angular-devkit/build-angular": "^0.10.0", diff --git a/aio/tools/examples/shared/boilerplate/universal/package.json b/aio/tools/examples/shared/boilerplate/universal/package.json index 243c274fd0..6a8f3df113 100644 --- a/aio/tools/examples/shared/boilerplate/universal/package.json +++ b/aio/tools/examples/shared/boilerplate/universal/package.json @@ -32,7 +32,7 @@ "core-js": "^2.5.4", "rxjs": "^6.3.0", "web-animations-js": "^2.3.1", - "zone.js": "~0.8.26" + "zone.js": "~0.9.0" }, "devDependencies": { "@angular-devkit/build-angular": "^0.10.0", diff --git a/aio/tools/examples/shared/package.json b/aio/tools/examples/shared/package.json index e92d202009..5de4fcbd4e 100644 --- a/aio/tools/examples/shared/package.json +++ b/aio/tools/examples/shared/package.json @@ -39,7 +39,7 @@ "rxjs": "^6.3.0", "systemjs": "0.19.39", "web-animations-js": "^2.3.1", - "zone.js": "~0.8.26" + "zone.js": "~0.9.0" }, "devDependencies": { "@angular-devkit/build-angular": "^0.11.0", diff --git a/aio/tools/examples/shared/yarn.lock b/aio/tools/examples/shared/yarn.lock index 63aadfc2ac..b757814a5d 100644 --- a/aio/tools/examples/shared/yarn.lock +++ b/aio/tools/examples/shared/yarn.lock @@ -8738,6 +8738,7 @@ yn@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/yn/-/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a" -zone.js@~0.8.26: - version "0.8.26" - resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.8.26.tgz#7bdd72f7668c5a7ad6b118148b4ea39c59d08d2d" +zone.js@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.9.0.tgz#f42319d657f7616724ed40c5907d4614b4c683fa" + integrity sha512-EfygvVnLxPSCMSgJ4h7SoY+XNr7ybdwvvwEQ70lvMFl9coNnciXSyWi8Kg6znK1ubyUSffkCKvleSQpLuUKw0Q== diff --git a/aio/yarn.lock b/aio/yarn.lock index 6decfc20e4..3d8116aae8 100644 --- a/aio/yarn.lock +++ b/aio/yarn.lock @@ -11698,6 +11698,7 @@ zip-stream@^1.1.0, zip-stream@^1.2.0: lodash "^4.8.0" readable-stream "^2.0.0" -zone.js@^0.8.26: - version "0.8.26" - resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.8.26.tgz#7bdd72f7668c5a7ad6b118148b4ea39c59d08d2d" +zone.js@^0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.9.0.tgz#f42319d657f7616724ed40c5907d4614b4c683fa" + integrity sha512-EfygvVnLxPSCMSgJ4h7SoY+XNr7ybdwvvwEQ70lvMFl9coNnciXSyWi8Kg6znK1ubyUSffkCKvleSQpLuUKw0Q== diff --git a/integration/_payload-limits.json b/integration/_payload-limits.json index 7b6f0c4f07..190fa36ce2 100644 --- a/integration/_payload-limits.json +++ b/integration/_payload-limits.json @@ -3,8 +3,8 @@ "master": { "uncompressed": { "runtime": 1497, - "main": 164671, - "polyfills": 38449 + "main": 164945, + "polyfills": 43626 } } }, @@ -13,7 +13,7 @@ "uncompressed": { "runtime": 1440, "main": 14106, - "polyfills": 38390 + "polyfills": 43567 } } }, @@ -22,7 +22,7 @@ "uncompressed": { "runtime": 1440, "main": 212976, - "polyfills": 38390 + "polyfills": 43567 } } }, diff --git a/integration/bazel/src/package.json b/integration/bazel/src/package.json index c9d10968f6..c415aca56a 100644 --- a/integration/bazel/src/package.json +++ b/integration/bazel/src/package.json @@ -13,7 +13,7 @@ "reflect-metadata": "0.1.12", "rxjs": "6.4.0", "tslib": "1.9.3", - "zone.js": "0.8.26" + "zone.js": "0.9.0" }, "devDependencies": { "@angular/bazel": "packages-dist:bazel", diff --git a/integration/bazel/src/yarn.lock b/integration/bazel/src/yarn.lock index 9eaa7cac0e..4a660abeb8 100644 --- a/integration/bazel/src/yarn.lock +++ b/integration/bazel/src/yarn.lock @@ -3700,7 +3700,7 @@ z-schema@~3.18.3: optionalDependencies: commander "^2.7.1" -zone.js@0.8.26: - version "0.8.26" - resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.8.26.tgz#7bdd72f7668c5a7ad6b118148b4ea39c59d08d2d" - integrity sha512-W9Nj+UmBJG251wkCacIkETgra4QgBo/vgoEkb4a2uoLzpQG7qF9nzwoLXWU5xj3Fg2mxGvEDh47mg24vXccYjA== +zone.js@0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.9.0.tgz#f42319d657f7616724ed40c5907d4614b4c683fa" + integrity sha512-EfygvVnLxPSCMSgJ4h7SoY+XNr7ybdwvvwEQ70lvMFl9coNnciXSyWi8Kg6znK1ubyUSffkCKvleSQpLuUKw0Q== diff --git a/package.json b/package.json index adfa9c2e0f..56ec5f2f08 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "typescript": "~3.3.3333", "xhr2": "0.1.4", "yargs": "9.0.1", - "zone.js": "^0.8.26" + "zone.js": "^0.9.0" }, "optionalDependencies": { "fsevents": "2.0.1" diff --git a/packages/core/package.json b/packages/core/package.json index fea6ca27ae..8fce023349 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -17,15 +17,15 @@ }, "peerDependencies": { "rxjs": "^6.0.0", - "zone.js": "~0.8.26" + "zone.js": "~0.9.0" }, "repository": { "type": "git", "url": "https://github.com/angular/angular.git" }, "ng-update": { - "migrations":"./schematics/migrations.json", + "migrations": "./schematics/migrations.json", "packageGroup": "NG_UPDATE_PACKAGE_GROUP" }, "sideEffects": false -} \ No newline at end of file +} diff --git a/packages/core/src/testability/testability.ts b/packages/core/src/testability/testability.ts index e555300bfb..05cfc9c536 100644 --- a/packages/core/src/testability/testability.ts +++ b/packages/core/src/testability/testability.ts @@ -27,7 +27,7 @@ export interface PendingMacrotask { source: string; creationLocation: Error; runCount?: number; - data: TaskData; + data?: TaskData; } export interface TaskData { diff --git a/packages/core/test/testability/testability_spec.ts b/packages/core/test/testability/testability_spec.ts index 7eb7a09303..ad604b8cf1 100644 --- a/packages/core/test/testability/testability_spec.ts +++ b/packages/core/test/testability/testability_spec.ts @@ -143,9 +143,10 @@ class MockNgZone extends NgZone { const tasks = execute.calls.mostRecent().args[1] as PendingMacrotask[]; expect(tasks.length).toEqual(1); - expect(tasks[0].data.delay).toEqual(1000); + expect(tasks[0].data).toBeTruthy(); + expect(tasks[0].data !.delay).toEqual(1000); expect(tasks[0].source).toEqual('setTimeout'); - expect(tasks[0].data.isPeriodic).toEqual(false); + expect(tasks[0].data !.isPeriodic).toEqual(false); clearTimeout(id); })); @@ -207,11 +208,11 @@ class MockNgZone extends NgZone { expect(execute).toHaveBeenCalled(); const update1 = updateCallback.calls.all()[0].args[0] as PendingMacrotask[]; - expect(update1[0].data.delay).toEqual(500); + expect(update1[0].data !.delay).toEqual(500); const update2 = updateCallback.calls.all()[1].args[0] as PendingMacrotask[]; - expect(update2[0].data.delay).toEqual(500); - expect(update2[1].data.delay).toEqual(300); + expect(update2[0].data !.delay).toEqual(500); + expect(update2[1].data !.delay).toEqual(300); })); it('cancels the done callback if the update callback returns true', fakeAsync(() => { diff --git a/packages/core/testing/src/async_fallback.ts b/packages/core/testing/src/async_fallback.ts index a2c8250b12..2fa447f7a6 100644 --- a/packages/core/testing/src/async_fallback.ts +++ b/packages/core/testing/src/async_fallback.ts @@ -87,7 +87,7 @@ function runInTestZone( // If we do it in ProxyZone then we will get to infinite recursion. const proxyZone = Zone.current.getZoneWith('ProxyZoneSpec'); const previousDelegate = proxyZoneSpec.getDelegate(); - proxyZone.parent.run(() => { + proxyZone !.parent !.run(() => { const testZoneSpec: ZoneSpec = new AsyncTestZoneSpec( () => { // Need to restore the original zone. @@ -113,4 +113,4 @@ function runInTestZone( proxyZoneSpec.setDelegate(testZoneSpec); }); return Zone.current.runGuarded(fn, context); -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index b9bc0a552e..c417d79185 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11261,7 +11261,7 @@ zip-stream@^1.0.0, zip-stream@^1.1.0, zip-stream@^1.2.0: lodash "^4.8.0" readable-stream "^2.0.0" -zone.js@^0.8.26: - version "0.8.26" - resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.8.26.tgz#7bdd72f7668c5a7ad6b118148b4ea39c59d08d2d" - integrity sha512-W9Nj+UmBJG251wkCacIkETgra4QgBo/vgoEkb4a2uoLzpQG7qF9nzwoLXWU5xj3Fg2mxGvEDh47mg24vXccYjA== +zone.js@^0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.9.0.tgz#f42319d657f7616724ed40c5907d4614b4c683fa" + integrity sha512-EfygvVnLxPSCMSgJ4h7SoY+XNr7ybdwvvwEQ70lvMFl9coNnciXSyWi8Kg6znK1ubyUSffkCKvleSQpLuUKw0Q==