Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mitsuhiko/minijinja
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2.6.0
Choose a base ref
...
head repository: mitsuhiko/minijinja
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2.7.0
Choose a head ref
  • 9 commits
  • 58 files changed
  • 2 contributors

Commits on Jan 8, 2025

  1. Move pypi publish step

    mitsuhiko committed Jan 8, 2025

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    HighCrit HighCrit
    Copy the full SHA
    b15baa8 View commit details

Commits on Jan 9, 2025

  1. Remove largely useless string interning support (#675)

    mitsuhiko authored Jan 9, 2025

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    HighCrit HighCrit
    Copy the full SHA
    f48b190 View commit details

Commits on Jan 18, 2025

  1. loop.nextitem is now a lazy operation (#677)

    mitsuhiko authored Jan 18, 2025
    Copy the full SHA
    383470b View commit details
  2. Improved loops to support aliasing (#678)

    mitsuhiko authored Jan 18, 2025
    Copy the full SHA
    c941c0b View commit details

Commits on Jan 27, 2025

  1. Use deprecated serde_yaml in cli (#684)

    mitsuhiko authored Jan 27, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    9b357f9 View commit details

Commits on Jan 28, 2025

  1. Fix undefineds in some places not reporting proper errors (#686)

    mitsuhiko authored Jan 28, 2025
    Copy the full SHA
    d1533c9 View commit details
  2. docs: add example for the join filter (#685)

    tisonkun authored Jan 28, 2025
    Copy the full SHA
    bf672a4 View commit details
  3. Allow newer notify in autoreload (#688)

    mitsuhiko authored Jan 28, 2025
    Copy the full SHA
    5ade42c View commit details
  4. 2.7.0

    mitsuhiko committed Jan 28, 2025
    Copy the full SHA
    d880120 View commit details
Showing with 725 additions and 382 deletions.
  1. +1 −1 .cargo/config.toml
  2. +24 −0 .github/workflows/build-wheels.yml
  3. +0 −28 .github/workflows/publish-pypi.yml
  4. +1 −1 .github/workflows/tests.yml
  5. +14 −0 CHANGELOG.md
  6. +37 −53 Cargo.lock
  7. +2 −2 Makefile
  8. +2 −2 README.md
  9. +1 −1 examples/dsl/Cargo.toml
  10. +1 −1 examples/eval-to-state/Cargo.toml
  11. +1 −1 examples/function-using-async/Cargo.toml
  12. +1 −1 examples/object-using-async/Cargo.toml
  13. +4 −4 minijinja-autoreload/Cargo.toml
  14. +2 −2 minijinja-cabi/Cargo.toml
  15. +5 −5 minijinja-cli/Cargo.toml
  16. +2 −2 minijinja-cli/src/cli.rs
  17. +1 −1 minijinja-cli/src/config.rs
  18. +3 −3 minijinja-contrib/Cargo.toml
  19. +1 −1 minijinja-embed/Cargo.toml
  20. +2 −2 minijinja-py/Cargo.toml
  21. +1 −1 minijinja-py/pyproject.toml
  22. +4 −2 minijinja/Cargo.toml
  23. +18 −0 minijinja/src/compiler/ast.rs
  24. +12 −3 minijinja/src/compiler/codegen.rs
  25. +3 −0 minijinja/src/compiler/instructions.rs
  26. +4 −0 minijinja/src/filters.rs
  27. +0 −6 minijinja/src/lib.rs
  28. +0 −7 minijinja/src/macros.rs
  29. +5 −0 minijinja/src/syntax.rs
  30. +1 −4 minijinja/src/template.rs
  31. +3 −48 minijinja/src/value/mod.rs
  32. +5 −15 minijinja/src/value/object.rs
  33. +0 −47 minijinja/src/value/string_interning.rs
  34. +5 −14 minijinja/src/vm/context.rs
  35. +1 −0 minijinja/src/vm/fuel.rs
  36. +114 −20 minijinja/src/vm/loop_object.rs
  37. +57 −100 minijinja/src/vm/mod.rs
  38. +3 −0 minijinja/tests/inputs/err_bad_fast_recurse.txt
  39. +5 −0 minijinja/tests/inputs/err_strict_undefined_for.txt
  40. +5 −0 minijinja/tests/inputs/err_strict_undefined_for_filter.txt
  41. +5 −0 minijinja/tests/inputs/err_strict_undefined_if.txt
  42. +3 −0 minijinja/tests/inputs/err_strict_undefined_print.txt
  43. +5 −0 minijinja/tests/inputs/loop_break_one_shot_iter.txt
  44. +5 −0 minijinja/tests/inputs/loop_break_one_shot_iter_peek.txt
  45. +1 −1 minijinja/tests/inputs/loop_controls.txt
  46. +42 −0 minijinja/tests/inputs/loop_recursive_alias.txt
  47. +1 −1 minijinja/tests/snapshots/test_compiler__for_loop.snap
  48. +21 −0 minijinja/tests/snapshots/test_templates__vm@err_bad_fast_recurse.txt.snap
  49. +25 −0 minijinja/tests/snapshots/test_templates__vm@err_strict_undefined_for.txt.snap
  50. +27 −0 minijinja/tests/snapshots/test_templates__vm@err_strict_undefined_for_filter.txt.snap
  51. +25 −0 minijinja/tests/snapshots/test_templates__vm@err_strict_undefined_if.txt.snap
  52. +23 −0 minijinja/tests/snapshots/test_templates__vm@err_strict_undefined_print.txt.snap
  53. +1 −0 minijinja/tests/snapshots/test_templates__vm@loop-recursion-error.txt.snap
  54. +8 −0 minijinja/tests/snapshots/test_templates__vm@loop_break_one_shot_iter.txt.snap
  55. +8 −0 minijinja/tests/snapshots/test_templates__vm@loop_break_one_shot_iter_peek.txt.snap
  56. +1 −1 minijinja/tests/snapshots/test_templates__vm@loop_over_non_iterable.txt.snap
  57. +122 −0 minijinja/tests/snapshots/test_templates__vm@loop_recursive_alias.txt.snap
  58. +51 −1 minijinja/tests/test_templates.rs
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[target.wasm32-wasi]
[target.wasm32-wasip1]
runner = ["./scripts/wasmtime-wrapper.sh"]

[target.aarch64-unknown-linux-gnu]
24 changes: 24 additions & 0 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
@@ -5,6 +5,9 @@ on:
tags: "*"
workflow_dispatch:

permissions:
contents: read

jobs:
macos:
name: macOS Wheels (universal2)
@@ -95,3 +98,24 @@ jobs:
with:
name: wheels
path: dist

publish-pypi:
name: Publish to pypi.org
runs-on: ubuntu-latest
needs:
- sdist
- windows
- linux
- macos
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
if: ${{ !github.event.pull_request }}
steps:
- uses: actions/download-artifact@v4
with:
name: wheels
- name: Publish to PyPI
uses: PyO3/maturin-action@v1
with:
command: upload
args: --non-interactive --skip-existing minijinja-*
28 changes: 0 additions & 28 deletions .github/workflows/publish-pypi.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -109,7 +109,7 @@ jobs:
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: wasm32-wasi
targets: wasm32-wasip1
- uses: Swatinem/rust-cache@v2
- name: Install WasmTime
run: |
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,20 @@

All notable changes to MiniJinja are documented here.

## 2.7.0

- Removed string interning. #675
- `loop.nextitem` is now a lazy operation. This prevents issues when
iterating over one-shot iterators combined with `{% break %}` and
it now ensures that the iterator is not running "one item ahead". #677
- Fixed an issue that caused loop aliasing not to be supported for
recursive loops. #678
- CLI moved from `serde_yml` to `serde_yaml`. #684
- Improved undefined error reporting. Undefined values will now in most
cases point to exactly where the error happened. #686
- Allow newer notify dependency versions (up to 8.x) for the autoreload
crate. #688

## 2.6.0

- Added `sum` filter. #648
90 changes: 37 additions & 53 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ doc:
.PHONY: test-msrv
test-msrv:
@$(MAKE) run-tests FEATURES=$(TEST_FEATURES)
@$(MAKE) run-tests FEATURES=$(TEST_FEATURES),preserve_order,key_interning,unicode
@$(MAKE) run-tests FEATURES=$(TEST_FEATURES),preserve_order,unicode
@echo "CARGO TEST ALL FEATURES"
@cd minijinja; cargo test --all-features

@@ -26,7 +26,7 @@ test: test-msrv test-cli

.PHONY: wasi-test
wasi-test:
@cd minijinja; cargo test --all-features --target=wasm32-wasi -- --nocapture
@cd minijinja; cargo test --all-features --target=wasm32-wasip1 -- --nocapture

.PHONY: python-test
python-test:
Loading