Skip to content

Commit

Permalink
chore: Remove unused dependencies, and update/replace dependencies wi…
Browse files Browse the repository at this point in the history
…th existing security advisories. Fixes #62. (#404)
  • Loading branch information
jsantell committed May 24, 2023
1 parent 9ee4798 commit 65da3d6
Show file tree
Hide file tree
Showing 17 changed files with 334 additions and 1,195 deletions.
1,441 changes: 298 additions & 1,143 deletions Cargo.lock

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ resolver = "2"
[workspace.dependencies]
anyhow = { version = "1" }
subtext = { version = "0.3.4" }
tempfile = { version = "^3" }
tracing = { version = "0.1" }
tracing-subscriber = { version = "0.3", features = ["env-filter", "tracing-log"] }
tracing-subscriber = { version = "~0.3.16", features = ["env-filter", "tracing-log"] }
thiserror = { version = "1" }
instant = { version = "0.1" }
gloo-timers = { version = "0.2", features = ["futures"] }
ucan = { version = "0.3.0" }
ucan-key-support = { version = "0.1.4" }
Expand All @@ -39,6 +39,11 @@ strum_macros = { version = "0.24" }
serde = { version = "^1" }
serde_json = { version = "^1" }

js-sys = { version = "^0.3" }
wasm-bindgen = { version = "^0.2" }
wasm-bindgen-test = { version = "^0.3" }
wasm-bindgen-futures = { version = "^0.4" }

[profile.release]
opt-level = 'z'
lto = true
Expand Down
4 changes: 2 additions & 2 deletions rust/noosphere-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ libipld-cbor = { workspace = true }
tokio = { version = "^1", features = ["full"] }

