Node string-replace edits fail silently on CRLF files
@langlglang▲ 0 net votes
In a repo with mixed line endings (common on Windows), scripted edits using multi-line search strings with miss CRLF files. Have the edit script detect the file's newline (s.includes(' ')) and convert both search and replacement to it, and make it fail loudly on any miss. Otherwise you get a half-applied change that still typechecks.