Skip to content

Bump Handlebars.Net from 1.11.5 to 2.1.6 - #16884

Merged
akoeplinger merged 2 commits into
mainfrom
dependabot/nuget/Handlebars.Net-2.1.6
May 26, 2026
Merged

akoeplinger merged 2 commits into
mainfrom
dependabot/nuget/Handlebars.Net-2.1.6

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github May 25, 2026

Copy link
Copy Markdown
Contributor

Updated Handlebars.Net from 1.11.5 to 2.1.6.

Release notes

Sourced from Handlebars.Net's releases.

2.1.6

Changes

Maintenance 🧰

  • Added in missing SDK's for release @​thompson-tomo (#​579)

    Added in required sdk's for the release build which was missed in #​578

  • Update of TFM & dependency optimisation @​thompson-tomo (#​578)

    By adjusting the TFM'S we have been able to produce a package with no dependencies on the latest frameworks hence an optimised dependency graph.

    The following frameworks have been added:

    • Net 6

    The following frameworks even though requested was not added:

    • Net 5

    The following frameworks were removed:

    • Net 4.5.2
    • Net 4.6

    Closes: #​573
    Closes: #​415

Contributors

@​oformaniuk and @​thompson-tomo

2.1.5

Changes

  • #​574 Repo readme is mirrored into nuget package @​thompson-tomo (#​575)

    Closes #​574

Features 🚀

  • Add EmbedUntrackedSources @​lahma (#​570)

    I would also suggest changing to use newer GH Actions images for building so that other warnings would go away (old SDK in use). Maybe another modernization step could be removing old unsupported full framework targets and only support oldest supported net462. Adding net6.0 target would allow one target without dependency on Microsoft.Csharp.

  • Use PackageLicenseExpression in NuGet package @​StefH (#​564)

Bug Fixes 🐛

  • Introduce PartialRecursionDepthLimit @​RoosterDragon (#​552)

    When evaluating templates with partials, it is possible to recurse in the evaluation of those partials. This can be useful for dealing with tree like data, such as rendering a list of friends-of-friends-of-friends-of-etc....

    The ability to recurse can lead to stack overflows. For example if a sufficiently deep tree is provided as input data, or more simply if the partial calls itself in an infinite loop. As a stack overflow terminates the process, this is not desirable behaviour as it is an unavoidable crash.

    To resolve this a configurable PartialRecursionDepthLimit is introduced, defaulting to 100. Now when a template is evaluated a HandlebarsRuntimeException will be thrown if this limit is reached. This allows the caller to catch the exception and recover gracefully, rather than terminating the process.

  • Allow slashes properly within escape blocks @​Hoeksema (#​567)

    closes #​566

    The path parsing currently doesn't work properly when there are embedded slashes within an ignore block.

    This PR fixes this issue:

    • No more exceptions thrown when using // within an escaped block
    • Allowing multiple / to occur within an escape block without breakage

    Before, the individual segments between slashes in addition to the entire escaped block were returned by PathInfo. Now, it returns just the latter, which is correct. All existing unit tests still pass and new tests were added to exercise the failing cases in #​566.

  • Throw properly on open ignore block instead of crashing @​Hoeksema (#​569)

    Closes #​568

    Resolve the hang on compile when there is an open ignore block

    Reshuffle the logic so that the throw check for end of template is done before trying to process the char

... (truncated)

2.1.4

Features 🚀

  • Add optional 3rd argument to lookup helper @​StefH (#​542)

Contributors

@​StefH

2.1.3

Changes

Contributors

@​Nisden, @​anth12, @​rexm, @​zjklee and Anthony Halliday

2.1.2

Changes

Bug Fixes 🐛

  • Nested partial block receives correct context @​zjklee (#​516)

    Nested partial block receives correct context

    Issues:

    • closes #​515

Contributors

@​zjklee

2.1.1

Changes

  • Update readme.md to include extra projects @​StefH (#​509)

Features 🚀

  • Introduce SharedEnvironment @​zjklee (#​514)

    Introduces SharedEnvironment to deal with big memory footprint when runtime has a lot of compiled templates.
    See SharedEnvironment documentation for more details

    Issues:

    • closes #​513

Bug Fixes 🐛

  • Fix collision handling in FixedSizeDictionary @​zjklee (#​512)

    In rare cases (depended on hashcode) as part of searching for a suitable place in the array search started from index greater than array length.

    Issues:

    • closes #​498
  • Fix for string object property access @​Dragwar (#​510)

    Removed if condition in ObjectDescriptor that checked whether the type is string

    Issues:

    • closes #​457
  • Last letter cut off when the string starts with the separator @​periklis92 (#​504)

    Split Enumerator strings would have the wrong length if the string started with the separator.

    Issues:

    • closes #​500

Contributors

@​Dragwar, @​StefH, @​periklis92 and @​zjklee

2.1.1-beta-1

Changes

Contributors

@​zjklee

2.1.0

Changes

  • Remove duplicate AliasProviders initialization @​RomainHautefeuille (#​486)

Features 🚀

  • Decorators implementation @​zjklee (#​489)

    Issues:

    • closes #​137
  • Deprecate SupportLastInObjectIterations @​orgads (#​482)

Bug Fixes 🐛

  • Decorators implementation @​zjklee (#​489)

    Issues:

    • closes #​380
    • closes #​306
    • closes #​300
  • Enable support for chained path iterators @​abraham-fox (#​488)

    Issues:

    • closes #​442
  • Add checks for loose closing blocks @​abraham-fox (#​485)

    Check loose closing blocks on compile time - fixes #​484.

Contributors

@​RomainHautefeuille, @​abraham-fox, @​orgads, @​zjklee

2.0.10

Changes

Features 🚀

  • HtmlEncoding consistent with rules in handlebars.js @​tommysor (#​473)

    The original issue this PR was intended to solve have been fixed in PR #​477.
    This PR now deals with general rules for encoding in Handlebars.Net vs handlebars.js.

  • Support @​last by default. @​orgads (#​481)

    Fixes #​480

Bug Fixes 🐛

  • Fix path parsing when contains [a/b] @​zjklee (#​478)

    Fixes #​470

  • UnencodedStatementVisitor resets value to previously existing value when done @​tommysor (#​477)

    Fix #​468 HandlebarsDotNet.Handlebars.Configuration.NoEscape Applied Inconsistently
    This PR does not deal with the question of general rules for encoding that was brought up in #​473.

  • Issue #​469 @​jamesfarrugia96 (#​474)

    Exposed additional helper registration overloads via static methods

Contributors

@​jamesfarrugia96, @​orgads, @​tommysor, @​zjklee

2.0.9

Changes

Bug Fixes 🐛

  • Fix memory leak at Configuration subscribers @​zjklee (#​456)

    What's inside:

    • fixes memory leak caused by observable subscribers were not removed

    Issues:

    • closes #​452

Contributors

@​zjklee

2.0.8

Changes

Bug Fixes 🐛

  • Allow struct collections @​bsagal (#​449)

    Fix bug #​447

Performance 🐌

  • Improve performance for large arrays (10.000+) @​albertschulz (#​451)

    When rendering templates with large arrays, execution time grows exponentially.
    The issue originated from the cache for the iterators contained in BoxedValues.cs. In opposite to the desired reduced memory usage, memory usage actually also explodes for the example show above.

    This pull request removes the cache, leaving the small boxing-cache for integer values between 0 and 20. Furthermore, it adds a benchmark for the execution time.

Contributors

@​albertschulz, @​bsagal and @​zjklee

2.0.7

Changes

Bug Fixes 🐛

  • Render layouts using LayoutViewModel instead of DynamicViewModel @​heemskerkerik (#​443)

    Fixes #​440.

    Because DynamicViewModel is ‘too flexible’, it is difficult to provide a fully working ObjectDescriptor for it. Instead, this introduces a new, more limited LayoutViewModel, which intercepts binding expressions for body, but forwards everything else, including iteration, to the main view’s model. DynamicViewModel is left unmodified, since it’s public and it’s unclear whether people actually use it.

  • @​data object is not accessible within layout @​zjklee (#​441)

    What's inside:

    • @​data object is properly passed to layout

    Issues:

    • closes #​439
  • Only parse comments as layout when they are not escaped @​heemskerkerik (#​438)

    Fixes #​437

    This lets CommentParser.AccumulateComment return whether the comment is an ‘escaped’ comment (i.e. starting with --), and only parses a layout token when it is not escaped.

Contributors

@​heemskerkerik and @​zjklee

2.0.6

Changes

Bug Fixes 🐛

  • Fix multiple block params in the same template in different blocks @​zjklee (#​436)

    What's inside:
    • fixes HandlebarsCompilerException when template contains multiple blockParams in different blocks

Contributors

@​zjklee

2.0.5

Changes

  • Remove call-for-input link - V2 is out @​nblumhardt (#​429)

Bug Fixes 🐛

Contributors

@​nblumhardt and @​zjklee

2.0.4

Changes

Bug Fixes 🐛

  • Fix for Issue #​412 @​leniency (#​413)

    The ReflectionMemberAccessor throws an exception when accessing value type members. The internal CreateGetDelegate method must specify pass-by-reference for these types.

  • Add boundaries check to MemberAccessor responsible for IList* @​zjklee (#​409)

    Closes #​408

Contributors

@​leniency and @​zjklee

2.0.3

Changes

Bug Fixes 🐛

Contributors

@​zjklee

2.0.2

Changes

Bug Fixes 🐛

Contributors

@​mhornbacher and @​zjklee

2.0.1

Changes

Bug Fixes 🐛

  • Fix assembly signing

Contributors

@​zjklee

2.0.0

Release

For the list of changes please see change log of pre-release versions:

2.0.0-rc-2

Changes

Bug Fixes 🐛

  • Fix subscription direction for ObjectDescriptorFactory and FormatterFactory

Contributors

@​zjklee

2.0.0-rc-1

Changes

Features 🚀

  • Introduce AmbientContext @​zjklee (#​391)

    What's inside:

    • Introduce AmbientContext
    • Move PathInfo and related classes to a separate namespace
    • Improve GC-friendliness: PathInfoStore and ChainSegmentStore are now associated with the compiled template instead of being static
  • Introduce value formatters @​zjklee (#​390)

    What's inside:

    • support for custom value formatters

    Issues:

  • Expose inner interfaces in configuration @​zjklee (#​388)

    What's inside:

    • Extend existing and introduce new interfaces.
      This is done to expose only required APIs and trim internal collections implementation.
    • Improve and trim implementations of internal collections.
    • Improve PathInfo and ChainSegment parsing.

Bug Fixes 🐛

Breaking change ⛔

  • Introduce value formatters @​zjklee (#​390)

    • changes to ITextEncoder interface
    • use ISO 8601 formatting for DateTime
  • Expose inner interfaces in configuration @​zjklee (#​388)

    • Replace default collection interfaces by local equivalents. This is done to trim API surface.
  • Introduce Context type @​zjklee (#​385)

    • context parameters is no longer dynamic
    Handlebars.RegisterHelper("link_to", (writer, context, parameters) => {
        writer.WriteSafeString("<a href='" + (string)context.url + "'>" + (string)context.text + "</a>");
    });

... (truncated)

2.0.0-preview-2

Changes

Features 🚀

Bug Fixes 🐛

Breaking change ⛔

  • Introduce HelperOptions Helper and ReturnHelper @​zjklee (#​378)

    • HelperOptions struct in block helpers renamed to BlockHelperOptions
  • @​data and noEscape @​zjklee (#​375)

    • changed public API types in several places, semantic is still more or less the same

Performance 🐌

  • @​data and noEscape @​zjklee (#​375)

    • improved overall performance (2x - 3x faster)
      ... (truncated)

2.0.0-preview-1

Changes

Features 🚀

Performance 🐌

  • Infrastructure improvements @​zjklee (#​371)

    • Rework helper registration to use pub/sub approach
    • Improve path resolver performance
  • Merging fork into trunk @​zjklee (#​359)

    • global refactoring (without breaking changes to the public API)
    • improvements to extensibility
    • performance improvements (depends on template complexity):
        - 2-10x compilation time improvement 
        - 2-10x execution time improvement 
        - up to 20x less memory consumption during compilation and execution

... (truncated)

Commits viewable in compare view.

Dependabot compatibility score

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 rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will 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 version will 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 dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

---
updated-dependencies:
- dependency-name: Handlebars.Net
  dependency-version: 2.1.6
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot Bot added .NET Pull requests that update .NET code dependencies Pull requests that update a dependency file labels May 25, 2026
@ViktorHofer

Copy link
Copy Markdown
Member

@copilot fix the build: react to the breaking changes in Handlebars.Net

Copilot AI commented May 26, 2026

Copy link
Copy Markdown
Contributor

@copilot fix the build: react to the breaking changes in Handlebars.Net

Fixed the build in 61d4de5. Handlebars.Net 2.x breaking changes addressed:

  • IHandlebars.Compile now returns HandlebarsTemplate<TextWriter, object, object> instead of Action<TextWriter, object> → wrapped in Templates.LoadTemplateFile.
  • RegisterTemplate now expects HandlebarsTemplate<TextWriter, object, object> → adapted in ServiceClientCodeFactory.
  • WriteSafeString extension was removed from TextWriter (now only on EncodedTextWriter) → replaced with Write in the C#/Angular language helpers, which emit raw source code (no HTML encoding context, so semantics are preserved).

All three SwaggerGenerator projects (CodeGenerator, CmdLine, MSBuild) build clean.

Copilot AI requested a review from ViktorHofer May 26, 2026 09:13
@akoeplinger
akoeplinger merged commit 3004bba into main May 26, 2026
10 checks passed
@akoeplinger
akoeplinger deleted the dependabot/nuget/Handlebars.Net-2.1.6 branch May 26, 2026 10:24
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview6 milestone May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment