Skip to content

refactor: replace fs.existsSync#509

Merged
ariporad merged 2 commits intomasterfrom
refactor-fs-exists
Aug 21, 2016
Merged

refactor: replace fs.existsSync#509
ariporad merged 2 commits intomasterfrom
refactor-fs-exists

Conversation

@nfischer
Copy link
Copy Markdown
Member

Because fs.existsSync is deprecated. This internally uses fs.statSync() instead, wrapped in a try-catch.

@ariporad
Copy link
Copy Markdown
Contributor

LGTM!

@ariporad ariporad merged commit ab8cf5a into master Aug 21, 2016
@ariporad ariporad deleted the refactor-fs-exists branch August 21, 2016 01:28
@gyandeeps
Copy link
Copy Markdown
Contributor

fs.existsSync is undeprecated now. 😸

@nfischer
Copy link
Copy Markdown
Member Author

Huzzah! This comment confirms this. Thanks for pointing this out. In that case, we should eventually revert this PR and use the core API again.

It may be worth it to look over where this is used in our code and see if we're falling into any anti-patterns (like checking for a file before reading from it, instead of just reading and catching the exception).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants