From 749e6dcbfc5526a592d3080bb1d18db2729ccbd9 Mon Sep 17 00:00:00 2001 From: Moritz Bischof Date: Mon, 27 Sep 2021 11:43:04 +0200 Subject: [PATCH] fix missing features --- example/Cargo.toml | 5 +++-- example/src/lib.rs | 2 ++ macros/Cargo.toml | 4 ++-- ts-rs/Cargo.toml | 7 ++++--- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/example/Cargo.toml b/example/Cargo.toml index b2e0056..4b6f58a 100644 --- a/example/Cargo.toml +++ b/example/Cargo.toml @@ -5,5 +5,6 @@ authors = ["Moritz Bischof "] edition = "2018" [dependencies] -ts-rs = { path = "../ts-rs" } -serde = { version = "1", features = ["derive"] } \ No newline at end of file +ts-rs = { path = "../ts-rs", features = ["serde-compat", "chrono-impl"] } +serde = { version = "1", features = ["derive"] } +chrono = { version = "0.4", features = ["serde"] } \ No newline at end of file diff --git a/example/src/lib.rs b/example/src/lib.rs index f7efda2..68fa3de 100644 --- a/example/src/lib.rs +++ b/example/src/lib.rs @@ -2,6 +2,7 @@ use serde::Serialize; use ts_rs::{export, TS}; +use chrono::NaiveDateTime; #[derive(Serialize, TS)] #[ts(rename_all = "lowercase")] @@ -28,6 +29,7 @@ struct User { role: Role, family: Vec, gender: Gender, + created_at: NaiveDateTime, } #[derive(Serialize, TS)] diff --git a/macros/Cargo.toml b/macros/Cargo.toml index 6cf1b80..fa877ec 100644 --- a/macros/Cargo.toml +++ b/macros/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ts-rs-macros" -version = "3.0.0" -authors = ["Moritz Bischof "] +version = "3.1.0" +authors = ["Moritz Bischof "] edition = "2018" description = "derive macro for ts-rs" license = "MIT" diff --git a/ts-rs/Cargo.toml b/ts-rs/Cargo.toml index 3a0461c..5027515 100644 --- a/ts-rs/Cargo.toml +++ b/ts-rs/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ts-rs" -version = "3.0.0" -authors = ["Moritz Bischof "] +version = "3.1.0" +authors = ["Moritz Bischof "] edition = "2018" license = "MIT" description = "generate typescript bindings from rust types" @@ -11,12 +11,13 @@ repository = "https://github.com/Aleph-Alpha/ts-rs" [features] chrono-impl = ["chrono"] bigdecimal-impl = ["bigdecimal"] +serde-compat = ["ts-rs-macros/serde-compat"] [dev-dependencies] serde = { version = "1.0", features = ["derive"] } [dependencies] -ts-rs-macros = { version = "3.0.0", path = "../macros", features = ["serde-compat"] } +ts-rs-macros = { version = "3.1.0", path = "../macros" } dprint-plugin-typescript = { version = "0.43" } chrono = { version = "0.4.19", optional = true } bigdecimal = {version = "0.1.2", features=["serde"], optional = true} \ No newline at end of file