From 72f30ddbf3febbf0d60896af4073ffc596ac9eef Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Fri, 13 Dec 2024 07:08:08 +0000 Subject: [PATCH] [ci] format --- packages/astro/src/content/mutable-data-store.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/astro/src/content/mutable-data-store.ts b/packages/astro/src/content/mutable-data-store.ts index 573adeaaf9..7f125ed4b4 100644 --- a/packages/astro/src/content/mutable-data-store.ts +++ b/packages/astro/src/content/mutable-data-store.ts @@ -196,7 +196,7 @@ export default new Map([\n${lines.join(',\n')}]); #pending = new Set(); async #writeFileAtomic(filePath: PathLike, data: string, depth = 0) { - if(depth > MAX_DEPTH) { + if (depth > MAX_DEPTH) { // If we hit the max depth, we skip a write to prevent the stack from growing too large // In theory this means we may miss the latest data, but in practice this will only happen when the file is being written to very frequently // so it will be saved on the next write. This is unlikely to ever happen in practice, as the writes are debounced. It requires lots of writes to very large files. @@ -213,7 +213,7 @@ export default new Map([\n${lines.join(',\n')}]); const tempFile = filePath instanceof URL ? new URL(`${filePath.href}.tmp`) : `${filePath}.tmp`; try { - // Write it to a temporary file first and then move it to prevent partial reads. + // Write it to a temporary file first and then move it to prevent partial reads. await fs.writeFile(tempFile, data); await fs.rename(tempFile, filePath); } finally {