Skip to content

Commit

Permalink
missed release so bump versions
Browse files Browse the repository at this point in the history
  • Loading branch information
max-sixty committed Sep 8, 2024
1 parent 5ff1da6 commit 2341f0d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 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 cargo-insta/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cargo-insta"
version = "1.40.0"
version = "1.41.0"
license = "Apache-2.0"
authors = ["Armin Ronacher <[email protected]>"]
description = "A review tool for the insta snapshot testing library for Rust"
Expand All @@ -14,7 +14,7 @@ readme = "README.md"
rust-version = "1.65.0"

[dependencies]
insta = { version = "=1.40.0", path = "../insta", features = ["json", "yaml", "redactions", "_cargo_insta_internal"] }
insta = { version = "=1.41.0", path = "../insta", features = ["json", "yaml", "redactions", "_cargo_insta_internal"] }
cargo_metadata = { version = "0.18.0", default-features = false }
console = "0.15.4"
serde = { version = "1.0.117", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion cargo-insta/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ fn prepare_test_runner<'snapshot_ref>(
"INSTA_UPDATE",
// Don't set `INSTA_UPDATE=force` for `--force-update-snapshots` on
// older versions
if *INSTA_VERSION >= Version::new(1,40,0) {
if *INSTA_VERSION >= Version::new(1,41,0) {
match (cmd.check, cmd.accept_unseen, cmd.force_update_snapshots) {
(true, false, false) => "no",
(false, true, false) => "unseen",
Expand Down
14 changes: 7 additions & 7 deletions cargo-insta/tests/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ Hello, world!

let test_current_insta =
create_test_force_update_project("current", "{ path = '$PROJECT_PATH' }");
let test_insta_1_39_0 = create_test_force_update_project("1_39_0", "\"1.39.0\"");
let test_insta_1_40_0 = create_test_force_update_project("1_40_0", "\"1.40.0\"");

// Test with current insta version
let output_current = test_current_insta
Expand All @@ -789,14 +789,14 @@ Hello, world!

assert_success(&output_current);

// Test with insta 1.39.0
let output_1_39_0 = test_insta_1_39_0
// Test with insta 1.40.0
let output_1_40_0 = test_insta_1_40_0
.cmd()
.args(["test", "--accept", "--force-update-snapshots"])
.output()
.unwrap();

assert_success(&output_1_39_0);
assert_success(&output_1_40_0);

// Check that both versions updated the snapshot correctly
assert_snapshot!(test_current_insta.diff("src/snapshots/test_force_update_current__force_update.snap"), @r#"
Expand All @@ -814,9 +814,9 @@ Hello, world!
-
"#);

assert_snapshot!(test_insta_1_39_0.diff("src/snapshots/test_force_update_1_39_0__force_update.snap"), @r#"
--- Original: src/snapshots/test_force_update_1_39_0__force_update.snap
+++ Updated: src/snapshots/test_force_update_1_39_0__force_update.snap
assert_snapshot!(test_insta_1_40_0.diff("src/snapshots/test_force_update_1_40_0__force_update.snap"), @r#"
--- Original: src/snapshots/test_force_update_1_40_0__force_update.snap
+++ Updated: src/snapshots/test_force_update_1_40_0__force_update.snap
@@ -1,8 +1,5 @@
-
---
Expand Down
2 changes: 1 addition & 1 deletion insta/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "insta"
version = "1.40.0"
version = "1.41.0"
license = "Apache-2.0"
authors = ["Armin Ronacher <[email protected]>"]
description = "A snapshot testing library for Rust"
Expand Down
4 changes: 2 additions & 2 deletions insta/src/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ impl Snapshot {
}
}
}
eprintln!("A snapshot uses an old snapshot format; please update it to the new format with `cargo insta --force-update-snapshots.\n\nSnapshot is at: {}", p.to_string_lossy());
crate::elog!("A snapshot uses an old snapshot format; please update it to the new format with `cargo insta test --force-update-snapshots --accept`.\n\nSnapshot is at: {}", p.to_string_lossy());
rv
};

Expand Down Expand Up @@ -717,7 +717,7 @@ fn get_inline_snapshot_value(frozen_value: &str) -> String {
// (the only call site)

if frozen_value.trim_start().starts_with('⋮') {
eprintln!("A snapshot uses an old snapshot format; please update it to the new format with `cargo insta --force-update-snapshots.\n\nValue: {}", frozen_value);
crate::elog!("A snapshot uses an old snapshot format; please update it to the new format with `cargo insta test --force-update-snapshots --accept`.\n\nSnapshot is at: {}", frozen_value);

// legacy format - retain so old snapshots still work
let mut buf = String::new();
Expand Down

0 comments on commit 2341f0d

Please sign in to comment.