fix(test): skip heavy-check lock for scoped tooling runs

This commit is contained in:
Vincent Koc
2026-04-12 05:25:14 +01:00
parent 1d1f10ecc2
commit 2069c85b34
3 changed files with 99 additions and 5 deletions

View File

@@ -16,6 +16,7 @@ import {
parseTestProjectsArgs,
resolveParallelFullSuiteConcurrency,
resolveChangedTargetArgs,
shouldAcquireLocalHeavyCheckLock,
writeVitestIncludeFile,
} from "./test-projects.test-support.mjs";
import {
@@ -26,11 +27,7 @@ import {
// Keep this shim so `pnpm test -- src/foo.test.ts` still forwards filters
// cleanly instead of leaking pnpm's passthrough sentinel to Vitest.
const releaseLock = acquireLocalHeavyCheckLockSync({
cwd: process.cwd(),
env: process.env,
toolName: "test",
});
let releaseLock = () => {};
let lockReleased = false;
const FULL_SUITE_CONFIG_WEIGHT = new Map([
@@ -243,6 +240,14 @@ async function main() {
cwd: process.cwd(),
});
releaseLock = shouldAcquireLocalHeavyCheckLock(runSpecs, process.env)
? acquireLocalHeavyCheckLockSync({
cwd: process.cwd(),
env: process.env,
toolName: "test",
})
: () => {};
const isFullSuiteRun =
targetArgs.length === 0 &&
changedTargetArgs === null &&