Skip to main content

Contributing

Contributions are welcome. The project is an MIT-licensed monorepo of independent npm packages with one-directional dependencies, managed with pnpm and nx.

Get the repo runningโ€‹

Requires Node.js >= 22 (see .nvmrc) and pnpm. Clone, install, and build:

git clone https://github.com/oh-just-another/diagram.git
cd diagram
pnpm install
pnpm build

Run the in-browser playground while you work:

pnpm --filter @oh-just-another/playground dev # http://localhost:5174

Before you open a PRโ€‹

Keep tests, types, and lint green โ€” these gates run in CI:

pnpm test # vitest across all packages
pnpm typecheck # tsc --noEmit (vitest does not check types)
pnpm lint # eslint
pnpm deps:check # dependency-cruiser: layering + no runtime cycles

Add or update tests for any behavior change, and run a changeset for any change to a package's public API:

pnpm changeset

Conventionsโ€‹

  • Branch off master; open pull requests against master.
  • Commits follow Conventional Commits (feat:, fix:, refactor:, docs:, chore:, test:, perf:, build:, ci:), subject line only (no body).
  • Everything committed to the repo is English-only โ€” code, comments, identifiers, and docs.
  • Respect the package layering: dependencies only flow downward (L0 to L6); a lower-level package must never import from a higher one. pnpm deps:check enforces this.

Licensing of contributionsโ€‹

There is no CLA. By contributing, you agree your contributions are licensed under the project's MIT license. Open issues and pull requests at github.com/oh-just-another/diagram. Full details: CONTRIBUTING.md.