From 1466eb14f25ab14f3f779a49104c31114d68e819 Mon Sep 17 00:00:00 2001 From: Dan Freeman Date: Tue, 14 Nov 2023 17:56:41 +0000 Subject: [PATCH] Default to TS's polling watcher for our tests The filesystem watcher (which they changed to by default in TS 4.9) is just too unstable in the GH Actions runner for us to count on. --- test-packages/test-utils/src/project.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test-packages/test-utils/src/project.ts b/test-packages/test-utils/src/project.ts index 1e2098043..a89f84308 100644 --- a/test-packages/test-utils/src/project.ts +++ b/test-packages/test-utils/src/project.ts @@ -17,6 +17,7 @@ const ROOT = pathUtils.normalizeFilePath(path.resolve(dirname, '../../ephemeral' interface TsconfigWithGlint { extends?: string; compilerOptions?: Record; // no appropriate types exist :sigh: + watchOptions?: Record; // https://www.typescriptlang.org/tsconfig#watchOptions references?: Array<{ path: string }>; files?: Array; include?: Array; @@ -69,7 +70,7 @@ export class Project { } let project = new Project(rootDir); - let tsconfig = { + let tsconfig: TsconfigWithGlint = { compilerOptions: { strict: true, target: 'es2019', @@ -80,6 +81,11 @@ export class Project { checkJs: false, ...config.compilerOptions, }, + watchOptions: { + watchFile: 'fixedPollingInterval', + watchDirectory: 'fixedPollingInterval', + synchronousWatchDirectory: true, + }, glint: config.glint ?? { environment: 'glimmerx', },