Replace hand-rolled regex heuristic with proper acorn JS parsing. The AST correctly identifies ExpressionStatement as the last node regardless of trailing semicolons, comments, or complex syntax. Fixes edge cases like '42;' which the regex wrongly treated as a statement. Co-authored-by: stiff <v.stiff@gmail.com> Co-authored-by: Jais Pedersen <jais@pedersens.net> |
||
|---|---|---|
| .. | ||
| ai-adapter.test.ts | ||
| cli.test.ts | ||
| create.test.ts | ||
| eval-wrap.test.ts | ||
| modify.test.ts | ||
| read.test.ts | ||
| registry.test.ts | ||
| structure.test.ts | ||