You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
We found this bug from a report of our use of Zone.js in the Application Insights Node.js SDK causing generator functions to not get called: microsoft/ApplicationInsights-node.js#267
Native promises in Node.js support taking the result of a generator function as an argument to Promise.all, and wait for all yielded promises to complete. For example:
…f when build zone-node (#897)
* feat(compile): fix#892, upgrade to typescript 2.3.4(same with angular), add downlevelIteration options when build zone-node
* local test should also use downlevelIteration option
We found this bug from a report of our use of Zone.js in the Application Insights Node.js SDK causing generator functions to not get called: microsoft/ApplicationInsights-node.js#267
Native promises in Node.js support taking the result of a generator function as an argument to
Promise.all
, and wait for all yielded promises to complete. For example:will print out
[ '1', '2', '3' ]
. This breaks when including zone into the project.The code for the
ZoneAwarePromise.all
method correctly uses a for-of loop to iterate its value (seezone.js/lib/common/promise.ts
Line 273 in a66595a
However, the compiled source, for zone-node at least, converts this into a standard for loop iterating an index against
value.length
(seezone.js/dist/zone-node.js
Line 893 in b9c0d9c
The end result is executing the code sample above with zone.js included is getting the following printed out:
[]
The text was updated successfully, but these errors were encountered: