Commit 272f1a7
committed
Replace ts-morph with tree-sitter for code parsing
ts-morph loaded full TypeScript compiler with node_modules type resolution,
causing OOM on large projects (e.g. ethers.js ABI types). tree-sitter is a
pure syntax parser with zero type resolution overhead.
- Add language registry with pluggable mapper interface (ready for multi-lang)
- Add TS/JS mapper using native tree-sitter + tree-sitter-typescript/javascript
- Rewrite parseCodeFile() to use tree-sitter AST traversal
- Manual relative import resolution via fs.existsSync (no type checker needed)
- Rewrite extractSymbols() in codeblock.ts with tree-sitter
- Remove getProject/resetProject/tsconfig watch from indexer
- Remove tsconfig from project config schema
- Add graphology-types devDep (fixes 19 pre-existing test suite failures)
- Add npm overrides for tree-sitter-typescript peer dep compatibility1 parent 03c0fcd commit 272f1a7
13 files changed
Lines changed: 751 additions & 464 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
| |||
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
| 81 | + | |
79 | 82 | | |
80 | 83 | | |
81 | 84 | | |
82 | 85 | | |
83 | 86 | | |
84 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
85 | 93 | | |
86 | 94 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
276 | | - | |
277 | 276 | | |
278 | 277 | | |
279 | 278 | | |
| |||
0 commit comments