Releases: adamreisnz/replace-in-file
4.0.0
Breaking changes
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);
New features
3.1.0
- Config file path passed to CLI can now be absolute (#37)
- Update dependencies
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.
3.0.0
3.0.0-beta.2
- Passing filename as last parameter for replace callback functions
3.0.0-beta.1
- Drop deprecated API
- Drop support for Node 4 and 5
- Refactor and clean up code base
- Leverage destructuring
- Option to disable globs (#32)
- Update and clean up readme