json-merge v1.1.0 released!
1.1.0 - 2026-01-12
- TAG: v1.1.0
- COVERAGE: 95.77% – 589/615 lines in 10 files
- BRANCH COVERAGE: 78.82% – 227/288 branches in 10 files
- 96.63% documented
Added
- bin/rspec-ffi to run FFI isolated specs
- Also bin/rake ffi_specs
- FFI backend isolation for test suite
- Added
bin/rspec-ffiscript to run FFI specs in isolation (before MRI backend loads) - Added
spec/spec_ffi_helper.rbfor FFI-specific test configuration - Updated Rakefile with
ffi_specsandremaining_specstasks - The
:testtask now runs FFI specs first, then remaining specs
- Added
Changed
- ast-merge v4.0.2
- Includes AstMergeEmitterBase
- tree_haver v5.0.1
- Many Backend improvements
- Many error handling improvements
- Simplified dependency_tags.rb: Removed redundant debug code
- Removed
JSON_MERGE_DEBUGenv var handling (useTREE_HAVER_DEBUGinstead) - tree_haver’s debug output now respects blocked backends via
compute_blocked_backends - Avoids accidentally loading MRI backend during FFI-only test runs
- Removed
Removed
- Obsolete Tests: Removed 3 obsolete integration tests
- Tests for
add_node_to_resultandadd_wrapper_to_resultmethods - These methods don’t exist in the
:batchstrategy (ConflictResolver now uses Emitter) - Tests were for old
:nodestrategy pattern
- Tests for
Fixed
- NodeWrapper signature tests: Updated tests to expect
:root_object/:root_arrayfor root-level containers- Root-level objects now correctly return
[:root_object, ...]instead of[:object, ...] - Root-level arrays now correctly return
[:root_array]instead of[:array, count] - Added
:parentmethod stubs to mock node tests forroot_level_container?compatibility
- Root-level objects now correctly return
- ConflictResolver#emit_node: Fixed handling of pair nodes with object values
- When emitting a pair like
"features": {...}, the value was treated as raw text - Now correctly detects when a pair’s value is an object container
- Recursively emits object structure using
emit_nested_object_start/end - Treats arrays as atomic values (emits as raw text)
- Prevents double key emission and invalid JSON output in nested merges
- When emitting a pair like
- ConflictResolver#merge_matched_nodes_to_emitter: Fixed array handling in merge logic
- Arrays are now treated atomically and replaced based on preference setting
- Only objects (not arrays) are recursively merged
- Fixes potential “expected object key, got number” errors when merging arrays
- Arrays like
[1,2,3]are now correctly replaced with[4,5]based on preference
Many paths lead to being a sponsor or a backer of this project. Are you on such a path?