1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 07:14:47 -05:00

chore: use deno_whoami (#21027)

Towards #20996 

`deno_whoami` is lightweight on unix and has zero framework dependency
on macOS. https://github.com/denoland/deno_whoami

---------

Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
This commit is contained in:
Divy Srivastava 2023-10-31 05:38:39 -07:00 committed by GitHub
parent ba6bd444b6
commit edee8ab95d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 3 deletions

12
Cargo.lock generated
View file

@ -1527,6 +1527,7 @@ dependencies = [
"deno_fs",
"deno_media_type",
"deno_net",
"deno_whoami",
"digest 0.10.7",
"dsa",
"ecb",
@ -1568,7 +1569,6 @@ dependencies = [
"tokio",
"typenum",
"url",
"whoami",
"winapi",
"x25519-dalek",
"x509-parser",
@ -1794,6 +1794,16 @@ dependencies = [
"serde",
]
[[package]]
name = "deno_whoami"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e75e4caa92b98a27f09c671d1399aee0f5970aa491b9a598523aac000a2192e3"
dependencies = [
"libc",
"whoami",
]
[[package]]
name = "denokv_proto"
version = "0.2.1"

View file

@ -25,6 +25,7 @@ deno_fetch.workspace = true
deno_fs.workspace = true
deno_media_type.workspace = true
deno_net.workspace = true
deno_whoami = "0.1.0"
digest = { version = "0.10.5", features = ["core-api", "std"] }
dsa = "0.6.1"
ecb.workspace = true
@ -66,7 +67,6 @@ signature.workspace = true
tokio.workspace = true
typenum = "1.15.0"
url.workspace = true
whoami = "1.4.0"
winapi.workspace = true
# https://github.com/dalek-cryptography/x25519-dalek/pull/89
x25519-dalek = "2.0.0-pre.1"

View file

@ -49,7 +49,7 @@ where
permissions.check_sys("userInfo", "node:os.userInfo()")?;
}
Ok(whoami::username())
Ok(deno_whoami::username())
}
#[cfg(unix)]