You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Draft a 2.4.4 release and review here before publishing #693
I'm the agent handling issue intake on Rex's behalf. My reading of this: draft release notes for 2.4.4 covering everything merged to master since the last tag, then post the draft here for review. I won't create or publish the GitHub Release until it's approved.
The draft release notes are below. I have not created or published anything. It covers the 10 PRs merged to master since 2.4.3 (#670, #675, #677–#682, #687, #689).
Decision needed: version number
AGENTS.md says to bump the minor version for additive features. This range adds public API:
It also changes some default output. The full list is under "Compatibility notes".
Recommendation: 2.5.0, not 2.4.4. Every behavior change is a defect fix toward Handlebars.js or has an opt-out, so I don't think it needs a major bump. But a patch number would tell consumers who auto-update on patches that nothing new or visible changed. If you'd still like 2.4.4, the notes work as written. For 2.5.0, only the compare link at the bottom changes.
Reply with the version (and any edits). I'll then create and publish the Release from current master and watch the Release workflow through to the NuGet push.
Draft release notes (title 2.4.4)
These are in a code block so the contributor mentions don't ping anyone until the release is published.
## New features-**`System.Text.Json``JsonNode` support.** You can now pass `JsonObject`, `JsonArray` and `JsonValue` into templates directly. They support the same things as `JsonElement`: member access, `#each` with `@index`/`@key`/`@first`/`@last`, truthiness, `includeZero` and partials. `JsonElement` also gains array index access (`{{items.[0]}}`, `{{lookup items 1}}`), `{{items.Count}}` (plus `{{items.length}}` with `UseCollectionMemberAliasProvider()`), and support for custom alias providers. New public types: `JsonNodeObjectDescriptorProvider`, `JsonNodeMemberAccessor`, `JsonNodeIterator`. `JsonElementObjectDescriptorProvider` and `JsonElementMemberAccessor` get new constructor overloads that take alias providers. (#670)
-**Error locations on exceptions.**`HandlebarsException` has new `Line` and `Column` properties (`int?`, zero-based, `null` when the location isn't known). The derived compiler, parser and runtime exceptions inherit them. When a compile-time error has a location, its message now ends with the offending template line and a caret under the column. (#681, refs #314)
-**Clearer messages for common syntax errors.**`{{#if !x}}` now says that `!` isn't a negation operator and points you to `#unless`. Unclosed blocks, stray closing tags and mismatched `}}}` now report where they happened. (#680, refs #314)
-**`Compatibility.LegacyStandaloneCaretBehavior`**: a new opt-out flag that restores the old `{{^}}` behavior (see Fixes). (#675, fixes #672)
## Fixes- A standalone `{{^}}` inside a block (also `{{^ }}` and `{{~^~}}`) is now the inverse separator, the same as `{{else}}`, matching Handlebars.js. Inside raw blocks it stays literal text. (#675, fixes #672)
-`{{else name args}}` under `{{#if}}`/`{{#unless}}` now chains to the named helper, as in Handlebars.js. Previously it was evaluated as `{{else if …}}`, or the condition was silently dropped. `{{else unless x}}` now has `unless` semantics, and `{{else with x}}` chains to the built-in `with`. (#687, #689, fixes #683)
-`{{#if}}`/`{{#unless}}` with a missing argument now throw `HandlebarsCompilerException` instead of a bare `InvalidOperationException`. (#678, fixes #674)
- Raw block helpers now compile when `Compatibility.RelaxedHelperNaming = true`. (#677, fixes #676)
-`JsonArray` member access is limited to indexes, `Count` and configured aliases, so `Parent`/`Root`/`Options` no longer resolve through reflection. Scalar `JsonValue`s read through `JsonSerializer` no longer throw. (#670)
## Internal- Sealed `ReusableStringWriter` (it has only a private constructor, so this doesn't break anything), and split up `Tokenizer`/`LiteralParser` methods for the SonarCloud S3881/S3776 items. No behavior change. (#679, closes #641)
## Compatibility notes
Some templates and code that worked before will behave differently:
-**`{{^}}` inside a block** used to render the current context, and the block had no inverse branch. It is now `{{else}}`. For example, `{{#if condition}}yes{{^}}no{{/if}}` with `condition = true` used to render `yes{ condition = True }no` and now renders `yes`. With `condition = false` it used to render nothing and now renders `no`. To restore the old output, set `Configuration.Compatibility.LegacyStandaloneCaretBehavior = true`. (#675)
-**`{{else unless x}}` under `{{#if}}`** used to be evaluated as `{{else if x}}`, which inverted the condition. **`{{else someHelper x}}`** used to ignore `someHelper`. It now calls it, and throws the usual missing-helper `HandlebarsRuntimeException` if `someHelper` isn't registered. `{{else if a b}}` and `{{else unless a b}}` (too many arguments) and a second `{{else}}` now fail at compile time. Plain `{{else}}`, `{{else if x}}` and a bare `{{else name}}` are unchanged. (#687)
-**Exception messages:** the location text changed from `Occured at: l:c` to `Line l, column c.`, and located compile errors now end with a source line and a caret. Code that matches on the exception type or message prefix keeps working. Code that searches for `Occured at:` or compares the full `Message` will not match. Use the new `Line`/`Column` properties instead. `{{#if}}` with no argument now throws `HandlebarsCompilerException` instead of `InvalidOperationException`. With too many arguments, it now says `#if requires exactly one argument`. (#678, #680, #681, #682)
-**`JsonNode`:**`false`, `0` and `""` are now falsy in `#if`/`#unless`/`#each`. Before, they were truthy. `JsonObject` lookups now fall back to the lowercase property name. Custom member alias providers are now consulted for `JsonElement` and `JsonObject` members that don't otherwise resolve. When interpolated directly, `JsonNode` booleans still render as `true`/`false`, while `JsonElement` booleans render as `True`/`False`. (#670)
**Contributors:**@jsneedles (`JsonNode` support), @EnesKartal (#684, whose test case and approach were incorporated into #687/#689), @rexm**Full Changelog**: https://github.com/Handlebars-Net/Handlebars.Net/compare/2.4.3...2.4.4
Thanks. I'll go with 2.4.4: apart from the JSON work, the public additions are small (one compatibility flag, two exception properties), and every behavior change is a defect fix or has an opt-out.
Nothing has been published yet. Reply "publish" (or with edits) and I'll create the 2.4.4 Release from current master with the notes below and follow the Release workflow through to the NuGet push.
Updated draft release notes (title 2.4.4)
## New features-**`System.Text.Json``JsonNode` support.** You can now pass `JsonObject`, `JsonArray` and `JsonValue` into templates directly. They support the same things as `JsonElement`: member access, `#each` with `@index`/`@key`/`@first`/`@last`, truthiness, `includeZero` and partials. `JsonElement` also gains array index access (`{{items.[0]}}`, `{{lookup items 1}}`), `{{items.Count}}` (plus `{{items.length}}` with `UseCollectionMemberAliasProvider()`), and support for custom alias providers. New public types: `JsonNodeObjectDescriptorProvider`, `JsonNodeMemberAccessor`, `JsonNodeIterator`. `JsonElementObjectDescriptorProvider` and `JsonElementMemberAccessor` get new constructor overloads that take alias providers. (#670)
-**Error locations on exceptions.**`HandlebarsException` has new `Line` and `Column` properties (`int?`, zero-based, `null` when the location isn't known). The derived compiler, parser and runtime exceptions inherit them. When a compile-time error has a location, its message now ends with the offending template line and a caret under the column. (#681, refs #314)
-**Clearer messages for common syntax errors.**`{{#if !x}}` now says that `!` isn't a negation operator and points you to `#unless`. Unclosed blocks, stray closing tags and mismatched `}}}` now report where they happened. (#680, refs #314)
-**`Compatibility.LegacyStandaloneCaretBehavior`**: a new opt-out flag that restores the old `{{^}}` behavior (see Fixes). (#675, fixes #672)
## Fixes- A standalone `{{^}}` inside a block (also `{{^ }}` and `{{~^~}}`) is now the inverse separator, the same as `{{else}}`, matching Handlebars.js. Inside raw blocks it stays literal text. (#675, fixes #672)
-`{{else name args}}` under `{{#if}}`/`{{#unless}}` now chains to the named helper, as in Handlebars.js. Previously it was evaluated as `{{else if …}}`, or the condition was silently dropped. `{{else unless x}}` now has `unless` semantics, and `{{else with x}}` chains to the built-in `with`. (#687, #689, fixes #683)
-`{{#if}}`/`{{#unless}}` with a missing argument now throw `HandlebarsCompilerException` instead of a bare `InvalidOperationException`. (#678, fixes #674)
- Raw block helpers now compile when `Compatibility.RelaxedHelperNaming = true`. (#677, fixes #676)
-`{{#each}}` over items of different runtime types now looks each item's members up by its own type. Before, a dictionary followed by a number threw `InvalidCastException`, and a number followed by a dictionary rendered empty. For example, `{{#each items}}[{{name}}]{{/each}}` over `[{name: "Erik"}, 42, {name: "Helen"}]` now renders `[Erik][][Helen]`. Collections whose items all share one type behave as before. (#691, fixes #685)
-`JsonArray` member access is limited to indexes, `Count` and configured aliases, so `Parent`/`Root`/`Options` no longer resolve through reflection. Scalar `JsonValue`s read through `JsonSerializer` no longer throw. (#670)
## Internal- Sealed `ReusableStringWriter` (it has only a private constructor, so this doesn't break anything), and split up `Tokenizer`/`LiteralParser` methods for the SonarCloud S3881/S3776 items. No behavior change. (#679, closes #641)
## Compatibility notes
Some templates and code that worked before will behave differently:
-**`{{^}}` inside a block** used to render the current context, and the block had no inverse branch. It is now `{{else}}`. For example, `{{#if condition}}yes{{^}}no{{/if}}` with `condition = true` used to render `yes{ condition = True }no` and now renders `yes`. With `condition = false` it used to render nothing and now renders `no`. To restore the old output, set `Configuration.Compatibility.LegacyStandaloneCaretBehavior = true`. (#675)
-**`{{else unless x}}` under `{{#if}}`** used to be evaluated as `{{else if x}}`, which inverted the condition. **`{{else someHelper x}}`** used to ignore `someHelper`. It now calls it, and throws the usual missing-helper `HandlebarsRuntimeException` if `someHelper` isn't registered. `{{else if a b}}` and `{{else unless a b}}` (too many arguments) and a second `{{else}}` now fail at compile time. Plain `{{else}}`, `{{else if x}}` and a bare `{{else name}}` are unchanged. (#687)
-**Exception messages:** the location text changed from `Occured at: l:c` to `Line l, column c.`, and located compile errors now end with a source line and a caret. Code that matches on the exception type or message prefix keeps working. Code that searches for `Occured at:` or compares the full `Message` will not match. Use the new `Line`/`Column` properties instead. `{{#if}}` with no argument now throws `HandlebarsCompilerException` instead of `InvalidOperationException`. With too many arguments, it now says `#if requires exactly one argument`. (#678, #680, #681, #682)
-**`JsonNode`:**`false`, `0` and `""` are now falsy in `#if`/`#unless`/`#each`. Before, they were truthy. `JsonObject` lookups now fall back to the lowercase property name. Custom member alias providers are now consulted for `JsonElement` and `JsonObject` members that don't otherwise resolve. When interpolated directly, `JsonNode` booleans still render as `true`/`false`, while `JsonElement` booleans render as `True`/`False`. (#670)
**Contributors:**@jsneedles (`JsonNode` support), @EnesKartal (#684, whose test case and approach were incorporated into #687/#689), @bardrop (#686, whose fix and tests were incorporated into #691), @rexm**Full Changelog**: https://github.com/Handlebars-Net/Handlebars.Net/compare/2.4.3...2.4.4
Handlebars.Net repo: the only other change is docs: make release version bump a judgement call in AGENTS.md #694 (AGENTS.md: the version bump is a judgement call, so small additive changes can be a patch). Its first CI run failed the macOS and Windows test jobs. I merged current master into the branch, the full suite passes locally (2284 passed, 0 failed), and CI is re-running. Auto-merge is still requested, so it lands once checks pass. If the macOS and Windows test jobs fail again, it will need a look.
Not fixed here; noting it for later: the Release workflow logs deprecation warnings. actions/checkout@v4, actions/setup-dotnet@v4 and timheuer/base64-to-file target Node.js 20, and one step still uses the deprecated set-output command. Both will eventually break the workflow if not updated.
Activity
stencil-harness commentedon Nov 21, 2026
I'm the agent handling issue intake on Rex's behalf. My reading of this: draft release notes for 2.4.4 covering everything merged to
mastersince the last tag, then post the draft here for review. I won't create or publish the GitHub Release until it's approved.stencil-harness commentedon Nov 21, 2026
The draft release notes are below. I have not created or published anything. It covers the 10 PRs merged to
mastersince2.4.3(#670, #675, #677–#682, #687, #689).Decision needed: version number
AGENTS.md says to bump the minor version for additive features. This range adds public API:
JsonNode*types and newJsonElement*constructor overloads (Add JsonNode support & enhance JsonElement #670)Compatibility.LegacyStandaloneCaretBehavior(Treat standalone {{^}} as the inverse separator, with a compatibility opt-out #675)HandlebarsException.Line/Columnand aMessageoverride (Expose error location on exceptions and show the source line with a caret #681)It also changes some default output. The full list is under "Compatibility notes".
Recommendation:
2.5.0, not2.4.4. Every behavior change is a defect fix toward Handlebars.js or has an opt-out, so I don't think it needs a major bump. But a patch number would tell consumers who auto-update on patches that nothing new or visible changed. If you'd still like2.4.4, the notes work as written. For2.5.0, only the compare link at the bottom changes.Before publishing
Reply with the version (and any edits). I'll then create and publish the Release from current
masterand watch theReleaseworkflow through to the NuGet push.Draft release notes (title
2.4.4)These are in a code block so the contributor mentions don't ping anyone until the release is published.
rexm commentedon Nov 21, 2026
Agents.md is wrong, if the public changes are small and additive only then it can be a patch version. It's a judgement call.
stencil-harness commentedon Nov 21, 2026
Thanks. I'll go with 2.4.4: apart from the JSON work, the public additions are small (one compatibility flag, two exception properties), and every behavior change is a defect fix or has an opt-out.
{{#each}}over items of mixed types, fixes #each: member lookup throws InvalidCastException when items have different types #685) merged after my first draft, so I've added it under Fixes and credited @bardrop for fix: drop cached descriptor when the context value changes type #686.masterrun for fix: #each member lookup with items of different types (drop cached descriptor on value type change) #691's merge was still queued when I checked. I'll wait for it to pass before publishing.Nothing has been published yet. Reply "publish" (or with edits) and I'll create the
2.4.4Release from currentmasterwith the notes below and follow theReleaseworkflow through to the NuGet push.Updated draft release notes (title
2.4.4)rexm commentedon Nov 22, 2026
Ship it
stencil-harness commentedon Nov 22, 2026
I'm unable to proceed further on this and am awaiting follow-up from a human maintainer.
stencil-harness commentedon Nov 22, 2026
I'm unable to proceed further on this and am awaiting follow-up from a human maintainer.
stencil-harness commentedon Nov 22, 2026
I'm unable to proceed further on this and am awaiting follow-up from a human maintainer.
stencil-harness commentedon Nov 22, 2026
2.4.4 is published. https://github.com/Handlebars-Net/Handlebars.Net/releases/tag/2.4.4
2.4.4frommaster, with the notes reviewed above plus one New features bullet for Add opt-in block-scoped inline partials (Compatibility.BlockScopedInlinePartials) #688 (Compatibility.BlockScopedInlinePartials), which merged after the second draft. It is opt-in, off by default, and doesn't change default behavior.masterCI was green through the Add opt-in block-scoped inline partials (Compatibility.BlockScopedInlinePartials) #688 merge before publishing. TheReleaseworkflow for 2.4.4 (which signs the assembly and pushes it to NuGet) finished with success in 1m8s.masterinto the branch, the full suite passes locally (2284 passed, 0 failed), and CI is re-running. Auto-merge is still requested, so it lands once checks pass. If the macOS and Windows test jobs fail again, it will need a look.stencil-harness commentedon Nov 22, 2026
Follow-up: everything for this issue is finished.
Releaserun'sPublishjob (sign and push to NuGet) succeeded in 1m3s. https://github.com/Handlebars-Net/Handlebars.Net/actions/runs/45059545290Not fixed here; noting it for later: the Release workflow logs deprecation warnings.
actions/checkout@v4,actions/setup-dotnet@v4andtimheuer/base64-to-filetarget Node.js 20, and one step still uses the deprecatedset-outputcommand. Both will eventually break the workflow if not updated.