Replace dirs and directories with maintained (#2949)

This commit is contained in:
Caden Haustein
2021-01-19 20:24:27 +00:00
committed by GitHub
parent 2e6d836dd1
commit 430da53f0b
11 changed files with 389 additions and 302 deletions

View File

@ -16,25 +16,29 @@ byte-unit = "4.0.9"
chrono = "0.4.15"
derive-new = "0.5.8"
directories = {version = "3.0.1", optional = true}
dirs = {version = "3.0.1", optional = true}
directories-next = { version = "2.0.0", optional = true }
dirs-next = { version = "2.0.0", optional = true }
getset = "0.1.1"
indexmap = {version = "1.6.0", features = ["serde-1"]}
indexmap = { version = "1.6.0", features = ["serde-1"] }
log = "0.4.11"
num-bigint = {version = "0.3.0", features = ["serde"]}
num-bigint = { version = "0.3.0", features = ["serde"] }
num-format = "0.4.0"
num-traits = "0.2.12"
parking_lot = "0.11.0"
query_interface = "0.3.5"
serde = {version = "1.0.115", features = ["derive"]}
serde = { version = "1.0.115", features = ["derive"] }
toml = "0.5.6"
nu-errors = {version = "0.25.2", path = "../nu-errors"}
nu-protocol = {version = "0.25.2", path = "../nu-protocol"}
nu-source = {version = "0.25.2", path = "../nu-source"}
nu-table = {version = "0.25.2", path = "../nu-table"}
nu-test-support = {version = "0.25.2", path = "../nu-test-support"}
nu-value-ext = {version = "0.25.2", path = "../nu-value-ext"}
nu-errors = { version = "0.25.2", path = "../nu-errors" }
nu-protocol = { version = "0.25.2", path = "../nu-protocol" }
nu-source = { version = "0.25.2", path = "../nu-source" }
nu-table = { version = "0.25.2", path = "../nu-table" }
nu-test-support = { version = "0.25.2", path = "../nu-test-support" }
nu-value-ext = { version = "0.25.2", path = "../nu-value-ext" }
[target.'cfg(unix)'.dependencies]
users = "0.10.0"
[features]
directories = ["directories-next"]
dirs = ["dirs-next"]

View File

@ -145,7 +145,7 @@ pub fn value_to_toml_value(v: &Value) -> Result<toml::Value, ShellError> {
#[cfg(feature = "directories")]
pub fn config_path() -> Result<PathBuf, ShellError> {
use directories::ProjectDirs;
use directories_next::ProjectDirs;
let dir = ProjectDirs::from("org", "nushell", "nu")
.ok_or_else(|| ShellError::untagged_runtime_error("Couldn't find project directory"))?;
@ -181,7 +181,7 @@ pub fn default_path_for(file: &Option<PathBuf>) -> Result<PathBuf, ShellError> {
#[cfg(feature = "directories")]
pub fn user_data() -> Result<PathBuf, ShellError> {
use directories::ProjectDirs;
use directories_next::ProjectDirs;
let dir = ProjectDirs::from("org", "nushell", "nu")
.ok_or_else(|| ShellError::untagged_runtime_error("Couldn't find project directory"))?;