rescript-compiler icon indicating copy to clipboard operation
rescript-compiler copied to clipboard

drop Node.js v16 (EoL) support

Open cometkim opened this issue 2 years ago • 4 comments

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

cometkim avatar Oct 10 '23 11:10 cometkim

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.

cometkim avatar Nov 14 '23 17:11 cometkim

@cristianoc @zth How shall we proceed with this? (For me, it would be fine to merge to master = v12 now.)

cknitt avatar Jan 31 '24 04:01 cknitt

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 unwrapping fs.promises.
  • JS class field syntax (v12.x)
  • JS optional chaning and nullish coalescing (v14.x)
  • Perf & security improvements

cometkim avatar Feb 01 '24 17:02 cometkim

@cometkim Could you rebase and move the changelog entry to 12.0.0-alpha.1?

cknitt avatar Feb 07 '24 08:02 cknitt

@cknitt done

cometkim avatar Feb 27 '24 16:02 cometkim

A lot of follow-up work is possible to modernize our dev env and js wrapper

cometkim avatar Feb 27 '24 18:02 cometkim