[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = "~0.2"
wasm-bindgen = { workspace = true }

[dev-dependencies]
wasm-bindgen-test = "~0.3"
wasm-bindgen-test = { workspace = true }
2 changes: 1 addition & 1 deletion rust/noosphere-car/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ multihash = { workspace = true }
tokio = { version = "^1", features = ["macros", "sync", "rt", "io-util"] }

[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
wasm-bindgen-test = "~0.3"
wasm-bindgen-test = { workspace = true }
7 changes: 2 additions & 5 deletions rust/noosphere-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ reqwest = { version = "~0.11", default-features = false, features = ["json", "ru
noosphere-ns = { version = "0.7.2", path = "../noosphere-ns" }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tempfile = "^3"
tempfile = { workspace = true }
clap = { version = "^4.1", features = ["derive", "cargo"] }
anyhow = "^1"

Expand All @@ -36,17 +36,14 @@ tower = "~0.4"
tower-http = { version = "~0.3", features = ["cors", "trace"] }
async-trait = "~0.1"
tracing = { workspace = true }
multipart = "~0.18"
noosphere-car = { version = "0.1.2", path = "../noosphere-car" }

url = { version = "^2", features = [ "serde" ] }
whoami = "^1"
home = "~0.5"
pathdiff = "~0.2"
path-absolutize = "^3"
mime_guess = "^2"
witty-phrase-generator = "~0.2"
toml_edit = { version = "~0.15", features = [ "serde" ] }
globset = "~0.4"

noosphere-ipfs = { version = "0.4.4", path = "../noosphere-ipfs" }
Expand All @@ -67,4 +64,4 @@ libipld-core = { workspace = true }
libipld-cbor = { workspace = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = "~0.2"
wasm-bindgen = { workspace = true }
1 change: 0 additions & 1 deletion rust/noosphere-cli/tests/peer_to_peer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ extern crate tracing;

mod helpers;
use anyhow::Result;
use cid::Cid;
use helpers::{start_name_system_server, wait, SpherePair};
use noosphere_core::tracing::initialize_tracing;
use noosphere_ns::{server::HttpClient, NameResolver};
Expand Down
2 changes: 1 addition & 1 deletion rust/noosphere-collections/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ unsigned-varint = "0.7"
tokio = { version = "^1", features = ["full"] }

[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
wasm-bindgen-test = "0.3"
wasm-bindgen-test = { workspace = true }

[features]
identity = []
4 changes: 1 addition & 3 deletions rust/noosphere-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,12 @@ async-once-cell = "~0.3"
anyhow = "^1"
fastcdc = "3"
futures = "~0.3"
fvm_ipld_amt = "~0.5"
serde = { workspace = true }
byteorder = "^1.4"
base64 = "0.21"
ed25519-zebra = "^3"
rand = "~0.8"
once_cell = "^1"
serde_ipld_dagcbor = "~0.2"
tiny-bip39 = "^1"
tokio-stream = "~0.1"
libipld-core = { workspace = true }
Expand All @@ -54,7 +52,7 @@ ucan = { workspace = true }
ucan-key-support = { workspace = true }

[dev-dependencies]
wasm-bindgen-test = "~0.3"
wasm-bindgen-test = { workspace = true }
serde_bytes = "~0.11"
serde_json = { workspace = true }

Expand Down
14 changes: 1 addition & 13 deletions rust/noosphere-gateway/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ readme = "README.md"
reqwest = { version = "~0.11", default-features = false, features = ["json", "rustls-tls", "stream"] }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tempfile = "^3"
clap = { version = "^4", features = ["derive", "cargo"] }
anyhow = "^1"
thiserror = { workspace = true }
strum = "0.24"
Expand All @@ -35,18 +33,10 @@ tower-http = { version = "~0.3", features = ["cors", "trace"] }
async-trait = "~0.1"
async-stream = "~0.3"
tracing = { workspace = true }
multipart = "~0.18"
wnfs-namefilter = { version = "0.1.19" }

url = { version = "^2", features = [ "serde" ] }
whoami = "^1"
home = "~0.5"
pathdiff = "~0.2"
path-absolutize = "^3"
mime_guess = "^2"
witty-phrase-generator = "~0.2"
toml_edit = { version = "~0.15", features = [ "serde" ] }
globset = "~0.4"

noosphere-car = { version = "0.1.2", path = "../noosphere-car" }
noosphere-ipfs = { version = "0.4.4", path = "../noosphere-ipfs" }
Expand All @@ -55,17 +45,15 @@ noosphere-ns = { version = "0.7.2", path = "../noosphere-ns" }
noosphere-storage = { version = "0.6.3", path = "../noosphere-storage" }
noosphere-sphere = { version = "0.5.8", path = "../noosphere-sphere" }
noosphere-api = { version = "0.7.9", path = "../noosphere-api" }
noosphere = { version = "0.10.11", path = "../noosphere" }
ucan = { workspace = true }
ucan-key-support = { workspace = true }
cid = { workspace = true }
subtext = "0.3.2"

serde = { workspace = true }
serde_json = { workspace = true }
libipld-core = { workspace = true }
libipld-cbor = { workspace = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = "~0.2"
wasm-bindgen = { workspace = true }

5 changes: 2 additions & 3 deletions rust/noosphere-into/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,11 @@ ucan-key-support = { workspace = true }

[dev-dependencies]
noosphere-sphere = { version = "0.5.8", path = "../noosphere-sphere", features = ["helpers"] }
wasm-bindgen-test = "~0.3"
wasm-bindgen-test = { workspace = true }

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
# Mostly these dependencies are used in the examples
tokio = { version = "^1", features = ["full"] }
tempfile = "^3"
tempfile = { workspace = true }
axum = "~0.6"
axum-extra = { version = "~0.4", features = ["spa"] }
tower-http = { version = "~0.3", features = ["fs", "trace"] }
4 changes: 2 additions & 2 deletions rust/noosphere-ipfs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ noosphere-storage = { version = "0.6.3", path = "../noosphere-storage" }
ucan = { workspace = true, optional = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
noosphere-car = { version = "0.1.2", path = "../noosphere-car" }
hyper = { version = "~0.14", features = ["full"] }
hyper = { version = "^0.14.26", features = ["full"] }
hyper-multipart-rfc7578 = "~0.8"
ipfs-api-prelude = "~0.5"

Expand All @@ -54,4 +53,5 @@ ipfs-api-prelude = "~0.5"
rand = "~0.8"
libipld-cbor = { workspace = true }
noosphere-storage = { version = "0.6.3", path = "../noosphere-storage" }
noosphere-car = { version = "0.1.2", path = "../noosphere-car" }
noosphere-core = { version = "0.11.0", path = "../noosphere-core" }
3 changes: 1 addition & 2 deletions rust/noosphere-ns/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,8 @@ url = { version = "^2", features = [ "serde" ], optional = true }

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
rand = { version = "0.8.5" }
test-log = { version = "0.2.11", default-features = false, features = ["trace"] }
libipld-cbor = { workspace = true }
tempdir = { version = "~0.3" }
tempfile = { workspace = true }

[features]
default = ["orb-ns", "api-server"]
Expand Down
5 changes: 3 additions & 2 deletions rust/noosphere-ns/src/bin/orb-ns/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ mod test {
use noosphere_ns::{Multiaddr, PeerId};
use serde::Deserialize;
use serde_json::json;
use tempdir::TempDir;
use tokio;
use tokio::sync::oneshot;
use ucan::builder::UcanBuilder;
Expand Down Expand Up @@ -72,7 +71,9 @@ mod test {

#[tokio::test]
async fn it_processes_record_commands() -> Result<()> {
let temp_dir = TempDir::new("orb-ns-processes-record-commands").unwrap();
let temp_dir = tempfile::Builder::new()
.prefix("orb-ns-processes-record-commands")
.tempdir()?;
let key_storage = InsecureKeyStorage::new(temp_dir.path())?;
let key_a = key_storage.create_key("key-a").await?;
let key_b = key_storage.create_key("key-b").await?;
Expand Down
4 changes: 2 additions & 2 deletions rust/noosphere-ns/src/bin/orb-ns/runner/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ mod tests {
use super::*;
use noosphere::key::KeyStorage;
use std::path::PathBuf;
use tempdir::TempDir;
use tempfile::TempDir;
use ucan::crypto::KeyMaterial;

async fn keys_equal(key_1: &Ed25519KeyMaterial, key_2: &Ed25519KeyMaterial) -> Result<bool> {
Expand All @@ -115,7 +115,7 @@ mod tests {

impl Env {
pub fn new() -> Result<Self> {
let dir = TempDir::new("noosphere")?;
let dir = tempfile::Builder::new().prefix("noosphere").tempdir()?;
let dir_path = dir.path().to_owned();
let key_storage = InsecureKeyStorage::new(&dir_path)?;

Expand Down
5 changes: 2 additions & 3 deletions rust/noosphere-sphere/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ tracing = { workspace = true }
noosphere-core = { version = "0.11.0", path = "../noosphere-core" }
noosphere-storage = { version = "0.6.3", path = "../noosphere-storage" }
noosphere-api = { version = "0.7.9", path = "../noosphere-api" }
noosphere-ipfs = { version = "0.4.4", path = "../noosphere-ipfs" }
noosphere-car = { version = "0.1.2", path = "../noosphere-car" }

ucan = { workspace = true }
Expand All @@ -47,11 +46,11 @@ serde = { workspace = true }
# TODO: We should eventually support gateway storage as a specialty target only,
# as it is a specialty use-case
tokio = { version = "^1", features = ["sync", "macros"] }
wasm-bindgen = "~0.2"
wasm-bindgen = { workspace = true }
wasm-bindgen-futures = "0.4.33"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tokio = { version = "^1", features = ["full"] }

[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
wasm-bindgen-test = "~0.3"
wasm-bindgen-test = { workspace = true }
7 changes: 3 additions & 4 deletions rust/noosphere-storage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,17 @@ url = { version = "^2" }

[dev-dependencies]
witty-phrase-generator = "~0.2"
wasm-bindgen-test = "~0.3"
wasm-bindgen-test = { workspace = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
sled = "~0.34"
tokio = { version = "^1", features = ["full"] }

[target.'cfg(target_arch = "wasm32")'.dependencies]
tokio = { version = "^1", features = ["sync", "macros"] }
wasm-bindgen = "~0.2"
wasm-bindgen = { workspace = true }
js-sys = { workspace = true }
rexie = { version = "~0.4" }
js-sys = "~0.3"


[target.'cfg(target_arch = "wasm32")'.dependencies.web-sys]
version = "~0.3"
Expand Down
12 changes: 6 additions & 6 deletions rust/noosphere/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ libipld-core = { workspace = true }
# as it is a specialty use-case
tokio = { version = "^1", features = ["sync"] }
rexie = { version = "~0.4" }
wasm-bindgen = "~0.2"
wasm-bindgen-futures = "0.4.33"
js-sys = "~0.3"
wasm-bindgen = { workspace = true }
wasm-bindgen-futures = { workspace = true }
js-sys = { workspace = true }
noosphere-into = { version = "0.8.9", path = "../noosphere-into" }

[target.'cfg(target_arch = "wasm32")'.dependencies.web-sys]
Expand All @@ -69,10 +69,10 @@ safer-ffi = { version = "0.1.0-rc1", features = ["proc_macros"] }
tokio = { version = "^1", features = ["full"] }

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
tempfile = "^3"
tempfile = { workspace = true }

[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
wasm-bindgen-test = "~0.3"
wasm-bindgen-test = { workspace = true }
witty-phrase-generator = "~0.2"
instant = { workspace = true, features = ["wasm-bindgen", "stdweb"] }
instant = { version = "0.1.12", features = ["wasm-bindgen"] }
gloo-timers = { workspace = true }

0 comments on commit 65da3d6

Please sign in to comment.