
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@immich/walkrs
Advanced tools
High-performance file tree walker for Node.js, built with Rust and the battle-tested ignore crate from ripgrep.
This project grew out of the need for fast and reliable external library scanning in Immich. Immich needed to scan very large photo libraries efficiently, often containing hundreds of thousands of files across complex directory structures.
By leveraging Rust's performance and the same ignore logic used in ripgrep (one of the fastest file search tools available), walkrs delivers exceptional speed and reliability for file tree traversal.
pnpm add @immich/walkrs
import { walk } from '@immich/walkrs';
// Simple usage - walk a directory
const files: string[] = [];
for await (const batch of walk({ paths: ['/path/to/scan'] })) {
files.push(...JSON.parse(batch));
}
// Advanced usage with filtering
const photos: string[] = [];
for await (const batch of walk({
paths: ['/photos', '/backup/photos'],
extensions: ['.jpg', '.png', '.heic', '.webp'],
exclusionPatterns: ['**/.stfolder/**'],
includeHidden: false,
})) {
photos.push(...JSON.parse(batch));
}
walkrs is designed to handle massive directory trees efficiently. It is greatly affected by multithreading: In benchmarks we have scanned 11M files in under 30 seconds over NFS on a machine with 32 CPU threads available. When restricting walkrs to a single thread, the time for the same task goes up to 208 seconds. Compare this with the single-threaded fast-glob based on nodejs which uses 360 seconds for the same task.
Since performance is critical, we provide dedicated benchmark scripts.
Before running benchmarks, you need to create benchmark datasets. This is a one-time setup that generates test directories with various file counts. Note: This can take several minutes to complete depending on your system.
pnpm run bench:setup
This creates datasets in the bench/datasets/ directory:
10 - 10 files100 - 100 files1k - 1,000 files10k - 10,000 files100k - 100,000 files1m - 1,000,000 files10m - 10,000,000 filesRun benchmarks against any dataset:
# Run with default settings on all datasets
pnpm run ts:bench
# Run on a specific dataset
pnpm run ts:bench 1m
# Run multiple datasets
pnpm run ts:bench 100 10k 1m
FAQs
Fast file tree walker for Node.js, built with ripgrep's ignore crate
We found that @immich/walkrs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.