-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Centralize fs usage. #8993
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
Centralize fs usage. #8993
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8993 +/- ##
==========================================
+ Coverage 57.45% 57.48% +0.02%
==========================================
Files 551 550 -1
Lines 29316 29301 -15
Branches 4447 4439 -8
==========================================
Hits 16844 16844
+ Misses 11533 11518 -15
Partials 939 939
Continue to review full report at Codecov.
|
a290ae0
to
ead41ef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🕐
@@ -54,6 +58,9 @@ export class FileSystem implements IFileSystem { | |||
public readFile(filePath: string): Promise<string> { | |||
return fs.readFile(filePath).then(buffer => buffer.toString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to call fs.readFile with a encoding option? I believe in the normal fs that returns a string. Then you don't need to do the conversion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that is just left over from the existing code. Regardless, I'll update it. 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5f846cb
to
683e42e
Compare
a521fe0
to
5080b06
Compare
(for #8995)
This is a partial un-revert of the recent FS changes. This change in particular only consolidates all FS-related operations to use of FileSystem objects.