All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Unreleased

1.0.1 - 2026-10-22

Added

Changed

  • Corrected the TextChunker moduledoc: :chunk_size and :chunk_overlap are measured in graphemes by default (#109)

1.0.0 - 2026-10-16

First stable release. The public API is TextChunker.split/2, TextChunker.supported_formats/0, %TextChunker.Chunk{}, TextChunker.Error, and the TextChunker.Strategy callback.

Changed

  • Breaking: TextChunker.split/2 raises TextChunker.Error on invalid options instead of returning {:error, String.t()}; the return type is now always [TextChunker.Chunk.t()]. This only affects you if you pattern-match on {:error, message} from TextChunker.split/2 (#102)
  • Breaking: empty input returns [] instead of a single sentinel chunk. This only affects you if you were doing anything special with the "No chunks created" chunk text; if you weren't, this stops that made-up chunk from polluting your data (#102)
  • Breaking: TextChunker.ChunkerBehaviour is renamed to TextChunker.Strategy. This shouldn't really affect anyone, since you couldn't plug in your own strategies before anyway
  • TextChunker.Strategies.RecursiveChunk.Separators is hidden from the docs; it is an implementation detail of the built-in strategy, not public API
  • Chunk assembly is linear in the number of chunks: chunk and split lists are accumulated as deep lists instead of appended with ++ (#99)
  • Credo runs in CI (#104); text files check out with LF line endings on every platform (#105)

Added

  • :strategy accepts any module declaring @behaviour TextChunker.Strategy and implementing split/2, not only the built-in RecursiveChunk (#102)
  • TextChunker.supported_formats/0 returns the accepted :format values (#102)

0.7.0 - 2026-07-31

Changed

  • Breaking: a :chunk_overlap greater than :chunk_size is now rejected with a validation error (#98)
  • Large performance improvement: the merge loop tracks split sizes incrementally instead of re-measuring accumulated text on every step (#95)

Added

  • Property-based invariant tests and coverage for previously untested separator sets (#92)
  • AI contribution policy (#84)

Fixed

  • Typespec and README inaccuracies; modernized CI (#83)

0.6.1 - 2026-04-07

Added

  • :vtt (WebVTT subtitle) format support (#79)

0.6.0 - 2026-01-14

Fixed

  • The :get_chunk_size function is now used when merging splits, so custom sizing (e.g. token counting) applies to chunk assembly, not just splitting (#74)

0.5.2 - 2025-09-08

Fixed

  • Infinite recursion on large homogeneous text with nothing left to split (#63)

0.5.1 - 2025-08-29

Fixed

  • Added the "" fallback separator to every separator set so oversized text can always be split (#61)

0.5.0 - 2025-08-27

Fixed

  • Byte position tracking in chunk metadata; improved splitting performance (#56)

0.4.0 - 2025-07-11

Added

  • :get_chunk_size option for custom chunk-size measurement, e.g. token counting (#47)

Changed

  • CI runs tests on pull requests (#49)

0.3.2 - 2025-01-23

Changed

  • Maintenance release: dependency updates and release-process documentation (#36)

0.3.1 - 2024-05-17

Added

  • :html format support (#23)

0.3.0 - 2024-04-18

Added

  • Option validation via NimbleOptions; invalid options return an error tuple (#19)

0.2.0 - 2024-03-12

Changed

  • Breaking: TextChunker.Chunker.split/2 renamed to TextChunker.split/2 (#8)
  • Breaking: the :strategy option takes a module instead of a function capture (#12)

0.1.2 - 2024-03-08

Added

  • :python format support (#9)

0.1.1 - 2024-02-28

Added

  • SECURITY.md (#2)

0.1.0 - 2024-02-27

Added

  • Initial release: recursive, separator-based semantic chunking with configurable chunk size, overlap, and format, and byte-range metadata on every chunk