Skip to content

v0.4.2 - Bug Fixes and Glob Pattern Support

Choose a tag to compare

@jwliles jwliles released this 19 Jul 01:33
· 4 commits to main since this release
9dd232a

πŸ› Bug Fixes and New Features

This release resolves all reported GitHub issues and adds comprehensive glob pattern support.

βœ… Fixed Issues

Issue #1: CLI mode glob pattern handling

  • Added full support for Unix-style glob patterns (*.ext, *pattern*, prefix*, *suffix)
  • Commands like smv title "*.org" directory -p now work correctly
  • Automatic conversion of glob patterns to appropriate CNP filters
  • Smart routing to CNP mode for glob-based commands

Issue #2: Kebab case transformation

  • Confirmed working correctly: "Dir Template.txt" β†’ "dir-template.txt" βœ“
  • Spaces are properly converted to hyphens in all cases

Issue #3: Space handling across transformers

  • Verified all transformations handle spaces correctly:
    • Snake case: "File with Spaces.md" β†’ "file_with_spaces.md" βœ“
    • Kebab case: "File with Spaces.md" β†’ "file-with-spaces.md" βœ“
    • Title case: "test_deletion" β†’ "Test Deletion" βœ“
  • Multiple spaces are correctly normalized

πŸ”§ Technical Improvements

  • Enhanced CNP Grammar Parser: Added is_glob_pattern() and convert_glob_to_filter() functions
  • Improved Routing Logic: Smart detection of glob patterns for proper command routing
  • Comprehensive Test Suite: 6 new test functions covering all glob pattern edge cases
  • Better Error Handling: Robust pattern matching with fallback to generic name filters

πŸ“Š Test Coverage

  • All 20 library tests passing βœ…
  • New test coverage for:
    • Glob pattern detection (*.txt, file?.log, file[0-9].txt, file{a,b,c}.txt)
    • Pattern conversion (*.ext β†’ EXT:ext, *pattern* β†’ NAME:pattern)
    • Edge cases (*.*, *.tar.gz, complex patterns)
    • Mixed CNP filter scenarios

πŸš€ Usage Examples

# Transform only .org files with glob pattern
smv title "*.org" directory -p

# Multiple glob patterns
smv kebab "*.txt" "*.md" . -p

# Mix glob patterns with CNP filters  
smv snake "*.rs" TYPE:file src -p

# Complex patterns
smv clean "*template*" projects/ -r -p

πŸ“¦ Installation

# Install via cargo
cargo install smv

# Or download from GitHub releases

πŸ”— Compatibility

  • Fully backward compatible with all existing functionality
  • Seamless integration with CNP ecosystem tools (DSC, XFD, SAY, DFF)
  • Works with all transformation types and routing options

Full Changelog: v0.4.1...v0.4.2

Published to crates.io: https://crates.io/crates/smv/0.4.2

πŸ€– Generated with Claude Code