Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Import Project="releasenotes.props" />

<PropertyGroup>
<VersionPrefix>1.0.4-beta</VersionPrefix>
<VersionPrefix>1.0.5-beta</VersionPrefix>
<!-- SPDX license identifier for MIT -->
<PackageLicenseExpression>MIT</PackageLicenseExpression>

Expand Down
28 changes: 28 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- No changes yet

## [1.0.5-beta] - 2025-11-14

### Changed
- **Migrated code generation from StringBuilder to Scriban templates** for improved maintainability and readability
- Unified template generates all interceptor code for 8 registration kinds
- Conditional logic handles variations (keyed, factory, instance, two-type-params)
- Template caching with `ConcurrentDictionary<string, Template>` for performance
- Strongly-typed `RegistrationModel` (readonly record struct) for zero-boxing overhead
- **Code cleanup** - Removed 570+ lines of StringBuilder emission code
- Simplified `InterceptorEmitter.cs` from 440+ lines to ~70 lines
- Removed individual template files (Common/InterceptsLocationAttribute, DecoratorKeys, DecoratorFactory)
- Single unified template: `DecoWeaverInterceptors.scriban`
- **Comment reduction** - Removed generic "Register X" comments, kept only valuable WHY comments
- "Create nested key to avoid circular resolution" - explains nested key purpose
- "Compose decorators (innermost to outermost)" - explains decorator ordering

### Added
- Added dependency: `Scriban 6.5.0` and `Microsoft.CSharp 4.7.0` (for Scriban's dynamic features)
- Template resource format: `Templates.{FileName}.scriban` embedded in assembly
- `TemplateHelper.cs` with template loading and caching infrastructure
- `DecoWeaverInterceptorsSources.cs` with strongly-typed model generation

### Technical Details
- Template compilation is one-time cost with caching - no performance impact
- No functional changes - generated code is equivalent (except comment reduction)
- All 49 tests passing with updated snapshots
- Template uses Scriban's `{{-` syntax for whitespace control

## [1.0.4-beta] - 2025-11-13

### Added
Expand Down
38 changes: 38 additions & 0 deletions releasenotes.props
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,44 @@ This release adds support for singleton instance registrations, completing issue
* Changelog: https://layeredcraft.github.io/decoweaver/changelog/
* GitHub: https://github.com/layeredcraft/decoweaver

]]>
</PackageReleaseNotes>

<PackageReleaseNotes Condition="$(VersionPrefix.StartsWith('1.0.5-beta'))">
<![CDATA[
## DecoWeaver 1.0.5-beta - Scriban Template Migration

This release migrates code generation from StringBuilder to Scriban templates for improved maintainability and readability.

### What's Changed

* **Template-based code generation** - Migrated from StringBuilder to Scriban 6.5.0 template engine
- Unified template generates all interceptor code (8 registration kinds)
- Conditional logic handles variations (keyed, factory, instance, two-type-params)
- Template caching with `ConcurrentDictionary<string, Template>` for performance
- Strongly-typed `RegistrationModel` (readonly record struct) for zero-boxing overhead
* **Code cleanup** - Removed 570+ lines of StringBuilder emission code
- Simplified `InterceptorEmitter.cs` from 440+ lines to ~70 lines
- Removed individual template files (Common/InterceptsLocationAttribute, DecoratorKeys, DecoratorFactory)
- Single unified template: `DecoWeaverInterceptors.scriban`
* **Comment reduction** - Removed generic "Register X" comments, kept only valuable WHY comments:
- "Create nested key to avoid circular resolution" - explains nested key purpose
- "Compose decorators (innermost to outermost)" - explains decorator ordering

### Technical Details

* Added dependency: `Scriban 6.5.0` and `Microsoft.CSharp 4.7.0` (for Scriban's dynamic features)
* Template resource format: `Templates.{FileName}.scriban` embedded in assembly
* No functional changes - generated code is equivalent (except comment reduction)
* All 49 tests passing with updated snapshots
* Build performance unchanged - template compilation is one-time cost with caching

### Documentation

* Full documentation: https://layeredcraft.github.io/decoweaver/
* Changelog: https://layeredcraft.github.io/decoweaver/changelog/
* GitHub: https://github.com/layeredcraft/decoweaver

]]>
</PackageReleaseNotes>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Polyfill" Version="9.0.2">
<PackageReference Include="Polyfill" Version="9.0.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Loading
Loading