Commit graph

12 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
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
ali
ea079ce4da
set current laguage for test 2026-01-29 17:20:07 +02:00
Sarthak Agarwal
aef580b640 remove skipping 2026-01-29 20:25:44 +05:30
Kevin Turcios
20cd0bd239 mock here 2026-01-29 06:29:44 -05:00
misrasaurabh1
198487bf81 format and lint all 2026-01-29 01:39:48 -08:00
misrasaurabh1
c9cd7bc5a4 extract function argument types and interfaces in read-only context 2026-01-29 01:32:15 -08:00
misrasaurabh1
13c6fc739b extract class fields and constructor 2026-01-29 00:46:40 -08:00
misrasaurabh1
5f09d5ac77 js code context extraction test much stricter 2026-01-29 00:22:08 -08:00
Sarthak Agarwal
2d5b33a361 strict tests for extractor and replacer 2026-01-29 03:38:44 +05:30
Sarthak Agarwal
2cc1fb2809 tests for extractor and replacer 2026-01-29 01:27:19 +05:30