Skip to content
This repository was archived by the owner on Nov 14, 2025. It is now read-only.

Commit 2db1cf3

Browse files
committed
docs: reorganize and enhance development commands
- Organize commands into logical categories (Quick Start, Building & Running, Testing, Code Quality) - Add missing commands (start:registry, dev:registry) - Simplify test command examples using pnpm test -- syntax - Add troubleshooting section with common development tasks - Include commands for debugging test failures and dependency management - Improve command descriptions and formatting for clarity
1 parent 47b5aa6 commit 2db1cf3

File tree

1 file changed

+64
-43
lines changed

1 file changed

+64
-43
lines changed

CLAUDE.md

Lines changed: 64 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -6,69 +6,90 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
66

77
This repository is a Model Context Protocol (MCP) server that integrates with DeepSource's code quality analysis platform. It serves as a bridge between DeepSource's GraphQL API and MCP-compatible AI assistants like Claude, providing access to code quality metrics and analysis results.
88

9-
## Common Commands
9+
## Development Commands
1010

11-
### Running a Single Test
12-
```bash
13-
# Run a single test file
14-
NODE_ENV=test NODE_OPTIONS='--experimental-vm-modules --no-warnings' jest src/__tests__/specific-test.test.ts
15-
16-
# Run tests matching a pattern
17-
NODE_ENV=test NODE_OPTIONS='--experimental-vm-modules --no-warnings' jest --testNamePattern="should handle errors"
18-
19-
# Run tests with verbose output for debugging
20-
NODE_ENV=test NODE_OPTIONS='--experimental-vm-modules --no-warnings' jest --verbose src/__tests__/specific-test.test.ts
21-
```
22-
23-
### Development Commands
11+
### Quick Start
2412
```bash
2513
# Install dependencies
2614
pnpm install
2715

28-
# Build the TypeScript code
16+
# Build and start
2917
pnpm run build
30-
31-
# Start the server
3218
pnpm run start
3319

34-
# Start in development mode with auto-reload
20+
# Development mode with auto-reload
3521
pnpm run dev
22+
```
3623

37-
# Run all tests
38-
pnpm run test
39-
40-
# Run tests with watching
41-
pnpm run test:watch
24+
### Building & Running
25+
```bash
26+
pnpm run build # Compile TypeScript to JavaScript
27+
pnpm run watch # Watch mode - rebuild on changes
28+
pnpm run clean # Remove build artifacts (dist/)
29+
30+
# Running the server
31+
pnpm run start # Start the compiled server
32+
pnpm run start:registry # Start the registry server
33+
pnpm run dev # Development mode with auto-reload
34+
pnpm run dev:registry # Registry dev mode with auto-reload
35+
36+
# Debugging
37+
pnpm run inspect # Debug with MCP inspector tool
38+
```
4239

43-
# Run tests with coverage
44-
pnpm run test:coverage
40+
### Testing
41+
```bash
42+
# Basic testing
43+
pnpm run test # Run all tests
44+
pnpm run test:watch # Run tests in watch mode
45+
pnpm run test:coverage # Run tests with coverage report
46+
47+
# Run specific tests
48+
pnpm test -- src/__tests__/specific-test.test.ts
49+
pnpm test -- --testNamePattern="should handle errors"
50+
pnpm test -- --verbose src/__tests__/specific-test.test.ts
51+
52+
# Run tests for a specific file pattern
53+
pnpm test -- client # Test all client files
54+
pnpm test -- handler # Test all handler files
55+
```
4556

46-
# Run ESLint
47-
pnpm run lint
57+
### Code Quality
58+
```bash
59+
# Type checking
60+
pnpm run check-types # Type check without building
4861

49-
# Fix linting issues automatically
50-
pnpm run lint:fix
62+
# Linting
63+
pnpm run lint # Run ESLint
64+
pnpm run lint:fix # Auto-fix ESLint issues
5165

52-
# Format code with Prettier
53-
pnpm run format
66+
# Formatting
67+
pnpm run format # Format all code with Prettier
68+
pnpm run format:check # Check if code is formatted
5469

55-
# Check code formatting
56-
pnpm run format:check
70+
# Combined checks
71+
pnpm run validate # Run type check + lint + tests
72+
pnpm run ci # Full CI pipeline (format, lint, type, build, test)
73+
```
5774

58-
# Type check without emitting files
59-
pnpm run check-types
75+
### Troubleshooting Commands
76+
```bash
77+
# Clean install (removes node_modules and lockfile)
78+
rm -rf node_modules pnpm-lock.yaml && pnpm install
6079

61-
# Run the full CI check (format, lint, type check, build, test)
62-
pnpm run ci
80+
# Clear Jest cache
81+
pnpm test -- --clearCache
6382

64-
# Validate codebase (type check, lint, test)
65-
pnpm run validate
83+
# Debug test failures
84+
pnpm test -- --detectOpenHandles # Find async leaks
85+
pnpm test -- --runInBand # Run tests serially
86+
pnpm test -- --maxWorkers=1 # Use single worker
6687

67-
# Inspect MCP server with inspector
68-
pnpm run inspect
88+
# Check for outdated dependencies
89+
pnpm outdated
6990

70-
# Clean build artifacts
71-
pnpm run clean
91+
# Update dependencies (interactive)
92+
pnpm update -i
7293
```
7394

7495
## Architecture Overview

0 commit comments

Comments
 (0)