Skip to content

Commit 83919f0

Browse files
committed
addressed PR feedback: renamed 'toRelativePath' to 'convertToRelativePath'
1 parent 534bb62 commit 83919f0

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/compiler/tsc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ namespace ts {
8787
if (diagnostic.file) {
8888
let loc = getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start);
8989
const relativeFileName = host
90-
? toRelativePath(diagnostic.file.fileName, host.getCurrentDirectory(), fileName => host.getCanonicalFileName(fileName))
90+
? convertToRelativePath(diagnostic.file.fileName, host.getCurrentDirectory(), fileName => host.getCanonicalFileName(fileName))
9191
: diagnostic.file.fileName;
9292

9393
output += `${ relativeFileName }(${ loc.line + 1 },${ loc.character + 1 }): `;

src/compiler/utilities.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2182,7 +2182,7 @@ namespace ts {
21822182
return result;
21832183
}
21842184

2185-
export function toRelativePath(absoluteOrRelativePath: string, basePath: string, getCanonicalFileName: (path: string) => string): string {
2185+
export function convertToRelativePath(absoluteOrRelativePath: string, basePath: string, getCanonicalFileName: (path: string) => string): string {
21862186
return !isRootedDiskPath(absoluteOrRelativePath)
21872187
? absoluteOrRelativePath
21882188
: getRelativePathToDirectoryOrUrl(basePath, absoluteOrRelativePath, basePath, getCanonicalFileName, /* isAbsolutePathAnUrl */ false);

src/harness/projectsRunner.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,10 +377,10 @@ class ProjectRunner extends RunnerBase {
377377
bug: testCase.bug,
378378
rootDir: testCase.rootDir,
379379
resolvedInputFiles: ts.map(compilerResult.program.getSourceFiles(), inputFile => {
380-
return ts.toRelativePath(inputFile.fileName, getCurrentDirectory(), path => Harness.Compiler.getCanonicalFileName(path));
380+
return ts.convertToRelativePath(inputFile.fileName, getCurrentDirectory(), path => Harness.Compiler.getCanonicalFileName(path));
381381
}),
382382
emittedFiles: ts.map(compilerResult.outputFiles, outputFile => {
383-
return ts.toRelativePath(outputFile.emittedFileName, getCurrentDirectory(), path => Harness.Compiler.getCanonicalFileName(path));
383+
return ts.convertToRelativePath(outputFile.emittedFileName, getCurrentDirectory(), path => Harness.Compiler.getCanonicalFileName(path));
384384
})
385385
};
386386

0 commit comments

Comments
 (0)