ast-merge v1.1.0 released!
1.1.0 - 2025-12-18
- TAG: v1.1.0
- COVERAGE: 95.16% – 2338/2457 lines in 44 files
- BRANCH COVERAGE: 82.59% – 517/626 branches in 44 files
- 98.45% documented
Added
- tree_haver Integration: Major architectural enhancement
- Added
tree_haver(~> 3.1) as a runtime dependency Ast::Merge::AstNodenow implements the TreeHaver::Node protocol for compatibility with tree_haver-based merge operations- Adds:
type,kind,text,start_byte,end_byte,start_point,end_point,children,child_count,child(index),each,named?,structural?,has_error?,missing?,inner_node - Adds
Pointstruct compatible withTreeHaver::Point - Adds
SyntheticNodealias for clarity (synthetic = not backed by a real parser)
- Adds:
Comment::Line,Comment::Block,Comment::Emptynow have explicittypemethodsText::LineNodeandText::WordNodenow inherit fromAstNode, gaining TreeHaver::Node protocol compliance- This enables
*-mergegems to leverage tree_haver’s cross-Ruby parsing capabilities (MRI, JRuby, TruffleRuby)
- Added
- Documentation: Comprehensive updates across the gem family
- Updated all vendor gem READMEs with standardized gem family tables
- Added
tree_haveras the foundation layer in architecture documentation - Clarified the two-layer architecture: tree_haver (parsing) → ast-merge (merge infrastructure)
- Added detailed documentation to
FencedCodeBlockDetectorexplaining when to use native AST nodes vs text-based detection - Updated markdown-merge documentation to highlight inner code block merging capabilities
- Example Scripts: Added comprehensive examples demonstrating inner-merge capabilities
examples/markdown_code_merge.rb- Shows how markdown-merge delegates to language-specific parsers for semantic merging- Documentation proving that language-specific parsers create full ASTs of embedded code blocks
Changed
- Architecture: Refactored to use tree_haver as the parsing foundation
- All tree-sitter-based gems (bash-merge, json-merge, jsonc-merge, toml-merge) now use tree_haver
- Parser-specific gems (prism-merge, psych-merge, markdown-merge, markly-merge, commonmarker-merge) use tree_haver backends
- Provides unified API across different Ruby implementations and parsing backends
- Documentation Structure: Standardized gem family tables across all 12 vendor gems
-
Changed from 3-column to 4-column format: Gem Format Parser Backend(s) Description - All parser backends now annotated with “(via tree_haver)” where applicable
- ast-merge description updated from “Shared infrastructure” to “Infrastructure: Shared base classes and merge logic”
- markdown-merge description updated to “Foundation: Shared base for Markdown mergers with inner code block merging”
-
- Configuration Documentation: Enhanced backend selection documentation
Fixed
- Fixed gemspec and Appraisals alignment with tree_haver requirements
- Fixed CI workflow conditions and retry logic
- Fixed badge rendering in documentation
- Fixed README structure issues (removed H3 duplicates, standardized gem family tables)
Many paths lead to being a sponsor or a backer of this project. Are you on such a path?