Created by: halfzebra
Why
path-exists was originally created to support the semantics of deprecated fs.exists which is used to check if given path exists in the file system asynchronously.
Because fs.exists() is being deprecated, but there's still a genuine use-case of being able to check if a path exists for other purposes than doing IO with it.
In Create React App all of the uses of path-exists are synchronuous.
The original fs.existsSync is not deprecated, which makes path-exists obsolete for synchronuous checks.
Note that fs.exists() is deprecated, but fs.existsSync() is not. (The callback parameter to fs.exists() accepts parameters that are inconsistent with other Node.js callbacks. fs.existsSync() does not use a callback.)
What
This PR removes path-exists from Create React App and replaces all the uses of pathExists.sync
with fs.existsSync