Skip to content

Releases: xcaeser/libglob

v0.3.0

Choose a tag to compare

@xcaeser xcaeser released this 22 Oct 12:26

Release Notes

v0.3.0

v0.3.0 reduces the API to one function and makes long inputs fast.

  • match(pattern, text, options) is the only entry point. It returns
    ParseError!bool, so malformed patterns are always reported.
  • Literal runs compare as slices, a star followed by a literal byte jumps to
    that byte's next occurrence, and a literal tail after the last star is checked
    with one suffix comparison. *.zig against a 210-byte path drops from about
    280 ns to under 10 ns.

Breaking changes from v0.2.0

  • The package is renamed to libglob.
  • Requires Zig 0.17.0.
  • match now takes Options and returns ParseError!bool.
  • Removed matchWithOptions, validate, matchAny, matchAll, and
    CaseSensitivity. Negate with ! on the result and loop over pattern lists.
  • ValidationError is renamed to ParseError.
  • Removed whole-pattern negation: a leading ! is an ordinary byte.
  • Options.case_sensitivity = .insensitive_ascii is now ignore_case = true,
    and no_escape = true is now escapes = false.

v0.2.0

v0.2.0 makes matching safer, faster on hostile wildcard patterns, and easier to
configure while keeping the library allocation-free and dependency-free.

  • Replaced recursive * matching with constant-stack iterative backtracking,
    bounding worst-case work to O(pattern.len * text.len).
  • Added negated and escaped character classes.
  • Added pathname, leading-period, no-escape, and ASCII case-insensitive options.
  • Invalid configurable patterns now return ValidationError.
  • Reduced the API to match, matchWithOptions, validate, matchAny, and
    matchAll.

Breaking changes from v0.1.0

  • Requires Zig 0.17.0-dev.1893+78e3b1c73.
  • Removed matchMultiple; use matchAny.
  • Added ValidationError.InvalidRange; reversed ranges such as [z-a] now fail
    validation.
  • Leading ! or ^ inside a character class now negates the class.
  • Invalid patterns always return false from match, including negated ones.

v0.1.0 (Initial Release)

  • Initial implementation of glob pattern matching
  • Support for wildcards: * (any characters), ? (single character)
  • Character classes: [abc] (set), [a-z] (range)
  • Negation with ! prefix
  • Pattern validation for syntax errors
  • Multiple pattern matching: matchAny (any match), matchAll (all match)
  • Pure Zig implementation with no dependencies
  • Comprehensive test suite covering all features

v0.2.0

Choose a tag to compare

@xcaeser xcaeser released this 29 Aug 20:14

Release Notes

v0.2.0

v0.2.0 makes matching safer, faster on hostile wildcard patterns, and easier to
configure while keeping the library allocation-free and dependency-free.

  • Replaced recursive * matching with constant-stack iterative backtracking,
    bounding worst-case work to O(pattern.len * text.len).
  • Added negated and escaped character classes.
  • Added pathname, leading-period, no-escape, and ASCII case-insensitive options.
  • Invalid configurable patterns now return ValidationError.
  • Reduced the API to match, matchWithOptions, validate, matchAny, and
    matchAll.

Breaking changes from v0.1.0

  • Requires Zig 0.17.0-dev.1893+78e3b1c73.
  • Removed matchMultiple; use matchAny.
  • Added ValidationError.InvalidRange; reversed ranges such as [z-a] now fail
    validation.
  • Leading ! or ^ inside a character class now negates the class.
  • Invalid patterns always return false from match, including negated ones.

Verified by 26 tests in Debug and ReleaseFast modes.

v0.1.0 (Initial Release)

  • Initial implementation of glob pattern matching
  • Support for wildcards: * (any characters), ? (single character)
  • Character classes: [abc] (set), [a-z] (range)
  • Negation with ! prefix
  • Pattern validation for syntax errors
  • Multiple pattern matching: matchAny (any match), matchAll (all match)
  • Pure Zig implementation with no dependencies
  • Comprehensive test suite covering all features

v0.1.0

Choose a tag to compare

@xcaeser xcaeser released this 31 Oct 18:55

Release Notes

v0.1.0 (Initial Release)

  • Initial implementation of glob pattern matching
  • Support for wildcards: * (any characters), ? (single character)
  • Character classes: [abc] (set), [a-z] (range)
  • Negation with ! prefix
  • Pattern validation for syntax errors
  • Multiple pattern matching: matchAny (any match), matchAll (all match)
  • Pure Zig implementation with no dependencies
  • Comprehensive test suite covering all features