diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-08 10:57:51 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-08 10:57:51 +0000 |
| commit | 075307804bf66bba10f5bc55cb40e2e6a98a65ee (patch) | |
| tree | f5a3eb2738372582e28a9a55a8f9481f0af9594b | |
| parent | f75e1c59aacf5ce668fd327e4e3d827511661c2a (diff) | |
chore: upgrade nostr-* packages to rev 4767ad13
- Update nostr-relay-builder, nostr-sdk, nostr-lmdb to latest revision
- Update grasp-audit nostr-sdk dependency
- Fix clippy warnings:
- Replace .clone() with std::slice::from_ref() in src/git/sync.rs
- Change &PathBuf to &Path in tests/common/git_server.rs
- Replace vec![] with array literal in src/purgatory/sync/functions.rs
- Update PR_TEST_COMMIT_HASH in grasp-audit due to event generation changes
All 249 tests passing, no breaking changes required.
| -rw-r--r-- | Cargo.lock | 18 | ||||
| -rw-r--r-- | Cargo.toml | 6 | ||||
| -rw-r--r-- | grasp-audit/Cargo.toml | 2 | ||||
| -rw-r--r-- | grasp-audit/src/specs/grasp01/push_authorization.rs | 2 | ||||
| -rw-r--r-- | src/git/sync.rs | 5 | ||||
| -rw-r--r-- | src/purgatory/sync/functions.rs | 2 | ||||
| -rw-r--r-- | tests/common/git_server.rs | 2 |
7 files changed, 19 insertions, 18 deletions
| @@ -584,9 +584,9 @@ checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127" | |||
| 584 | 584 | ||
| 585 | [[package]] | 585 | [[package]] |
| 586 | name = "flatbuffers" | 586 | name = "flatbuffers" |
| 587 | version = "25.9.23" | 587 | version = "25.12.19" |
| 588 | source = "registry+https://github.com/rust-lang/crates.io-index" | 588 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 589 | checksum = "09b6620799e7340ebd9968d2e0708eb82cf1971e9a16821e2091b6d6e475eed5" | 589 | checksum = "35f6839d7b3b98adde531effaf34f0c2badc6f4735d26fe74709d8e513a96ef3" |
| 590 | dependencies = [ | 590 | dependencies = [ |
| 591 | "bitflags 2.10.0", | 591 | "bitflags 2.10.0", |
| 592 | "rustc_version", | 592 | "rustc_version", |
| @@ -1469,7 +1469,7 @@ dependencies = [ | |||
| 1469 | [[package]] | 1469 | [[package]] |
| 1470 | name = "nostr" | 1470 | name = "nostr" |
| 1471 | version = "0.44.1" | 1471 | version = "0.44.1" |
| 1472 | source = "git+https://github.com/rust-nostr/nostr?rev=e09c9d82a1778683d2a6b968d09eb2c619883bf3#e09c9d82a1778683d2a6b968d09eb2c619883bf3" | 1472 | source = "git+https://github.com/rust-nostr/nostr?rev=4767ad13#4767ad138ed47b49584cdc3cea9cccf69f283be5" |
| 1473 | dependencies = [ | 1473 | dependencies = [ |
| 1474 | "base64 0.22.1", | 1474 | "base64 0.22.1", |
| 1475 | "bech32", | 1475 | "bech32", |
| @@ -1493,7 +1493,7 @@ dependencies = [ | |||
| 1493 | [[package]] | 1493 | [[package]] |
| 1494 | name = "nostr-database" | 1494 | name = "nostr-database" |
| 1495 | version = "0.44.0" | 1495 | version = "0.44.0" |
| 1496 | source = "git+https://github.com/rust-nostr/nostr?rev=e09c9d82a1778683d2a6b968d09eb2c619883bf3#e09c9d82a1778683d2a6b968d09eb2c619883bf3" | 1496 | source = "git+https://github.com/rust-nostr/nostr?rev=4767ad13#4767ad138ed47b49584cdc3cea9cccf69f283be5" |
| 1497 | dependencies = [ | 1497 | dependencies = [ |
| 1498 | "btreecap", | 1498 | "btreecap", |
| 1499 | "flatbuffers", | 1499 | "flatbuffers", |
| @@ -1505,7 +1505,7 @@ dependencies = [ | |||
| 1505 | [[package]] | 1505 | [[package]] |
| 1506 | name = "nostr-gossip" | 1506 | name = "nostr-gossip" |
| 1507 | version = "0.44.0" | 1507 | version = "0.44.0" |
| 1508 | source = "git+https://github.com/rust-nostr/nostr?rev=e09c9d82a1778683d2a6b968d09eb2c619883bf3#e09c9d82a1778683d2a6b968d09eb2c619883bf3" | 1508 | source = "git+https://github.com/rust-nostr/nostr?rev=4767ad13#4767ad138ed47b49584cdc3cea9cccf69f283be5" |
| 1509 | dependencies = [ | 1509 | dependencies = [ |
| 1510 | "nostr", | 1510 | "nostr", |
| 1511 | ] | 1511 | ] |
| @@ -1513,7 +1513,7 @@ dependencies = [ | |||
| 1513 | [[package]] | 1513 | [[package]] |
| 1514 | name = "nostr-lmdb" | 1514 | name = "nostr-lmdb" |
| 1515 | version = "0.44.0" | 1515 | version = "0.44.0" |
| 1516 | source = "git+https://github.com/rust-nostr/nostr?rev=e09c9d82a1778683d2a6b968d09eb2c619883bf3#e09c9d82a1778683d2a6b968d09eb2c619883bf3" | 1516 | source = "git+https://github.com/rust-nostr/nostr?rev=4767ad13#4767ad138ed47b49584cdc3cea9cccf69f283be5" |
| 1517 | dependencies = [ | 1517 | dependencies = [ |
| 1518 | "async-utility", | 1518 | "async-utility", |
| 1519 | "flume", | 1519 | "flume", |
| @@ -1527,7 +1527,7 @@ dependencies = [ | |||
| 1527 | [[package]] | 1527 | [[package]] |
| 1528 | name = "nostr-relay-builder" | 1528 | name = "nostr-relay-builder" |
| 1529 | version = "0.44.0" | 1529 | version = "0.44.0" |
| 1530 | source = "git+https://github.com/rust-nostr/nostr?rev=e09c9d82a1778683d2a6b968d09eb2c619883bf3#e09c9d82a1778683d2a6b968d09eb2c619883bf3" | 1530 | source = "git+https://github.com/rust-nostr/nostr?rev=4767ad13#4767ad138ed47b49584cdc3cea9cccf69f283be5" |
| 1531 | dependencies = [ | 1531 | dependencies = [ |
| 1532 | "async-utility", | 1532 | "async-utility", |
| 1533 | "async-wsocket", | 1533 | "async-wsocket", |
| @@ -1544,7 +1544,7 @@ dependencies = [ | |||
| 1544 | [[package]] | 1544 | [[package]] |
| 1545 | name = "nostr-relay-pool" | 1545 | name = "nostr-relay-pool" |
| 1546 | version = "0.44.0" | 1546 | version = "0.44.0" |
| 1547 | source = "git+https://github.com/rust-nostr/nostr?rev=e09c9d82a1778683d2a6b968d09eb2c619883bf3#e09c9d82a1778683d2a6b968d09eb2c619883bf3" | 1547 | source = "git+https://github.com/rust-nostr/nostr?rev=4767ad13#4767ad138ed47b49584cdc3cea9cccf69f283be5" |
| 1548 | dependencies = [ | 1548 | dependencies = [ |
| 1549 | "async-utility", | 1549 | "async-utility", |
| 1550 | "async-wsocket", | 1550 | "async-wsocket", |
| @@ -1561,7 +1561,7 @@ dependencies = [ | |||
| 1561 | [[package]] | 1561 | [[package]] |
| 1562 | name = "nostr-sdk" | 1562 | name = "nostr-sdk" |
| 1563 | version = "0.44.1" | 1563 | version = "0.44.1" |
| 1564 | source = "git+https://github.com/rust-nostr/nostr?rev=e09c9d82a1778683d2a6b968d09eb2c619883bf3#e09c9d82a1778683d2a6b968d09eb2c619883bf3" | 1564 | source = "git+https://github.com/rust-nostr/nostr?rev=4767ad13#4767ad138ed47b49584cdc3cea9cccf69f283be5" |
| 1565 | dependencies = [ | 1565 | dependencies = [ |
| 1566 | "async-utility", | 1566 | "async-utility", |
| 1567 | "nostr", | 1567 | "nostr", |
| @@ -17,11 +17,11 @@ hyper-util = { version = "0.1", features = ["tokio", "server", "http1", "http2"] | |||
| 17 | http-body-util = "0.1" | 17 | http-body-util = "0.1" |
| 18 | 18 | ||
| 19 | # Nostr relay | 19 | # Nostr relay |
| 20 | nostr-relay-builder = { git = "https://github.com/rust-nostr/nostr", rev = "e09c9d82a1778683d2a6b968d09eb2c619883bf3" } | 20 | nostr-relay-builder = { git = "https://github.com/rust-nostr/nostr", rev = "4767ad13" } |
| 21 | 21 | ||
| 22 | # Nostr | 22 | # Nostr |
| 23 | nostr-sdk = { git = "https://github.com/rust-nostr/nostr", rev = "e09c9d82a1778683d2a6b968d09eb2c619883bf3" } | 23 | nostr-sdk = { git = "https://github.com/rust-nostr/nostr", rev = "4767ad13" } |
| 24 | nostr-lmdb = { git = "https://github.com/rust-nostr/nostr", rev = "e09c9d82a1778683d2a6b968d09eb2c619883bf3" } | 24 | nostr-lmdb = { git = "https://github.com/rust-nostr/nostr", rev = "4767ad13" } |
| 25 | 25 | ||
| 26 | # Utilities | 26 | # Utilities |
| 27 | futures-util = "0.3" | 27 | futures-util = "0.3" |
diff --git a/grasp-audit/Cargo.toml b/grasp-audit/Cargo.toml index 88f3d60..6c8632e 100644 --- a/grasp-audit/Cargo.toml +++ b/grasp-audit/Cargo.toml | |||
| @@ -12,7 +12,7 @@ path = "src/bin/grasp-audit.rs" | |||
| 12 | 12 | ||
| 13 | [dependencies] | 13 | [dependencies] |
| 14 | # Nostr | 14 | # Nostr |
| 15 | nostr-sdk = { git = "https://github.com/rust-nostr/nostr", rev = "e09c9d82a1778683d2a6b968d09eb2c619883bf3" } | 15 | nostr-sdk = { git = "https://github.com/rust-nostr/nostr", rev = "4767ad13" } |
| 16 | 16 | ||
| 17 | # Async | 17 | # Async |
| 18 | tokio = { version = "1", features = ["full"] } | 18 | tokio = { version = "1", features = ["full"] } |
diff --git a/grasp-audit/src/specs/grasp01/push_authorization.rs b/grasp-audit/src/specs/grasp01/push_authorization.rs index 549ba6f..23eb735 100644 --- a/grasp-audit/src/specs/grasp01/push_authorization.rs +++ b/grasp-audit/src/specs/grasp01/push_authorization.rs | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | /// | 29 | /// |
| 30 | /// Run `test_pr_test_commit_hash_discovery` to discover/verify this value. | 30 | /// Run `test_pr_test_commit_hash_discovery` to discover/verify this value. |
| 31 | #[allow(dead_code)] | 31 | #[allow(dead_code)] |
| 32 | const PR_TEST_COMMIT_HASH: &str = "5d40fb1555a0c28bf4d650515a73aaa54d4d9bfb"; | 32 | const PR_TEST_COMMIT_HASH: &str = "8935183ff722bf04e861928c6a7e50868c6ca4a6"; |
| 33 | 33 | ||
| 34 | use crate::{ | 34 | use crate::{ |
| 35 | clone_repo, create_commit, create_deterministic_commit_with_variant, try_push, try_push_to_ref, | 35 | clone_repo, create_commit, create_deterministic_commit_with_variant, try_push, try_push_to_ref, |
diff --git a/src/git/sync.rs b/src/git/sync.rs index 06013a5..b05e2d0 100644 --- a/src/git/sync.rs +++ b/src/git/sync.rs | |||
| @@ -1618,7 +1618,8 @@ mod tests { | |||
| 1618 | }; | 1618 | }; |
| 1619 | 1619 | ||
| 1620 | // latest should be considered latest | 1620 | // latest should be considered latest |
| 1621 | let result = is_latest_authorized_state(&latest, &maintainers, &[older.clone()]); | 1621 | let result = |
| 1622 | is_latest_authorized_state(&latest, &maintainers, std::slice::from_ref(&older)); | ||
| 1622 | assert!(result); | 1623 | assert!(result); |
| 1623 | 1624 | ||
| 1624 | // older should not be considered latest | 1625 | // older should not be considered latest |
| @@ -1633,7 +1634,7 @@ mod tests { | |||
| 1633 | let maintainers = vec![keys.public_key().to_hex()]; | 1634 | let maintainers = vec![keys.public_key().to_hex()]; |
| 1634 | 1635 | ||
| 1635 | // When the state being checked is also in the db_states, it should be considered latest | 1636 | // When the state being checked is also in the db_states, it should be considered latest |
| 1636 | let result = is_latest_authorized_state(&state, &maintainers, &[state.clone()]); | 1637 | let result = is_latest_authorized_state(&state, &maintainers, std::slice::from_ref(&state)); |
| 1637 | assert!(result); | 1638 | assert!(result); |
| 1638 | } | 1639 | } |
| 1639 | } | 1640 | } |
diff --git a/src/purgatory/sync/functions.rs b/src/purgatory/sync/functions.rs index 370990e..0139ac5 100644 --- a/src/purgatory/sync/functions.rs +++ b/src/purgatory/sync/functions.rs | |||
| @@ -930,7 +930,7 @@ mod tests { | |||
| 930 | .expect("Should return a second URL"); | 930 | .expect("Should return a second URL"); |
| 931 | 931 | ||
| 932 | // Both URLs should be available (one from announcement, one from PR) | 932 | // Both URLs should be available (one from announcement, one from PR) |
| 933 | let both_urls = vec![first_url, second_url]; | 933 | let both_urls = [first_url, second_url]; |
| 934 | assert!( | 934 | assert!( |
| 935 | both_urls.iter().any(|u| u.contains("github.com")), | 935 | both_urls.iter().any(|u| u.contains("github.com")), |
| 936 | "Should include announcement URL" | 936 | "Should include announcement URL" |
diff --git a/tests/common/git_server.rs b/tests/common/git_server.rs index d0d727e..9fb62df 100644 --- a/tests/common/git_server.rs +++ b/tests/common/git_server.rs | |||
| @@ -282,7 +282,7 @@ fn is_safe_path(path: &Path, repo_path: &Path) -> bool { | |||
| 282 | } | 282 | } |
| 283 | 283 | ||
| 284 | /// Guess the content type for a git-related file. | 284 | /// Guess the content type for a git-related file. |
| 285 | fn guess_content_type(path: &PathBuf) -> &'static str { | 285 | fn guess_content_type(path: &Path) -> &'static str { |
| 286 | let filename = path.file_name().and_then(|n| n.to_str()).unwrap_or(""); | 286 | let filename = path.file_name().and_then(|n| n.to_str()).unwrap_or(""); |
| 287 | 287 | ||
| 288 | if filename == "info/refs" || filename == "refs" { | 288 | if filename == "info/refs" || filename == "refs" { |