|
2 | 2 |
|
3 | 3 | All notable changes to this project are documented in this file. |
4 | 4 |
|
| 5 | +## [2.0.0] - 2026-01-24 |
| 6 | + |
| 7 | +### Major Release — Unified API |
| 8 | + |
| 9 | +This release completes the migration to a **single-module architecture**, providing a simpler, more intuitive API while maintaining all existing functionality. |
| 10 | + |
| 11 | +### Breaking Changes |
| 12 | + |
| 13 | +- **Module consolidation**: `str/core`, `str/extra`, and `str/tokenize` are now internal. Import `import str` instead. |
| 14 | +- **Removed deprecated public APIs** from `str/core`, `str/extra`, and `str/tokenize`. |
| 15 | +- **Type re-exports**: `SearchStrategy` and `FillPosition` types are now exported directly from `str`. |
| 16 | + |
| 17 | +### Added |
| 18 | + |
| 19 | +- **Unified entry point**: All functions are now accessible via `import str`. |
| 20 | +- **New `str/advanced` module** for power users who need fine-grained control: |
| 21 | + - `build_kmp_maps/1` — Build KMP prefix/lookup maps for a pattern. |
| 22 | + - `kmp_search_all_with_maps/3` — KMP search with pre-built maps. |
| 23 | + - `kmp_index_of_with_maps/4` — KMP index with pre-built maps. |
| 24 | + - `kmp_index_of/2`, `kmp_search_all/2` — Direct KMP algorithm access. |
| 25 | + - `sliding_index_of/2`, `sliding_search_all/2` — Direct sliding-window access. |
| 26 | + - `choose_search_strategy/2` — Expose the library's heuristic chooser. |
| 27 | +- **Alias functions** for clarity: |
| 28 | + - `index_of_simple/2` — Explicit simple/stable implementation. |
| 29 | + - `count_simple/3` — Explicit simple/stable implementation. |
| 30 | +- **Re-exported types** from main module: |
| 31 | + - `str.SearchStrategy` with constructors `str.Kmp`, `str.Sliding`. |
| 32 | + - `str.FillPosition` with constructors `str.Left`, `str.Right`, `str.Both`. |
| 33 | + |
| 34 | +### Changed |
| 35 | + |
| 36 | +- **Default search behavior**: `index_of/2` and `count/3` remain simple/stable implementations. Use `index_of_auto/2` and `count_auto/3` for heuristic-based auto-optimization. |
| 37 | +- **Internal restructure**: Implementation details moved to `str/internal/*` modules. |
| 38 | +- **Improved documentation**: Module-level docs with comprehensive examples. |
| 39 | + |
| 40 | +### Deprecated |
| 41 | + |
| 42 | +- **`str/core`, `str/extra`, `str/tokenize`**: These modules are now internal. All public APIs have been moved to `str` or `str/advanced`. |
| 43 | + |
| 44 | +### Notes |
| 45 | + |
| 46 | +- Zero OTP dependencies maintained. |
| 47 | +- Grapheme-aware behavior unchanged. |
| 48 | + |
| 49 | +Contributed by: Daniele (`lupodevelop`) |
| 50 | + |
| 51 | +--- |
| 52 | + |
5 | 53 | ## [1.3.0] - 2026-01-09 |
6 | 54 | ### Deprecated |
7 | 55 | - Deprecated public APIs in internal modules (`str/core`, `str/extra`, and `str/tokenize`) in |
|
0 commit comments