Commit graph

8 commits

Author SHA1 Message Date
Kevin Turcios
19bd6e4bad test: sync test files from main (safe, main-only changes)
34 test files updated with main's refactored tests for new language
support protocol, JS/TS improvements, and code context extraction.
2026-03-02 15:25:50 -05:00
ali
e9b7154361
Merge branch 'main' of github.com:codeflash-ai/codeflash into fix/js-jest30-loop-runner 2026-02-12 16:39:33 +02:00
Sarthak Agarwal
fa56eb7abe refactor 2026-02-11 02:05:54 +05:30
ali
a6b936402d
fix: include same-class helper methods inside class wrapper for TypeScript
When optimizing TypeScript class methods that call other methods from the
same class, the helper methods were being appended OUTSIDE the class
definition. This caused syntax errors because class-specific keywords like
`private` are only valid inside a class body.

Changes:
- Add _find_same_class_helpers() method to identify helper methods belonging
  to the same class as the target method
- Modify extract_code_context() to include same-class helpers inside the
  class wrapper and filter them from the helpers list
- Fix all JavaScript/TypeScript tests by adding export keywords to test code
  so functions can be discovered by discover_functions()
- Add comprehensive tests for same-class helper extraction

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 17:19:46 +02:00
misrasaurabh1
a5edb73b13 fix: Use FunctionToOptimize field names consistently across JS code
- Fix field name mismatches: .name → .function_name, .start_line → .starting_line,
  .end_line → .ending_line, .start_col → .starting_col, .end_col → .ending_col
- Fix circular imports by creating function_types.py with FunctionParent
- Add lazy language registration via _ensure_languages_registered()
- Fix macOS symlink path resolution in ImportResolver
- Update all affected code and tests to use correct FunctionToOptimize attributes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 11:32:58 -08:00
misrasaurabh1
198487bf81 format and lint all 2026-01-29 01:39:48 -08:00
misrasaurabh1
28755c01d6 fix windows tests 2026-01-28 20:01:34 -08:00
misrasaurabh1
39d31400be test discovery tests 2026-01-15 22:19:45 -08:00