Documentation
Tech Debt

Tech debt

Pinned dependencies

In general we keep dependencies up to date. The following packages, however, need to be pinned to a specific version:

Pure ESM in Node.js

Some Node packages are pinned to their last CommonJS version until ESM is fully supported in Jest (opens in a new tab) or until we migrate to Vitest (opens in a new tab) or another ESM compatible test runner:

Code improvements

  • Enabling noUncheckedIndexedAccess in TypeScript would improve the overall quality of all Cosmos packages. Some research is required to learn common ways of handling mapping and reducing arrays, where TypeScript can't infer that a mapped key isn't undefined. I don't want to add unnecessary checks either because it decreases code conciseness.

NPM optionalDependencies

When migrating from Yarn 1.x to NPM latest (opens in a new tab) some platform-specific optional dependencies had to be added here (opens in a new tab) and here (opens in a new tab) in order for GitHub Actions to work across Linux & Windows with the versioned package-lock.json. This doesn't affect users as those optional dependencies aren't added to any of the published packages. It's just a minor nuisance. The NPM issue is tracked here (opens in a new tab).