mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-07 02:58:15 +00:00
1.7 KiB
1.7 KiB
Monorepo (pnpm)
- Work primarily in:
• src/
• webview-ui/package
• packages/types (shared DTOs) - Other workspaces (modify only if instructed):
• evals/
• packages//
• apps//
• [others] - To install deps:
→ runpnpm add <package>in<cwd>workspace/directory</cwd>(updates<workspace>/package.json) - ⚠️ DO NOT run pnpm in root (root only holds CLI dev-tools in devDependencies, e.g. prettier)
Turborepo
- ❌ Don’t modify
turboconfig without instruction - ✅ You may propose config changes when:
- Adding a shared, cacheable npm task
- Declaring an internal-package dependency that affects the extension build
Running tests
- Always execute commands using
<cwd>workspace/directory</cwd>when running any test command - To fix failures:
- Target one failing test:
→npx vitest relative/path/__tests__/name.spec.ts -t "substring" - Verify all tests in that module pass:
→npx vitest relative/path/__tests__/name.spec.ts
- Target one failing test:
- File conventions:
•.spec.ts→ vitest
•.test.ts→ jest (deprecated) - If a test in
.test.tsfails:
→ delete it & recreate in.spec.ts - Keep passing tests in
.test.ts - Use
npx jest <file> -t "substring"for deprecated test execution using the same strategy above - Run all tests in the root workspace:
→pnpm test
Creating tests
- Use vitest (native ESM, jest-compatible)
- Steps:
- Create
path/to/__tests__/name.spec.ts(must be.spec.ts) - Omit ESM mocks unless necessary
- Run via vitest
- Create
- For modules with existing
.test.ts:- Move any failing tests →
name.spec.ts - Add new tests →
name.spec.ts - Leave successful tests in
.test.ts
- Move any failing tests →