diff --git a/src/compiler/sourcemapDecoder.ts b/src/compiler/sourcemapDecoder.ts index 5553509dac..17cd1375f7 100644 --- a/src/compiler/sourcemapDecoder.ts +++ b/src/compiler/sourcemapDecoder.ts @@ -83,7 +83,7 @@ namespace ts.sourcemaps { if (!maps[targetIndex] || comparePaths(loc.fileName, maps[targetIndex].sourcePath, sourceRoot, !host.useCaseSensitiveFileNames) !== 0) { return loc; } - return { fileName: toPath(map.file!, sourceRoot, host.getCanonicalFileName), position: maps[targetIndex].emittedPosition }; // Closest pos + return { fileName: getNormalizedAbsolutePath(map.file!, sourceRoot), position: maps[targetIndex].emittedPosition }; // Closest pos } function getOriginalPosition(loc: SourceMappableLocation): SourceMappableLocation { @@ -94,7 +94,7 @@ namespace ts.sourcemaps { // if no exact match, closest is 2's compliment of result targetIndex = ~targetIndex; } - return { fileName: toPath(maps[targetIndex].sourcePath, sourceRoot, host.getCanonicalFileName), position: maps[targetIndex].sourcePosition }; // Closest pos + return { fileName: getNormalizedAbsolutePath(maps[targetIndex].sourcePath, sourceRoot), position: maps[targetIndex].sourcePosition }; // Closest pos } function getSourceFileLike(fileName: string, location: string): SourceFileLike | undefined { diff --git a/src/testRunner/unittests/tsserverProjectSystem.ts b/src/testRunner/unittests/tsserverProjectSystem.ts index 4ac267979e..171070e2cb 100644 --- a/src/testRunner/unittests/tsserverProjectSystem.ts +++ b/src/testRunner/unittests/tsserverProjectSystem.ts @@ -10655,7 +10655,7 @@ declare class TestLib { const dependecyLocation = `${projectLocation}/dependency`; const mainLocation = `${projectLocation}/main`; const dependencyTs: File = { - path: `${dependecyLocation}/fns.ts`, + path: `${dependecyLocation}/FnS.ts`, content: `export function fn1() { } export function fn2() { } export function fn3() { }