chore: generate types always with LF (#15245)

This commit is contained in:
Max Schmitt 2022-06-29 23:19:49 +02:00 committed by GitHub
parent 074ae99dc5
commit f6bdf3a3cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -615,8 +615,6 @@ class TypesGenerator {
content = content.replace(/\r\n/g, '\n');
if (removeTrailingWhiteSpace)
content = content.replace(/( +)\n/g, '\n'); // remove trailing whitespace
if (os.platform() === 'win32')
content = content.replace(/\n/g, '\r\n');
const existing = fs.readFileSync(filePath, 'utf8');
if (existing === content)
return;