From 42d5ab08a6bfb3b3e11f26a3e8df9cca5b0147e1 Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Mon, 31 Jul 2023 12:22:44 +0800 Subject: [PATCH] Replace `dotenv` with `dotenvy` --- Cargo.toml | 2 +- examples/seaography_example/graphql/Cargo.toml | 2 +- examples/seaography_example/graphql/src/main.rs | 2 +- issues/1599/graphql/Cargo.toml | 2 +- issues/1599/graphql/src/main.rs | 2 +- tests/basic.rs | 4 ++-- tests/common/mod.rs | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e4d5b74aa..747cdce3c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -61,7 +61,7 @@ time = { version = "0.3", features = ["macros"] } uuid = { version = "1", features = ["v4"] } once_cell = "1.8" arraystring = "0.3" -dotenv = "0.15" +dotenvy = "0.15" [features] debug-print = [] diff --git a/examples/seaography_example/graphql/Cargo.toml b/examples/seaography_example/graphql/Cargo.toml index 4a9da62c3..9cc76d3ce 100644 --- a/examples/seaography_example/graphql/Cargo.toml +++ b/examples/seaography_example/graphql/Cargo.toml @@ -9,7 +9,7 @@ poem = { version = "1.3.56" } async-graphql-poem = { version = "5.0.10" } async-graphql = { version = "5.0.10", features = ["decimal", "chrono", "dataloader", "dynamic-schema"] } async-trait = { version = "0.1.72" } -dotenv = "0.15.0" +dotenvy = "0.15.0" sea-orm = { version = "0.12.0", features = ["sqlx-mysql", "runtime-async-std-native-tls", "seaography"] } tokio = { version = "1.29.1", features = ["macros", "rt-multi-thread"] } tracing = { version = "0.1.37" } diff --git a/examples/seaography_example/graphql/src/main.rs b/examples/seaography_example/graphql/src/main.rs index 6ddab6890..aa438b811 100644 --- a/examples/seaography_example/graphql/src/main.rs +++ b/examples/seaography_example/graphql/src/main.rs @@ -3,7 +3,7 @@ use async_graphql::{ http::{playground_source, GraphQLPlaygroundConfig}, }; use async_graphql_poem::GraphQL; -use dotenv::dotenv; +use dotenvy::dotenv; use lazy_static::lazy_static; use poem::{get, handler, listener::TcpListener, web::Html, IntoResponse, Route, Server}; use sea_orm::Database; diff --git a/issues/1599/graphql/Cargo.toml b/issues/1599/graphql/Cargo.toml index 465d0924f..cac60832c 100644 --- a/issues/1599/graphql/Cargo.toml +++ b/issues/1599/graphql/Cargo.toml @@ -9,7 +9,7 @@ poem = { version = "1.3.55" } async-graphql-poem = { version = "5.0.6" } async-graphql = { version = "5.0.6", features = ["decimal", "chrono", "dataloader", "dynamic-schema"] } async-trait = { version = "0.1.64" } -dotenv = "0.15.0" +dotenvy = "0.15.0" tokio = { version = "1.26.0", features = ["macros", "rt-multi-thread"] } tracing = { version = "0.1.37" } tracing-subscriber = { version = "0.3.16" } diff --git a/issues/1599/graphql/src/main.rs b/issues/1599/graphql/src/main.rs index 897ca83c8..956bd5fe9 100644 --- a/issues/1599/graphql/src/main.rs +++ b/issues/1599/graphql/src/main.rs @@ -3,7 +3,7 @@ use async_graphql::{ http::{playground_source, GraphQLPlaygroundConfig}, }; use async_graphql_poem::GraphQL; -use dotenv::dotenv; +use dotenvy::dotenv; use lazy_static::lazy_static; use poem::{get, handler, listener::TcpListener, web::Html, IntoResponse, Route, Server}; use sea_orm::{prelude::*, Database}; diff --git a/tests/basic.rs b/tests/basic.rs index 54a9f47c0..89e26b2d5 100644 --- a/tests/basic.rs +++ b/tests/basic.rs @@ -8,8 +8,8 @@ pub use sea_orm::{entity::*, error::*, query::*, sea_query, tests_cfg::*, Databa #[sea_orm_macros::test] #[cfg(feature = "sqlx-sqlite")] async fn main() -> Result<(), DbErr> { - dotenv::from_filename(".env.local").ok(); - dotenv::from_filename(".env").ok(); + dotenvy::from_filename(".env.local").ok(); + dotenvy::from_filename(".env").ok(); let base_url = std::env::var("DATABASE_URL").unwrap_or_else(|_| "sqlite::memory:".to_owned()); diff --git a/tests/common/mod.rs b/tests/common/mod.rs index 359bc9dbd..e4aaffc5e 100644 --- a/tests/common/mod.rs +++ b/tests/common/mod.rs @@ -13,8 +13,8 @@ pub struct TestContext { impl TestContext { pub async fn new(test_name: &str) -> Self { - dotenv::from_filename(".env.local").ok(); - dotenv::from_filename(".env").ok(); + dotenvy::from_filename(".env.local").ok(); + dotenvy::from_filename(".env").ok(); let base_url = std::env::var("DATABASE_URL").expect("Enviroment variable 'DATABASE_URL' not set");