22
33This project is a Deno-based parser generator for domain specific languages.
44
5- ## Development Environment
5+ ** ALWAYS follow these instructions first and only fallback to search or
6+ additional context gathering if the information here is incomplete or found to
7+ be in error.**
68
7- ### Deno Testing
9+ ## Working Effectively
810
9- - Run tests using: ` deno test --allow-read --parallel `
10- - Watch mode: ` deno test --allow-read --watch --parallel `
11- - Tests require ` --allow-read ` permission for resolver tests
12- - Use parallel execution for better performance
13- - Coverage: ` deno test --allow-read --parallel --coverage=cov_profile `
11+ ### Building and Testing
1412
15- ### Deno Linting
13+ ** CRITICAL** : For every source file (_ .ts) you create or modify in the src/
14+ directory, you MUST create or update a corresponding unit test file (_ .test.ts)
15+ in the same directory. This ensures comprehensive test coverage and validates
16+ that your changes work correctly.
1617
17- - Run linter: ` deno lint `
18- - Fix lint issues automatically: ` deno lint --fix `
19- - The project follows standard Deno linting rules
20-
21- ### Deno Formatting
22-
23- - Check formatting: ` deno fmt --check `
24- - Auto-format code: ` deno fmt `
25- - The project uses standard Deno formatting conventions
18+ 1 . ** NEVER CANCEL builds or tests** - they complete quickly (under 2 minutes)
19+ 2 . ** Format check** : ` deno fmt ` - Takes ~ 5 seconds, NEVER CANCEL
20+ 3 . ** Lint check** : ` deno lint ` - Takes ~ 10 seconds, NEVER CANCEL
21+ - ** KNOWN ISSUE** : 8 linting errors about import prefixes - these are
22+ expected and do not break functionality
23+ - Lint failures do not prevent the tool from working correctly
24+ 4 . ** Run all tests** :
25+ ``` bash
26+ deno task test
27+ ```
28+ - Takes ~ 1 second for 32 tests, NEVER CANCEL
29+ - Set timeout to 60+ seconds minimum for safety
2630
2731## Project Structure
2832
@@ -43,8 +47,42 @@ This project is a Deno-based parser generator for domain specific languages.
4347
4448- ** Every code file change must include a corresponding test**
4549- Tests are co-located with source files using the ` *.test.ts ` naming pattern
46- - When modifying a file (e.g., ` src/example.ts ` ), ensure a test file exists (e.g., ` src/example.test.ts ` )
50+ - When modifying a file (e.g., ` src/example.ts ` ), ensure a test file exists
51+ (e.g., ` src/example.test.ts ` )
4752- ** Every change to code must have a test that validates the change**
4853- Add new test cases when adding new functionality
4954- Update existing test cases when modifying functionality
5055- Ensure all tests pass before committing changes
56+
57+ ## Validation
58+
59+ ### Required Validation Steps
60+
61+ ** ALWAYS run these validation steps after making any changes:**
62+
63+ 1 . ** Format and basic checks** :
64+ ``` bash
65+ deno fmt # ~5 seconds
66+ deno lint # ~10 seconds (expect 8 import prefix errors - this is normal)
67+ ```
68+
69+ 2 . ** Full test suite** (NEVER CANCEL - completes in ~ 1 second):
70+ ``` bash
71+ deno task test
72+ ```
73+
74+ ## Dependencies
75+
76+ ### Updating Dependencies
77+
78+ 1 . Check for outdated dependencies:
79+ ``` bash
80+ deno outdated
81+ ```
82+ 2 . Update dependencies:
83+ ``` bash
84+ deno update --latest
85+ ```
86+ 3 . Re-run validation steps to ensure everything works with updated dependencies.
87+ 4 . Commit changes with a clear message indicating dependency updates.
88+ 5 . Be sure to include changes from both deno.jsonc and deno.lock files.
0 commit comments