rescript-compiler
rescript-compiler copied to clipboard
drop Node.js v16 (EoL) support
The official maintenance for Node 16 ended last October. Perfect timing
This won't break anything right away, but it should be marked as a breaking change. Then we can make further improvements in the JS part in the future
I understand there are concerns about drastically increasing the supported Node.js version
How about dropping Node.js v15 or lower? We already do testing only on v16. (v16.x has complete ESM support, including support for top-level await)
Gradual Node.js version upgrades will help us maintain a thin JS wrapper as Node.js itself is becoming useful.
@cristianoc @zth How shall we proceed with this? (For me, it would be fine to merge to master = v12 now.)
fyi what are new features in nodejs, useful for rescript peers and compiler itself.
- ESM support (including TLW since v14.8.0): So we can convert our syntax into fully ES standard
- conditional exports (added in v12.6.0): which is solution for dual-package hazard in Node.js ecosystem.
- util.parseArgs (finalized in v18.11.0, v16.19.0): which handle most complex part of our JS wrapper.
- test runner (added in v16.19.0): which can replace mocha in our dev env with modern APIs
fs/promises(v14.0.0): can used without promisify-ing, or unwrappingfs.promises.- JS class field syntax (v12.x)
- JS optional chaning and nullish coalescing (v14.x)
- Perf & security improvements
@cometkim Could you rebase and move the changelog entry to 12.0.0-alpha.1?
@cknitt done
A lot of follow-up work is possible to modernize our dev env and js wrapper