Skip to content

Commit ecc6f81

Browse files
authored
fix(bench): scan .ts files in import resolution benchmark (#603)
* fix(bench): scan .ts files in import resolution benchmark The collectImportPairs function only scanned .js files, returning 0 import pairs after the TypeScript migration. Include .ts files so the benchmark actually exercises import resolution. Impact: 2 functions changed, 21 affected * fix(bench): include .tsx files in import resolution scan (#603) Impact: 2 functions changed, 21 affected
1 parent 18c3a8b commit ecc6f81

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/incremental-benchmark.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ if (!isWorker()) {
5858
function walk(dir) {
5959
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
6060
if (entry.isDirectory()) { walk(path.join(dir, entry.name)); continue; }
61-
if (!entry.name.endsWith('.js')) continue;
61+
if (!entry.name.endsWith('.js') && !entry.name.endsWith('.ts') && !entry.name.endsWith('.tsx')) continue;
6262
const absFile = path.join(dir, entry.name);
6363
const content = fs.readFileSync(absFile, 'utf8');
6464
let match;

0 commit comments

Comments
 (0)