path(projectRoot: string): string
Returns the on-disk cache path for projectRoot. The path embeds a SHA-1
tag of the absolute project root so projects that share a hoisted/symlinked
node_modules (pnpm workspaces, monorepos, integration test fixtures) write
to distinct files. 12 hex chars is far below collision risk for the scale of
"projects on one machine."
import * as MetafileCache from './metafile-cache.ts'; MetafileCache.path('/proj'); // '/proj/node_modules/.cache/qunitx/d6f745519348/metafile.json' MetafileCache.path('/other'); // same layout, different hash tag — no clash on shared node_modules