meteor / promise

ES6 Promise polyfill with Fiber support
MIT License
63 stars 15 forks source link

Update to fibers 4.0 for Node 12 compatibility #25

Closed HachetAmaury closed 3 years ago

HachetAmaury commented 4 years ago

Now that meteor 1.9.3 use Node 12 meteor-promise should also be updated to support fibers 4.0.0 since it's a fact that fibers 3.1.1 doesn't work with node 12 :

https://github.com/laverdet/node-fibers/issues/409

aas395 commented 4 years ago

How is this package included with releases 1.9.3 and up if it requires an old version of fibers that doesn't work with node 12? I'm trying to track down a fibers issue I'm having and it looks like I'll run into this once I fix the first one

ebbe-brandstrup commented 3 years ago

This package doesn't depend on the fibers package directly. It only has a devDependency on fibers to install them for running tests / doing development on meteor-promise itself.

It instead just assumes that the dependent program supplies the Fiber constructor by setting it on Promise.Fiber (like the tests in this repo do: https://github.com/meteor/promise/blob/1e52f297b02ea83e7fb48ba4c2b17d3b4503c001/test/tests.js#L2-L5).

So that's why it still works with Node 12+ (because Meteor installs fibers v4+ and sets Promise.Fiber to that version's constructor).

However, it would still be good to bump the devDependency on fibers in here so tests are executed against the same version of fibers as the latest Meteor release uses.