Skip to content

Release v0.3.0

Choose a tag to compare

@github-actions github-actions released this 18 Jul 10:34
· 1390 commits to main since this release

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 structure
  • get_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 file
  • get_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 function
  • extract_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 definition
  • get_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 Def interface with optional metadata including:
    • is_async - Detect async functions
    • is_test - Identify test functions
    • is_private - Detect private methods
    • parameters - 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...of loops (tree-sitter uses for_in_statement for both)
    • Named function expressions
    • Complex destructuring patterns (nested arrays, objects)
  • Improved Rust support for:
    • Method calls (obj.method(), Type::method())
    • Field access (obj.field)
  • 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