From 31b97c1eb7fb3998cc2c02d84136f0b2f76e7019 Mon Sep 17 00:00:00 2001 From: PavelMor25 <77216072+PavelMor25@users.noreply.github.com> Date: Thu, 12 Oct 2023 15:09:03 +0400 Subject: [PATCH] update typescript compiler (#8029) ## Purpose TypeScript compilation fails when using Yarn PnP ## Approach Added file's path normalization for typescript test. Couldn't add test due to OS specificity ## References [7412](https://github.com/DevExpress/testcafe/issues/7412) --- src/compiler/test-file/formats/typescript/compiler.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/compiler/test-file/formats/typescript/compiler.ts b/src/compiler/test-file/formats/typescript/compiler.ts index 9d4b7361c4e..29afd766686 100644 --- a/src/compiler/test-file/formats/typescript/compiler.ts +++ b/src/compiler/test-file/formats/typescript/compiler.ts @@ -179,7 +179,10 @@ export default class TypeScriptTestFileCompiler extends APIBasedTestFileCompiler } private _compileFilesToCache (ts: TypeScriptInstance, filenames: string[]): void { - const opts = this._tsConfig.getOptions() as Dictionary; + const opts = this._tsConfig.getOptions() as Dictionary; + + filenames = filenames.map(name => TypeScriptTestFileCompiler._normalizeFilename(name)); + const program = ts.createProgram([TypeScriptTestFileCompiler.tsDefsPath, ...filenames], opts); DEBUG_LOGGER('version: %s', ts.version);