MCPcopy Index your code
hub / github.com/nodejs/node / getEditsForFileRename

Function getEditsForFileRename

test/fixtures/snapshot/typescript.js:139435–139444  ·  view source on GitHub ↗
(program, oldFileOrDirPath, newFileOrDirPath, host, formatContext, preferences, sourceMapper)

Source from the content-addressed store, hash-verified

139433var ts;
139434(function (ts) {
139435 function getEditsForFileRename(program, oldFileOrDirPath, newFileOrDirPath, host, formatContext, preferences, sourceMapper) {
139436 var useCaseSensitiveFileNames = ts.hostUsesCaseSensitiveFileNames(host);
139437 var getCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
139438 var oldToNew = getPathUpdater(oldFileOrDirPath, newFileOrDirPath, getCanonicalFileName, sourceMapper);
139439 var newToOld = getPathUpdater(newFileOrDirPath, oldFileOrDirPath, getCanonicalFileName, sourceMapper);
139440 return ts.textChanges.ChangeTracker.with({ host: host, formatContext: formatContext, preferences: preferences }, function (changeTracker) {
139441 updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, newFileOrDirPath, host.getCurrentDirectory(), useCaseSensitiveFileNames);
139442 updateImports(program, changeTracker, oldToNew, newToOld, host, getCanonicalFileName);
139443 });
139444 }
139445 ts.getEditsForFileRename = getEditsForFileRename;
139446 // exported for tests
139447 function getPathUpdater(oldFileOrDirPath, newFileOrDirPath, getCanonicalFileName, sourceMapper) {

Callers

nothing calls this directly

Calls 4

getPathUpdaterFunction · 0.85
updateTsconfigFilesFunction · 0.85
updateImportsFunction · 0.85
getProgramFunction · 0.85

Tested by

no test coverage detected