Bump Handlebars.Net from 2.1.6 to 2.4.0 - #2472
Open
dependabot[bot] wants to merge 1 commit into
Open
Conversation
--- updated-dependencies: - dependency-name: Handlebars.Net dependency-version: 2.4.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updated Handlebars.Net from 2.1.6 to 2.4.0.
Release notes
Sourced from Handlebars.Net's releases.
2.4.0
Performance
Rendering plain .NET objects and string-heavy templates got substantially faster this release, across three targeted changes to the hot rendering path:
ObjectDescriptor's member accessor is now pre-bound to its described type instead of re-resolving through a shared type-keyed lookup on every access, andboolproperty reads return cached boxed instances instead of allocating a fresh box per read. (#652)SearchValues<char>(net8.0+) or a plain scan (netstandard) instead of oneTextWriter.Write(char)call per character, falling back to the original per-character path only where escaping is actually needed. Output is byte-for-byte identical. (#651){{#each}}iteration — the boxed-integer cache used for iterator indexes grew from 20 to 1024 entries, eliminating a 24-byte-per-item allocation that was the dominant remaining allocation source in list rendering (e.g. 23.5 KB → 0 B for a 1000-item{{#each}}). (#653)Combined, typical object-rendering and list-rendering templates should see meaningfully lower latency and near-zero allocation on the common paths; dictionary/expando-backed templates benefit from the encoder work but were otherwise already efficient.
New features
<Nullable>enable</Nullable>are unaffected. Nullable-enabled consumers get compiler-checked null contracts on the public API, and extensibility interfaces (IPartialTemplateResolver,ITextEncoder,IMemberAccessor,IHelperResolver,IFormatterProvider,IObjectDescriptorProvider,IHelperDescriptor<T>,ViewEngineFileSystem) gained nullability annotations that may surface mismatch warnings (e.g. CS8767) in existing implementations until updated. (#642, @TheConstructor)System.Text.Json.JsonElementsupport — first-class support forJsonElement(e.g. the result ofJsonSerializer.Deserialize<object>(json)) in templates: nested member access,{{#each}}iteration over both JSON objects and arrays, and correct{{#if}}/{{#unless}}truthiness — bringing it to parity with the existing NewtonsoftJObject/JTokensupport. (#657)int[,]) can now be indexed via path expressions ({{grid.[0].[1]}}) and iterated with{{#each}}, which walks the outer-most dimension and yields row/slab slices for the rest. Jagged arrays and existingIList/IEnumerablebehavior are unaffected. (#649)else ifchaining for block helpers —{{else name args}}...{{/outer}}now works for any block helper, not just{{#if}}, and chains recursively to any depth, e.g.{{#StringEqualityBlockHelper @value 'dog'}}...{{else StringEqualityBlockHelper @value 'cat'}}...{{else}}...{{/StringEqualityBlockHelper}}. (#648)Fixes
{{PropertyName}}lookup and{{#each this}}enumeration, instead of being silently skipped. (#658, fixes #601){{#*inline "name" ...}}no longer throws when passed hash arguments or extra positional arguments, matching Handlebars.js'sinlinedecorator behavior. (#647, fixes #560)Try*out-parameters for concrete reference types (introduced in #642) from[MaybeNullWhen(false)] out Tto[NotNullWhen(true)] out T?, matching BCL convention (e.g.Uri.TryCreate) and giving a stronger compiler guarantee against unchecked dereferences. Affects ~20Try*methods acrossIObjectDescriptorProvider/ObjectDescriptor,IFormatterProvider,DynamicMemberAccessor,TypeExtensions,BindingContext,PathResolver, andBlockAccumulatorContext. Compile-time-only change, not binary breaking. (#655, fixes #654)Closure.Ais nowinternalandPathInfo.Segmentscarries an explicit suppression. (#656)Compatibility notes
NotNullWhen/MaybeNullWhencorrection are compile-time metadata only.IPartialTemplateResolver,ITextEncoder,IMemberAccessor,IHelperResolver,IFormatterProvider,IObjectDescriptorProvider,IHelperDescriptor<T>, or derive fromViewEngineFileSystem, and build with<Nullable>enable</Nullable>, you may see new nullability-mismatch warnings until your implementation's annotations are updated to match.HandlebarsConfiguration.FileSystemis now declared nullable (ViewEngineFileSystem?), matching its actual default.ArgumentNullException(with parameter name) instead of a rawNullReferenceExceptionfor null/mismatched values.Contributors
@TheConstructor, @rexm
Full Changelog: Handlebars-Net/Handlebars.Net@2.2.0...2.4.0
2.3.0
Changes
Nullable Reference Types @TheConstructor (#642)
The entire public API surface is now annotated for Nullable Reference Types.
Compatibility notes:
<Nullable>enable</Nullable>are unaffected.Try*methods are annotated with[MaybeNullWhen(false)], optional parameters and nullable returns are declared with?, etc.?annotations. Affected:IPartialTemplateResolver,ITextEncoder,IMemberAccessor,IHelperResolver,IFormatterProvider,IObjectDescriptorProvider,IHelperDescriptor<T>, and theViewEngineFileSystembase class.HandlebarsConfiguration.FileSystemis now declared nullable (ViewEngineFileSystem?), matching its actual default.ArgumentNullExceptionwith a parameter name instead of a rawNullReferenceExceptionwhen given a null or mismatched value.Contributors
@TheConstructor
Full Changelog: Handlebars-Net/Handlebars.Net@2.2.0...2.3.0
2.2.0
Handlebars.Net 2.2.0
netstandard1.3,net451, andnet6. The package now targetsnetstandard2.0,netstandard2.1, andnet8.0. Modern consumers (.NET Framework 4.6.1+, .NET Core 2.0+, .NET 5/8+) are unaffected vianetstandard2.0; only consumers on the removed legacy frameworks need to stay on 2.1.x.') is now HTML-encoded by default (#546), matching Handlebars.js behavior. This is invisible when rendering HTML, but changes raw output bytes — review any exact-string or snapshot assertions on rendered output.Bug fixes
PathBinder(#434)IDictionary/Hashtable(#521) andDictionaryMemberAccessor(#466)@partial-blocknow usable inside#ifand as a block partial (#519)#ifwithincludeZero=truenow supported;includeZerohonored in built-in conditional blocks (#285)#each(#539)WriteSafeStringencoding consistent regardless of helper registration order (#559)byref/indelegate parameters incompatible with Mono/Xamarin (#458)DictionarySlimgrowth when replacing existing keys (#541)StaticConverterfor platform-independent outputMaintenance
windows-latest; bumped deprecated GitHub Actions and SDK versions; pinned third-party actions to commit SHAsCommits viewable in compare view.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)