chore: bump minijinja from 2.21.0 to 2.23.0 - #3795
Conversation
Bumps [minijinja](https://github.com/mitsuhiko/minijinja) from 2.21.0 to 2.23.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.21.0...minijinja-go/v2.23.0) --- updated-dependencies: - dependency-name: minijinja dependency-version: 2.23.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
worktrunk-bot
left a comment
There was a problem hiding this comment.
Not a mechanical lockfile bump — minijinja 2.22.0 changed how values render, and it breaks a test and changes user-visible template output.
The 2.22.0 entry Changed rendering of none and boolean values to None, True, and False for Jinja2 compatibility in Rust and Go (#913) lands squarely on wt's template surface. code-coverage on this head already fails on it (job log): config::expansion::tests::test_expand_template_vars_json_dot_access asserts {{ vars.config.debug }} renders true, got True.
The test is the messenger, not the problem. vars_map_to_value in src/config/expansion.rs parses a worktrunk.state.<branch>.vars.<key> value as JSON when it's an object or array, so any nested boolean reaches minijinja as a real bool — and it renders into a hook/alias command line. A hook that today runs DEBUG=true … starts running DEBUG=True … after this bump, with no error and no warning. JSON null shifts too: expand_template_with only installs the is_none()-to-empty formatter when escape_mode != ShellEscapeMode::Literal, so in Literal mode — wt step eval, wt step for-each arguments, path templates, wt list custom columns — a null that used to render as the empty string now renders None.
Two defensible resolutions, and which one is right is a maintainer call rather than something a reviewer should pick:
- Preserve current output. Extend the formatter in
expand_template_with(and givetemplate_environmentone, so Literal mode and list columns are covered) to writetrue/falsefor bools and empty for none. Exact no-op against today's behavior, at the cost of diverging from upstream's Jinja2 parity direction — a divergence every future minijinja bump has to keep working. - Adopt the new rendering. Update the test expectation and note the change in
CHANGELOG.md. Simpler and follows upstream, but it's a silent behavior change in rendered hook and alias command lines, which reads againstCLAUDE.md's "prefer deprecation warnings over silent breaks".
Either way this shouldn't land as-is. If the answer is (2) the test fix belongs on this PR; if it's (1), the shim wants its own PR and this bump should wait behind it (or Cargo.toml gets a temporary >=2.20, <2.22 while that lands). Happy to push either once you've picked — say which and I'll do it.
Trace
- Constraint is
minijinja = { version = "2.20", … }inCargo.toml, so 2.23.0 resolves without a manifest change; nothing in the diff signals the behavior shift. - Bools break in every escape mode: the non-Literal formatter shell-escapes
value.to_string(), which is nowTrue. - None breaks only in Literal mode; the
if value.is_none() { return Ok(()) }guard in the Posix/PowerShell formatter already absorbs it there. - 2.23.0 itself is Python-bindings only. The other 2.22.0 entries look inert here: no template in this repo uses the
splitfilter (the onesplit rowhit is nushell in a shell-init snapshot), and no custom filter usesStringInput. - No overlap with #3794 — that bump group doesn't touch minijinja.
Bumps minijinja from 2.21.0 to 2.23.0.
Changelog
Sourced from minijinja's changelog.
Commits
19af7d4chore(release): 2.23.07f63616docs(changelog): document Python Unicode identifiers179652fref: Remove CLAUDE.md52b1cc6ref: Move claude stuff0d4c6f4ref: Remove broken symlinksbe3c6f5fix(python): enable Unicode identifiersd5bf25echore(release): 2.22.0cdbd4a9docs(changelog): document unreleased filter fixesd715d56fix: doc linkcd62d8cfix(filters): preserve safety in string transformationsDependabot 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 rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill 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 versionwill 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 dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)