Release Notes
- Fixed a panic or abort in Rust when buffering an iterator that reports a huge size hint, or when passing a huge count to the
batchorslicefilters. Filters likelist,sort,reverse,map,sliceandbatchas well as slicing and concatenating sequences now cap how much they preallocate, so[1, 2]|batch(4611686018427387904)is[[1, 2]]instead of failing with "capacity overflow". #483 - Fixed floats in Go switching to exponent notation from one million up, so
1234567.5printed as1.2345675e+06. Like in Rust, a float now prints as its shortest exact decimal without an exponent, so1234567.5is1234567.5and1e20is100000000000000000000.0. Inside lists and maps, exponent notation is only used below1e-4and from1e16up, written like1e20and1e-5. NaN now prints asNaN, and infinity inside a list asinfinstead of+Inf. #984 - Fixed
%sin theformatfilter formatting floats with%grules, so"%s"|format(1234567.5)was1.23457e+06. Like in Python, floats are now formatted likestr()does:1234567.5,1e+16,1e-05ornan. The0,+and space flags are ignored for floats and strings with%s, like in Python. This applies to both Rust and Go. #984 - Fixed the
tojsonfilter in Go writing floats like integers. Like in Rust, a float stays a float in the output, so1.0|tojsonis1.0instead of1, large and small magnitudes use exponent notation (1.5e+16,2.5e-7) and infinity becomesnullinstead of an error. The same applies to values rendered with JSON auto-escaping. #983 - Fixed the
upper,lower,capitalize,titleandreplacefilters in Go ignoring values that are not strings. Like in Rust, the value and thereplacearguments are converted to strings first, so1.5|replace(".", ",")is1,5andtrue|upperisTRUE, and a number passed toreplaceis no longer treated as an empty string. #985 - Fixed slicing and the
inoperator on iterables such asrange()in Go. Like in Rust,range(5)[:2]is now[0, 1]instead of failing with "cannot slice iterator", and3 in range(5)istrueinstead offalse. Slicingnoneor undefined gives an empty list like in Rust. Iterables now also print, compare, serialize withtojsonandpprintlike lists, sorange(2) == [0, 1]istrueand[range(2)]prints as[[0, 1]]instead of[<iterator>]. Theinoperator now also works on custom sequence, iterable and map objects. #986 - Fixed
nonein Go not being treated as an empty sequence by thesort,unique,select,reject,map,groupby,joinandurlencodefilters and theiterabletest. Like in Rust,none|sortis now[]andnone|joinis an empty string instead ofNone. #987 - Fixed the
odd,evenanddivisiblebytests in Go ignoring booleans, anddivisiblebyignoring a float divisor. Like in Rust, booleans count as0and1, sotrue is oddis true, and6.5 is divisibleby(0.5)is true. #988 - Fixed
str.formatinpycompatcutting floats to six significant digits when no precision is given. Like in Python, such floats are now formatted likestr()does, so'{}'.format(3.14159265)is3.14159265,'{}'.format(1234567.0)is1234567.0instead of1.23457e+06and'{}'.format(0.0)is0.0instead of0. #991 - Fixed the
trimfilter in Go ignoring values that are not strings and only stripping ASCII spaces, tabs and newlines by default. Like in Rust,5|trim|lengthis now1, and Unicode whitespace such as a non-breaking space is stripped. #989 - Fixed undefined values not being treated as empty sequences by the
sort,unique,select,reject,selectattr,rejectattr,map,batchandgroupbyfilters in Go, andnonebybatch,selectattrandrejectattr. Like in Rust,undefined|sortis now[]with lenient undefined behavior, while strict and semi-strict undefined behavior still fail except forjoinandgroupby. #990 - Fixed a panic in
compile_expressionwhen the expression contains}}followed by more input, such as}} x. This is now a syntax error, like the same text inside a template. #992
Install minijinja-cli 3.0.5
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mitsuhiko/minijinja/releases/download/3.0.5/minijinja-cli-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/mitsuhiko/minijinja/releases/download/3.0.5/minijinja-cli-installer.ps1 | iex"Download minijinja-cli 3.0.5
| File | Platform | Checksum |
|---|---|---|
| minijinja-cli-aarch64-apple-darwin.tar.xz | Apple Silicon macOS | checksum |
| minijinja-cli-x86_64-apple-darwin.tar.xz | Intel macOS | checksum |
| minijinja-cli-aarch64-pc-windows-msvc.zip | ARM64 Windows | checksum |
| minijinja-cli-i686-pc-windows-msvc.zip | x86 Windows | checksum |
| minijinja-cli-x86_64-pc-windows-msvc.zip | x64 Windows | checksum |
| minijinja-cli-aarch64-unknown-linux-gnu.tar.xz | ARM64 Linux | checksum |
| minijinja-cli-i686-unknown-linux-gnu.tar.xz | x86 Linux | checksum |
| minijinja-cli-x86_64-unknown-linux-gnu.tar.xz | x64 Linux | checksum |
| minijinja-cli-armv7-unknown-linux-gnueabihf.tar.xz | ARMv7 Linux | checksum |
| minijinja-cli-aarch64-unknown-linux-musl.tar.xz | ARM64 MUSL Linux | checksum |
| minijinja-cli-i686-unknown-linux-musl.tar.xz | x86 MUSL Linux | checksum |
| minijinja-cli-x86_64-unknown-linux-musl.tar.xz | x64 MUSL Linux | checksum |