Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate directory scanning packages #357

Open
rprieto opened this issue Dec 2, 2023 · 0 comments
Open

Consolidate directory scanning packages #357

rprieto opened this issue Dec 2, 2023 · 0 comments
Labels
enhancement New feature or functionality

Comments

@rprieto
Copy link
Member

rprieto commented Dec 2, 2023

Thumbsup uses 3 packages for reading the file system:

package used in usage complexity last package version
readdir-enhanced the main scanning logic complex glob patterns, ignore lists and optimisations 3 years ago
fs-readdir-recursive the cleanup routine simple (read all files) 6 years ago
glob integration tests simple (read all files) 2 months ago

We could consolidate to a single solution to reduce the number of dependencies. Glob is the only one of the 3 that seems actively maintained. It seems to support all the advanced features Thumbsup uses (filtering, early pruning, etc). We would need to carefully assess performance and memory usage.

Node.js also added recursive functionality to fs.readdirSync recently, but it requires a recent version (> 18.17) and doesn't offer all the required features. It could still be a replacement for the last 2 use cases once it's stabilized.

@rprieto rprieto added the enhancement New feature or functionality label Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or functionality
Projects
None yet
Development

No branches or pull requests

1 participant