FredrikNoren / ungit

The easiest way to use git. On any platform. Anywhere.
MIT License
10.44k stars 637 forks source link

Async await #1358

Open wmertens opened 4 years ago

wmertens commented 4 years ago

The result of running the async-await codemod and some fixes

Hirse commented 4 years ago

I started to review a bit, but the diff is so large that it is difficult to check everything.

In general, the codemod seems good, but it doesn't seem to remove all promises. I'm a bit confused when .then is converted to await and when it isn't.

Hirse commented 4 years ago

Also, by changing the UI code to use async/await, we are dropping support for all IE versions.

@campersau, @jung-kim, which browsers are currently supported or supposed to be supported?

campersau commented 4 years ago

@Hirse we had this discussion some months ago over here https://github.com/FredrikNoren/ungit/pull/1178#issuecomment-552916409 And as you can see we have dropped IE support a long time ago 😃 I addition to that I removed Bluebird which means browsers also have to support promises and even Promise.prototype.finally which was added later than async / await!


I have currently a lot of work at work so I will probably reviewing PRs at the weekend.

Hirse commented 4 years ago

@Hirse we had this discussion some months ago over here #1178 (comment)

Oh, right. 😄 Thanks for the reminder.

I still think we should mention the supported browsers (in the Readme).

wmertens commented 3 years ago

I'll wait to revisit this until #1461 is merged, since it will cause a bunch of conflicts