Release v0.3.0
Code Charter Integration Release
This release introduces powerful new APIs designed for integration with Code Charter and other code intelligence tools, along with major improvements to our testing infrastructure.
馃殌 New Features
Public Scope Graph Access
get_scope_graph(file_path)- Access the scope graph for any file to understand its structureget_all_scope_graphs()- Get scope graphs for all files in the project- Direct access to lexical scopes, definitions, references, and imports
Function Discovery APIs
get_functions_in_file(file_path)- Find all function definitions in a specific fileget_all_functions(options)- Discover functions across the entire project with filtering:- Filter out private functions (underscore prefix)
- Filter out test functions (common test patterns)
- Filter by symbol kind (function, method, generator)
Call Graph Extraction
get_function_calls(def)- Extract all function calls made within a specific functionextract_call_graph()- Build a complete call graph for the entire project- Distinguishes between function calls and method calls
- Captures call locations for accurate source mapping
Source Code Extraction
get_source_code(def)- Extract the exact source code of any definitionget_source_with_context(def)- Get source with language-specific context:- Python: Includes decorators and docstrings
- TypeScript/JavaScript: Includes JSDoc comments
- Proper handling of multi-line definitions
Function Metadata
- Enhanced
Definterface with optional metadata including:is_async- Detect async functionsis_test- Identify test functionsis_private- Detect private methodsparameters- Extract parameter names
馃И Testing Infrastructure Overhaul
- Shared Test Framework: Consistent test patterns across all languages
- Language Feature Matrix: Comprehensive documentation of supported features
- 600+ New Tests: Including language-specific advanced feature tests
- Testing Guide: Step-by-step instructions for adding new language support
馃悰 Bug Fixes
- Enhanced JavaScript scope patterns for:
for...ofloops (tree-sitter usesfor_in_statementfor both)- Named function expressions
- Complex destructuring patterns (nested arrays, objects)
- Improved Rust support for:
- Method calls (
obj.method(),Type::method()) - Field access (
obj.field)
- Method calls (
- Fixed method definition resolution with proper hoisting
- Corrected import handling to return appropriate symbol kinds
馃摎 Documentation
- New language feature matrix showing capabilities across all supported languages
- Comprehensive testing guide with migration examples
- Updated API documentation with new methods
馃捇 For Tool Builders
This release is specifically designed to support tools like Code Charter that need to:
- Visualize function relationships through call graphs
- Extract and display source code with proper context
- Filter and categorize functions (tests, private methods, etc.)
- Access the underlying scope graph for custom analysis