-
Notifications
You must be signed in to change notification settings - Fork 0
Development Setup
ABCrimson edited this page Mar 11, 2026
·
2 revisions
How to clone, build, test, and contribute to modern-cmdk.
| Tool | Version | Notes |
|---|---|---|
| Node.js | 22+ | Required for ES2026 support |
| pnpm | 11.0.0-alpha.12+ | Workspace management |
| Rust | 1.82+ | Only needed for WASM package |
| wasm-pack | 0.13+ | Only needed for WASM package |
git clone https://github.com/ABCrimson/modern-cmdk.git
cd modern-cmdk
pnpm install# Build all packages
pnpm build
# Build specific package
pnpm --filter modern-cmdk build
pnpm --filter modern-cmdk/react build
pnpm --filter modern-cmdk-search-wasm build
pnpm --filter modern-cmdk build
# Build docs
pnpm --filter docs build
# Build playground
pnpm --filter playground buildBuild tool: tsdown 0.21.0 with isolatedDeclarations: true for fast .d.ts generation.
# Run all unit tests
pnpm test
# Run with coverage
pnpm test:coverage
# Run specific test file
pnpm --filter modern-cmdk test -- search.test.ts
# Run benchmarks
pnpm bench
# Run E2E tests (requires build first)
pnpm test:e2e
# Run E2E with UI
pnpm test:e2e:ui| Tool | Version | Purpose |
|---|---|---|
| Vitest | 4.1.0-beta.6 | Unit + benchmark tests |
| happy-dom | 20.8.3 | DOM environment for React tests |
| Playwright | 1.59.0-alpha | E2E browser tests |
# Lint all files
pnpm lint
# Format all files
pnpm format
# Check formatting without writing
pnpm format:check
# Type check
pnpm typecheckLinter/formatter: Biome 2.4.6 (replaces ESLint + Prettier).
# Start docs dev server
pnpm --filter docs dev
# Start playground dev server
pnpm --filter playground dev
# Watch mode for core package
pnpm --filter modern-cmdk devThe WASM search crate lives in packages/command-search-wasm/crate/:
cd packages/command-search-wasm
# Build WASM
wasm-pack build crate --target web --out-dir ../wasm
# Run Rust tests
cargo test --manifest-path crate/Cargo.toml
# Bench Rust
cargo bench --manifest-path crate/Cargo.tomlCommits follow Conventional Commits:
feat(core): add keyboard shortcut registry
fix(react): prevent stale closure in useCommandState
perf(wasm): optimize trigram index lookup
docs: add virtualization guide
test(core): add stress tests for 100K items
chore: update dependencies
Scopes: core, react, wasm, codemod, docs, playground
| Branch | Purpose |
|---|---|
main |
Stable, release-ready code |
feat/* |
New features |
fix/* |
Bug fixes |
perf/* |
Performance improvements |
docs/* |
Documentation updates |
Releases are versioned per-package using semver. Tags follow the format v{version} (e.g., v0.8.0).
# Update version
pnpm --filter modern-cmdk version patch
# Build and test
pnpm build && pnpm test
# Create git tag
git tag v0.x.x
# Publish
pnpm --filter modern-cmdk publish