mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
* getEditsForFileRename: Support directory rename * Code review * Handle imports inside the new file/directory * Document path updaters * Shorten relative paths where possible * Reduce duplicate code * Rewrite, use moduleSpecifiers.ts to get module specifiers from scratch instead of updating relative paths * Update additional tsconfig.json fields * Add test with '.js' extension * Handle case-insensitive paths * Better tsconfig handling * Handle properties inside compilerOptions * Use getOptionFromName
This commit is contained in:
@@ -1695,7 +1695,7 @@ namespace ts.server {
|
||||
|
||||
private getEditsForFileRename(args: protocol.GetEditsForFileRenameRequestArgs, simplifiedResult: boolean): ReadonlyArray<protocol.FileCodeEdits> | ReadonlyArray<FileTextChanges> {
|
||||
const { file, project } = this.getFileAndProject(args);
|
||||
const changes = project.getLanguageService().getEditsForFileRename(args.oldFilePath, args.newFilePath, this.getFormatOptions(file));
|
||||
const changes = project.getLanguageService().getEditsForFileRename(args.oldFilePath, args.newFilePath, this.getFormatOptions(file), this.getPreferences(file));
|
||||
return simplifiedResult ? this.mapTextChangesToCodeEdits(project, changes) : changes;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user