Skip to content
Open
5 changes: 5 additions & 0 deletions .changeset/thick-rings-punch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@swc/cli": patch
---

Skip the write when emitted output is byte-identical, and write through a temp file plus rename so watch consumers never read a partially written file
4 changes: 3 additions & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@
"semver": "^7.3.8",
"slash": "3.0.0",
"source-map": "^0.7.3",
"tinyglobby": "^0.2.13"
"tinyglobby": "^0.2.13",
"write-file-atomic": "^7.0.1"
},
"devDependencies": {
"@swc/cli": "0.8.0",
Expand All @@ -65,6 +66,7 @@
"@types/jest": "^29.5.0",
"@types/node": "^20.11.5",
"@types/semver": "^7.3.13",
"@types/write-file-atomic": "^4.0.3",
"chokidar": "^5.0.0",
"deepmerge": "^4.2.2",
"jest": "^29.5.0",
Expand Down
Loading
Loading