Skip to content

chore: bump minijinja from 2.24.0 to 3.0.0 - #6437

Open
dependabot[bot] wants to merge 2 commits into
mainfrom
dependabot/cargo/minijinja-3.0.0
Open

dependabot[bot] wants to merge 2 commits into
mainfrom
dependabot/cargo/minijinja-3.0.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Oct 13, 2026

Copy link
Copy Markdown
Contributor

Bumps minijinja from 2.24.0 to 3.0.0.

Changelog

Sourced from minijinja's changelog.

3.0.0

MiniJinja 3 is a major release. It aligns template behavior and the value model more closely with Jinja2, makes Serde optional, makes mutable State the canonical way to call back into the engine, adds built-in automatic reloading of templates, reworks the JavaScript bindings and makes the Python bindings considerably faster. Errors involving undefined values and the debug info shown for errors were improved as well.

Most projects will need some changes when upgrading. See UPDATING.md for migration instructions. The changes below are relative to 2.24.0 and include everything from the 3.0.0 alpha releases.

Breaking Changes

  • Made serde optional, explicit and disabled by default. The rendering APIs, context! and args! now consume values and convert exclusively through Into<Value>. Serde conversion is requested with the new value::Serde wrapper which also replaces ViaDeserialize for deserializing function arguments. Value::from_serialize was removed. The deserialization feature was removed and is now part of the serde feature. Disabling the feature fully removes the dependency. #528
  • The json feature no longer depends on serde and serde_json. The tojson filter and JSON auto escaping now use a built-in JSON serializer. Invalid values now fail the serialization rather than being emitted as null. Floats are formatted like recent versions of serde_json do (for instance 1e+16 instead of 1e16). The speedups feature now uses zmij and itoa to format numbers in JSON; the output is the same without it.
  • Made mutable State the canonical path for functions, filters, tests, objects, methods, formatters, unknown method callbacks and nested macro calls. Read-only typed callbacks can continue to use &State; state mutation and dynamic calls now require &mut State. Added typed render-local extensions that persist through includes, blocks and macros. State::get_or_set_temp_object was removed in favor of these extensions.
  • Removed Rust APIs deprecated before 3.0: Template::render_and_return_state, Template::render_to_write, Template::eval_to_state, the Filter, Test, TestResult and ViaDeserialize aliases, value::intern and the no-op key_interning feature. The no-op loader feature was also removed; loader APIs remain available unconditionally.
  • Moved format_filter and FormatStyle from the crate root into the new formatting module and renamed format_filter to formatting::format.
  • Moved the trim_blocks, lstrip_blocks and keep_trailing_newline settings from Environment into SyntaxConfig. Added SyntaxConfig::to_builder to modify an existing configuration. Template introspection via Template::undeclared_variables now honors the whitespace settings. WhitespaceConfig was removed from the unstable_machinery APIs. #470
  • Removed the custom_syntax feature. Custom delimiters, line statements and line comments are now always available. The aho-corasick dependency was removed; start markers are now found with a simple scan which is as fast or faster and makes building a custom SyntaxConfig about 100 times faster.
  • Empty end delimiters are now rejected with ErrorKind::InvalidDelimiter.
  • Changed AutoEscape::Custom to hold a Cow<'static, str> so custom auto escape formats can be determined at runtime. AutoEscape is no longer Copy and State::auto_escape now returns a reference.
  • Changed Value function arguments to reject implicit keyword-argument values. Variadic functions that intentionally capture them can use ValueOrKwargs. #596
  • Added native Rust tuple conversions and Value::from_pairs. Collecting pairs directly into Value now creates a sequence of tuples rather than a map.
  • Iteration now consistently fails on invalid values that iterators yield to report errors. Previously only loops did this while filters such as list, join or sort, the in operator and serialization processed them like other items. The new ValueIter::checked helper provides the same behavior for custom code.
  • Environment::set_loader is now generic over the returned source, which can be a String or a TemplateSource. Closures that relied on type inference through .into() or only return Ok(None) need an explicit type.
  • Discontinued the minijinja-autoreload crate in favor of built-in automatic reloading (see below).

