-
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.
Prefer local module specifier over relative node_modules ones in auto…
…-import, even when it reaches into a monorepo package (#55969)
- Loading branch information
1 parent
3116b89
commit 248488a
Showing
3 changed files
with
41 additions
and
3 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
27 changes: 27 additions & 0 deletions
27
tests/cases/fourslash/server/autoImportRelativePathToMonorepoPackage.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,27 @@ | ||
/// <reference path="../fourslash.ts" /> | ||
|
||
// @Filename: /tsconfig.json | ||
//// { | ||
//// "compilerOptions": { | ||
//// "module": "nodenext" | ||
//// } | ||
//// } | ||
|
||
// @Filename: /packages/app/dist/index.d.ts | ||
//// import {} from "utils"; | ||
//// export const app: number; | ||
|
||
// @Filename: /packages/utils/package.json | ||
//// { "name": "utils", "version": "1.0.0", "main": "dist/index.js" } | ||
|
||
// @Filename: /packages/utils/dist/index.d.ts | ||
//// export const x: number; | ||
|
||
// @link: /packages/utils -> /packages/app/node_modules/utils | ||
|
||
// @Filename: /script.ts | ||
//// import {} from "./packages/app/dist/index.js"; | ||
//// x/**/ | ||
|
||
goTo.marker(""); | ||
verify.importFixModuleSpecifiers("", ["./packages/utils/dist/index.js"]); |