Skip to content

Commit 3dfe1d5

Browse files
committed
fixed module load hanging
1 parent f7853e1 commit 3dfe1d5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

source/lib/all-events.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ async function watchForDirectoryChanges() {
1919
}
2020
}
2121

22-
await watchForDirectoryChanges();
22+
// We do not want to await this Promise, since it will never resolve and would cause the module to hang on load.
23+
// eslint-disable-next-line unicorn/prefer-top-level-await
24+
void watchForDirectoryChanges();
2325

2426
async function loadDirectory(): Promise<Partial<EventDirectory>> {
2527
const directoryString = await readFile(DIRECTORY_FILE);

0 commit comments

Comments
 (0)