diff --git a/Cargo.lock b/Cargo.lock index 50bee330..584f1be3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -424,9 +424,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "joinery" @@ -559,9 +559,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.18" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "same-file" @@ -594,9 +594,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.132" +version = "1.0.143" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" +checksum = "d401abef1d108fbd9cbaebc3e46611f4b1021f714a0597a71f41ee463f5f4a5a" dependencies = [ "itoa", "memchr", @@ -705,12 +705,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc842091f2def52017664b53082ecbbeb5c7731092bad69d2c63050401dfd64" -[[package]] -name = "topological-sort" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea68304e134ecd095ac6c3574494fc62b909f416c4fca77e440530221e549d3d" - [[package]] name = "typeshare" version = "1.0.4" @@ -740,7 +734,6 @@ dependencies = [ "flexi_logger", "ignore", "log", - "once_cell", "serde", "toml", "typeshare-core", @@ -759,12 +752,10 @@ dependencies = [ "joinery", "lazy_format", "log", - "once_cell", "proc-macro2", "quote", "syn", "thiserror", - "topological-sort", ] [[package]] diff --git a/cli/Cargo.toml b/cli/Cargo.toml index e8295234..de166dbd 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -23,7 +23,6 @@ clap = { version = "4.5", features = [ "wrap_help", ] } ignore = "0.4" -once_cell = "1" serde = { version = "1", features = ["derive"] } toml = "0.9" typeshare-core = { path = "../core", version = "=1.13.3" } diff --git a/core/Cargo.toml b/core/Cargo.toml index eef74bf9..0759b9cb 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -14,14 +14,12 @@ thiserror = "2" itertools = "0.14" lazy_format = "2" joinery = "3.1" -topological-sort = { version = "0.2.2" } convert_case = { version = "0.8" } log.workspace = true -flexi_logger.workspace = true [dev-dependencies] +flexi_logger.workspace = true expect-test = "1.5" -once_cell = "1" cool_asserts = "2" syn = { version = "2", features = ["full", "visit", "extra-traits"] } anyhow = "1" diff --git a/core/tests/snapshot_tests.rs b/core/tests/snapshot_tests.rs index 521cd664..eccd73ac 100644 --- a/core/tests/snapshot_tests.rs +++ b/core/tests/snapshot_tests.rs @@ -2,13 +2,12 @@ use anyhow::anyhow; use anyhow::Context; use flexi_logger::DeferredNow; use log::Record; -use once_cell::sync::Lazy; use std::{ collections::{BTreeMap, HashMap}, fs::{self, OpenOptions}, io::{Read, Write}, path::{Path, PathBuf}, - sync::Once, + sync::{LazyLock, Once}, }; use typeshare_core::{ context::{ParseContext, ParseFileContext}, @@ -16,8 +15,8 @@ use typeshare_core::{ reconcile::reconcile_aliases, }; -static TESTS_FOLDER_PATH: Lazy = - Lazy::new(|| PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("data/tests")); +static TESTS_FOLDER_PATH: LazyLock = + LazyLock::new(|| PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("data/tests")); static INIT: Once = Once::new(); @@ -414,28 +413,28 @@ macro_rules! tests { )*}; } -static KOTLIN_MAPPINGS: Lazy> = Lazy::new(|| { +static KOTLIN_MAPPINGS: LazyLock> = LazyLock::new(|| { [("Url", "String"), ("DateTime", "String")] .iter() .map(|(k, v)| (k.to_string(), v.to_string())) .collect() }); -static SCALA_MAPPINGS: Lazy> = Lazy::new(|| { +static SCALA_MAPPINGS: LazyLock> = LazyLock::new(|| { [("Url", "String"), ("DateTime", "String")] .iter() .map(|(k, v)| (k.to_string(), v.to_string())) .collect() }); -static SWIFT_MAPPINGS: Lazy> = Lazy::new(|| { +static SWIFT_MAPPINGS: LazyLock> = LazyLock::new(|| { [("Url", "String"), ("DateTime", "Date")] .iter() .map(|(k, v)| (k.to_string(), v.to_string())) .collect() }); -static TYPESCRIPT_MAPPINGS: Lazy> = Lazy::new(|| { +static TYPESCRIPT_MAPPINGS: LazyLock> = LazyLock::new(|| { [ ("Url", "string"), ("DateTime", "string"), @@ -446,7 +445,7 @@ static TYPESCRIPT_MAPPINGS: Lazy> = Lazy::new(|| { .collect() }); -static GO_MAPPINGS: Lazy> = Lazy::new(|| { +static GO_MAPPINGS: LazyLock> = LazyLock::new(|| { [ ("Url", "string"), ("DateTime", "string"), @@ -457,7 +456,7 @@ static GO_MAPPINGS: Lazy> = Lazy::new(|| { .collect() }); -static PYTHON_MAPPINGS: Lazy> = Lazy::new(|| { +static PYTHON_MAPPINGS: LazyLock> = LazyLock::new(|| { [ ("Url", "AnyUrl"), ("DateTime", "datetime"), diff --git a/lib/Cargo.toml b/lib/Cargo.toml index 25a87ec9..4750f36e 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -13,9 +13,11 @@ chrono = { version = "0.4", default-features = false, features = [ "std", ] } serde = { version = "1", features = ["derive"] } -serde_json = "1" typeshare-annotation = { path = "../annotation", version = "1.0.4" } +[dev-dependencies] +serde_json = "1" + [features] default = ["wasmbind"] wasmbind = ["chrono/wasmbind"]