diff --git a/.github/screenshot-project-memory.png b/.github/screenshot-project-memory.png index a7c18e80..f35f1673 100644 Binary files a/.github/screenshot-project-memory.png and b/.github/screenshot-project-memory.png differ diff --git a/.github/screenshot-user-profile.png b/.github/screenshot-user-profile.png index 3941fc4d..cdccea3d 100644 Binary files a/.github/screenshot-user-profile.png and b/.github/screenshot-user-profile.png differ diff --git a/package.json b/package.json index cc6b49ed..83b1f716 100644 --- a/package.json +++ b/package.json @@ -26,8 +26,8 @@ "dev": "tsc --watch", "test": "bun test", "typecheck": "tsc --noEmit", - "format": "prettier --write \"src/**/*.{ts,js,css,html}\" \"web/src/**/*.{ts,tsx,js,jsx,css,html}\"", - "format:check": "prettier --check \"src/**/*.{ts,js,css,html}\" \"web/src/**/*.{ts,tsx,js,jsx,css,html}\"", + "format": "prettier --write \"src/**/*.{ts,css,html}\" \"web/src/**/*.{ts,tsx,css,html}\"", + "format:check": "prettier --check \"src/**/*.{ts,css,html}\" \"web/src/**/*.{ts,tsx,css,html}\"", "prepare": "husky" }, "keywords": [ @@ -83,7 +83,7 @@ "package.json" ], "lint-staged": { - "*.{ts,tsx,js,jsx,css,html,json,md}": [ + "*.{ts,tsx,css,html,json,md}": [ "prettier --write" ] } diff --git a/tests/helpers/temp-dir.mjs b/tests/helpers/temp-dir.mjs deleted file mode 100644 index f56446f4..00000000 --- a/tests/helpers/temp-dir.mjs +++ /dev/null @@ -1,37 +0,0 @@ -import { rmSync } from "node:fs"; - -const RETRYABLE_REMOVE_CODES = new Set(["EBUSY", "ENOTEMPTY", "EPERM"]); - -function sleep(ms) { - return new Promise((resolve) => setTimeout(resolve, ms)); -} - -function isRetryableRemoveError(error) { - return RETRYABLE_REMOVE_CODES.has(error?.code); -} - -export async function removeDirWithRetries(dir, attempts = 20) { - let lastError; - - for (let attempt = 0; attempt < attempts; attempt += 1) { - try { - rmSync(dir, { recursive: true, force: true }); - return; - } catch (error) { - lastError = error; - if (!isRetryableRemoveError(error) || attempt === attempts - 1) { - throw error; - } - await sleep(50 * (attempt + 1)); - } - } - - throw lastError; -} - -export async function removeTempDirs(tempDirs) { - while (tempDirs.length > 0) { - const dir = tempDirs.pop(); - if (dir) await removeDirWithRetries(dir); - } -} diff --git a/tsconfig.json b/tsconfig.json index 46e074ab..d988008a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,7 +4,6 @@ "target": "ESNext", "module": "ESNext", "moduleDetection": "force", - "allowJs": true, "types": ["bun-types"], "moduleResolution": "bundler",