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/insta
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.24.0
Choose a base ref
...
head repository: mitsuhiko/insta
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1.24.1
Choose a head ref
  • 3 commits
  • 6 files changed
  • 1 contributor

Commits on Jan 4, 2023

  1. Copy the full SHA
    5d1e3c1 View commit details
  2. Copy the full SHA
    0b21dd5 View commit details
  3. 1.24.1

    mitsuhiko committed Jan 4, 2023
    Copy the full SHA
    255a2af View commit details
Showing with 14 additions and 7 deletions.
  1. +5 −0 CHANGELOG.md
  2. +1 −1 Cargo.toml
  3. +2 −2 cargo-insta/Cargo.lock
  4. +2 −2 cargo-insta/Cargo.toml
  5. +3 −1 cargo-insta/src/cargo.rs
  6. +1 −1 src/env.rs
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,11 @@

All notable changes to insta and cargo-insta are documented here.

## 1.24.1

- Fix non working `--include-hidden` flag (#331)
- Fix incorrect mapping of `review.include_ignored` (#330)

## 1.24.0

- Added an insta tool config (`.config/insta.yaml`) to change the
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "insta"
version = "1.24.0"
version = "1.24.1"
license = "Apache-2.0"
authors = ["Armin Ronacher <armin.ronacher@active-4.com>"]
description = "A snapshot testing library for Rust"
4 changes: 2 additions & 2 deletions cargo-insta/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 cargo-insta/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cargo-insta"
version = "1.24.0"
version = "1.24.1"
license = "Apache-2.0"
authors = ["Armin Ronacher <armin.ronacher@active-4.com>"]
description = "A review tool for the insta snapshot testing library for Rust"
@@ -12,7 +12,7 @@ edition = "2018"
readme = "README.md"

[dependencies]
insta = { version = "=1.24.0", path = "..", features = ["json", "yaml", "redactions", "_cargo_insta_internal"] }
insta = { version = "=1.24.1", path = "..", features = ["json", "yaml", "redactions", "_cargo_insta_internal"] }
console = "0.15.1"
structopt = { version = "0.3.26", default-features = false }
serde = { version = "1.0.117", features = ["derive"] }
4 changes: 3 additions & 1 deletion cargo-insta/src/cargo.rs
Original file line number Diff line number Diff line change
@@ -260,7 +260,9 @@ pub fn find_snapshots<'a>(
) -> impl Iterator<Item = Result<SnapshotContainer, Box<dyn Error>>> + 'a {
let mut builder = WalkBuilder::new(root.clone());
builder.standard_filters(!flags.include_ignored);
if !flags.include_hidden {
if flags.include_hidden {
builder.hidden(false);
} else {
builder.filter_entry(|e| e.file_type().map_or(false, |x| x.is_file()) || !is_hidden(e));
}

2 changes: 1 addition & 1 deletion src/env.rs
Original file line number Diff line number Diff line change
@@ -233,7 +233,7 @@ impl ToolConfig {
.and_then(|x| x.as_bool())
.unwrap_or(false),
#[cfg(feature = "_cargo_insta_internal")]
review_include_ignored: resolve(&cfg, &["test", "include_ignored"])
review_include_ignored: resolve(&cfg, &["review", "include_ignored"])
.and_then(|x| x.as_bool())
.unwrap_or(false),
})