Thanks for your interest in contributing! This document covers how to get started with development, and what is expected when you open a pull request.
Cordis is a TypeScript monorepo managed with Yarn 4 workspaces
and yakumo. It contains the following packages
under packages/:
core— the framework runtimecreate— scaffolding for new projectsgroup— group model utilitieshmr— hot module reloading supportinclude— config file inclusionloader— plugin loadinglogger-console— console log formattingtimer— timer model utilitiesutils— shared utilities
There are also external workspaces under external/.
- Node.js 24 or newer (CI runs on Node 24 and 26)
- Corepack enabled, so that the pinned Yarn
version in
package.jsonis used automatically - Git
-
Fork the repository on GitHub, then clone your fork:
git clone git@github.com:<your-username>/cordis.git cd cordis git remote add upstream git@github.com:cordiverse/cordis.git
-
Install dependencies:
corepack enable yarn
Run everything from the repository root:
| Command | Description |
|---|---|
yarn lint |
Lint the codebase with ESLint |
yarn build |
Build all packages (esbuild, then type check with tsc) |
yarn test |
Run the test suite with Vitest |
yarn test:text |
Run tests with a text coverage report |
yarn test:html |
Run tests with an HTML coverage report |
To run commands for a single package, prefix the command with
yarn yakumo and append the workspace name, for example:
yarn yakumo vitest --import tsx core-
Base your work on the latest
main:git fetch upstream git checkout -b <branch-name> upstream/main
-
Make your changes. Keep them focused: one logical change per pull request.
-
Add tests for any behavior change. Tests live in
packages/<package>/tests/and are written with Vitest. -
Run the checks locally before pushing:
yarn lint yarn build yarn test -
Commit your changes and push to your fork:
git push -u origin <branch-name>
-
Open a pull request against
cordiverse/cordis:main. If your change addresses an issue, reference it in the PR description (e.g. "Closes #123").
Commit messages follow Conventional Commits:
- Use a type prefix:
feat,fix,perf,refactor,chore,docs,test, etc. - Scope the message to the package you changed, e.g.
fix(core): ...,feat(loader): ...,chore: ...for repository-wide changes. - Keep the subject line under 72 characters, starting with a lowercase letter.
Examples from the repository history:
fix(core): track direct service callers
feat(loader): use internal loader without `--expose-internals`
perf(core): avoid binding callbacks in event dispatch
chore: bump versions
- The project uses the
@cordisjs/eslint-configpreset; runyarn lintbefore pushing. - TypeScript is compiled in strict mode; type errors fail the CI build.
- Do not introduce new runtime dependencies without discussing them first.
The build workflow runs three jobs on every pull request:
lint— ESLintbuild— esbuild bundling andtsctype checkingtest— the full Vitest suite on Node 24 and 26
All of them must pass before a pull request can be merged. You can reproduce them
locally with yarn lint, yarn build, and yarn test.
If you are not sure whether a change is wanted, open an issue first to discuss it. The issue tracker is also the right place to report bugs and request features.