dojo / core

:rocket: Dojo 2 - language helpers and utilities.
http://dojo.io
Other
213 stars 58 forks source link

Refactored for removal of Promise shim from dojo/shim, shim issue #21 #219

Closed rorticus closed 8 years ago

rorticus commented 8 years ago

This is part of shim #21! We removed the promise shim and are returning the native promise object.

It looks like in Typescript, if you cannot extend Promise and compile down to ES5. So in the mean time, I've created a Promise wrapper thingy, similar to what was in shim. The wrapper includes a finally because Task needed it.

It turns out that the promise shim from dojo/shim was swallowing uncaught errors. When you run the tests now, you get a ton of uncaught error messages (but the tests pass).

Did I mention this is dependent on https://github.com/dojo/shim/pull/41 ?

codecov-io commented 8 years ago

Current coverage is 97.37% (diff: 100%)

Merging #219 into master will decrease coverage by 0.04%

@@             master       #219   diff @@
==========================================
  Files            44         45     +1   
  Lines          2326       2359    +33   
  Methods          26         25     -1   
  Messages          0          0          
  Branches        445        449     +4   
==========================================
+ Hits           2266       2297    +31   
- Misses           56         58     +2   
  Partials          4          4          

Powered by Codecov. Last update 3c14776...725d190

kitsonk commented 8 years ago

We should rebase this off of master while we are getting dojo/shim#41 sorted out as there has been quite a bit of machinations in there with the integration of dojo-interfaces.

kitsonk commented 8 years ago

Actually this is now independent of dojo/shim#41, because it has now abstracted itself from that, which is good. While there is a risk that when dojo/shim#41 gets published, it causes a regression, but both @rorticus and myself have tested against linked versions of this. This is a great example of decoupling!