From 249f1e9960b7ee07d80e12b585ac57b644f9e4c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Artur=20Micha=C5=82ek?= <52135326+cptartur@users.noreply.github.com> Date: Thu, 26 Sep 2024 15:34:07 +0200 Subject: [PATCH] Release 0.31.0 (#2523) Closes # ## Introduced changes - Release 0.31.0 ## Checklist - [x] Linked relevant issue - [x] Updated relevant documentation - [x] Added relevant tests - [x] Performed self-review of the code - [x] Added changes to `CHANGELOG.md` --- CHANGELOG.md | 2 ++ Cargo.lock | 8 ++++---- Cargo.toml | 2 +- crates/forge/tests/e2e/running.rs | 24 ++++++++++++++++------- crates/sncast/tests/e2e/script/general.rs | 2 +- crates/snforge-scarb-plugin/Scarb.toml | 2 +- sncast_std/Scarb.lock | 2 +- sncast_std/Scarb.toml | 2 +- snforge_std/Scarb.lock | 4 ++-- snforge_std/Scarb.toml | 2 +- 10 files changed, 31 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b475d6d5a5..52c3c430f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.31.0] - 2024-09-26 + ### Cast #### Changed diff --git a/Cargo.lock b/Cargo.lock index 7396cdb1c5..3957fdc250 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2051,7 +2051,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "forge" -version = "0.30.0" +version = "0.31.0" dependencies = [ "anyhow", "ark-ff", @@ -2121,7 +2121,7 @@ dependencies = [ [[package]] name = "forge_runner" -version = "0.30.0" +version = "0.31.0" dependencies = [ "anyhow", "bimap", @@ -4655,7 +4655,7 @@ dependencies = [ [[package]] name = "sncast" -version = "0.30.0" +version = "0.31.0" dependencies = [ "anyhow", "async-trait", @@ -4712,7 +4712,7 @@ dependencies = [ [[package]] name = "snforge-scarb-plugin" -version = "0.30.0" +version = "0.31.0" dependencies = [ "cairo-lang-diagnostics", "cairo-lang-filesystem", diff --git a/Cargo.toml b/Cargo.toml index 54a7aa3051..e8355a9d7b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ members = [ ] [workspace.package] -version = "0.30.0" +version = "0.31.0" edition = "2021" repository = "https://github.com/foundry-rs/starknet-foundry" license = "MIT" diff --git a/crates/forge/tests/e2e/running.rs b/crates/forge/tests/e2e/running.rs index 526d6aa1cf..5ed90e6328 100644 --- a/crates/forge/tests/e2e/running.rs +++ b/crates/forge/tests/e2e/running.rs @@ -663,9 +663,13 @@ fn with_exit_first_flag() { fn init_new_project() { let temp = tempdir_with_tool_versions().unwrap(); - runner(&temp).args(["init", "test_name"]).assert().success(); + runner(&temp) + .args(["init", "test_name"]) + .env("DEV_DISABLE_SNFORGE_STD_DEPENDENCY", "true") + .assert() + .success(); - validate_init(&temp); + validate_init(&temp, false); } #[test] @@ -683,7 +687,7 @@ fn init_new_project_from_scarb() { .assert() .success(); - validate_init(&temp); + validate_init(&temp, true); } pub fn append_to_path_var(path: &Path) -> OsString { @@ -693,10 +697,16 @@ pub fn append_to_path_var(path: &Path) -> OsString { env::join_paths(script_path.chain(other_paths)).unwrap() } -fn validate_init(temp: &TempDir) { +fn validate_init(temp: &TempDir, validate_snforge_std: bool) { let manifest_path = temp.join("test_name/Scarb.toml"); let scarb_toml = fs::read_to_string(manifest_path.clone()).unwrap(); + let snforge_std_assert = if validate_snforge_std { + "\nsnforge_std = { git = \"https://github.com/foundry-rs/starknet-foundry\", tag = \"v[..]\" }" + } else { + "" + }; + let expected = formatdoc!( r#" [package] @@ -709,8 +719,7 @@ fn validate_init(temp: &TempDir) { [dependencies] starknet = "[..]" - [dev-dependencies] - snforge_std = {{ git = "https://github.com/foundry-rs/starknet-foundry", tag = "v[..]" }} + [dev-dependencies]{} assert_macros = "[..]" [[target.starknet-contract]] @@ -718,7 +727,8 @@ fn validate_init(temp: &TempDir) { [scripts] test = "snforge test" - "# + "#, + snforge_std_assert ); assert_matches(&expected, &scarb_toml); diff --git a/crates/sncast/tests/e2e/script/general.rs b/crates/sncast/tests/e2e/script/general.rs index b590bb8870..52f96b3554 100644 --- a/crates/sncast/tests/e2e/script/general.rs +++ b/crates/sncast/tests/e2e/script/general.rs @@ -135,7 +135,7 @@ async fn test_incompatible_sncast_std_version() { snapbox.assert().success().stdout_matches(indoc! {r" ... - [WARNING] Package sncast_std version does not meet the recommended version requirement =0.30.0, it might result in unexpected behaviour + [WARNING] Package sncast_std version does not meet the recommended version requirement =0.31.0, it might result in unexpected behaviour ... "}); } diff --git a/crates/snforge-scarb-plugin/Scarb.toml b/crates/snforge-scarb-plugin/Scarb.toml index 180e091dfe..f32ad582e6 100644 --- a/crates/snforge-scarb-plugin/Scarb.toml +++ b/crates/snforge-scarb-plugin/Scarb.toml @@ -1,5 +1,5 @@ [package] name = "snforge_scarb_plugin" -version = "0.1.0" +version = "0.31.0" [cairo-plugin] diff --git a/sncast_std/Scarb.lock b/sncast_std/Scarb.lock index 82bd542ed0..9e22d45df2 100644 --- a/sncast_std/Scarb.lock +++ b/sncast_std/Scarb.lock @@ -3,4 +3,4 @@ version = 1 [[package]] name = "sncast_std" -version = "0.30.0" +version = "0.31.0" diff --git a/sncast_std/Scarb.toml b/sncast_std/Scarb.toml index f477c62673..a1c96d91d6 100644 --- a/sncast_std/Scarb.toml +++ b/sncast_std/Scarb.toml @@ -1,4 +1,4 @@ [package] name = "sncast_std" -version = "0.30.0" +version = "0.31.0" edition = "2023_11" diff --git a/snforge_std/Scarb.lock b/snforge_std/Scarb.lock index c7b5856aef..ab144df366 100644 --- a/snforge_std/Scarb.lock +++ b/snforge_std/Scarb.lock @@ -3,11 +3,11 @@ version = 1 [[package]] name = "snforge_scarb_plugin" -version = "0.1.0" +version = "0.31.0" [[package]] name = "snforge_std" -version = "0.30.0" +version = "0.31.0" dependencies = [ "snforge_scarb_plugin", ] diff --git a/snforge_std/Scarb.toml b/snforge_std/Scarb.toml index 95d1856100..c3af29478a 100644 --- a/snforge_std/Scarb.toml +++ b/snforge_std/Scarb.toml @@ -1,6 +1,6 @@ [package] name = "snforge_std" -version = "0.30.0" +version = "0.31.0" edition = "2023_10" [dependencies]