d671c7ae96
* 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
18 lines
325 B
TypeScript
18 lines
325 B
TypeScript
/// <reference path='fourslash.ts' />
|
|
|
|
// @allowJs: true
|
|
|
|
// @Filename: /src/a.js
|
|
////export const a = 0;
|
|
|
|
// @Filename: /b.js
|
|
////import { a } from "./src/a.js";
|
|
|
|
verify.getEditsForFileRename({
|
|
oldPath: "/b.js",
|
|
newPath: "/src/b.js",
|
|
newFileContents: {
|
|
"/b.js":
|
|
`import { a } from "./a.js";`,
|
|
},
|
|
});
|