chore: update dependencies and oxc tooling

This commit is contained in:
Peter Steinberger
2026-04-10 19:24:20 +01:00
parent 2fc3223ed4
commit 59925c1a74
22 changed files with 397 additions and 276 deletions

View File

@@ -1,5 +1,7 @@
import path from "node:path";
import { describe, expect, it } from "vitest";
import {
applyParallelVitestCachePaths,
buildFullSuiteVitestRunPlans,
buildVitestRunPlans,
resolveChangedTargetArgs,
@@ -488,3 +490,43 @@ describe("scripts/test-projects full-suite sharding", () => {
]);
});
});
describe("scripts/test-projects parallel cache paths", () => {
it("assigns isolated Vitest fs-module cache paths per parallel shard", () => {
const specs = applyParallelVitestCachePaths(
[
{ config: "test/vitest/vitest.gateway.config.ts", env: {}, pnpmArgs: [] },
{ config: "test/vitest/vitest.extension-matrix.config.ts", env: {}, pnpmArgs: [] },
],
{ cwd: "/repo", env: {} },
);
expect(specs.map((spec) => spec.env)).toEqual([
{
OPENCLAW_VITEST_FS_MODULE_CACHE_PATH: path.join(
"/repo",
"node_modules",
".experimental-vitest-cache",
"0-test-vitest-vitest.gateway.config.ts",
),
},
{
OPENCLAW_VITEST_FS_MODULE_CACHE_PATH: path.join(
"/repo",
"node_modules",
".experimental-vitest-cache",
"1-test-vitest-vitest.extension-matrix.config.ts",
),
},
]);
});
it("keeps an explicit global cache path", () => {
const [spec] = applyParallelVitestCachePaths(
[{ config: "test/vitest/vitest.gateway.config.ts", env: {}, pnpmArgs: [] }],
{ cwd: "/repo", env: { OPENCLAW_VITEST_FS_MODULE_CACHE_PATH: "/tmp/cache" } },
);
expect(spec?.env.OPENCLAW_VITEST_FS_MODULE_CACHE_PATH).toBeUndefined();
});
});