Bump Handlebars.Net from 2.3.0 to 2.4.1 - #484
Merged
github-actions[bot] merged 1 commit intoAug 7, 2026
Merged
Conversation
--- updated-dependencies: - dependency-name: Handlebars.Net dependency-version: 2.4.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
dependabot
Bot
deleted the
dependabot/nuget/service/src/InstructorIQ.Core/Handlebars.Net-2.4.1
branch
August 7, 2026 07:08
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.3.0 to 2.4.1.
Release notes
Sourced from Handlebars.Net's releases.
2.4.1
Fixes
Both regressions below were introduced on 2026-06-20 and shipped in 2.4.0 (released 2026-08-06). Neither was an intentional public API change — this release restores prior correct behavior.
\r\n/\rin static template text to\n, so a literal\r\na caller wrote into a template string (e.g. between{{#each}}iterations) was silently turned into\n. Static text now round-trips verbatim, matching this library's long-standing behavior and handlebars.js. (#663, fixes #661)internal sealed class SafeStringwhen used as a subexpression argument. Only a few internal call sites knew how to unwrap it — any other consumer, including reflection-based/typed helper binders in third-party packages (e.g.Handlebars.Net.Helpers), received an opaque type it could neither cast tostringnor unwrap, throwingInvalidCastException. The double-encoding fix is preserved, but the signal is now carried by an invisible reference-keyed marker instead of a boxing type, so the value is a genuineSystem.Stringeverywhere except the one place that needs to know. (#664, fixes #660)Compatibility notes
\n-only output regardless of source line endings, or handled aSafeString-typed subexpression argument), that adaptation is no longer necessary but should remain harmless.Contributors
@rexm
Full Changelog: Handlebars-Net/Handlebars.Net@2.4.0...2.4.1
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
Commits 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)