mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
896592b747
A vitest/vite type bump made inferred creator return types reach
vite-internal names (TS4058/TS4082), failing check-test-types repo-wide.
Annotate the scoped/extension config roots and the spread-rebuilding
creators with ViteUserConfig; also drop an unused workflow read, mutating
sorts, and an untyped record index left by 1f591bba56.
33 lines
995 B
TypeScript
33 lines
995 B
TypeScript
import type { ViteUserConfig } from "vitest/config";
|
|
import { cliProcessTestFiles } from "./vitest.cli-process-paths.mjs";
|
|
// CLI process tests run serially in isolated forks so child startup deadlines
|
|
// measure the CLI rather than contention from the shared CLI test graph.
|
|
import { createScopedVitestConfig } from "./vitest.scoped-config.ts";
|
|
|
|
export function createCliProcessVitestConfig(
|
|
env?: Record<string, string | undefined>,
|
|
): ViteUserConfig {
|
|
const config = createScopedVitestConfig(cliProcessTestFiles, {
|
|
env,
|
|
fileParallelism: false,
|
|
isolate: true,
|
|
name: "cli-process",
|
|
passWithNoTests: true,
|
|
pool: "forks",
|
|
useNonIsolatedRunner: false,
|
|
});
|
|
return {
|
|
...config,
|
|
test: {
|
|
...config.test,
|
|
env: {
|
|
...config.test?.env,
|
|
// Avoid TSX's unbounded wait on esbuild's synchronous worker IPC in source-child tests.
|
|
ESBUILD_WORKER_THREADS: "0",
|
|
},
|
|
},
|
|
};
|
|
}
|
|
|
|
export default createCliProcessVitestConfig();
|