chore: export BUILD_CRITICAL_PACKAGES for the test, drop dead default export

Follow-up to the salvaged #87980: the test kept its own copy of the
build-critical package list (drift hazard) and the module's default
export had no consumer.
This commit is contained in:
kshitijk4poor
2026-09-02 01:01:02 +05:30
committed by Teknium
parent 15e74fa625
commit ae0418599d
2 changed files with 2 additions and 5 deletions
+1 -2
View File
@@ -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 }
@@ -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.