Skip to content

Development Workflow

Prerequisites

  • Node.js 20+
  • pnpm 10+ (package.json pins pnpm@10.20.0)
  • pnpm install from repo root

Scripts

CommandDescription
pnpm devVitest watch mode with coverage + heap usage logging.
pnpm testVitest suite with coverage reports in coverage/.
pnpm benchRuns benchmarks in test/benchmarks/. Update the README there after each round.
pnpm lintESLint auto-fix over src/.
pnpm buildBuilds ESM + IIFE bundles and .d.ts files.
pnpm docs:devLaunches VitePress for this docs/ folder.
pnpm releaseTest + build + changelog generation via changelogen.
pnpm cleanRemoves node_modules/ and dist/.

Workflow tips

  1. Run pnpm dev while editing core structures to catch regressions quickly.
  2. Update docs (README + VitePress pages) alongside API changes to avoid stale instructions.
  3. Execute pnpm bench after performance-sensitive tweaks and log results.
  4. Run pnpm docs:dev locally to verify sidebar/content structure before publishing.

Contribution guidelines

  • Maintain backward compatibility for exported classes/types; introduce breaking changes behind major version bumps.
  • Add or update tests in test/ (and benchmarks if applicable) when fixing bugs or adding features.

Built with VitePress – Released under the MIT License.