mirror of
https://github.com/codeflash-ai/codeflash.git
synced 2026-05-04 18:25:17 +00:00
fix: resolve jest-runner inside scoped package subdirectories
The recursive search in loop-runner.js wasn't entering package directories inside scoped namespaces (e.g. @jest/core), so it couldn't find jest-runner nested at @jest/core/node_modules/jest-runner.
This commit is contained in:
parent
123f06084d
commit
d9a329667e
1 changed files with 3 additions and 1 deletions
|
|
@ -82,11 +82,13 @@ function findJestRunnerRecursive(nodeModulesPath, maxDepth = 5) {
|
|||
|
||||
// Recurse into:
|
||||
// - node_modules subdirectories
|
||||
// - scoped packages (@org/pkg)
|
||||
// - scoped packages (@org/pkg) and their children (e.g. @jest/core)
|
||||
// - hidden directories (.pnpm, .yarn, etc.)
|
||||
// - pnpm versioned directories (jest-runner@30.0.5)
|
||||
const isInsideScopedDir = path.basename(dir).startsWith('@');
|
||||
const shouldRecurse = entry.name === 'node_modules' ||
|
||||
entry.name.startsWith('@') ||
|
||||
isInsideScopedDir ||
|
||||
entry.name === '.pnpm' || entry.name === '.yarn' ||
|
||||
entry.name.startsWith('jest-runner@');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue