Closed vially closed 9 months ago
@vially Thanks for submitting this PR, can you confirm what versions have support for promises, and which versions do not? I'm absolutely on board with removing any bloat as that's one of my biggest pet peeves when it comes to dev work, but I kept that in this plugin to maintain compatibility ... without knowing what versions are compatible and are not, I would not feel comfortable removing it until we know for sure and can post a notice in readme as to what versions require the polyfill
I did want to include a compatibility table in the original pull-request message but to be honest I don't know where to find this information.
According to caniuse, support for promises was first introduced in iOS 8 and Android 4.4.4. However, this is for the browser itself (e.g.: iOS Safari and Android Browser respectively) and not for the webviews. I can't seem to find any info on the webviews, but I would suspect they might have followed shortly.
Since WKWebView
was introduced in iOS 8 there's a good chance it might have had support for promises from the start. Not sure about UIWebView
though, but that seems to be on its way out anyway.
So if I were to make a wild guess, I would say you might not need es6-promise-plugin
if you target Android 4.4.4
and iOS 8 and higher, but someone would need to actually verify these numbers.
@vially yeah that was my concern with removing it, is the possibility of all hell breaking loose ... and it's not like this is a lib for microcontrollers where space is SUPER limited, so i think for now i'll just leave it there until someone can do extensive testing or confirm it does/does not work on older versions ... or at least maybe some docs on whether or not it is necessary.
So while I completely agree about removing bloat, IMO it's not worth the potential issues it could cause ... at least until we move to a major revision where it could be removed
I'm going to close this for now. If someone wants to follow-up on it, it should be trivial to pick it up again.
Description of the Change
Remove the dependency on the
es6-promise-plugin
cordova plugin.Benefits
Most modern web views (WKWebView on iOS and WebView on Android) have supported promises for a while now. This means having
es6-promise-plugin
as a dependency does not serve any purpose and it only adds bloat to a project that doesn't need it.Possible Drawbacks
Removing
es6-promise-plugin
as a dependency from this plugin might break apps that are using some older webviews which don't have native support for promises (and don't provide any other promise polyfill). However, that's easy to fix by adding this plugin as a dependency on the projects that actually need it, rather than have it as a transitive dependency from this plugin.