Releases: lazy-eggplant/vs.templ
v0.4.7
While working on my new toy I felt some features were missing.
Hence, this release is mostly made of new features and small additions:
- IDs, IDs for everyone! And ID for you. And you! And you too.
- Support for nesting and tree structures. I found out a nice trick to minimally extend the
forcycle and get what I was looking for. - Proper context for logs, mostly to improve error messages and make them a little less useless. We finally got there :D!
I also took some time to improve the documentations a bit.
New Features
Introduced tree-rewrite capabilities with s:for via the additional attributes src-children and dst-children.
Basically the same for cycle is matched recursively inside the relative path described by src-children and applied inside dst-children.
The actual behaviour of dst-children has not been fully implemented yet, as it requires access to children in reverse order, making it incompatible with the rest of the codebase.
As such, some custom implementation is needed. For now one can only specify the direct name of the tag embedding children, without nesting as it should be in its final form.
The nested behaviour of s:for is going to change a bit in v0.4.9 once dst-children is fully fixed.
We also added support for more VM functions:
timestampas the name impliesridto generate a 256bit random ID serialized as hex string.sidto generate anint-sized sequential ID, autoincrementing and with an optional family ID to have independent sequences.
Finally, logs have now a proper context which provides paths and offsets to the template, data and destination locations which triggered the message.
For more details, check changes to log_t::ctx.
Oh, and now the default log format is much cuter in the terminal.

