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

make globbing use FileSystem abstraction #414

Open
ajafff opened this issue Sep 10, 2018 · 0 comments · May be fixed by #418
Open

make globbing use FileSystem abstraction #414

ajafff opened this issue Sep 10, 2018 · 0 comments · May be fixed by #418

Comments

@ajafff
Copy link
Member

ajafff commented Sep 10, 2018

The API allows overriding file system operations by injecting a different implementation of FileSystem. That allows for in-memory file systems and similar concepts.

The only thing that uses Node's fs module directly is glob. This is only used if you don't lint a project, but still it's very inconsistent. This inconsistency also causes duplicate file system operations by using a separate cache.

One possibility is to provide a Proxy for the certain cache options of glob. Behind the scenes this proxy does the file system access and caching using CachedFileSystem. If glob finds a value in the cache, it doesn't try to access the real file system.

@ajafff ajafff linked a pull request Sep 12, 2018 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant