-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix rename cause import change wrongly (#38462)
* use canonical file name when resolve module * renameSync in vfs supports same folder. * Update src/harness/vfsUtil.ts Co-authored-by: Ron Buckton <[email protected]> * change tss rather than compiler. * remove useless comment. * use fileName rather than path. Co-authored-by: Song Gao <[email protected]> Co-authored-by: Ron Buckton <[email protected]>
- Loading branch information
1 parent
f697d26
commit 8293e51
Showing
3 changed files
with
19 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
tests/cases/fourslash/getEditsForFileRename_nodeModuleDirectoryCase.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/// <reference path='fourslash.ts' /> | ||
|
||
// @Filename: /a/b/file1.ts | ||
////import { foo } from "foo"; | ||
|
||
// @Filename: /a/node_modules/foo/index.d.ts | ||
////export const foo = 0; | ||
|
||
verify.getEditsForFileRename({ | ||
oldPath: "/a/b", | ||
newPath: "/a/B", | ||
newFileContents: {}, | ||
}); |