Skip to content

Commit 28982ca

Browse files
committed
test(daemon): keep the coordinator ownership scan on existing roots
Drop the not-yet-existing packages/daemon/src root and the catch-all readdir guard that would let a wrong root scan nothing.
1 parent a56adca commit 28982ca

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

‎src/__tests__/daemon-composition/replay-coordinator-ownership.test.ts‎

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,20 +50,12 @@ type ImportSite = {
5050
declarationTypeOnly: boolean;
5151
};
5252

53-
// `packages/daemon/src` is where the daemon moves when the extraction lands; the walk below
54-
// tolerates a root that does not exist yet so this guard keeps seeing the daemon before and after.
55-
const PRODUCTION_ROOTS = ['src', 'packages/replay-port/src', 'packages/daemon/src'] as const;
53+
const PRODUCTION_ROOTS = ['src', 'packages/replay-port/src'] as const;
5654

5755
function listProductionSourceFiles(): string[] {
5856
const out: string[] = [];
5957
const walk = (dir: string): void => {
60-
let entries;
61-
try {
62-
entries = fs.readdirSync(path.join(REPO_ROOT, dir), { withFileTypes: true });
63-
} catch {
64-
return;
65-
}
66-
for (const entry of entries) {
58+
for (const entry of fs.readdirSync(path.join(REPO_ROOT, dir), { withFileTypes: true })) {
6759
if (entry.name === 'node_modules' || entry.name === '__tests__') continue;
6860
const relPath = path.posix.join(dir, entry.name);
6961
if (entry.isDirectory()) {

0 commit comments

Comments
 (0)