Simplify handling of node:-prefixed modules in auto-imports (#59702)

This commit is contained in:
Andrew Branch
2024-08-21 16:43:21 -07:00
committed by GitHub
parent f6ec916313
commit a5eec2485f
16 changed files with 943 additions and 191 deletions

View File

@@ -10,7 +10,7 @@ import {
File,
} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: duplicate packages", () => {
describe("unittests:: tsserver:: duplicatePackages", () => {
// Tests that 'moduleSpecifiers.ts' will import from the redirecting file, and not from the file it redirects to, if that can provide a global module specifier.
it("works with import fixes", () => {
const packageContent = "export const foo: number;";

View File

@@ -1455,7 +1455,7 @@ describe("unittests:: tsserver:: typingsInstaller:: discover typings", () => {
const { discoverTypings, baseline } = setup([f]);
const cache = new Map<string, ts.JsTyping.CachedTyping>();
for (const name of ts.JsTyping.nodeCoreModuleList) {
for (const name of ts.nodeCoreModules) {
discoverTypings(
[f.path],
ts.getDirectoryPath(f.path as ts.Path),