A simple utility to quickly replace contents in one or more files
The return value is now a results array instead of an array with changed files. The new results array includes each file that was processed, with a flag to indicate whether or not the file was changed, and optionally information about the number of matches and replacements that were made. See the readme for more details.
To update existing code and obtain an array of changed files again, simply convert the results array as follows:
const results = await replace(options);
const changedFiles = results
.filter(result => result.hasChanged)
.map(result => result.file);
Note: potentially breaking if you were passing in a config file path which was absolute and relying on the undocumented behaviour that this would be appended to the current working directory. If you encounter issues with this, simply change your config file path from absolute to relative, by removing the leading slash from it.