v0.4.5
This release has no visible changes in its functionality (aside for some subtle bug fixes).
Which is good, it means the language itself is getting stable.
The main objectives for this release were:
- Reducing complexity and verbosity for most of the code
- Removing obsolete or unused features from earlier revisions
- Better documentation of its public interface.
- Improved tests (so that I can validate the implementation so far)
So, a boring one! But it means that a "final" v1 is getting close.
Basically all that is left are better tests to see if all commands are working as expected, better documentation and some code optimization.
Fixes
- Fixed behaviour of filters in cycles. Now they always used meta-expressions only (no prefix
:in that case). - Fixed behaviour of
for-rangewith negative increments to match specs. - Fixed behaviour of
~!txtto return the concatenation of all cdata and pcdata children, not just the first one.
Breaking changes
The interface to build the preprocessor is now a configuration object.
This is done to avoid verbosity, and to allow for the definition of more fields if so needed.
In most cases, using the new interface is just as simple as placing braces between the original args.
Internal changes
- Code cleanup.
- Speed up
O(nm)children detection in cycles avoiding multiple passes. - Rework the mechanisms used in
order-by
v0.4.3
Very minor release, just so that downstream code can take advantage of several fixes and new features.
Also, this release restores the WASM/WASI build which broke due to from_chars compatibility across toolchains.
New features
- Natural ordering for strings is now supported in
order-byby all commands (as the new default) order-bydirectives can be typed, likeasc:floatorasc:fwill parse entries as float and sort them accordingly.
Breaking
s:enable.*has been reworked as an overload ofs:when. Use it ass:when.*.- Default string comparisons are now following natural ordering, which might break things.
v0.4.1
Important
This release has no wasm build. clang-19, on which zig is based, has no support for from_chars in its floating point overloads.
This has been added to clang-20. Future releases will have it back, after a workaround is added or assuming clang-20 is more widely available.
This first revision of the new minor has no real incompatibility with the previous one, just some fixes and small new features.
New features
As expected, this update and the next few ones will be light on new features, mostly focusing on documentation, fixes and architectural improvements.
Still, using the library for its intended purpose exposed some sharp edges, which will be/have been taken care of.
This is what is new in this release:
- Centralize
symbolcomparisons have been extended and centralized in a single function serving the entire code base. - Strings will now support ordering based on the dot modifier even when
randomis used. - There is default support for string comparisons in the boolean operators of the RPN. Several fixes have been resolved for the other comparisons as well.
- A new prop command
s:enable.*. It conditionally adds a prop if the condition is true.
This might be reworked ins:when.*as this override does not conflict with the others:when, but no decision has been taken yet.
Fixes
- Several conversions are now locale-independent.
- In the UI for the demo, the generate button is now locked while fetching examples.
- Many fixes in the docs and demo examples.
v0.3.15
New features
All done! The last for and for-props prop based commands have been completed.
With this, development of functionality for vs.templ is done.
We are also shipping a WASM-WASI version as part of each release from now on!
You can just run it via
bun vs.templ.jsor with any other compatible runtime like node or deno!
And you can finally test it online!
https://lazy-eggplant.github.io/vs.templ/wasm-demo/
What is next
There are minor features planned for the v0.4.x branch, but most will be documentation, better examples, formal XML schemas and testing infrastructure.
Once that is done, we are going straight to v1, as long as no architectural problem is discovered in the meanwhile.
v0.3.13
A new intermediate release before moving to v0.4.x.
Surprisingly, whatever was originally scheduled for v0.3.13 has been delayed again, and other features took the spot!
So, yeah, the attribute version of for-props and for are yet to come (at least they are covered in the examples).
The revised plan is for the two missing commands to be in v0.3.15, and then we move straight to the new minor.
At that point the development here will slow down as all core features made their way in the codebase.
I will be resuming work on vs.fltk.
New features
datacommand has been added to introduce external data sources in the template.randomorder support inorder-byforforloops. Stable random ordering depending on a seed number.- Examples! LOTS OF EXAMPLEEES! And improved tests.
- We now have the most blazingly fast web server based on
vs.templ(according to source myself)!
Bug fixes
test/casefixed to match the intended specs.- Fixed behaviour of
for-proptag command to ensure good symbols are provided in the loop scope. - Fixed handling of floating point numbers in expressions.
Breaking changes
- Reverted and fixed
srcin for cycles toinas it initially was. - Changed the preprocessor interface to introduce the new
loadfn(the name has been recycled from before, the olderloadfnis nowincludefn)
v0.3.11
There has been much more progress than anticipated, and most features needed to reach v0.4.1 have been filled in already.
This release is to make sure vs can properly use the newly supported syntax in its code and examples.
Subsequent milestones have been rescheduled, and next new branch v0.4.x will be mostly for consolidation, documentation and to incrementally improve the quality of code.
As such, I am splitting this release here, leaving the two leftover commands for v0.3.13.
New features
- Introduced
includeto load more template files. Please, notice that checks to avoid circular dependencies are to be performed externally. - Some of the remaining prop-based commands.
-
value -
prop
-
- Loading the environment of a preprocessor is now possible via
load_env. - Improved handling of some expressions making them less verbose.
- Better (and colourful) logging!
Bug fixing
- Fixed several broken maths operations like
*.
Breaking changes
The interface of preprocessor was changed once again to support the XML loader function.
Minimal changes are expected downstream, based on your prior usage.
v0.3.9
Just a quick corrective version over v0.3.7 to fix the behaviour of several untested features, like the newly added filters of for loops.
This release also introduces few more meta-expression operators to allow escaping, and a realistic example emitting HTML to complement the rest of the docs.
New features
whenas a prop command for the conditional rendering of the owner.
Breaking changes
sort-byandorder-bywill now use|in place,to split multiple options.when/isfully replaced. The older syntax was dreadful but necessary without the RPN virtual machine, but now that we have... say hello totest/case.
v0.3.7
This release brings many new features which further expand the capabilities of vs.templ:
- Introduced a more robust logging infrastructure at all levels. Now errors and warnings are better logged.
- Introduced
logtag
- Introduced
- Introduced meta-expressions with their RPN virtual machine to support more complex evaluations.
A good number of operators have been implemented so far, with most of the architectural bits ironed out. - Introduced
filterfor loops now that we have meta-expressions (but operator support is lacking so you will not be able to do much with that for now). - A significantly improved documentation.
- Initial work to support prop-based commands.
The in attribute for cycles has been removed in favour of src to make it more consistent.
No further breaking change is expected from v0.3.5 for templates, but the public interface itself has.
You might need to slightly refactor current code, and provide an explicit logging function.
Next release is expected to be the very last for v0.3.x.
v0.3.5
Just a technical initial release to finalize all workflows.
Details about what is there and what is missing are published @ https://github.com/lazy-eggplant/vs.templ/blob/master/TODO.md