Skip to content

Commit 41b8167

Browse files
committed
Update CHANGELOG for 2.0.0 unified API release
Documents the major 2.0.0 release, highlighting the migration to a single-module architecture, breaking changes, new advanced APIs, type re-exports, and improved documentation. Notes deprecations and internal restructuring.
1 parent 49dcc7f commit 41b8167

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,54 @@
22

33
All notable changes to this project are documented in this file.
44

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+
553
## [1.3.0] - 2026-01-09
654
### Deprecated
755
- Deprecated public APIs in internal modules (`str/core`, `str/extra`, and `str/tokenize`) in

0 commit comments

Comments
 (0)