Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.33
->1.0
Release Notes
mitsuhiko/minijinja (minijinja)
v1.0.10
Compare Source
int
andfloat
filters. #372integer
andfloat
tests. #373repl
featurewas disabled. #374
-n
/--no-newline
option to CLI. #375v1.0.9
Compare Source
leaking memory due to an undetected cycle. #359
debug
function in templates can now also be used to print outthe debug output of a variable. #356
stacker
feature which allows raising of the recursionlimits. It enables monitoring of the call stack via stacker
and automatically acquires additional memory when the call stack
runs out of space. #354
v1.0.8
Compare Source
Value::downcast_object_ref
/Object::downcast_ref
/Object::is
and added support for downcastingof types that were directly created with
Value::from_seq_object
and
Value::from_struct_object
. #349silently wrapping around. #350
v1.0.7
Compare Source
keep_trailing_newlines
which allows you to disablethe automatic trimming of trailing newlines. #334
minijinja-cli
which lets you render and debug templates fromthe command line. #331
Value::UNDEFINED
andValue::from(())
is nowundefined
andnone
rather thanUndefined
andNone
. This wasan accidental inconsistency.
Environment::set_path_join_callback
andState::get_template
to support path joining. This is for greater compatibility with Jinja2
where path joining was overridable. With this you can configure the
engine so that paths used by
include
orextends
can be relative tothe current template. #328
.html.j2
as alias for.html
as well as for all other choices. In general.j2
as an extensionis now generally supported.
v1.0.6
Compare Source
Value
directly from the crate root for convenience.deserialize
from aValue
. Additionally theViaDeserialize<T>
argument type was added to support value conversionsvia serde as argument type. #325
v1.0.5
context!
macro. (#317)
Option<T>
now acceptsnone
in filters. Previously onlyundefined values were accepted. This bugfix might have a minor impact
on code that relied in this behavior. (#320)
minijinja-contrib
if thetimezone
feature is not enabled.
v1.0.4
args!
macro which can be used to create an argumentslice on the stack. (#311)
chrono
support to the time filters in theminijinja-contrib
crate.v1.0.3
Compare Source
1.0.2
with fixed docs.v1.0.2
Compare Source
TryFrom
andArgType
forArc<str>
.datetimeformat
,dateformat
,timeformat
andnow()
to thecontrib crate. (#309)
v1.0.1
Compare Source
Environment::compile_expression_owned
to allow compiled expressionsto be held without requiring a reference. #383
v1.0.0
Compare Source
Support unicode sorting for filters when the
unicode
feature is enabled.This also fixes confusing behavior when mixed types were sorted. (#299)
Added
json5
as file extension for JSON formatter.The autoreload crate now supports fast reloading by just clearning the
already templates. This is enabled via
set_fast_reload
on theNotifier
.Note: This also includes all the changes in the different 1.0.0 alphas.
Breaking Changes
1.0 includes a lot of changes that are breaking. However they should with
some minor exceptions be rather trivial changes.
Environment::source
,Environment::set_source
and theSource
typetogether with the
source
feature were removed. The replacement is thenew
loader
feature which adds theadd_template_owned
andset_loader
APIs. The functionality previously provided by
Source::from_path
isnow available via
path_loader
.Old:
New:
Old:
New:
Template::render_block
andTemplate::render_block_to_write
werereplaced with APIs of the same name on the
State
returned byTemplate::eval_to_state
orTemplate::render_and_return_state
:Old:
New:
Kwargs::from_args
was removed as API as it's no longer necessary sincethe
from_args
function now provides the same functionality:Before:
After:
The
testutils
feature andtestutils
module were removed. Instead youcan now directly create an empty
State
and use the methods providedto invoke filters.
Before:
After:
Before:
After:
Before:
After:
intern
and some APIs that useArc<String>
now useArc<str>
. Thismeans that for instance
StructObject::fields
returnsArc<str>
insteadof
Arc<String>
. All the type conversions that previously acceptedArc<String>
now only supportArc<str>
.State::current_call
was removed without replacement. This informationwas unreliably maintained in the engine and caused issues with recursive
calls. If you have a need for this API please reach out on the issue
tracker.
Output::is_discarding
was removed without replacement. This isan implementation detail and was unintentionally exposed. You should not
write code that depends on the internal state of the
Output
.v0.34.0
Compare Source
Updated
self_cell
andpercent-encoding
dependencies. (#264)Added
Template::render_block
andTemplate::render_block_to_write
whichallows rendering a single block in isolation. (#262)
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.