Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
275 changes: 204 additions & 71 deletions Cargo.lock

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ future_not_send = "allow"
[workspace.dependencies]
allocator-api2 = { version = "0.2.21", default-features = false, features = ["alloc", "std"] }
anyhow = "1.0.98"
assert2 = "0.3.16"
assert2 = "0.4.0"
assertables = "9.8.1"
async-trait = "0.1.89"
base64 = "0.22.1"
Expand All @@ -64,7 +64,7 @@ cow-utils = "0.1.3"
cp_r = "0.5.2"
crossterm = { version = "0.29.0", features = ["event-stream"] }
csv-async = { version = "1.3.1", features = ["tokio"] }
ctor = "0.6"
ctor = "0.13"
ctrlc = "3.5.2"
derive_more = "2.0.1"
diff-struct = "0.5.3"
Expand All @@ -82,7 +82,7 @@ fspy_shared = { path = "crates/fspy_shared" }
fspy_shared_unix = { path = "crates/fspy_shared_unix" }
futures = "0.3.31"
futures-util = "0.3.31"
jsonc-parser = { version = "0.29.0", features = ["serde"] }
jsonc-parser = { version = "0.32.0", features = ["serde"] }
libc = "0.2.185"
libtest-mimic = "0.8.2"
memmap2 = "0.9.7"
Expand All @@ -100,7 +100,7 @@ notify = "8.0.0"
path-clean = "1.0.1"
pathdiff = "0.2.3"
petgraph = "0.8.2"
phf = { version = "0.11.3", features = ["macros"] }
phf = { version = "0.13.0", features = ["macros"] }
portable-pty = "0.9.0"
pretty_assertions = "1.4.1"
pty_terminal = { path = "crates/pty_terminal" }
Expand All @@ -110,14 +110,14 @@ ratatui = "0.30.0"
rayon = "1.10.0"
ref-cast = "1.0.24"
regex = "1.11.3"
rusqlite = "0.37.0"
rusqlite = "0.39.0"
rustc-hash = "2.1.1"
# SeccompAction::UserNotif (SECCOMP_RET_USER_NOTIF) was added after the latest published release (v0.5.0)
seccompiler = { git = "https://github.com/rust-vmm/seccompiler", rev = "08587106340b8e3cb361c7561411510039436857" }
serde = "1.0.219"
serde_json = "1.0.140"
serde_norway = "0.9.42"
sha2 = "0.10.9"
sha2 = "0.11.0"
shared_memory = "0.12.4"
shell-escape = "0.1.5"
similar = "2.7.0"
Expand All @@ -126,7 +126,7 @@ snapshot_test = { path = "crates/snapshot_test" }
stackalloc = "1.2.1"
subprocess_test = { path = "crates/subprocess_test" }
supports-color = "3.0.1"
syscalls = { version = "0.6.18", default-features = false }
syscalls = { version = "0.8.0", default-features = false }
tar = "0.4.45"
tempfile = "3.14.0"
test-log = { version = "0.2.18", features = ["trace"] }
Expand Down Expand Up @@ -159,7 +159,7 @@ wax = "0.7.0"
which = "8.0.0"
widestring = "1.2.0"
winapi = "0.3.9"
winsafe = { version = "0.0.24", features = ["kernel"] }
winsafe = { version = "0.0.27", features = ["kernel"] }
xxhash-rust = { version = "0.8.15", features = ["const_xxh3"] }
ntest = "0.9.5"
terminal_size = "0.4"
Expand Down
2 changes: 1 addition & 1 deletion crates/fspy_preload_unix/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ pub unsafe fn handle_open(path: impl ToAbsolutePath, mode: impl ToAccessMode) {
}

#[cfg(not(test))]
#[ctor::ctor]
#[ctor::ctor(unsafe)]
fn init_client() {
CLIENT.set(Client::from_env()).unwrap();
}
2 changes: 1 addition & 1 deletion crates/pty_terminal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ terminal_size = { workspace = true }

[target.'cfg(unix)'.dev-dependencies]
nix = { workspace = true }
signal-hook = "0.3"
signal-hook = "0.4"

[lints]
workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/subprocess_test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ macro_rules! command_for_fn {
assert_arg_type(&$arg, $f);

// Register an initializer that runs the provided function when the process is started
#[::ctor::ctor]
#[::ctor::ctor(unsafe)]
unsafe fn init() {
$crate::init_impl(ID, $f);
}
Expand Down
6 changes: 3 additions & 3 deletions crates/vite_path/src/absolute/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -402,17 +402,17 @@ mod tests {
fn strip_prefix_invalid_relative() {
use std::{ffi::OsStr, os::unix::ffi::OsStrExt};

use assert2::let_assert;
use assert2::assert;

let mut abs_path = b"/home/".to_vec();
abs_path.push(0xC0);
let abs_path = AbsolutePath::new(Path::new(OsStr::from_bytes(&abs_path))).unwrap();

let prefix = AbsolutePath::new(Path::new("/home")).unwrap();
let_assert!(Err(err) = abs_path.strip_prefix(prefix));
assert!(let Err(err) = abs_path.strip_prefix(prefix));

assert_eq!(err.stripped_path.as_os_str().as_bytes(), &[0xC0]);
let_assert!(InvalidPathDataError::NonUtf8 = err.invalid_path_data_error);
assert!(let InvalidPathDataError::NonUtf8 = err.invalid_path_data_error);
}

#[test]
Expand Down
22 changes: 11 additions & 11 deletions crates/vite_path/src/relative.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,14 +338,14 @@ mod tests {
#[cfg(windows)]
use std::os::windows::ffi::OsStringExt as _;

use assert2::let_assert;
use assert2::assert;

use super::*;

#[test]
fn non_relative() {
let_assert!(
Err(FromPathError::NonRelative) =
assert!(
let Err(FromPathError::NonRelative) =
RelativePathBuf::new(if cfg!(windows) { "C:\\Users" } else { "/home" })
);
}
Expand All @@ -356,8 +356,8 @@ mod tests {
use std::{ffi::OsStr, os::unix::ffi::OsStrExt as _};

let non_utf8_os_str = OsStr::from_bytes(&[0xC0]);
let_assert!(
Err(FromPathError::InvalidPathData(InvalidPathDataError::NonUtf8)) =
assert!(
let Err(FromPathError::InvalidPathData(InvalidPathDataError::NonUtf8)) =
RelativePathBuf::new(non_utf8_os_str),
);
}
Expand All @@ -368,25 +368,25 @@ mod tests {
use std::ffi::OsString;
// ill-formed UTF-16: X<high surrogate>Y
let non_utf8_path = OsString::from_wide(&[0x0058, 0xD800, 0x0059]);
let_assert!(
Err(FromPathError::InvalidPathData(InvalidPathDataError::NonUtf8)) =
assert!(
let Err(FromPathError::InvalidPathData(InvalidPathDataError::NonUtf8)) =
RelativePathBuf::new(non_utf8_path),
);
}

#[cfg(unix)]
#[test]
fn backslash_in_component() {
let_assert!(
Err(FromPathError::InvalidPathData(InvalidPathDataError::BackslashInComponent)) =
assert!(
let Err(FromPathError::InvalidPathData(InvalidPathDataError::BackslashInComponent)) =
RelativePathBuf::new("foo\\bar")
);
}

#[cfg(windows)]
#[test]
fn backslash_in_component() {
let_assert!(Ok(path) = RelativePathBuf::new("foo\\bar"));
assert!(let Ok(path) = RelativePathBuf::new("foo\\bar"));
assert_eq!(path.as_str(), "foo/bar");
}

Expand Down Expand Up @@ -453,7 +453,7 @@ mod tests {
#[test]
fn clean_malformed_drive_path() {
let rel_path = RelativePathBuf::new(r"foo\C:\bar").unwrap();
let_assert!(Err(FromPathError::NonRelative) = rel_path.clean());
assert!(let Err(FromPathError::NonRelative) = rel_path.clean());
}

#[test]
Expand Down
8 changes: 4 additions & 4 deletions crates/vite_task_bin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,12 @@ impl vite_task::loader::UserConfigLoader for JsonUserConfigLoader {
}
Err(err) => return Err(err.into()),
};
let json_value = jsonc_parser::parse_to_serde_value(
let json_value: Option<serde_json::Value> = jsonc_parser::parse_to_serde_value(
&config_content,
&jsonc_parser::ParseOptions::default(),
)?
.unwrap_or_default();
let user_config: vite_task::config::UserRunConfig = serde_json::from_value(json_value)?;
)?;
let user_config: vite_task::config::UserRunConfig =
serde_json::from_value(json_value.unwrap_or_default())?;
Ok(Some(user_config))
}
}
Expand Down
12 changes: 9 additions & 3 deletions crates/vite_task_plan/src/envs.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::{collections::BTreeMap, ffi::OsStr, mem::MaybeUninit, sync::Arc};
use std::{collections::BTreeMap, ffi::OsStr, fmt::Write as _, mem::MaybeUninit, sync::Arc};

use rustc_hash::FxHashMap;
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -140,11 +140,17 @@ impl EnvFingerprints {
let value: Arc<str> = if sensitive_patterns.is_match(name) {
let mut hasher = Sha256::new();
hasher.update(value.as_bytes());
let digest = hasher.finalize();
#[expect(
clippy::disallowed_macros,
clippy::disallowed_types,
reason = "result is converted to Arc<str>, not Str"
)]
format!("sha256:{:x}", hasher.finalize()).into()
let mut hex = std::string::String::with_capacity(7 + digest.len() * 2);
hex.push_str("sha256:");
for b in digest {
write!(&mut hex, "{b:02x}").unwrap();
}
hex.into()
} else {
value.into()
};
Expand Down
Loading