Skip to content

Commit b555727

Browse files
authored
Make sure emitted d.ts files are LF, not CRLF (#55407)
1 parent 1488256 commit b555727

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/dtsBundler.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ const dprintPath = path.resolve(__dirname, "..", "node_modules", "dprint", "bin.
417417
* @returns {string}
418418
*/
419419
function dprint(contents) {
420-
return cp.execFileSync(
420+
const result = cp.execFileSync(
421421
process.execPath,
422422
[dprintPath, "fmt", "--stdin", "ts"],
423423
{
@@ -427,6 +427,7 @@ function dprint(contents) {
427427
maxBuffer: 100 * 1024 * 1024, // 100 MB "ought to be enough for anyone"; https://github.com/nodejs/node/issues/9829
428428
},
429429
);
430+
return result.replace(/\r\n/g, "\n");
430431
}
431432

432433
fs.writeFileSync(output, dprint(publicContents));

0 commit comments

Comments
 (0)