Skip to content

Switch to ESM #1199

Description

@remcohaszing

Is your enhancement related to a problem? Please describe.

Currently yaml-language-server is distributed as:

  • CommonJS
  • UMD
  • Faux ESM

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:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions