angular/packages/zone.js/lib
arturovt 260d3ed0d9 fix(zone.js): patch Response methods returned by fetch (#50653)
This commit updates the implementation of the `fetch` patch and additionally
patches `Response` methods which return promises. These are `arrayBuffer`, `blob`,
`formData`, `json` and `text`. This fixes the issue when zone becomes stable too early
before all of the `fetch` tasks complete. Given the following code:
```ts
appRef.isStable.subscribe(console.log);
fetch(...).then(response => response.json()).then(console.log);
```
The `isStable` observer would log `false, true, false, true`. This was happening because
`json()` was returning a native promise (and not a `ZoneAwarePromise`). But calling `then`
on the native promise returns a `ZoneAwarePromise` which notifies Angular about the task
being scheduled and forces to re-calculate the `isStable` state.

Issue: #50327

PR Close #50653
2024-01-31 14:57:25 +00:00
..
browser feat(zone.js): remove legacy files and access to deep imports (#51752) 2023-09-14 12:11:05 +02:00
common fix(zone.js): patch Response methods returned by fetch (#50653) 2024-01-31 14:57:25 +00:00
extra docs: fix spelling (#46713) 2022-07-08 20:54:52 +00:00
jasmine refactor(zone.js): remove leftover debugging code using Error.stack (#46989) 2022-08-01 09:52:29 -07:00
jest feat(zone.js): jest 29 should ignore uncaught error console log (#49325) 2023-03-27 08:33:49 -07:00
mix build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
mocha fix(zone.js): revert Mocha it.skip, describe.skip method patch (#49329) 2023-03-14 09:13:57 -07:00
node fix(zone.js): enable monkey patching of the queueMicrotask() API in node.js (#50530) 2023-06-07 12:42:33 -07:00
rxjs fix(zone.js): zone patch rxjs should return null _unsubscribe correctly. (#37091) 2020-07-27 12:10:27 -07:00
testing refactor(core): remove unused fakeAsyncFallback and asyncFallback (#37879) 2020-11-20 08:34:59 -08:00
zone-spec refactor(zone.js): remove zone-async-tagging from zone.js (#47416) 2022-09-23 14:44:38 -07:00
BUILD.bazel refactor: update zone.js and tests to work with ESM (#48521) 2022-12-19 19:50:44 +00:00
zone-global.d.ts fix(zone.js): remove global declaration (#37861) 2020-10-23 15:19:49 -07:00
zone.api.extensions.ts refactor(zone.js): change from scripts to modules (#53445) 2024-01-09 13:20:50 -08:00
zone.configurations.api.ts fix(zone.js): add __Zone_ignore_on_properties to ZoneGlobalConfigurations (#50737) 2024-01-31 14:56:57 +00:00
zone.ts refactor(zone.js): change from scripts to modules (#53445) 2024-01-09 13:20:50 -08:00