Releases: mitsuhiko/minijinja
Releases · mitsuhiko/minijinja
2.8.0
Release Notes
- Added
SemiStrict
undefined mode that is like strict but allows
to be checked for truthiness. Additionally an if expression without
an else block will always produce a silent undefined object that
never errors for compatibility with Jinja2. #687
- Make the trait bounds of
ViaDeserialize
stricter. Now the type
can only be constructed if the type implements DeserializeOwned
.
This is not a new requirement for passing the function to
add_function
but bad code will now error earlier for better
error reporting. #689
- Raise MSRV to 1.70.
- The contrib crate now uses a basic xorrand implementation instead
of depending on all of the rand
module. #696
- Added temps, a way to stash away temporary state during rendering. #697
- Fixed a bug that caused the random functions in the contrib crate
to not advance the RNG between calls. #698
- Added
Environment.undeclared_variables_in_template
and
Environnent.undeclared_variables_in_str
to Python binding. #699
- Enable
loop_controls
for Python in-line with the CLI. #704
- Fixed a panic when comparing plain objects. #705
- Added
Object::custom_cmp
to allow objects to influence how they
compare against themselves. This also fixes Python objects in the
Python binding not to compare correctly. #707
- Fixed a bug where
undeclared_variables
would incorrectly handle
variables referenced by macros. #714
- Fixed a deadlock in the Python binding when multiple threads were
rendering from the same environment at once. #717
- The Python bindings handle
__bool__
correctly now for custom
objects in if-conditions and filters. #719
- Fixed a bug where
}}
caused a syntax error in expressions with
open parentheses, braces or brackets. #723
- Added
State::known_variables
to return a list of known variables
and Environment::globals
. #724
- Fixed an issue with undeclared variables not handling
caller
. #725
- Removed unnecessary
Filters
and Tests
traits. They remain as
hidden aliases to Function
. #726
- Fixed a bug that caused implicit string concatenation to not correctly
handle escapes. #728
- Implemented constant folding in the code generator. #731
- Improved error reporting for bad loop recursion calls. #734
- The engine now uses smaller integers to represent columns, line numbers
and addresses. This cuts down on the memory usage needed for debug
information. #735
- Added
load_from_path
to python. #736
- Added JavaScript bindings. #737
Install minijinja-cli 2.8.0
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mitsuhiko/minijinja/releases/download/2.8.0/minijinja-cli-installer.sh | sh
Install prebuilt binaries via powershell script
powershell -ExecutionPolicy ByPass -c "irm https://github.com/mitsuhiko/minijinja/releases/download/2.8.0/minijinja-cli-installer.ps1 | iex"
Download minijinja-cli 2.8.0
2.7.0
Release Notes
- Removed string interning. #675
loop.nextitem
is now a lazy operation. This prevents issues when
iterating over one-shot iterators combined with {% break %}
and
it now ensures that the iterator is not running "one item ahead". #677
- Fixed an issue that caused loop aliasing not to be supported for
recursive loops. #678
- CLI moved from
serde_yml
to serde_yaml
. #684
- Improved undefined error reporting. Undefined values will now in most
cases point to exactly where the error happened. #686
- Allow newer notify dependency versions (up to 8.x) for the autoreload
crate. #688
Install minijinja-cli 2.7.0
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mitsuhiko/minijinja/releases/download/2.7.0/minijinja-cli-installer.sh | sh
Install prebuilt binaries via powershell script
powershell -ExecutionPolicy ByPass -c "irm https://github.com/mitsuhiko/minijinja/releases/download/2.7.0/minijinja-cli-installer.ps1 | iex"
Download minijinja-cli 2.7.0
2.6.0
Release Notes
- Added
sum
filter. #648
- Added
truncate
filter to minijinja-contrib
. #647
- Added
wordcount
filter to minijinja-contrib
. #649
- Added
wordwrap
filter to minijinja-contrib
. #651
- Some tests and filters now pass borrowed values for performance reasons
and a bug was fixed that caused undefined values in strict undefined
mode not to work with tests. #657
- Fixed an error reporting issue for some syntax errors. #655
- Removed an
unsafe
code block from the Kwargs
type internally
which was probably unsafe. #659
- Fix a regression with latest serde that caused internals to leak
out when flattening on value handles is used. #664
- Added
Value::make_object_map
to create projections from object
into maps, similar to how it was already possible to create
iterators that were projected from objects. #663
- The
|items
filter will no longer allocate a list and instead
return an iterator. #665
- Fixed a bug that caused
lstrip_blocks
to act too eager. #674
Install minijinja-cli 2.6.0
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mitsuhiko/minijinja/releases/download/2.6.0/minijinja-cli-installer.sh | sh
Install prebuilt binaries via powershell script
powershell -ExecutionPolicy ByPass -c "irm https://github.com/mitsuhiko/minijinja/releases/download/2.6.0/minijinja-cli-installer.ps1 | iex"
Download minijinja-cli 2.6.0
2.5.0
Release Notes
minijinja-cli
now supports preservation of order in maps. #611
- Fixed an issue where CBOR was not correctly deserialized in
minijinja-cli
. #611
- Added a
lines
filter to split a string into lines.
- Bytes are now better supported in MiniJinja. They can be created from
Value::from_bytes
without having to go via serde, and they are now
producing a nicer looking debug output. #616
- Added the missing
string
filter from Jinja2. #617
- Reversing bytes and convergint them implicitly to strings will now work
more consistently. #619
- Added type hints for the Python binding and relaxed maturin constraint. #590
minijinja-cli
now allows the template name to be set to an empty
string when --template
is used, to allow suppliying a data file. #624
- Added the missing
sameas
filter from Jinja2. #625
- Tests can now support one argument without parentheses like in Jinja2
(1 is sameas 1
). #626
- Added error context for strict undefined errors during template
rendering. #627
- Syntax errors caused by the lexer now include the correct position of
the error. #630
minijinja-cli
now has all features enabled by default as documented
(that means also shell completion and ini). #633
minijinja-cli
now does not convert INI files to lowercase anymore. This was
an unintended behavior. #633
- Moved up MSRV to 1.63.0 due to indexmap. #635
- Added argument splatting support (
*args
for variable args and **kwargs
for keyword arguments) and fixed a bug where sometimes maps and keyword
arguments were created in inverse order. #642
Install minijinja-cli 2.5.0
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mitsuhiko/minijinja/releases/download/2.5.0/minijinja-cli-installer.sh | sh
Install prebuilt binaries via powershell script
powershell -ExecutionPolicy ByPass -c "irm https://github.com/mitsuhiko/minijinja/releases/download/2.5.0/minijinja-cli-installer.ps1 | iex"
Download minijinja-cli 2.5.0
2.4.0
Release Notes
- Updated version of
minijinja-cli
with support for better documentation,
config file and environment variable support. #602
minijinja-cli
now supports template source passed by parameter for
simple cases. #606
minijinja-cli
now has a --syntax-help
argument that prints out the
primer on the syntax. #607
minijinja-cli
now installs to ~/.local/bin
by default. #608
- Made the c-bindings compatible with wasm compilation. #603
String
/Cow<str>
argument types will no longer implicitly convert
keyword arguments to string form. This was an unintended foot gun. #605
Install minijinja-cli 2.4.0
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mitsuhiko/minijinja/releases/download/2.4.0/minijinja-cli-installer.sh | sh
Install prebuilt binaries via powershell script
powershell -ExecutionPolicy ByPass -c "irm https://github.com/mitsuhiko/minijinja/releases/download/2.4.0/minijinja-cli-installer.ps1 | iex"
Download minijinja-cli 2.4.0
2.3.1
Release Notes
- Fixes a regresion in
PartialEq
/ Eq
in Value
caused by changes
in 2.3.0. #584
Install minijinja-cli 2.3.1
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mitsuhiko/minijinja/releases/download/2.3.1/minijinja-cli-installer.sh | sh
Install prebuilt binaries via powershell script
powershell -c "irm https://github.com/mitsuhiko/minijinja/releases/download/2.3.1/minijinja-cli-installer.ps1 | iex"
Download minijinja-cli 2.3.1
2.3.0
Release Notes
- Fixes some compiler warnings in Rust 1.81. #575
- Fixes incorrect ordering of maps when the keys of those maps
were not in consistent order. #569
- Implemented the missing
groupby
filter. #570
- The
unique
filter now is case insensitive by default like in
Jinja2 and supports an optional flag to make it case sensitive.
It also now lets one check individual attributes instead of
values. #571
- Changed sort order of
Ord
to avoid accidentally non total order
that could cause panics on Rust 1.81. #579
- Added a
Value::is_integer
method to allow a user to tell floats
and true integers apart. #580
Install minijinja-cli 2.3.0
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mitsuhiko/minijinja/releases/download/2.3.0/minijinja-cli-installer.sh | sh
Install prebuilt binaries via powershell script
powershell -c "irm https://github.com/mitsuhiko/minijinja/releases/download/2.3.0/minijinja-cli-installer.ps1 | iex"
Download minijinja-cli 2.3.0
2.2.0
Release Notes
- Fixes a bug where some enums did not deserialize correctly when
used with ViaDeserialize
. #554
- Implemented
IntoDeserializer
for Value
and &Value
. #555
- Added
filesizeformat
to minijinja-contrib. #556
- Added support for the
loop_controls
feature which adds
{% break %}
and {% continue %}
. #558
- Iterables can now be indexed into. It was already possible previously
to slice them. This improves support for Jinja2 compatibility as Jinja2
is more likely to create temporary lists when slicing lists. #565
Install minijinja-cli 2.2.0
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mitsuhiko/minijinja/releases/download/2.2.0/minijinja-cli-installer.sh | sh
Install prebuilt binaries via powershell script
powershell -c "irm https://github.com/mitsuhiko/minijinja/releases/download/2.2.0/minijinja-cli-installer.ps1 | iex"
Download minijinja-cli 2.2.0
2.1.2
Release Notes
- Flush filter and test cache when processing extended template.
This fixes a bug that caused the wrong filters to be used in some
cases. #551
Install minijinja-cli 2.1.2
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mitsuhiko/minijinja/releases/download/2.1.2/minijinja-cli-installer.sh | sh
Install prebuilt binaries via powershell script
powershell -c "irm https://github.com/mitsuhiko/minijinja/releases/download/2.1.2/minijinja-cli-installer.ps1 | iex"
Download minijinja-cli 2.1.2
2.1.1
Release Notes
- Added
indent
parameter to tojson
filter. #546
- Added
randrange
, lipsum
, random
, cycler
and joiner
to
minijinja-contrib
. #547
- Added the ability to use
&T
and Arc<T>
as parameters
to filters and functions if T
is an Object
. #548
minijinja-cli
now also enables the datetime, timezone and rand features. #549
- Aligned the behavior of the
int
filter closer to Jinja2. #549
Install minijinja-cli 2.1.1
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mitsuhiko/minijinja/releases/download/2.1.1/minijinja-cli-installer.sh | sh
Install prebuilt binaries via powershell script
powershell -c "irm https://github.com/mitsuhiko/minijinja/releases/download/2.1.1/minijinja-cli-installer.ps1 | iex"
Download minijinja-cli 2.1.1