Template Behavior

These changes apply to Rust and Go and therefore also to the Python and JavaScript bindings.

  • Added first-class tuple literals and public tuple value types. Tuples now preserve their type through serialization and sequence operations, render like Python tuples, and roundtrip as tuples through the Python bindings. JavaScript receives evaluated tuples as arrays. #785
  • Changed sequence and map representations to use Python-style string quoting, and changed tojson to use Jinja2-compatible separator spacing. #785
  • Changed floor division and modulo to match Jinja2 semantics. #935
  • Changed division by zero to produce an error. #949
  • Changed the round filter to use round-half-even semantics and fixed decimal rounding edge cases. #948
  • Changed built-ins to treat booleans as numbers for Jinja2 compatibility. #950
  • Changed the sequence test to classify undefined values as sequences. #951
  • Fixed the upper and lower tests to reject non-strings and handle titlecase characters correctly. #952
  • Fixed the title filter treating every ASCII punctuation character as a word boundary. Words now start after whitespace or one of -, (, {, [ and < as in Jinja2, so "don't"|title renders as Don't instead of Don'T. #930
  • Fixed the precedence of unary minus. Like in Jinja2, -foo.bar now negates foo.bar rather than looking up bar on -foo.
  • Fixed the format filter accepting undefined values with strict and semi-strict undefined behavior.
  • Fixed constant-folded and and or expressions returning booleans instead of preserving their operands. #945
  • Added support for format precisions beyond Rust's formatter limit. #946
  • Limited repeated sequence sizes to prevent excessive allocations. #947
  • Fixed custom delimiters where a start marker overlaps a longer one (for instance <% and <%%=) sometimes picking the wrong marker.

... (truncated)

Commits
  • c1e7e23 chore(release): 3.0.0
  • 7a8f76b docs(changelog): consolidate the 3.0.0 alpha entries
  • c123ab4 docs: complete the MiniJinja 3 upgrade guide
  • 7a92676 feat(playground): add an empty example
  • 1be8515 feat(playground): add a console tab for logged messages
  • 85e5206 fix(playground): replace empty configs with the default config
  • de65258 feat(playground): use commented out examples as default config
  • 2d95b1f feat(playground): add config tab and preview mode toggle
  • 2e76f5e feat(playground): align colors with the MiniJinja logo
  • 3982db0 fix(ci): exclude minijinja-js from MSRV builds
  • Additional commits viewable in compare view

Most Recent Ignore Conditions Applied to This Pull Request
Dependency Name Ignore Conditions
minijinja [< 1, > 0.31.0]
minijinja [>= 1.a, < 2]

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [minijinja](https://github.com/mitsuhiko/minijinja) from 2.24.0 to 3.0.0.
- [Release notes](https://github.com/mitsuhiko/minijinja/releases)
- [Changelog](https://github.com/mitsuhiko/minijinja/blob/main/CHANGELOG.md)
- [Commits](mitsuhiko/minijinja@minijinja-go/v2.24.0...minijinja-go/v3.0.0)

---
updated-dependencies:
- dependency-name: minijinja
  dependency-version: 3.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies rust Pull requests that update Rust code labels Oct 13, 2026

@prql-bot prql-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minijinja 3 breaks the build of prqlc/prqlc/src/cli/jinja.rs (the cli feature's only use of the crate): WhitespaceConfig was removed from unstable_machinery, SyntaxConfig is no longer a unit struct, and machinery::tokenize now takes three arguments. Building this head fails with E0432 unresolved import minijinja::machinery::WhitespaceConfig, E0423 expected value, found struct SyntaxConfig and E0061 this function takes 3 arguments but 4 arguments were supplied.

The fix is to call tokenize(source, false, SyntaxConfig::default()) and drop the import. In 3.0, SyntaxConfig::default() embeds WhitespaceConfig::default(), so tokenization is unchanged. With that change, the cli::jinja tests pass and cargo clippy -p prqlc --all-targets -D warnings is clean. I'll push it to this branch as a follow-up commit. minijinja 3's rust-version is 1.70, below the workspace's 1.85, so the MSRV doesn't move.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant