Skip to content

Commit 249c83b

Browse files
chore(deps): bump the minor-and-patch group with 2 updates (#560)
Bumps the minor-and-patch group with 2 updates: [flate2](https://github.com/rust-lang/flate2-rs) and [napi](https://github.com/napi-rs/napi-rs). Updates `flate2` from 1.1.9 to 1.1.10 - [Release notes](https://github.com/rust-lang/flate2-rs/releases) - [Commits](rust-lang/flate2-rs@1.1.9...1.1.10) Updates `napi` from 3.12.1 to 3.12.2 - [Release notes](https://github.com/napi-rs/napi-rs/releases) - [Commits](napi-rs/napi-rs@napi-v3.12.1...napi-v3.12.2) --- updated-dependencies: - dependency-name: flate2 dependency-version: 1.1.10 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: napi dependency-version: 3.12.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 044ed44 commit 249c83b

34 files changed

Lines changed: 316 additions & 224 deletions

Cargo.lock

Lines changed: 15 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/exarch-cli/src/commands/create.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,8 @@ mod tests {
214214
assert!(formatter.was_called());
215215
}
216216

217-
// Human formatter with quiet=true must suppress output — SpyFormatter mirrors
218-
// HumanFormatter behavior.
217+
// Human formatter with quiet=true must suppress output — SpyFormatter
218+
// mirrors HumanFormatter behavior.
219219
#[test]
220220
fn human_formatter_suppresses_when_quiet() {
221221
let tmp = tempfile::tempdir().unwrap();

crates/exarch-cli/src/commands/extract.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,8 @@ mod tests {
993993
if !target.join("payload.txt").exists() {
994994
// DAC permission checks don't apply to root, so the restriction
995995
// above did nothing and cleanup genuinely succeeded — same
996-
// root-skip reasoning as `parent_without_read_permission_is_rejected`
996+
// root-skip reasoning as
997+
// `parent_without_read_permission_is_rejected`
997998
// in `atomic_swap.rs`.
998999
eprintln!(
9991000
"skipping: permission-restricted removal unexpectedly succeeded (running as \

crates/exarch-cli/src/error.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,9 @@ mod tests {
401401
);
402402
}
403403

404-
// Regression tests for issue #204: PartialExtraction wrapping HardlinkEscape /
405-
// SymlinkEscape must not repeat the inner error text more than once.
404+
// Regression tests for issue #204: PartialExtraction wrapping
405+
// HardlinkEscape / SymlinkEscape must not repeat the inner error text
406+
// more than once.
406407

407408
#[test]
408409
fn test_partial_hardlink_escape_inner_text_appears_once() {
@@ -434,8 +435,8 @@ mod tests {
434435
);
435436
}
436437

437-
// Regression tests for issue #295: four explicit arms must produce actionable
438-
// messages.
438+
// Regression tests for issue #295: four explicit arms must produce
439+
// actionable messages.
439440

440441
#[test]
441442
fn test_output_exists_contains_path_and_hint() {

crates/exarch-cli/src/output/json.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -427,8 +427,8 @@ mod tests {
427427

428428
#[test]
429429
fn test_format_error_downcasts_extraction_error() {
430-
// Verify that format_error correctly resolves the kind from an anyhow chain
431-
// containing an ArchiveError.
430+
// Verify that format_error correctly resolves the kind from an anyhow
431+
// chain containing an ArchiveError.
432432
let extraction_err = ArchiveError::ZipBomb {
433433
compressed: 100,
434434
uncompressed: 100_000,
@@ -447,8 +447,8 @@ mod tests {
447447

448448
#[test]
449449
fn test_format_error_unknown_error_uses_generic_kind() {
450-
// A plain anyhow error with no ArchiveError in chain should use "Error" as
451-
// kind
450+
// A plain anyhow error with no ArchiveError in chain should use "Error"
451+
// as kind
452452
let anyhow_err = anyhow::anyhow!("something went wrong");
453453

454454
let kind = anyhow_err
@@ -459,8 +459,8 @@ mod tests {
459459
assert_eq!(kind, "Error");
460460
}
461461

462-
// Regression tests for issue #192: JSON error message must not duplicate text
463-
// that ArchiveError::Display already emits.
462+
// Regression tests for issue #192: JSON error message must not duplicate
463+
// text that ArchiveError::Display already emits.
464464

465465
#[test]
466466
fn test_json_message_quota_exceeded_no_duplication() {

crates/exarch-core/src/api.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -930,8 +930,8 @@ mod tests {
930930
let parent = tempfile::TempDir::new().unwrap();
931931
let output_dir = parent.path().join("extracted");
932932
std::fs::create_dir_all(&output_dir).unwrap();
933-
// Create a file in output_dir so it's non-empty (rename over non-empty dir
934-
// fails on most OSes)
933+
// Create a file in output_dir so it's non-empty (rename over non-empty
934+
// dir fails on most OSes)
935935
std::fs::write(output_dir.join("existing.txt"), b"old content").unwrap();
936936

937937
let archive_dir = tempfile::TempDir::new().unwrap();
@@ -951,7 +951,8 @@ mod tests {
951951
&options,
952952
);
953953

954-
// Should fail with OutputExists or Io (platform dependent rename semantics)
954+
// Should fail with OutputExists or Io (platform dependent rename
955+
// semantics)
955956
assert!(result.is_err());
956957
// Output dir must still have old content (not corrupted)
957958
assert!(output_dir.join("existing.txt").exists());
@@ -1349,7 +1350,8 @@ mod tests {
13491350
)
13501351
.unwrap();
13511352

1352-
// The hardlink copies the file content — bytes should be reported twice.
1353+
// The hardlink copies the file content — bytes should be reported
1354+
// twice.
13531355
let expected = (content.len() as u64) * 2;
13541356
assert_eq!(
13551357
progress.total, expected,

crates/exarch-core/src/config.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,8 @@ mod tests {
960960
fn test_config_default_security_flags() {
961961
let config = SecurityConfig::default();
962962

963-
// All security-sensitive flags should be false by default (deny-by-default)
963+
// All security-sensitive flags should be false by default
964+
// (deny-by-default)
964965
assert!(
965966
!config.allowed.symlinks,
966967
"symlinks should be denied by default"

crates/exarch-core/src/creation/tar.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,8 @@ mod tests {
940940
create_tar_internal_with_progress(encoder, &[source_dir.path()], &config, &mut noop);
941941

942942
// Either the internal write or encoder.finish() must surface an error.
943-
// We call finish() only if internal succeeded, mirroring the real code path.
943+
// We call finish() only if internal succeeded, mirroring the real code
944+
// path.
944945
let is_err = match result {
945946
Err(_) => true,
946947
Ok((_, enc)) => enc.finish().is_err(),

crates/exarch-core/src/creation/walker.rs

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -227,26 +227,29 @@ pub fn collect_entries<P: AsRef<Path>, State>(
227227
for source in sources {
228228
let path = source.as_ref();
229229

230-
// `symlink_metadata` (lstat) is required here instead of `exists`/`metadata`
231-
// (stat) so that a dangling symlink (target missing) is still treated as a
232-
// present source; it is later classified as EntryType::Symlink below. The
233-
// result is reused in the single-file branch to avoid a second lstat.
230+
// `symlink_metadata` (lstat) is required here instead of
231+
// `exists`/`metadata` (stat) so that a dangling symlink (target
232+
// missing) is still treated as a present source; it is later
233+
// classified as EntryType::Symlink below. The result is reused
234+
// in the single-file branch to avoid a second lstat.
234235
let Ok(metadata) = path.symlink_metadata() else {
235236
return Err(ArchiveError::SourceNotFound {
236237
path: path.to_path_buf(),
237238
});
238239
};
239240

240-
// `metadata.is_dir()` (from the lstat above) is required here instead of
241-
// `path.is_dir()` (stat, follows symlinks), so that a symlink pointing at a
242-
// directory is not routed into `FilteredWalker`/`WalkDir` by default —
243-
// `WalkDir` always dereferences its root regardless of `follow_links(false)`
244-
// and would produce an empty relative path for the root entry. Such a symlink
245-
// is instead classified as `EntryType::Symlink` in the branch below,
246-
// consistent with the symlink-to-file case. When `follow_symlinks` is
247-
// explicitly enabled, though, the symlink must still be walked as a directory
248-
// (via `path.is_dir()`, stat) to preserve the pre-existing dereferencing
249-
// behavior for that config — otherwise the single-entry branch would try to
241+
// `metadata.is_dir()` (from the lstat above) is required here instead
242+
// of `path.is_dir()` (stat, follows symlinks), so that a
243+
// symlink pointing at a directory is not routed into
244+
// `FilteredWalker`/`WalkDir` by default — `WalkDir` always
245+
// dereferences its root regardless of `follow_links(false)` and
246+
// would produce an empty relative path for the root entry. Such a
247+
// symlink is instead classified as `EntryType::Symlink` in the
248+
// branch below, consistent with the symlink-to-file case. When
249+
// `follow_symlinks` is explicitly enabled, though, the symlink
250+
// must still be walked as a directory (via `path.is_dir()`,
251+
// stat) to preserve the pre-existing dereferencing behavior for
252+
// that config — otherwise the single-entry branch would try to
250253
// open the symlink as a regular file and fail with an I/O error.
251254
if metadata.is_dir() || (config.follow_symlinks && path.is_dir()) {
252255
let walker = FilteredWalker::new(path, config);
@@ -255,11 +258,13 @@ pub fn collect_entries<P: AsRef<Path>, State>(
255258
}
256259
} else {
257260
// For single files, we need to create a FilteredEntry manually.
258-
// `symlink_metadata` (lstat) is required here instead of `metadata` (stat)
259-
// so that a symlink passed directly as a top-level source is classified as
260-
// EntryType::Symlink rather than silently dereferenced into its target.
261-
// `metadata.is_dir()` can no longer be true here (that case is routed to
262-
// the walk branch above), so only `File` and `Symlink` remain.
261+
// `symlink_metadata` (lstat) is required here instead of `metadata`
262+
// (stat) so that a symlink passed directly as a
263+
// top-level source is classified as EntryType::Symlink
264+
// rather than silently dereferenced into its target.
265+
// `metadata.is_dir()` can no longer be true here (that case is
266+
// routed to the walk branch above), so only `File` and
267+
// `Symlink` remain.
263268
let size = if metadata.is_file() {
264269
metadata.len()
265270
} else {
@@ -336,7 +341,8 @@ mod tests {
336341
let walker = FilteredWalker::new(root, &config);
337342
let entries: Vec<_> = walker.walk().collect::<Result<Vec<_>>>().unwrap();
338343

339-
// Should find exactly: root dir, file1, file2, subdir, file3 = 5 entries
344+
// Should find exactly: root dir, file1, file2, subdir, file3 = 5
345+
// entries
340346
assert_eq!(entries.len(), 5, "expected exactly 5 entries");
341347

342348
let paths: Vec<_> = entries
@@ -657,8 +663,8 @@ mod tests {
657663

658664
let entries = collect_entries(&sources, &config).unwrap();
659665

660-
// Should have: single_file.txt (1) + dir1 entries (2 files + 1 dir = 3) + dir2
661-
// entries (1 file + 1 dir = 2) = 6 total
666+
// Should have: single_file.txt (1) + dir1 entries (2 files + 1 dir = 3)
667+
// + dir2 entries (1 file + 1 dir = 2) = 6 total
662668
assert!(
663669
entries.len() >= 5,
664670
"Expected at least 5 entries (files and dirs), got {}",
@@ -699,8 +705,8 @@ mod tests {
699705

700706
let entries = collect_entries(&sources, &config).unwrap();
701707

702-
// Should have: 50 files in root + 1 subdir + 1 root dir + 30 files in subdir =
703-
// 82
708+
// Should have: 50 files in root + 1 subdir + 1 root dir + 30 files in
709+
// subdir = 82
704710
assert!(
705711
entries.len() >= 80,
706712
"Expected at least 80 entries, got {}",

crates/exarch-core/src/creation/zip.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,9 @@ fn create_zip_internal_with_progress<W: Write + Seek, P: AsRef<Path>>(
158158
let start = std::time::Instant::now();
159159

160160
// Configure ZIP file options with compression level. `compression_level`
161-
// is guaranteed to be `None` or `Some(1..=9)` by `CreationConfig::validate`,
162-
// so `Stored` (level 0) is unreachable through the public API.
161+
// is guaranteed to be `None` or `Some(1..=9)` by
162+
// `CreationConfig::validate`, so `Stored` (level 0) is unreachable
163+
// through the public API.
163164
let level = config.compression_level.unwrap_or(6);
164165
let options = SimpleFileOptions::default()
165166
.compression_method(CompressionMethod::Deflated)
@@ -191,7 +192,8 @@ fn create_zip_internal_with_progress<W: Write + Seek, P: AsRef<Path>>(
191192
}
192193
EntryType::Directory => {
193194
tracker.on_entry_start(&entry.archive_path);
194-
// Skip root directory entry (empty path becomes "/" which is invalid)
195+
// Skip root directory entry (empty path becomes "/" which is
196+
// invalid)
195197
if !entry.archive_path.as_os_str().is_empty() {
196198
let dir_path = format!("{}/", normalize_zip_path(&entry.archive_path)?);
197199
zip.add_directory(&dir_path, options).map_err(|e| {
@@ -415,8 +417,8 @@ mod tests {
415417

416418
// Should have exactly 3 files: file1.txt, file2.txt, subdir/file3.txt
417419
assert_eq!(report.files_added, 3);
418-
// Should have exactly 1 directory: subdir (root is omitted — empty archive path
419-
// is invalid in ZIP)
420+
// Should have exactly 1 directory: subdir (root is omitted — empty
421+
// archive path is invalid in ZIP)
420422
assert_eq!(report.directories_added, 1);
421423
assert!(output.exists());
422424
}
@@ -787,7 +789,8 @@ mod tests {
787789

788790
let report = create_zip(&output, &[source_dir.path()], &config).unwrap();
789791

790-
// Both target.txt and the followed link.txt must be written as regular entries.
792+
// Both target.txt and the followed link.txt must be written as regular
793+
// entries.
791794
assert_eq!(report.files_added, 2);
792795
assert_eq!(report.files_skipped, 0);
793796
assert!(!report.has_warnings());

0 commit comments

Comments
 (0)