Releases: JPVenson/morestachio
Releases · JPVenson/morestachio
5.0.1.670
What's Changed
- Feature/dynamic formatter call by @JPVenson in #29
- Bump System.Linq.Dynamic.Core from 1.2.14 to 1.3.0 in /Morestachio.Linq by @dependabot[bot] in #31
- Bump System.Text.Json from 8.0.2 to 8.0.4 in /Morestachio.System.Text.Json by @dependabot[bot] in #32
- Bump System.Text.Json from 8.0.2 to 8.0.4 in /Morestachio.Tests by @dependabot[bot] in #33
- Modernized Dotnet versions. Dropped support for Net5,Net6,Net7. Added support for Net8,Net9,Net10
Full Changelog: 5.0.1.631...5.0.1.670
5.0.1.631 Token location refactoring, Serialization refactoring and addition of Xml & System.Text.Json value converter
- Refactored indexing.
- The new indexing does always include ranges within the template and are more verbose.
- Tag Document items do now have information on the start and end of the whole tag embedded
- Block Document items have a new property
BlockLocationthat mark the closing tag of that block
- Refactored XML and Json serialization.
- Json serialization does no longer depend on the
TypeNameHandling = TypeNameHandling.Objectssetting from newtonsoft as it adds its own Type Discriminator - Added support for System.Text.Json serialization
- Added support for Nullable type serialization.
- Json serialization does no longer depend on the
- Added additional Number.cs formatters such as "IsIntegralNumber", "IsFloatingPointNumber", "AsFloatingPointNumber"
- Added support for Numbers to be used with
#REPEATblocks - Added additional Linq formatter
- Breaking Change: Updated Inheritance for Block/Tag document items. Only block documents now declare a Children property.
5.0.1.622 Newtonsoft.Json Update CWE-755
This release is only a version upgrade of all Newtonsoft.Json references that bump the version to 13.0.1 to mitigate the CWE-755.
5.0.1.615 External Integrations
- Added Handling for PartialsStoreAggregator and MultiValueResolver in ParserOptionsBuilder
- Added Handling for ListLogger in ParserOptionsBuilder
- Added Nuget Package for System.Text.Json support
- Added Nuget Package for System.Xml support
- Added Nuget Package for Microsoft.Extensions.Logging
- Added proper symbol packages to nuget
- Added
When(bool, object, object)formatter for single line conditional data output - Improved generics type inheritance matching in Formatters
- Improved Logger usage with explicit Interpolated string handling
- Refactored usage of ConfigureAwait(false)
- Fixed invalid calling case to a Instance formatter when the invoking object is not the correct instance
- Set CI build to use
ContinuousIntegrationBuildandDeterministicoptions in msbuild - Discontinued the support for the data parameter in logging. The methods are still present but marked Obsolete.
5.0.1.589 ParserOptionsBuilder
- BreakingChange: Added ParserOptionsBuilder with fluid syntax to create ParserOptions
- Added ParserOptionsError serialization
- Added FormatterService parent with default of the default FormatterService
- Added
Typeofformatter - Added Allowed currencies to be added or substracted when one is more defined then the other
- Added IMorestachioExpression as option for TokenOption
- Fixed Logger warning on Inverted scope
- Fixed HashWith formatter
5.0.1.577 Hotfix #21
This release fixes the bug #21
5.0.1.570 Bugfixes & Performance Improvments
- Fixed: Generics for Formatters not matched under certain conditions
- Fixed: Xml persistent tokens not properly serialized
- Fixed: Tokenizer not always respecting special variables
$in paths - Fixed: Runner nuget package referencing the Test project
- Removed explicit references to .NetFramework. Compatibility is ensured via .NetStandard
- Improved usage of
Array.Emptywhere applicable - Improved access to special collection variables like
$index - Improved tokenizer to use shared
StringBuilderwhere applicable for performance and memory reasons - Improved several places for performance
- Added Tests
- Added
#ForEachloop. See https://github.com/JPVenson/morestachio/wiki/Keywords#each--foreach--every---blocks - Added access to
ParserOptionsinIDocumentItemduring compile time - Added Fallback
IValueResolverthat is set to an reflection based resolver per default
QOL Features
This update contains a number of Quality of life improvements and some minor changes to the internal architecture that aims for faster execution and more stable formatter execution as well as the usual expansion of build-in formatters.
- Added the
[MethodName]placeholder feature for Formatter names to be replaced with the C# name of the method it attributes - Updated the Predefined Formatter wiki
- Added the CryptService for encrypting data with AES
- Added the HashService to hash data with several algorithms
- Added Constants. Constants are read only variables provided by the invoker that exists alongside the root object.
- BREAKING CHANGE: The MorestachioFormatterService now has a property
Servicesthat contains the services for your template instead of beeing the service container itself - Added methods to evaluate most values at compile time instead of runtime. This prolongs the compiling process but speeds up the execution significantly.
- Fixed: The name of a #Import partial is now properly handled when null
- Fixed: The value of a #Culture is now properly handled when null
- Added a base
MorestachioPropertyListResolverclass for whitelisting properties - Added Currency to the Money type
- Added the
[ServiceNameAttribute]to define a custom name for a service within your template - Allowed a formatter to get the original
IMorestachioExpressionas an argument instead of the value - Allowed the use of lambda generation from template. You can now create a lambda function in your template and provide it to a formatter like
listOfData.Where(e => e.item == true). The formatter must accept aMorestachioTemplateExpressionas the parameter type - Allowed alias to be set on
#DO,#WHILE,#REPEATto get the correct collection scope - Added UsageReport. Using the
DataAccessAnalyzeryou can now analyize the whole expression tree to get all property paths and formatters that are called.
Performance, Custom Renderes, Isolation, Bugfixes
This Update contains a number of smaller improvements, Performance fixes, QOL features and a the addition of renderes.
- Added an Index property to
CharacterLocation - Fixed the NullCoalescing Operator
- Added global Formatter "ParseBool" that will parse a string containing ether "true","yes","valid" or "1" to true otherwise to false.
- Added Isolation keyword. See: https://github.com/JPVenson/morestachio/wiki/Keywords#isolation---block
- Fixed an StackOverflow in Tokenizer
- Added IDocumentCompiler and IRenderer see: https://github.com/JPVenson/morestachio/wiki/IRenderer-and-IDocumentCompiler
- Performance improvement for Path handing in CompiledRenderer
- Performance improvement for Expression execution in CompiledRenderer
- Performance improvement for EachDocument loop
- Breaking Change: Removed the AbortGeneration property
- Breaking Change: Expressions no longer overwrites the ToString method but uses the DebuggerProxys ToString method
- Huge Performance Improvement with the usage of
ReadOnlySpan<char>in the ByteCounterStream for compatible .Net versions - TextInstructions are now added to the Content as a Child instead of being an distinct DocumentItem
- Breaking Change: Moved the ParserOptions property from ContextObject to ScopeData
- Bugfix: AsyncPartialStore now uses ValueTask where applicable
- EachDocument now reuses its Context object
- NumberExpression and StringExpression now evaluates its ContextObject in CompileTime instead of RenderTime
- Feature: It is now possible to overwrite the TargetStream directly when calling
IRenderer.RenderAsync() - Feature: Added
ByteCounterTextWriterandByteCounterStringBuilderfor pure In-Memory generation. (both are way faster than theByteCounterStream) - Feature: All build-in ByteCounters overwrite the ToString method to to allow easy result-to-string generation
- Added .Net-Configuration transformation with Morestachio (WIP)
Hotfix and QOL
- Fixed endless running TokenParser when encountering a single expression containing only one string opening
- Added
thisreplacement for.self referencing - Added
Withformatter for list creation - Changed the
FormatterServices service interface fromIServiceProvidertoIServiceContainer