test(vitest): classify Crabbox shared dependencies · openclaw/openclaw@a3fa5b6
vincentkoc
·
2026-06-01
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -138,6 +138,10 @@ const workerConfig = resolveSharedVitestWorkerConfig({
|
138 | 138 | isWindows, |
139 | 139 | localScheduling, |
140 | 140 | }); |
| 141 | +const dependencyModuleDirectories = ["/node_modules/", "/openclaw-pnpm-node-modules/"]; |
| 142 | +const dependencyExternalPatterns = [ |
| 143 | +/\/openclaw-pnpm-node-modules\/(?!.*\/?vite\w*\/dist\/client\/env\.mjs$).*\.(?:cjs\.js|mjs)$/u, |
| 144 | +]; |
141 | 145 | const sourcePluginSdkSubpaths = [ |
142 | 146 | ...new Set([...pluginSdkSubpaths, ...privateLocalOnlyPluginSdkSubpaths]), |
143 | 147 | ].toSorted((left, right) => left.localeCompare(right)); |
@@ -436,6 +440,14 @@ export const sharedVitestConfig = {
|
436 | 440 | runner: nonIsolatedRunnerPath, |
437 | 441 | maxWorkers: workerConfig.maxWorkers, |
438 | 442 | fileParallelism: workerConfig.fileParallelism, |
| 443 | +deps: { |
| 444 | +moduleDirectories: dependencyModuleDirectories, |
| 445 | +}, |
| 446 | +server: { |
| 447 | +deps: { |
| 448 | +external: dependencyExternalPatterns, |
| 449 | +}, |
| 450 | +}, |
439 | 451 | forceRerunTriggers: [ |
440 | 452 | "package.json", |
441 | 453 | "pnpm-lock.yaml", |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。