-
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.
Deprioritize import paths made up of only dots and slashes (#47432)
* Deprioritize import paths made up of only dots and slashes * Fix test * Hoist regex * Yaaaay RegExp state
- Loading branch information
1 parent
16bbddb
commit 28c2084
Showing
2 changed files
with
35 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
// @module: commonjs | ||
|
||
// @Filename: /foo/a.ts | ||
//// export const A = 0; | ||
|
||
// @Filename: /foo/b.ts | ||
//// export {}; | ||
//// A/*sibling*/ | ||
|
||
// @Filename: /foo/index.ts | ||
//// export * from "./a"; | ||
//// export * from "./b"; | ||
|
||
// @Filename: /index.ts | ||
//// export * from "./foo"; | ||
//// export * from "./src"; | ||
|
||
// @Filename: /src/a.ts | ||
//// export {}; | ||
//// A/*parent*/ | ||
|
||
// @Filename: /src/index.ts | ||
//// export * from "./a"; | ||
|
||
// Module specifiers made up of only "." and ".." components are deprioritized | ||
verify.importFixModuleSpecifiers("sibling", ["./a", ".", ".."]); | ||
verify.importFixModuleSpecifiers("parent", ["../foo", "../foo/a", ".."]); |