redhat-developer / redhat-developer/yaml-language-server
Improve output directory structure
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 352
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 11
Description
Describe the bug
See the discussion on https://github.com/redhat-developer/yaml-language-server/pull/1104
The compiled code is split between two folders:
./outfor the code compiled to CommonJS modules as well as a compiled copy of the test code./libfor the code compiled to UMD modules and to ESM modules
Notably, the relative paths to ./l10n from the CommonJS server.js and the UMD and ESM server.js are different. This means that the localization information will not be loaded properly when running with the compiled UMD or ESM code.
Making changes to the output directory structure could break projects that consume yaml-language-server, but the current structure is confusing and causing problems.
Expected Behavior
- There should be one "output" folder for the compiled code
- The relative path from server.js to ./l10n for CJS, UMD, and ESM should be the same
Current Behavior
- There are two output folders:
outandlib - The relative path from server.js to ./l10n for CJS is
../../../l10nand for UMD and ESM it's../../l10n
Steps to Reproduce
- Compile the code
npm run compile; npm run compile:esm; npm run compile:umd - Observe the directory structure of the output code
Environment
- Windows
- Mac
- Linux
- other (please specify)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the output produced by npm run compile, npm run compile:esm, and npm run compile:umd, comparing the out and lib folders and the server.js paths to ./l10n. Read the discussion in pull request 1104 before changing the layout. Done means one output folder is used and CJS, UMD, and ESM resolve localization through the same relative path without breaking the documented compile commands.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100