Skip to content

v0.3

Choose a tag to compare

@dsisco11 dsisco11 released this 10 Jan 10:24
· 3 commits to master since this release
e5a20e4

Release Notes — TinyPreprocessor v0.3

Breaking changes

  • The library is now generic over content representation (TContent) instead of a symbol type (TSymbol + ReadOnlyMemory<TSymbol>).
  • Preprocessor<…> now requires an IContentModel<TContent> instance to define:
    • how content length is measured
    • how content is sliced
    • what a source-map “offset” means (“content units”)
  • Public interfaces updated accordingly:
    • IResource<TContent> / Resource<TContent> now store TContent Content
    • IResourceResolver<TContent> and ResourceResolutionResult<TContent>
    • IDirectiveParser<TContent, TDirective> parses TContent directly
    • IMergeStrategy<TContent, TDirective, TContext>, ResolvedResource<TContent, TDirective>, MergeContext<TContent, TDirective>
    • PreprocessResult<TContent> now returns TContent Content

New

  • Added IContentModel<TContent> abstraction.
  • Added a text implementation for the default text pipeline (ReadOnlyMemory<char>).

Text pipeline

  • ConcatenatingMergeStrategy updated to the new merge contracts and continues to operate as the default text merge strategy using TContent = ReadOnlyMemory<char>.

Source maps

  • Source mapping remains offset-based; documentation now reflects the current implementation.
  • Offsets are now explicitly “content units” as defined by the supplied IContentModel<TContent>.

Documentation

  • README and architecture docs updated to match the new TContent + IContentModel<TContent> APIs and examples.

Testing

  • Test suite updated to the new API and remains green (109 tests passing).
  • Existing xUnit analyzer warnings remain (no behavioral change implied).

Upgrade guidance (high level)

  • Replace TSymbol usages with TContent in your implementations.
  • Provide an IContentModel<TContent> when constructing Preprocessor<…>.
  • If you’re using the text pipeline, use TContent = ReadOnlyMemory<char> and ReadOnlyMemoryCharContentModel.