mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-12-11 17:41:26 -06:00
Make sure emitted d.ts files are LF, not CRLF (#55407)
This commit is contained in:
parent
1488256ec4
commit
b5557271a5
@ -417,7 +417,7 @@ const dprintPath = path.resolve(__dirname, "..", "node_modules", "dprint", "bin.
|
||||
* @returns {string}
|
||||
*/
|
||||
function dprint(contents) {
|
||||
return cp.execFileSync(
|
||||
const result = cp.execFileSync(
|
||||
process.execPath,
|
||||
[dprintPath, "fmt", "--stdin", "ts"],
|
||||
{
|
||||
@ -427,6 +427,7 @@ function dprint(contents) {
|
||||
maxBuffer: 100 * 1024 * 1024, // 100 MB "ought to be enough for anyone"; https://github.com/nodejs/node/issues/9829
|
||||
},
|
||||
);
|
||||
return result.replace(/\r\n/g, "\n");
|
||||
}
|
||||
|
||||
fs.writeFileSync(output, dprint(publicContents));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user