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
This commit is contained in:

committed by
Miško Hevery

parent
531fa00992
commit
17f7bdbd60
@ -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
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ export interface PendingMacrotask {
|
||||
source: string;
|
||||
creationLocation: Error;
|
||||
runCount?: number;
|
||||
data: TaskData;
|
||||
data?: TaskData;
|
||||
}
|
||||
|
||||
export interface TaskData {
|
||||
|
@ -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(() => {
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user