Skip to content

v0.4.0

Choose a tag to compare

@phil65 phil65 released this 06 Feb 23:51
· 2 commits to main since this release

Breaking changes

  • files() no longer accepts search-only parameters (patterns, heading, after_context, before_context, separator_field_context, separator_field_match, separator_context, line_number, multiline, case_sensitive, smart_case, json)
  • files_with_info() no longer accepts patterns parameter

New features

  • search_structured() — returns parsed SearchMatch objects with line number, path, line text, and individual SearchSubmatch entries (text + byte offsets), instead of raw formatted strings
  • max_total parameter on search_structured() to cap total matches across all files
  • relative_to parameter on files_with_info() to strip a path prefix from results
  • SearchMatch and SearchSubmatch classes now exported

Internal

  • Deduplicated path normalization into shared helpers (build_relative_prefix, normalize_and_strip)
  • Removed ~140 lines of duplicated inline code
  • Updated README, type stubs, exports, tests, and benchmarks