build(deps): bump tera from 1.20.1 to 2.1.0 - #329
Closed
dependabot[bot] wants to merge 1 commit into
Closed
Conversation
Bumps [tera](https://github.com/Keats/tera) from 1.20.1 to 2.1.0. - [Changelog](https://github.com/Keats/tera/blob/master/CHANGELOG.md) - [Commits](Keats/tera@v1.20.1...v2.1.0) --- updated-dependencies: - dependency-name: tera dependency-version: 2.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
dependabot
Bot
force-pushed
the
dependabot/cargo/tera-2.0.0
branch
from
August 4, 2026 15:28
f2a1fd7 to
0097fbf
Compare
fischeti
added a commit
that referenced
this pull request
Aug 4, 2026
Tera 2.0 breaks both the Rust API and the template syntax, so the dependabot bump in #329 does not compile. This fixes both sides. Rust API: - `Context::into_json()` is gone, and Tera 2's `Context` is write-only (no `Serialize`, no iterator, `data` is `pub(crate)`), so there is no way to recover the context for `script template-json`. Accumulate the values in a `serde_json::Map` instead and convert with `Context::from_serialize` right before rendering. - `render_str` gained an explicit `autoescape` argument, because a one-off template has no filename to infer escaping from. Templates: all eleven built-in formats failed to render. Array and tuple fields need `foo[0]` rather than `foo.0`, tests take keyword arguments (`is starting_with(pat=root)`), and `trim_start_matches` became `trim_start(pat=...)`. Beyond the straight port: - Register the template under its own name and use `render` instead of rendering it as a one-off, so errors point at `my_format.tera:12:54` rather than `__tera_one_off:12:54`. This also means unknown filters and tests are reported before rendering starts. Autoescaping is disabled explicitly rather than relying on the filename suffix, so a user template that happens to end in `.html` cannot silently start escaping its own output. - Enable the `preserve_order` feature. Tera 2 ships `default = []` and its `Map` is a `std::collections::HashMap`, so map iteration order varied between runs; Tera 1 used a `BTreeMap` and was deterministic. No built-in template iterates a map, but a custom template iterating `global_defines` would produce non-reproducible scripts. The feature switches Tera to `indexmap`, already a direct dependency, so it adds no transitive dependencies. Verified byte-identical output against Tera 1 across all twelve formats with the default, `--compilation-mode separate --source-annotations` and `-D` flag combinations, plus `--only-defines`, `--only-includes` and `--relative-path`. Drops 44 transitive dependencies, adds none. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
fischeti
added a commit
that referenced
this pull request
Aug 4, 2026
Tera 2.0 breaks both the Rust API and the template syntax, so the dependabot bump in #329 does not compile. This fixes both sides. Rust API: - `Context::into_json()` is gone, and Tera 2's `Context` is write-only (no `Serialize`, no iterator, `data` is `pub(crate)`), so there is no way to recover the context for `script template-json`. Accumulate the values in a `serde_json::Map` instead and convert with `Context::from_serialize` right before rendering. - `render_str` gained an explicit `autoescape` argument, because a one-off template has no filename to infer escaping from. Templates: all eleven built-in formats failed to render. Array and tuple fields need `foo[0]` rather than `foo.0`, tests take keyword arguments (`is starting_with(pat=root)`), and `trim_start_matches` became `trim_start(pat=...)`. Beyond the straight port: - Register the template under its own name and use `render` instead of rendering it as a one-off, so errors point at `my_format.tera:12:54` rather than `__tera_one_off:12:54`. This also means unknown filters and tests are reported before rendering starts. Autoescaping is disabled explicitly rather than relying on the filename suffix, so a user template that happens to end in `.html` cannot silently start escaping its own output. - Enable the `preserve_order` feature. Tera 2 ships `default = []` and its `Map` is a `std::collections::HashMap`, so map iteration order varied between runs; Tera 1 used a `BTreeMap` and was deterministic. No built-in template iterates a map, but a custom template iterating `global_defines` would produce non-reproducible scripts. The feature switches Tera to `indexmap`, already a direct dependency, so it adds no transitive dependencies. Verified byte-identical output against Tera 1 across all twelve formats with the default, `--compilation-mode separate --source-annotations` and `-D` flag combinations, plus `--only-defines`, `--only-includes` and `--relative-path`. Drops 44 transitive dependencies, adds none. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
fischeti
added a commit
that referenced
this pull request
Aug 4, 2026
Tera 2.0 breaks both the Rust API and the template syntax, so the dependabot bump in #329 does not compile. This fixes both sides. Rust API: - `Context::into_json()` is gone, and Tera 2's `Context` is write-only (no `Serialize`, no iterator, `data` is `pub(crate)`), so there is no way to recover the context for `script template-json`. Accumulate the values in a `serde_json::Map` instead and convert with `Context::from_serialize` right before rendering. - `render_str` gained an explicit `autoescape` argument, because a one-off template has no filename to infer escaping from. Templates: all eleven built-in formats failed to render. Array and tuple fields need `foo[0]` rather than `foo.0`, tests take keyword arguments (`is starting_with(pat=root)`), and `trim_start_matches` became `trim_start(pat=...)`. Beyond the straight port: - Register the template under its own name and use `render` instead of rendering it as a one-off, so errors point at `my_format.tera:12:54` rather than `__tera_one_off:12:54`. This also means unknown filters and tests are reported before rendering starts. Autoescaping is disabled explicitly rather than relying on the filename suffix, so a user template that happens to end in `.html` cannot silently start escaping its own output. - Enable the `preserve_order` feature. Tera 2 ships `default = []` and its `Map` is a `std::collections::HashMap`, so map iteration order varied between runs; Tera 1 used a `BTreeMap` and was deterministic. No built-in template iterates a map, but a custom template iterating `global_defines` would produce non-reproducible scripts. The feature switches Tera to `indexmap`, already a direct dependency, so it adds no transitive dependencies. Verified byte-identical output against Tera 1 across all twelve formats with the default, `--compilation-mode separate --source-annotations` and `-D` flag combinations, plus `--only-defines`, `--only-includes` and `--relative-path`. Drops 44 transitive dependencies, adds none. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
fischeti
added a commit
that referenced
this pull request
Aug 5, 2026
Tera 2.0 breaks both the Rust API and the template syntax, so the dependabot bump in #329 does not compile. This fixes both sides. Rust API: - `Context::into_json()` is gone, and Tera 2's `Context` is write-only (no `Serialize`, no iterator, `data` is `pub(crate)`), so there is no way to recover the context for `script template-json`. Accumulate the values in a `serde_json::Map` instead and convert with `Context::from_serialize` right before rendering. - `render_str` gained an explicit `autoescape` argument, because a one-off template has no filename to infer escaping from. Templates: all eleven built-in formats failed to render. Array and tuple fields need `foo[0]` rather than `foo.0`, tests take keyword arguments (`is starting_with(pat=root)`), and `trim_start_matches` became `trim_start(pat=...)`. Beyond the straight port: - Register the template under its own name and use `render` instead of rendering it as a one-off, so errors point at `my_format.tera:12:54` rather than `__tera_one_off:12:54`. This also means unknown filters and tests are reported before rendering starts. Autoescaping is disabled explicitly rather than relying on the filename suffix, so a user template that happens to end in `.html` cannot silently start escaping its own output. - Enable the `preserve_order` feature. Tera 2 ships `default = []` and its `Map` is a `std::collections::HashMap`, so map iteration order varied between runs; Tera 1 used a `BTreeMap` and was deterministic. No built-in template iterates a map, but a custom template iterating `global_defines` would produce non-reproducible scripts. The feature switches Tera to `indexmap`, already a direct dependency, so it adds no transitive dependencies. Verified byte-identical output against Tera 1 across all twelve formats with the default, `--compilation-mode separate --source-annotations` and `-D` flag combinations, plus `--only-defines`, `--only-includes` and `--relative-path`. Drops 44 transitive dependencies, adds none. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
Author
|
Superseded by #346. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Bumps tera from 1.20.1 to 2.1.0.
Changelog
Sourced from tera's changelog.
... (truncated)
Commits
face2fbFix typocca5d6cUpdate changelog4c0e3c5Added get_component_names and contains_component_definition. (#993)b2a8f2cv2.1.057b2e19clippyc35cf58explicit type annotations for -Znext-solver (#1001)ba36f89Add .iter() method to Kwargs (#1000)687b128Mention indexing change for vec in migrationb75b036Remove link in docs headere2f66dcCopy features docs to lib.rs