diff --git a/statsHelpers.js b/statsHelpers.js index 9d7816bd2..f9e56e426 100644 --- a/statsHelpers.js +++ b/statsHelpers.js @@ -9,7 +9,8 @@ const fs = require("fs"); const path = require("path"); const util = require("util"); -const writeFile = util.promisify(fs.writeFile); +const writeFileAtomic = require("write-file-atomic"); +const writeFile = util.promisify(writeFileAtomic); const readFile = util.promisify(fs.readFile); const readdir = util.promisify(fs.readdir); const crypto = require("crypto");