Repository navigation
v0.3
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 anIContentModel<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 storeTContent ContentIResourceResolver<TContent>andResourceResolutionResult<TContent>IDirectiveParser<TContent, TDirective>parsesTContentdirectlyIMergeStrategy<TContent, TDirective, TContext>,ResolvedResource<TContent, TDirective>,MergeContext<TContent, TDirective>PreprocessResult<TContent>now returnsTContent Content
New
- Added
IContentModel<TContent>abstraction. - Added a text implementation for the default text pipeline (
ReadOnlyMemory<char>).
Text pipeline
ConcatenatingMergeStrategyupdated to the new merge contracts and continues to operate as the default text merge strategy usingTContent = 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
TSymbolusages withTContentin your implementations. - Provide an
IContentModel<TContent>when constructingPreprocessor<…>. - If you’re using the text pipeline, use
TContent = ReadOnlyMemory<char>andReadOnlyMemoryCharContentModel.