Releases: mike-north/pattern-algebra
Releases · mike-north/pattern-algebra
Release list
pattern-algebra@0.1.0
Minor Changes
-
d2ee2df: Initial release of the
pattern-algebrapackage.This package re-exports all functionality from
@pattern-algebra/core, providing a simpler import path for users who prefer an unscoped package name.// Instead of: import { parsePattern, matchPath } from '@pattern-algebra/core' // You can use: import { parsePattern, matchPath } from 'pattern-algebra'
Both packages provide identical functionality - choose whichever import style you prefer.
Patch Changes
- Updated dependencies [7cd829e]
- @pattern-algebra/core@0.1.0
@pattern-algebra/core@0.1.0
Minor Changes
-
7cd829e: ## New Features
Pattern Algebra Operations
- Added
patternIntersect(),patternUnion(),patternComplement(), andpatternDifference()for set operations on compiled patterns - Patterns can now be combined using standard set algebra
Automaton Improvements
- Added DFA size limits to prevent exponential state blowup during determinization
determinize()now acceptsDeterminizeOptionswith configurablemaxStates(default: 10,000)- Added
AutomatonLimitErrorfor handling state limit exceeded conditions - Added
SegmentMatcherinterface for composite pattern matching without faking RegExp
Path Utilities
- Added
PathContextinterface for path resolution operations - Updated
normalizePath()to properly handle~, relative paths, and project roots
Bug Fixes
- Fixed
createIntersectionPatternto use properSegmentMatcherinstead of fake RegExp object with invalid properties
Documentation
- Added comprehensive JSDoc documentation to all interface properties in type definitions
- Documented
PathContextusage in README - Added examples for pattern algebra operations
Tests
- Added 38 new tests for automaton operations:
- 14 tests for
determinize()including state limit handling - 15 tests for
isEmpty(),findWitness(), andcountPaths() - 9 tests for
complement()operation
- 14 tests for
- Added