TheSpyder / rescript-nodejs

Node bindings for ReScript
MIT License
79 stars 15 forks source link

Update to Rescript compiler v10.1? #12

Closed jido closed 9 months ago

jido commented 1 year ago

I would like to use async/await from the 10.1 version of the compiler.

Can you provide instructions to build it or are you planning on updating the package soon?

TheSpyder commented 1 year ago

The library works fine with a project using 10.1, what it doesn’t have is APIs that leverage async/await.

I’m not sure when I’ll have time for that, or whether to add new apis side by side rather than force people to upgrade. Contributions definitely welcome.

TheSpyder commented 9 months ago

Apologies for not following up. A Promise submodule was added to the fs API in #14, which works with async/await: https://github.com/TheSpyder/rescript-nodejs/blob/913a14bf229472128c21ed4c78ed83832216fae0/test/atomic/Fs.test.res#L5-L12

I think (much like node itself) this is a good path forward. I hope to add more over time - if there's a particular API you want a promise mapping for please let me know and I'll do it before others.