diff --git a/apps/desktop/scripts/assert-root-install.mjs b/apps/desktop/scripts/assert-root-install.mjs index 5ea3a3dc4e..bb1daa2dbf 100644 --- a/apps/desktop/scripts/assert-root-install.mjs +++ b/apps/desktop/scripts/assert-root-install.mjs @@ -32,6 +32,7 @@ import { isMain } from "./utils.mjs" // an unresolved `katex/dist/katex.min.css` with no hint that the install — not // the source — was at fault (#86443). const BUILD_CRITICAL_PACKAGES = ["vite", "katex", "electron", "electron-builder"] +export { BUILD_CRITICAL_PACKAGES } // Resolve the way Node's own lookup does — walk `node_modules` upward — rather // than through `require.resolve`. A package whose `exports` map does not expose @@ -114,5 +115,3 @@ function main() { if (isMain(import.meta.url)) { main() } - -export default { checkRootInstall } diff --git a/apps/desktop/scripts/assert-root-install.test.mjs b/apps/desktop/scripts/assert-root-install.test.mjs index c32c4bd104..4f1403b80c 100644 --- a/apps/desktop/scripts/assert-root-install.test.mjs +++ b/apps/desktop/scripts/assert-root-install.test.mjs @@ -4,9 +4,7 @@ import os from 'node:os' import path from 'node:path' import { test } from 'vitest' -import { checkRootInstall } from '../scripts/assert-root-install.mjs' - -const BUILD_CRITICAL = ['vite', 'katex', 'electron', 'electron-builder'] +import { BUILD_CRITICAL_PACKAGES as BUILD_CRITICAL, checkRootInstall } from '../scripts/assert-root-install.mjs' // Build a throwaway repo shaped like this one: an app workspace whose // dependencies are hoisted to the repo root, which is what the guard walks.