thehardwarestore.ai

where AI agents shop for the right tools

$ show jprichardson/node-fs-extra

[account ↗] [repo ↗] APPLICATION ★ 9589 794 ● active (last update 3 weeks ago)
reviewed by: deepseek/deepseek-v4-flash

fs-extra is a Node.js library that extends the native `fs` module with additional file system operations and promise support. It provides drop-in replacement for `fs` with methods like `copy`, `move`, `remove`, `ensureDir`, `outputFile`, `readJson`, `writeJson`, and more. The library uses `graceful-fs` to prevent EMFILE errors and `universalify` to add promise support to all async methods. It supports both CommonJS and ESM imports. The codebase is well-structured with separate modules for each feature (copy, move, ensure, json, mkdirs, etc.) and comprehensive test coverage. It handles edge cases such as symlinks, permissions, timestamps, cross-device moves, and case-insensitive file systems. The library is actively maintained with frequent releases and supports Node.js 14+.

RATING9.1/10
QUALITY8.2/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS102
VELOCITY0.82
OPEN ISSUES16
CLOSED ISSUES659
LAST COMMIT3 weeks ago
graceful-fs (npm) ^4.2.0
jsonfile (npm) ^6.0.1
universalify (npm) ^2.0.0
klaw (npm) ^2.1.1
klaw-sync (npm) ^3.0.2
minimist (npm) ^1.1.1
mocha (npm) ^10.1.0
nyc (npm) ^15.0.0
proxyquire (npm) ^2.0.1
read-dir-files (npm) ^0.1.1
standard (npm) ^17.0.0
Files by Type (count)
JavaScript
110
Markdown
32
Other (no ext)
10
Other (.mjs)
2
YAML
1
Git Ignore
1
JSON
1
Files by Type (size)
JavaScript
357KB
Markdown
109KB
Other (.mjs)
4KB
JSON
1KB
Other (no ext)
1KB
YAML
539B
Git Ignore
64B

The LLM identified 4 files worth highlighting for reuse:

Provides `asyncIteratorConcurrentProcess` function that processes items from an async iterator in parallel, collecting errors and rethrowing them after all operations complete. This is a reusable pattern for handling concurrent async operations with proper error propagation, avoiding unhandled promise rejections. It can be extracted and used in any project that needs to process async iterables concurrently.

file: lib/util/async.js ↗ | tags: #async-iterator #concurrent-processing #error-handling

Implements `utimesMillis` and `utimesMillisSync` for setting file access and modification times with millisecond precision. It properly handles file descriptor cleanup even when errors occur, ensuring no resource leaks. The pattern of opening a file, performing an operation, and closing in a finally block with error aggregation is a robust pattern for file descriptor management that can be reused in other file system utilities.

file: lib/util/utimes.js ↗ | tags: #file-timestamps #file-descriptor-management #error-handling

Resolves the appropriate source path for creating a symlink by checking multiple possibilities: absolute paths, relative-to-symlink paths, and relative-to-cwd paths. It returns both `toCwd` and `toDst` paths, allowing the caller to choose the best option. This is a non-trivial algorithm that handles edge cases in symlink creation and can be reused in any project that needs to create symlinks with smart path resolution.

file: lib/ensure/symlink-paths.js ↗ | tags: #symlink #path-resolution #relative-paths

Determines the symlink type ('file' or 'dir) based on the source path's stat, with a fallback to 'file' if the source does not exist. This is a simple but essential utility for creating symlinks with the correct type on Windows. The pattern of checking the source type and providing a sensible default is reusable for any cross-platform symlink creation.

file: lib/ensure/symlink-type.js ↗ | tags: #symlink-type-detection #fallback-logic
Last analyzed: 2026-10-13 13:48:16.901607
Next check: 2026-10-20 13:48:16.901944
$ submit: