Upgrading handlebars 4 to 5
Breaking4.5.0 → 5.1.2Breaking5New10Changed8Fixed9Other17
Fetching 9 releases from GitHub…3 / 9
BreakingUpgrade verdict
5 breaking changes.
In plain terms
- Code that reads TemplateError fields directly must switch to accessor methods.
- Code that names these types with explicit lifetimes may need updating.
- Render errors now carry a typed reason so code can match on the cause instead of parsing strings.
- Code calling register_template_directory may need updating for the new signature.
Must act Top 3 of 5 that need code or config changes
Rust requirement changed in 5.1.2: 1.57 → 1.72.
What you must change
Breaking5
Updates TemplateError to reduce its size and removes direct field access in favor of access methods.
TemplateErrorSimplifies lifetime specifiers for Helper, ScopedJson and related types and functions.
HelperScopedJsonIntroduces RenderErrorReason for typed render errors.
RenderErrorReasonRenderErrorChanges the register_template_directory API for more customizations.
register_template_directorySimplifies lifetime requirements for Helper and related APIs.
Helper