Skip to content

build(deps): bump tera from 1.20.1 to 2.1.0 - #329

Closed
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/cargo/tera-2.0.0
Closed

build(deps): bump tera from 1.20.1 to 2.1.0#329
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/cargo/tera-2.0.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jul 9, 2026

Copy link
Copy Markdown
Contributor

Bumps tera from 1.20.1 to 2.1.0.

Changelog

Sourced from tera's changelog.

2.1.0 (2026-06-23)

  • Add .iter() method to Kwargs
  • Add Tera::contains_component and Tera::get_component_names

2.0.0 (2026-06-26)

see migration guide for all the changes.

1.21.1 (2025-10-30)

  • Replace unmaintained unic-segment dependency

1.20.0 (2024-05-27)

  • Support parenthesis in if statements
  • Allow escaped newline and tab join separator

1.19.1 (2023-09-03)

  • Minimum supported Rust version (MSRV) is now 1.63 due to transitive dependencies.
  • Update crates.io metadata for the website

1.19.0 (2023-05-31)

  • Revert change to glob path to not error if the path doesn't exist
  • Allow macro definition in renderable template

1.18.1 (2023-03-15)

  • Fix panic on invalid globs to Tera::new

1.18.0 (2023-03-08)

  • Add abs filter
  • Add indent filter
  • Deprecate get_json_pointer in favour of dotted_pointer, a faster alternative
  • Always canonicalize glob paths passed to Tera to workaround a globwalk bug
  • Handle apostrophes in title case filter
  • Some performance improvement

1.17.1 (2022-09-19)

  • Make get_random use isize instead of i32 and bad error message
  • Fix variables lookup when the evaluated key has a . or quotes
  • Fix changed output of f64 from serde_json 1.0.85

1.17.0 (2022-08-14)

  • Fix bug where operands in in operation were escaped before comparison

... (truncated)

Commits

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file rust Pull requests that update rust code labels Jul 9, 2026
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 dependabot Bot changed the title build(deps): bump tera from 1.20.1 to 2.0.0 build(deps): bump tera from 1.20.1 to 2.1.0 Aug 4, 2026
@dependabot
dependabot Bot force-pushed the dependabot/cargo/tera-2.0.0 branch from f2a1fd7 to 0097fbf Compare August 4, 2026 15:28
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>
@dependabot @github

dependabot Bot commented on behalf of github Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #346.

@dependabot dependabot Bot closed this Aug 6, 2026
@dependabot
dependabot Bot deleted the dependabot/cargo/tera-2.0.0 branch August 6, 2026 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants