Skip to content

Commit

Permalink
Merge branch 'master' into line-ending
Browse files Browse the repository at this point in the history
  • Loading branch information
max-sixty committed Oct 12, 2024
2 parents e58dbcb + a8b6cc2 commit 53b8f30
Show file tree
Hide file tree
Showing 17 changed files with 2,576 additions and 232 deletions.
31 changes: 26 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,35 @@ All notable changes to insta and cargo-insta are documented here.

## 1.41.0

- `--force-update-snapshots` has more conservative and consistent behavior for
inline snapshots. As a side-effect of this, only the content within the inline
snapshot delimiters are assessed for changes, not the delimiters (e.g. `###`).
#581
- Experimental support for binary snapshots. #610 (Florian Plattner)

- `--force-update-snapshots` now causes `cargo-insta` to write every snapshot, regardless of whether
it evaluates snapshots fully match, and now implies `--accept`. This
allows for `--force-update-snapshots` to update inline snapshots when
delimiters or indentation can be updated.

For the existing behavior of limiting writes to when `insta` evaluates writes
are required, use `--require-full-match`. The main difference between
`--require-full-match` and the existing behavior of `--force-update-snapshots`
is that `cargo-insta` will return a non-zero exit code if any snapshots don't
match fully. `--require-full-match` doesn't track inline snapshots' delimiters or
indentation. #644

- Inline snapshots only use `#` characters as delimiters when required. #603

- Experimental support for binary snapshots. #610 (Florian Plattner)
- Warnings for undiscovered snapshots are more robust, and include files with
custom snapshot extensions. #637

- Insta runs correctly on packages which reference rust files in a parent path. #626

- Warnings are printed when any snapshot uses a legacy format. #599

- `insta` now internally uses `INSTA_UPDATE=force` rather than
`INSTA_FORCE_UPDATE=1`. (This doesn't affect users of `cargo-insta`, which
handles this internally.) #482

- `cargo-insta`'s integration tests continue to grow over the past couple of versions,
and now offer coverage of most of `cargo-insta`'s interface.

## 1.40.0

Expand Down
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ cargo run -p cargo-insta -- test # (or `review` or whatever command you want to
...in contrast to running `cargo insta`, which invokes the installed version of
`cargo-insta`, and so make iterating more difficult.

To run the version of `cargo-insta` in the working directory on another crate, run:

```sh
cargo run -p cargo-insta -- test --manifest-path=../insta-bug-repro/Cargo.toml
```

## Writing tests

If making non-trivial changes to `cargo-insta`, please add an integration test to
Expand Down
13 changes: 11 additions & 2 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion cargo-insta/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ walkdir = "2.3.1"
similar= "2.2.1"
itertools = "0.10.0"
termcolor = "1.1.2"
os_pipe = "0.9.0"
os_pipe = "0.9.0"
Loading

0 comments on commit 53b8f30

Please sign in to comment.