Skip to content

v5.3.0

Latest

Choose a tag to compare

@mttrbrts mttrbrts released this 19 Oct 20:22
· 1 commit to main since this release
398b02e

v5.3.0

template-engine now uses the latest releases of its Accord Project dependencies. These packages released new major versions, but template-engine's API, Node requirement (22 or later) and browser bundle are unchanged, and existing templates load without edits.

Dependency upgrades

  • cicero-core 3.1 (was ^2.2.0)
  • markdown-common / markdown-template / markdown-transform 2.0.0 (was ^1.1.0)
  • concerto-codegen 7.1.0 (was ^6.3.0)

These majors change how the packages are published (ES module builds with an exports map; the UMD bundles are gone). template-engine loads them with require() and compiles them into its own browser bundle, so neither affects you. If you depend on these packages directly as well, upgrade them too so npm installs a single copy.

Behaviour changes from the upgrades

  • More templates type-check. Variables inside {{#if}} and {{#optional}} blocks, and in their {{else}} branches, now resolve against the template model, so templates like {{#if age}}Hi {{name}}{{/if}} compile. Inside a block, {{this}} still refers to the guarded field. This also applies to the re-exported TemplateMarkTransformer (accordproject/markdown-transform#683, #684).
  • Template hashes are corrected for templates with more than one model file. Template#getHash() previously counted only the last model file (accordproject/template-archive#943). If you sign or verify templates with the cicero-core that comes with template-engine, signatures made earlier on such templates will no longer verify. Rebuild and re-sign those archives. template-engine itself does not use template hashes.
  • Templates targeting "cicero": "^2.0.0" keep loading. cicero-core 3.1 accepts templates targeting any version from 2.0.0 up to the running version (accordproject/template-archive#962), so you don't need to change the range in your templates.

Changes

  • chore(actions): publish v5.2.0 to npm by @github-actions[bot] in #201
  • refactor: import the Script type from the cicero-core root by @ujjwalv01 in #207
  • chore(deps): upgrade markdown packages to 2.0.0, concerto-codegen to 7.1.0 and cicero-core to 3.0.0 by @ujjwalv01 in #206
  • fix: preserve all blocks in unwrapped list items by @Dnyanesh-29 in #210
  • chore(deps): upgrade cicero-core to 3.1.0 by @mttrbrts in #211

New Contributors

Full Changelog: v5.2.0...v5.3.0