Skip to content

chore: update master branch with zone.js 0.8.19 [DO NOT MERGE]#3

Merged
vakrilov merged 273 commits intoNativeScript:masterfrom
justindujardin:master
May 9, 2018
Merged

chore: update master branch with zone.js 0.8.19 [DO NOT MERGE]#3
vakrilov merged 273 commits intoNativeScript:masterfrom
justindujardin:master

Conversation

@justindujardin
Copy link
Copy Markdown

alxhub and others added 30 commits October 18, 2016 13:42
`resolvePromise` assumes that if a value is an `instanceof` ZoneAwarePromise
then it has the properties "__zone_symbol__state" and "__zone_symbol__value"
and it _is_ a true ZoneAwarePromise; however, a user can construct a value that
breaks this assumption by inheriting from ZoneAwarePromise without actually
having those properties or being a true ZoneAwarePromise (for example, by
attempting to subclass Promise).

We can fix this by adding checks for "__zone_symbol__state" and
"__zone_symbol__value" to `resolvePromise`.
This will add the badge to show its version on CDNJS and also link to its page on CDNJS!
…atch. (angular#500)

* fix long-stack-trace zone will not render correctly when reject a promise

* fix issue angular#484 and angular#491, patch EventEmitter.once and removeAllListeners

* add event emitter once test case

* prependlistener should add listener at the beginning of the listener array.
add test cases for prepend listener and once.

* use newest fetch to test
System.js loads zone.js using XHR and then evals. In Safari the stack 
traces come with no line numbers as it does not honor inline 
source-maps. This prevents stack analysis. By loading it explicitly 
using script tag the zone.js has proper line numbers for its stack 
traces.
The errors caused by the Zone contain extra stack frames. This feature
removes the confusing stack frames as well as appends the zone for each
stack frame to get a better understanding of the error messages.

Improved Error:
```
Error.spec.js:54 Error: Inside [InnerZone]
    at insideRun (Error.spec.js:31) [InnerZone]
    at Zone.run (zone.js:100) [<root> => InnerZone]
    at testFn (Error.spec.js:29) [<root>]
    at Zone.run (zone.js:100) [ProxyZone => <root>]
    at Object.eval (Error.spec.js:19) [ProxyZone]
```

Original Error:
```
Error.spec.js:53 Error: Inside
    at ZoneAwareError (zone.js:652)
    at insideRun (Error.spec.js:31)
    at ZoneDelegate.invoke (zone.js:216)
    at Zone.run (zone.js:100)
    at testFn (Error.spec.js:29)
    at ZoneDelegate.invoke (zone.js:216)
    at Zone.run (zone.js:100)
    at Object.eval (Error.spec.js:19)
```
…tch process.nextTick, fix removeAllListeners bug (angular#516)

* fix long-stack-trace zone will not render correctly when reject a promise

* fix issue angular#484 and angular#491, patch EventEmitter.once and removeAllListeners

* add event emitter once test case

* prependlistener should add listener at the beginning of the listener array.
add test cases for prepend listener and once.

* use newest fetch to test

* patch process.nextTick

* restore ZoneAwareError captureStackTrace function

* move captureStackTrace test into node

* use hasOwnProperty for check captureStackTrace exist or not

* change var to const

* add process.spec.ts into node_tests.ts target

* add done in process.spec.ts

* change var to let

* add nexttick order case

* add prepareStackTrace callback to ZoneAwareError

* fix when EventEmitter removeAllListeners has no event type parameter, should remove all listeners

* change some var to let/const, remove unnecessary cancelTask call

* modify testcases

* remove typo

* use zone.scheduleMicrotask to patch process.nextTick

* forget use let/const again

* add comment to removeAllListeners patch, and remove useCapturing parameter cause it is not needed

* update fetch to 2.0.1
* fix bug add event listener to xhrhttprequest multiple times and invalid request call (angular#529)
* fix bug add event listener to xhrhttprequest multiple times angular#527
* fix angular#287 with a better solution to prevent memory leak
* fix angular#530 for xhr request to an invalid url cause Schedule task count failed
Closes  angular#524

'isNode' will now be false in nw.js environment so 'isBrowser' will be true and 'propertyDescriptorPatch' will be executed correctly
Fix angular#587, currentzone in all hook methods will not be corrent if current zone has no hook method (angular#539)
fix angular#544, add reconnect options in sauce shell (angular#545)
fix angular#546, should keep error prototype chain correctly (angular#547)
* add generic patch eventtarget method

* export types

* unify api name
JiaLiPassion and others added 27 commits September 27, 2017 13:19
* fix(bazel): add zone-testing bundle for bazel build

* fix(build): fix angular#404, add zone-testing to load test related files

* fix(build): add zone-testing-node-bundle
Due to stricter generic type checks, signatures for ZoneAwarePromise
need to be changed. See
microsoft/TypeScript#16368

The signatures from lib.es5.d.ts were copied over for .then and .catch.
This lets us skip the ProxyZone if we really don't need it in our tests.
…, fix rxjs version to pass CI (angular#935)

* fix(timer): setInterval should not auto cancel after callback invoked

* fix rxjs to 5.4.2

* fix(test): update rxjs to 5.5.3, update RAF test case to avoid timeout
…stable macroTask (angular#938)

* fix(fakeAsyncTest): fix angular#937, let user be able to customize testable macroTask

* add global flag to define fakeAsyncTest macroTaskOptions

* support set callback arguments
- `window` does not exist in NativeScript applications.
- this removes a hacky workaround where you assign `global.window` to `global` before including the mocha patch.
- preserve existing behavior by using window first if it exists.
Without this extra star, the Closure commands in the jsdoc are ignored.
This change adds an `unpkg` field to package.json that will allow users
to load zone.js via unpkg w/out using the ?main=browser query parameter.

Also, we're removing support for using the `browser` fallback on
unpkg.com due to the fact that it was originally intended to be used by
bundlers, which unpkg is not.

For more info, please see unpkg/unpkg#63
…ise error (angular#959)

* feat(promise): fix angular#955, print readable log when uncaught promise error

* fix(promise): handle test case error in IE
@justindujardin justindujardin changed the title chore: update master branch with zone.js 0.8.19 chore: update master branch with zone.js 0.8.19 [DO NOT MERGE] Jan 9, 2018
@hypery2k
Copy link
Copy Markdown

hypery2k commented May 5, 2018

@alxhub Will this be going to get merged?

@vakrilov vakrilov merged commit 288f472 into NativeScript:master May 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.