redhat-developer / redhat-developer/yaml-language-server

Switch to ESM

Open
#1,199 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
1.5k
Forks
352
Avg merge
2d 7h
Merged PRs (30d)
11

Description

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:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or test paths are named. Begin by locating the current CommonJS, UMD, and ESM entry points and the Mocha-based test setup, then review how TypeScript, ts-node, and Node.js type-stripping are used; done means ESM-only distribution and tests running with node:test.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
devtools, testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.