ysmood / yaku

A lightweight promise library
https://tonicdev.com/ysmood/yaku
MIT License
291 stars 28 forks source link

`finally` is now stage 2 #35

Closed JakeChampion closed 7 years ago

JakeChampion commented 8 years ago

When do we consider adding finally to yaku? https://github.com/tc39/proposal-promise-finally

From yaku readme:

  • Will Yaku implement done, finally, etc?

No. All non-ES6 APIs are only implemented for debugging and testing, which means when you remove Yaku, everything should work well with ES6 native promise.

ysmood commented 8 years ago

Thanks, I'll implement it ASAP.

ysmood commented 8 years ago

ES6 is locked, so it should be a part of ES7 or somehow. I'm sorry that I'm a little outdated.

So I don't know, where to implement it, as an extension or inside the core. I need more information. I did some research on the internet, nothing seems helpful. I even can't figure out it's ES7 or ES-Next.

JakeChampion commented 8 years ago

It's not in ES2016/ES7, only two Math methods were added to ES2016/ES7. It will hopefully enter Stage 3 at some point this year.

Criteria to move to Stage 3:

It is up to you where to implement it. I imagine people would be confused if they had to install Yaku and a Yaku plugin to get ES-Promises working.

ysmood commented 8 years ago

Uh, it should be inside the core.

JakeChampion commented 7 years ago

@ysmood Do you need some help with this feature at all?

ysmood commented 7 years ago

Yes, I need some help. The performance is my main concern.

ysmood commented 7 years ago

The two extra closure makes me headache. I may merge the finally branch if I have time to add more test cases.

ysmood commented 7 years ago

@JakeChampion I published the version v0.17.0 with the newly added finally support. Hope its not too late.

JakeChampion commented 7 years ago

Thanks!

JakeChampion commented 7 years ago

Looks to fail some tests in these browsers:

 • ie/11
 • ie/10
 • ie/9
 • ie/8
 • android/4.4
ysmood commented 7 years ago

May I see the error information?

JakeChampion commented 7 years ago

Rerunning the test suite now as I had some configuration errors which reported lots of false positives. Apologies if it turns out everything is working.

JakeChampion commented 7 years ago

Tests pass on all except IE8 which seems to hang

ysmood commented 7 years ago

I will double check it later.