-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't load core-js promise into global namespace #951
Comments
For reference, apparently the issue is that core-js is particularly aggressive about when to apply its polyfill, overriding native Promise implementations when this may not be desirable (zloirock/core-js#283). |
The corejs polyfill was causing issues with @dojo/framework. Replace it with promise-polyfill. Eventually, don't use a polyfill. fixes #951
promise-polyfill apparently isn't a great choice either -- it polyfills |
promise-polyfill's `finally` polyfill can causing timing issues for finally handlers for cancelled Tasks. resolves #951
FYI @jason0x43 - I had some problems with es6-promise and polyfilling for Edge. Not sure if this impacts your work. stefanpenner/es6-promise#330 (comment) and |
I noticed some issues with es6-promise as well. All of these promise polyfills seem to have subtle but annoying implementation differences. |
Actually, it seems the latest issue isn't so much with es6-promise as it is with some weird native Promise behavior in older versions of Firefox (< 35). Intern's polyfilling just needs to install a basically functional Promise implementation, so the issue with es6-promise not polyfilling |
Unfortunately that might end up being a significant change for downstream users, so...polyfilling for now. |
Use core-js, but be a bit more careful. Manually load polyfills only if no native version exists. Generally Don't try to shim functionality into existing native classes. resolves #951
Intern 4.3.1 is failing some Promise shim tests in @dojo/framework on FF, Safari, and Edge, but not on Node, IE, and Chrome. It appears that the core-js shim is being loaded on those platforms even though native promises are available, and it's either behaving incorrectly or causing issues with the @dojo shim.
Have Intern import Promise from core-js rather than using the shim, or use a better shim (promise-polyfill doesn't appear to have the same issue).
The text was updated successfully, but these errors were encountered: