Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid writing to output files when no changes (#6550)
* fix(cli): avoid write same output when no changes * generalize outputFile This function will check a cache, it will only write the file if: - The modified timestamps changed since last time we wrote something. This is useful to know if something changed by another tool or manually without diffing the full file. - The contents changed. * further simplify checks Turns out that reading files and comparing them is fairly fast and there is no huge benefit over only using the Stats of the file and keeping track of that information. Thanks @kentcdodds! Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
- Loading branch information