@memoir/tree

Development

Local commands and verification flow for @memoir/tree.

This project uses Bun, TypeScript, oxlint, and Bun's test runner.

Commands

bun run lint
bun run typecheck
bun test
bun run build
bun run check

bun run check is the full local quality gate:

  1. oxlint .
  2. tsc --noEmit
  3. bun test
  4. bun run build

Build

The build intentionally avoids tsup and esbuild.

rm -rf dist
tsc -p tsconfig.build.json
bun scripts/fix-dist-imports.ts

TypeScript emits ESM and declarations. The Bun script rewrites local generated ESM imports to include .js extensions so dist/index.js works in Node-style ESM environments.

Source Layout

Published source lives under src/. Tests live under tests/. The Next.js and Fumadocs site lives under site/.

See Project Structure for the full tree.

Tests

Tests are focused on pure behavior:

  • Relationship helper rows.
  • Subject-centered family indexing.
  • Measured layout derivation.
  • Relationship graph traversal.
  • Relationship chart level building.

Linting

Oxlint is the only linter. Keep bun run lint at zero warnings.

Browser Verification

After layout or rendering changes:

  1. Run the docs site with bun run dev from site/.
  2. Open http://localhost:3000.
  3. Inspect the console.
  4. Capture a screenshot of the family tree playground section.

On this page