Minijinja

Latest version: v2.8.0

Safety actively analyzes 712767 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 16

2.8.0

- 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

2.7.0

- 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

2.6.0

- 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

2.5.0

- `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

2.4.0

- 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

2.3.1

- Fixes a regression in `PartialEq` / `Eq` in `Value` caused by changes
in 2.3.0. 584

Page 1 of 16

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.