Is your enhancement related to a problem? Please describe.
Currently yaml-language-server is distributed as:
These are all outdated practices that aim to provide backwards compatibility for programmatic use. But in reality, they make the project harder to work with.
Describe the solution you would like
- Go ESM only
- Drop CommonJS support
- Drop UMD support
- Drop Node.js 20 support
- Replace Mocha with
node:test
Describe alternatives you have considered
- The use of
ts-node will likely be problematic. This is why I suggest to use Node.js type-stripping.
- I don’t know how well Mocha works with Node.js type-stripping. This is why I suggest replace Mocha with
node:test and drop support for Node.js 20. An alternative would be to build the tests and running its build output.
Additional context
The current state of JavaScript modules is as follows:
Is your enhancement related to a problem? Please describe.
Currently
yaml-language-serveris distributed as:These are all outdated practices that aim to provide backwards compatibility for programmatic use. But in reality, they make the project harder to work with.
Describe the solution you would like
node:testDescribe alternatives you have considered
ts-nodewill likely be problematic. This is why I suggest to use Node.js type-stripping.node:testand drop support for Node.js 20. An alternative would be to build the tests and running its build output.Additional context
The current state of JavaScript modules is as follows:
require(esm).yamlpackage will be ESM only (Breaking changes foryamlv3 eemeli/yaml#601).yaml-language-serveris tested against Node.js 20.