Skip to content

Consider replacing fs calls with a lib that deals with OS specific edge cases. #5554

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

Closed
rally25rs opened this issue Mar 21, 2018 · 2 comments
Assignees
Labels
cat-feature fixed-in-modern This issue has been fixed / implemented in Yarn 2+. needs-discussion

Comments

@rally25rs
Copy link
Contributor

There is a fair amount of code in fs.js (or fs-normalized.js once #5470 is accepted) that deals with oddities in case sensitive, timestamp preservation, file access differences across OSs and Node versions.

We should explore simplifying this by using a 3rd party library instead.
Perhaps https://github.com/jprichardson/node-fs-extra
which seems to do checks for the existance of fs.copyFile and timestamp normalization.

Need to evaluate performance on several OS's (OSX, Win, Linux) and node versions (pre and post 8.5.0)

@arcanis
Copy link
Member

arcanis commented Mar 22, 2018

Yep I'd support that. Once advantage of fs-extra is that it automatically wraps everything to return promises, which would allow us to remove at least this part of fs.

@paul-soporan
Copy link
Member

Closing this as we now use @yarnpkg/fslib in the v2 that handles everything in a type-safe way.

@paul-soporan paul-soporan added the fixed-in-modern This issue has been fixed / implemented in Yarn 2+. label Jan 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat-feature fixed-in-modern This issue has been fixed / implemented in Yarn 2+. needs-discussion
Projects
None yet
Development

No branches or pull requests

3 participants