stefanpenner / es6-promise

A polyfill for ES6-style Promises
MIT License
7.29k stars 594 forks source link

Look for AMD first, then CJS in the UMD #246

Open stefcameron opened 7 years ago

stefcameron commented 7 years ago

Trying es6-promise 4.0.5. Unfortunately, I have an AMD project (packaged with requirejs) that includes es-promise, but changes in the es6-promise build since 3.3.0 has introduced a new UMD which checks for a CommonJS env first unlike the old UMD which used to check for an AMD env first. The result is I can't run my library on NodeJS (like I could before) because es6-promise finds the CommonJS env first and exports itself as a CJS module instead of defining itself as an AMD module.

Unless there's a specific reason why the UMD test order was changed, it might be good to change it back. Otherwise, 3.2.1 is the latest release this type of project could use, AFAIK.