TheSpyder / rescript-nodejs

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

Add Fs.PromiseAPI #14

Closed AisonSu closed 1 year ago

AisonSu commented 1 year ago
  1. To tidy the Fs Promise API and keep forward compatible, copy all of them to PromiseAPI_ .
  2. uses @unwrap+polymorphic variant for more strict type, changes most arguments to labeled arguments.
  3. Add Fs.PromiseAPI.stat, Fs.PromiseAPI.statWith
TheSpyder commented 1 year ago

If we time this with a major upgrade I wouldn't mind breaking parts of the API. ReScript 10 has and is adding a lot of very convenient mechanisms that make libraries so much easier to use.

I sync the major version with the NodeJS major version, though, and I haven't made time to look at whether any of the new v16 APIs were worth adding immediately.

AisonSu commented 1 year ago

I think we should be more rigorous about adding new APIs, and not make too much breaking changes, Especially it used in a different way than before and lacks of test (Sorry but I saw our test files and it is too simples now). and i think use tag instead of versions may be better and decreases ambiguity.

TheSpyder commented 1 year ago

Published as 14.4.0