diff --git a/src/testRunner/tests.ts b/src/testRunner/tests.ts index c4a34d424b2..4f520adb3fa 100644 --- a/src/testRunner/tests.ts +++ b/src/testRunner/tests.ts @@ -60,6 +60,7 @@ import "./unittests/services/preProcessFile"; import "./unittests/services/textChanges"; import "./unittests/services/transpile"; import "./unittests/tsbuild/amdModulesWithOut"; +import "./unittests/tsbuild/cacheResolutions"; import "./unittests/tsbuild/clean"; import "./unittests/tsbuild/commandLine"; import "./unittests/tsbuild/configFileErrors"; @@ -85,6 +86,7 @@ import "./unittests/tsbuild/referencesWithRootDirInParent"; import "./unittests/tsbuild/resolveJsonModule"; import "./unittests/tsbuild/sample"; import "./unittests/tsbuild/transitiveReferences"; +import "./unittests/tsbuildWatch/cacheResolutions"; import "./unittests/tsbuildWatch/configFileErrors"; import "./unittests/tsbuildWatch/demo"; import "./unittests/tsbuildWatch/moduleResolution"; @@ -95,6 +97,7 @@ import "./unittests/tsbuildWatch/projectsBuilding"; import "./unittests/tsbuildWatch/publicApi"; import "./unittests/tsbuildWatch/reexport"; import "./unittests/tsbuildWatch/watchEnvironment"; +import "./unittests/tsc/cacheResolutions"; import "./unittests/tsc/cancellationToken"; import "./unittests/tsc/composite"; import "./unittests/tsc/declarationEmit"; @@ -104,6 +107,7 @@ import "./unittests/tsc/listFilesOnly"; import "./unittests/tsc/projectReferences"; import "./unittests/tsc/redirect"; import "./unittests/tsc/runWithoutArgs"; +import "./unittests/tscWatch/cacheResolutions"; import "./unittests/tscWatch/consoleClearing"; import "./unittests/tscWatch/emit"; import "./unittests/tscWatch/nodeNextWatch"; @@ -120,6 +124,7 @@ import "./unittests/tscWatch/watchEnvironment"; import "./unittests/tsserver/applyChangesToOpenFiles"; import "./unittests/tsserver/autoImportProvider"; import "./unittests/tsserver/auxiliaryProject"; +import "./unittests/tsserver/cacheResolutions"; import "./unittests/tsserver/cachingFileSystemInformation"; import "./unittests/tsserver/cancellationToken"; import "./unittests/tsserver/compileOnSave"; diff --git a/src/testRunner/unittests/tsbuild/cacheResolutions.ts b/src/testRunner/unittests/tsbuild/cacheResolutions.ts new file mode 100644 index 00000000000..8eb90937bab --- /dev/null +++ b/src/testRunner/unittests/tsbuild/cacheResolutions.ts @@ -0,0 +1,70 @@ +import { + noChangeRun, + prependText, + verifyTsc, +} from "../tsc/helpers"; +import { + getFsWithNode16, + getFsWithOut, + getPkgImportContent, + getPkgTypeRefContent, +} from "./cacheResolutionsHelper"; + +describe("unittests:: tsbuild:: cacheResolutions::", () => { + verifyTsc({ + scenario: "cacheResolutions", + subScenario: "multi file", + fs: getFsWithNode16, + commandLineArgs: ["-b", "/src/project", "--explainFiles"], + baselineModulesAndTypeRefs: true, + edits: [ + noChangeRun, + { + caption: "write file not resolved by import", + edit: fs => fs.writeFileSync("/src/project/node_modules/pkg1/require.d.ts", getPkgImportContent("Require", 1)), + }, + { + caption: "write file not resolved by typeRef", + edit: fs => fs.writeFileSync("/src/project/node_modules/pkg3/require.d.ts", getPkgTypeRefContent("Require", 3)), + }, + { + caption: "modify randomFileForImport by adding import", + edit: fs => prependText(fs, "/src/project/randomFileForImport.ts", `import type { ImportInterface0 } from "pkg0" assert { "resolution-mode": "import" };\n`), + }, + { + caption: "modify randomFileForTypeRef by adding typeRef", + edit: fs => prependText(fs, "/src/project/randomFileForTypeRef.ts", `/// \n`), + }, + ] + }); + + verifyTsc({ + scenario: "cacheResolutions", + subScenario: "bundle emit", + fs: getFsWithOut, + commandLineArgs: ["-b", "/src/project", "--explainFiles"], + baselineModulesAndTypeRefs: true, + edits: [ + noChangeRun, + { + caption: "write file not resolved by import", + edit: fs => fs.writeFileSync("/src/project/pkg1.d.ts", getPkgImportContent("Require", 1)), + }, + { + caption: "write file not resolved by typeRef", + edit: fs => { + fs.mkdirpSync("/src/project/node_modules/pkg3"); + fs.writeFileSync("/src/project/node_modules/pkg3/index.d.ts", getPkgTypeRefContent("Require", 3)); + }, + }, + { + caption: "modify randomFileForImport by adding import", + edit: fs => prependText(fs, "/src/project/randomFileForImport.ts", `import type { ImportInterface0 } from "pkg0";\n`), + }, + { + caption: "modify randomFileForTypeRef by adding typeRef", + edit: fs => prependText(fs, "/src/project/randomFileForTypeRef.ts", `/// \n`), + }, + ] + }); +}); \ No newline at end of file diff --git a/src/testRunner/unittests/tsbuild/cacheResolutionsHelper.ts b/src/testRunner/unittests/tsbuild/cacheResolutionsHelper.ts new file mode 100644 index 00000000000..ff533eedd5e --- /dev/null +++ b/src/testRunner/unittests/tsbuild/cacheResolutionsHelper.ts @@ -0,0 +1,160 @@ +import * as Utils from "../../_namespaces/Utils"; +import { + createServerHost, + createWatchedSystem, + libFile, + TestServerHost, +} from "../virtualFileSystemWithWatch"; +import { + loadProjectFromFiles, +} from "../tsc/helpers"; +import { + solutionBuildWithBaseline, +} from "../tscWatch/helpers"; + +function getRandomFileContent() { + return `export const x = 10;`; +} +function getPkgPackageJsonContent(pkg: number) { + return JSON.stringify({ + name: `pkg${pkg}`, + version: "0.0.1", + exports: { + import: "./import.js", + require: "./require.js" + } + }); +} +export function getPkgImportContent(type: "Import" | "Require", pkg: number) { + return `export interface ${type}Interface${pkg} {}`; +} +export function getPkgTypeRefContent(type: "Import" | "Require", pkg: number) { + return Utils.dedent` + export {}; + declare global { + interface ${type}Interface${pkg} {} + } + `; +} +export function getFsMapWithNode16(): { [path: string]: string; } { + return { + "/src/project/tsconfig.json": JSON.stringify({ + compilerOptions: { + moduleResolution: "node16", + composite: true, + cacheResolutions: true, + traceResolution: true, + }, + include: ["*.ts"], + exclude: ["*.d.ts"] + }), + "/src/project/fileWithImports.ts": Utils.dedent` + import type { ImportInterface0 } from "pkg0" assert { "resolution-mode": "import" }; + import type { RequireInterface1 } from "pkg1" assert { "resolution-mode": "require" }; + `, + "/src/project/randomFileForImport.ts": getRandomFileContent(), + "/src/project/node_modules/pkg0/package.json": getPkgPackageJsonContent(0), + "/src/project/node_modules/pkg0/import.d.ts": getPkgImportContent("Import", 0), + "/src/project/node_modules/pkg0/require.d.ts": getPkgImportContent("Require", 0), + "/src/project/node_modules/pkg1/package.json": getPkgPackageJsonContent(1), + "/src/project/node_modules/pkg1/import.d.ts": getPkgImportContent("Import", 1), + "/src/project/fileWithTypeRefs.ts": Utils.dedent` + /// + /// + interface LocalInterface extends ImportInterface2, RequireInterface3 {} + export {} + `, + "/src/project/randomFileForTypeRef.ts": getRandomFileContent(), + "/src/project/node_modules/pkg2/package.json": getPkgPackageJsonContent(2), + "/src/project/node_modules/pkg2/import.d.ts": getPkgTypeRefContent("Import", 2), + "/src/project/node_modules/pkg2/require.d.ts": getPkgTypeRefContent("Require", 2), + "/src/project/node_modules/pkg3/package.json": getPkgPackageJsonContent(3), + "/src/project/node_modules/pkg3/import.d.ts": getPkgTypeRefContent("Import", 3), + "/src/project/node_modules/@types/pkg4/index.d.ts": getRandomFileContent(), + }; +} + +export function getFsWithNode16() { + return loadProjectFromFiles(getFsMapWithNode16()); +} + +export function getWatchSystemWithNode16() { + const system = createWatchedSystem(getFsMapWithNode16(), { currentDirectory: "/src/project" }); + system.ensureFileOrFolder(libFile); + return system; +} + +export function getServerHostWithNode16() { + const system = createServerHost(getFsMapWithNode16(), { currentDirectory: "/src/project" }); + system.writeFile(libFile.path, libFile.content); + return system; +} + +export function getWatchSystemWithNode16WithBuild() { + return getSystemWithBuild(getWatchSystemWithNode16); +} + +export function getServerHostWithNode16WithBuild() { + return getSystemWithBuild(getServerHostWithNode16); +} + +function getSystemWithBuild(createSystem: () => TestServerHost) { + const system = createSystem(); + solutionBuildWithBaseline(system, ["/src/project"]); + return system; +} + +export function getFsMapWithOut(): { [path: string]: string; } { + return { + "/src/project/tsconfig.json": JSON.stringify({ + compilerOptions: { + module: "amd", + composite: true, + cacheResolutions: true, + traceResolution: true, + out: "./out.js" + }, + include: ["*.ts"], + exclude: ["*.d.ts"] + }), + "/src/project/fileWithImports.ts": Utils.dedent` + import type { ImportInterface0 } from "pkg0"; + import type { RequireInterface1 } from "pkg1"; + `, + "/src/project/randomFileForImport.ts": getRandomFileContent(), + "/src/project/pkg0.d.ts": getPkgImportContent("Import", 0), + "/src/project/fileWithTypeRefs.ts": Utils.dedent` + /// + /// + interface LocalInterface extends ImportInterface2, RequireInterface3 {} + export {} + `, + "/src/project/randomFileForTypeRef.ts": getRandomFileContent(), + "/src/project/node_modules/pkg2/index.d.ts": getPkgTypeRefContent("Import", 2), + "/src/project/node_modules/@types/pkg4/index.d.ts": getRandomFileContent(), + }; +} + +export function getFsWithOut() { + return loadProjectFromFiles(getFsMapWithOut()); +} + +export function getWatchSystemWithOut() { + const system = createWatchedSystem(getFsMapWithOut(), { currentDirectory: "/src/project" }); + system.ensureFileOrFolder(libFile); + return system; +} + +export function getServerHostWithOut() { + const system = createServerHost(getFsMapWithOut(), { currentDirectory: "/src/project" }); + system.ensureFileOrFolder(libFile); + return system; +} + +export function getWatchSystemWithOutWithBuild() { + return getSystemWithBuild(getWatchSystemWithOut); +} + +export function getServerHostWithOutWithBuild() { + return getSystemWithBuild(getServerHostWithOut); +} \ No newline at end of file diff --git a/src/testRunner/unittests/tsbuild/sample.ts b/src/testRunner/unittests/tsbuild/sample.ts index b98f14f7c8e..6cfa21130ab 100644 --- a/src/testRunner/unittests/tsbuild/sample.ts +++ b/src/testRunner/unittests/tsbuild/sample.ts @@ -613,5 +613,28 @@ class someClass2 { }`), fs.unlinkSync("/src/core/anotherModule.ts"); } }); + + verifyTsc({ + scenario: "sample1", + subScenario: "cacheResolutions", + baselinePrograms: true, + fs: () => projFs, + modifyFs: fs => { + cacheResolutions("/src/core/tsconfig.json"); + cacheResolutions("/src/logic/tsconfig.json"); + cacheResolutions("/src/tests/tsconfig.json"); + function cacheResolutions(file: string) { + const content = JSON.parse(fs.readFileSync(file, "utf-8")); + content.compilerOptions = { + ...content.compilerOptions || {}, + cacheResolutions: true + }; + fs.writeFileSync(file, JSON.stringify(content, /*replacer*/ undefined, 4)); + } + }, + commandLineArgs: ["--b", "/src/tests"], + baselineModulesAndTypeRefs: true, + edits: coreChanges, + }); }); }); diff --git a/src/testRunner/unittests/tsbuildWatch/cacheResolutions.ts b/src/testRunner/unittests/tsbuildWatch/cacheResolutions.ts new file mode 100644 index 00000000000..9fb09b65dcf --- /dev/null +++ b/src/testRunner/unittests/tsbuildWatch/cacheResolutions.ts @@ -0,0 +1,113 @@ +import { + TestServerHost, +} from "../virtualFileSystemWithWatch"; +import { + getPkgImportContent, + getPkgTypeRefContent, + getWatchSystemWithNode16, + getWatchSystemWithNode16WithBuild, + getWatchSystemWithOut, + getWatchSystemWithOutWithBuild, +} from "../tsbuild/cacheResolutionsHelper"; +import { + verifyTscWatch, +} from "../tscWatch/helpers"; + +describe("unittests:: tsbuildWatch:: watchMode:: cacheResolutions::", () => { + describe("multi file project", () => { + verifyTscWatchMultiFile("multi file", getWatchSystemWithNode16); + verifyTscWatchMultiFile("multi file already built", getWatchSystemWithNode16WithBuild); + function verifyTscWatchMultiFile(subScenario: string, sys: () => TestServerHost) { + verifyTscWatch({ + scenario: "cacheResolutions", + subScenario, + sys, + commandLineArgs: ["-b", "-w", "--explainFiles"], + baselineModulesAndTypeRefs: true, + edits: [ + { + caption: "modify randomFileForImport by adding import", + edit: sys => sys.prependFile("/src/project/randomFileForImport.ts", `import type { ImportInterface0 } from "pkg0" assert { "resolution-mode": "import" };\n`), + timeouts: sys => sys.runQueuedTimeoutCallbacks(), + }, + { + caption: "modify randomFileForTypeRef by adding typeRef", + edit: sys => sys.prependFile("/src/project/randomFileForTypeRef.ts", `/// \n`), + timeouts: sys => sys.runQueuedTimeoutCallbacks(), + }, + { + caption: "write file not resolved by import and random edit", + edit: sys => { + sys.writeFile("/src/project/node_modules/pkg1/require.d.ts", getPkgImportContent("Require", 1)); + sys.appendFile("/src/project/randomFileForImport.ts", `export const y = 10;`); + }, + timeouts: sys => sys.runQueuedTimeoutCallbacks(), + }, + { + caption: "write file not resolved by typeRef and random edit", + edit: sys => { + sys.writeFile("/src/project/node_modules/pkg3/require.d.ts", getPkgTypeRefContent("Require", 3)); + sys.appendFile("/src/project/randomFileForImport.ts", `export const z = 10;`); + }, + timeouts: sys => sys.runQueuedTimeoutCallbacks(), + }, + { + caption: "Random edit", + edit: sys => sys.appendFile("/src/project/randomFileForImport.ts", `export const k = 10;`), + timeouts: sys => sys.runQueuedTimeoutCallbacks(), + }, + ] + }); + } + }); + + describe("with bundle emit", () => { + verifyTscWatchBundleEmit("bundle emit", getWatchSystemWithOut); + verifyTscWatchBundleEmit("bundle emit already built", getWatchSystemWithOutWithBuild); + function verifyTscWatchBundleEmit(subScenario: string, sys: () => TestServerHost) { + verifyTscWatch({ + scenario: "cacheResolutions", + subScenario, + sys, + commandLineArgs: ["-b", "-w", "--explainFiles"], + baselineModulesAndTypeRefs: true, + edits: [ + { + caption: "modify randomFileForImport by adding import", + edit: sys => sys.prependFile("/src/project/randomFileForImport.ts", `import type { ImportInterface0 } from "pkg0";\n`), + timeouts: sys => sys.runQueuedTimeoutCallbacks(), + }, + { + caption: "modify randomFileForTypeRef by adding typeRef", + edit: sys => sys.prependFile("/src/project/randomFileForTypeRef.ts", `/// \n`), + timeouts: sys => sys.runQueuedTimeoutCallbacks(), + }, + { + caption: "write file not resolved by import and random edit", + edit: sys => { + sys.writeFile("/src/project/pkg1.d.ts", getPkgImportContent("Require", 1)); + sys.appendFile("/src/project/randomFileForImport.ts", `export const y = 10;`); + }, + timeouts: sys => sys.runQueuedTimeoutCallbacks(), + }, + { + caption: "write file not resolved by typeRef and random edit", + edit: sys => { + sys.ensureFileOrFolder({ + path: "/src/project/node_modules/pkg3/index.d.ts", + content: getPkgTypeRefContent("Require", 3) + }); + sys.appendFile("/src/project/randomFileForImport.ts", `export const z = 10;`); + }, + timeouts: sys => sys.runQueuedTimeoutCallbacks(), + }, + { + caption: "Random edit", + edit: sys => sys.appendFile("/src/project/randomFileForImport.ts", `export const k = 10;`), + timeouts: sys => sys.runQueuedTimeoutCallbacks(), + }, + ] + }); + } + }); +}); \ No newline at end of file diff --git a/src/testRunner/unittests/tsc/cacheResolutions.ts b/src/testRunner/unittests/tsc/cacheResolutions.ts new file mode 100644 index 00000000000..93c75b875f0 --- /dev/null +++ b/src/testRunner/unittests/tsc/cacheResolutions.ts @@ -0,0 +1,226 @@ +import * as Utils from "../../_namespaces/Utils"; +import { + createWatchedSystem, + libFile, +} from "../virtualFileSystemWithWatch"; +import { + getFsWithNode16, + getFsWithOut, + getPkgImportContent, + getPkgTypeRefContent, +} from "../tsbuild/cacheResolutionsHelper"; +import { + loadProjectFromFiles, + noChangeRun, + prependText, + verifyTsc, +} from "./helpers"; +import { + solutionBuildWithBaseline, + verifyTscWatch, +} from "../tscWatch/helpers"; + +describe("unittests:: tsc:: cacheResolutions::", () => { + verifyTsc({ + scenario: "cacheResolutions", + subScenario: "multi file", + fs: getFsWithNode16, + commandLineArgs: ["-p", "/src/project", "--explainFiles"], + baselineModulesAndTypeRefs: true, + edits: [ + noChangeRun, + { + caption: "modify randomFileForImport by adding import", + edit: fs => prependText(fs, "/src/project/randomFileForImport.ts", `import type { ImportInterface0 } from "pkg0" assert { "resolution-mode": "import" };\n`), + }, + { + caption: "modify randomFileForTypeRef by adding typeRef", + edit: fs => prependText(fs, "/src/project/randomFileForTypeRef.ts", `/// \n`), + }, + { + caption: "write file not resolved by import", + edit: fs => fs.writeFileSync("/src/project/node_modules/pkg1/require.d.ts", getPkgImportContent("Require", 1)), + }, + { + caption: "write file not resolved by typeRef", + edit: fs => fs.writeFileSync("/src/project/node_modules/pkg3/require.d.ts", getPkgTypeRefContent("Require", 3)), + }, + { + caption: "delete file with imports", + edit: fs => fs.unlinkSync("/src/project/fileWithImports.ts"), + }, + { + caption: "delete file with typeRefs", + edit: fs => fs.unlinkSync("/src/project/fileWithTypeRefs.ts"), + }, + { + caption: "delete resolved import file", + edit: fs => fs.unlinkSync("/src/project/node_modules/pkg0/import.d.ts"), + }, + { + caption: "delete resolved typeRef file", + edit: fs => fs.unlinkSync("/src/project/node_modules/pkg2/import.d.ts"), + }, + ] + }); + + verifyTsc({ + scenario: "cacheResolutions", + subScenario: "bundle emit", + fs: getFsWithOut, + commandLineArgs: ["-p", "/src/project", "--explainFiles"], + baselineModulesAndTypeRefs: true, + edits: [ + noChangeRun, + { + caption: "modify randomFileForImport by adding import", + edit: fs => prependText(fs, "/src/project/randomFileForImport.ts", `import type { ImportInterface0 } from "pkg0";\n`), + }, + { + caption: "modify randomFileForTypeRef by adding typeRef", + edit: fs => prependText(fs, "/src/project/randomFileForTypeRef.ts", `/// \n`), + }, + { + caption: "write file not resolved by import", + edit: fs => fs.writeFileSync("/src/project/pkg1.d.ts", getPkgImportContent("Require", 1)), + }, + { + caption: "write file not resolved by typeRef", + edit: fs => { + fs.mkdirpSync("/src/project/node_modules/pkg3"); + fs.writeFileSync("/src/project/node_modules/pkg3/index.d.ts", getPkgTypeRefContent("Require", 3)); + }, + }, + { + caption: "delete file with imports", + edit: fs => fs.unlinkSync("/src/project/fileWithImports.ts"), + }, + { + caption: "delete file with typeRefs", + edit: fs => fs.unlinkSync("/src/project/fileWithTypeRefs.ts"), + }, + { + caption: "delete resolved import file", + edit: fs => fs.unlinkSync("/src/project/pkg0.d.ts"), + }, + { + caption: "delete resolved typeRef file", + edit: fs => fs.unlinkSync("/src/project/node_modules/pkg2/index.d.ts"), + }, + ] + }); + + verifyTsc({ + scenario: "cacheResolutions", + subScenario: "pathsBasePath", + fs: () => loadProjectFromFiles({ + "/src/project/tsconfig.json": JSON.stringify({ + compilerOptions: { + paths: { + "*": ["./lib/*"] + }, + composite: true, + cacheResolutions: true, + traceResolution: true, + }, + files: ["main.ts", "randomFileForImport.ts"], + }), + "/src/project/main.ts": Utils.dedent` + import type { ImportInterface0 } from "pkg0"; + `, + "/src/project/randomFileForImport.ts": "export const x = 10;", + "/src/project/lib/pkg0/index.d.ts": getPkgImportContent("Import", 0), + }), + commandLineArgs: ["-p", "/src/project", "--explainFiles"], + baselineModulesAndTypeRefs: true, + edits: [ + { + caption: "modify randomFileForImport by adding import", + edit: fs => prependText(fs, "/src/project/randomFileForImport.ts", `import type { ImportInterface0 } from "pkg0";\n`), + }, + ] + }); + + describe("symlinks", () => { + function verifySymLinks(preserveSymlinks: boolean, built: boolean) { + verifyTscWatch({ + scenario: "cacheResolutions", + subScenario: `resolutions with symlinks${preserveSymlinks ? " with preserveSymlinks" : ""}${built ? "" : " when not built"}`, + sys: () => { + const sys = createWatchedSystem({ + "/src/project/tsconfig.json": JSON.stringify({ + compilerOptions: { + composite: true, + cacheResolutions: true, + traceResolution: true, + preserveSymlinks, + }, + files: ["main.ts", "randomFileForImport.ts"], + }), + "/src/project/main.ts": Utils.dedent` + import type { ImportInterface0 } from "pkg0"; + `, + "/src/project/randomFileForImport.ts": "export const x = 10;", + "/src/project/lib/pkg0/index.d.ts": getPkgImportContent("Import", 0), + "/src/project/node_modules/pkg0/index.d.ts": { symLink: "/src/project/lib/pkg0/index.d.ts" }, + }); + sys.ensureFileOrFolder(libFile); + if (built) { + solutionBuildWithBaseline(sys, ["/src/project"]); + sys.clearOutput(); + sys.prependFile("/src/project/randomFileForImport.ts", `import type { ImportInterface0 } from "pkg0";\n`); + } + return sys; + }, + commandLineArgs: ["-p", "/src/project", "--explainFiles"], + baselineModulesAndTypeRefs: true, + }); + } + verifySymLinks(/*preserveSymlinks*/ true, /*built*/ true); + verifySymLinks(/*preserveSymlinks*/ false, /*built*/ true); + verifySymLinks(/*preserveSymlinks*/ true, /*built*/ false); + verifySymLinks(/*preserveSymlinks*/ false, /*built*/ false); + }); + + verifyTsc({ + scenario: "cacheResolutions", + subScenario: "diagnostics from cache", + fs: () => loadProjectFromFiles({ + "/src/project/tsconfig.json": JSON.stringify({ + compilerOptions: { + moduleResolution: "nodenext", + outDir: "./dist", + declaration: true, + declarationDir: "./types", + cacheResolutions: true, + traceResolution: true, + }, + }), + "/src/project/package.json": JSON.stringify({ + name: "@this/package", + type: "module", + exports: { + ".": { + default: "./dist/index.js", + types: "./types/index.d.ts" + } + } + }), + "/src/project/index.ts": Utils.dedent` + import * as me from "@this/package"; + me.thing() + export function thing(): void {} + `, + "/src/project/index2.ts": Utils.dedent` + export function thing(): void {} + `, + "/src/project/randomFileForImport.ts": "export const x = 10;", + }), + commandLineArgs: ["-p", "/src/project", "--incremental", "--explainFiles"], + baselineModulesAndTypeRefs: true, + edits: [{ + caption: "modify randomFileForImport by adding import", + edit: fs => prependText(fs, "/src/project/randomFileForImport.ts", `import * as me from "@this/package";\n`), + }], + }); +}); \ No newline at end of file diff --git a/src/testRunner/unittests/tscWatch/cacheResolutions.ts b/src/testRunner/unittests/tscWatch/cacheResolutions.ts new file mode 100644 index 00000000000..cbd3e36734d --- /dev/null +++ b/src/testRunner/unittests/tscWatch/cacheResolutions.ts @@ -0,0 +1,143 @@ +import { + getPkgImportContent, + getPkgTypeRefContent, + getWatchSystemWithNode16, + getWatchSystemWithNode16WithBuild, + getWatchSystemWithOut, + getWatchSystemWithOutWithBuild, +} from "../tsbuild/cacheResolutionsHelper"; +import { + TestServerHost, +} from "../virtualFileSystemWithWatch"; +import { + verifyTscWatch, +} from "./helpers"; + +describe("unittests:: tsc-watch:: cacheResolutions::", () => { + describe("multi file project", () => { + verifyTscWatchMultiFile("multi file", getWatchSystemWithNode16); + verifyTscWatchMultiFile("multi file already built", getWatchSystemWithNode16WithBuild); + function verifyTscWatchMultiFile(subScenario: string, sys: () => TestServerHost) { + verifyTscWatch({ + scenario: "cacheResolutions", + subScenario, + sys, + commandLineArgs: ["-w", "--explainFiles", "--extendedDiagnostics"], + baselineModulesAndTypeRefs: true, + edits: [ + { + caption: "modify randomFileForImport by adding import", + edit: sys => sys.prependFile("/src/project/randomFileForImport.ts", `import type { ImportInterface0 } from "pkg0" assert { "resolution-mode": "import" };\n`), + timeouts: sys => sys.runQueuedTimeoutCallbacks(), + }, + { + caption: "modify randomFileForTypeRef by adding typeRef", + edit: sys => sys.prependFile("/src/project/randomFileForTypeRef.ts", `/// \n`), + timeouts: sys => sys.runQueuedTimeoutCallbacks(), + }, + { + caption: "write file not resolved by import", + edit: sys => sys.writeFile("/src/project/node_modules/pkg1/require.d.ts", getPkgImportContent("Require", 1)), + timeouts: sys => { + sys.runQueuedTimeoutCallbacks(); // failed lookup + sys.runQueuedTimeoutCallbacks(); // actual update + } + }, + { + caption: "write file not resolved by typeRef", + edit: sys => sys.writeFile("/src/project/node_modules/pkg3/require.d.ts", getPkgTypeRefContent("Require", 3)), + timeouts: sys => { + sys.runQueuedTimeoutCallbacks(); // failed lookup + sys.runQueuedTimeoutCallbacks(); // actual update + } + }, + { + caption: "delete file with imports", + edit: sys => sys.deleteFile("/src/project/fileWithImports.ts"), + timeouts: sys => sys.runQueuedTimeoutCallbacks(), + }, + { + caption: "delete file with typeRefs", + edit: sys => sys.deleteFile("/src/project/fileWithTypeRefs.ts"), + timeouts: sys => sys.runQueuedTimeoutCallbacks(), + }, + { + caption: "delete resolved import file", + edit: sys => sys.deleteFile("/src/project/node_modules/pkg0/import.d.ts"), + timeouts: sys => sys.runQueuedTimeoutCallbacks(), + }, + { + caption: "delete resolved typeRef file", + edit: sys => sys.deleteFile("/src/project/node_modules/pkg2/import.d.ts"), + timeouts: sys => sys.runQueuedTimeoutCallbacks(), + }, + ] + }); + } + }); + + describe("with bundle emit", () => { + verifyTscWatchBundleEmit("bundle emit", getWatchSystemWithOut); + verifyTscWatchBundleEmit("bundle emit already built", getWatchSystemWithOutWithBuild); + function verifyTscWatchBundleEmit(subScenario: string, sys: () => TestServerHost) { + verifyTscWatch({ + scenario: "cacheResolutions", + subScenario, + sys, + commandLineArgs: ["-w", "--explainFiles", "--extendedDiagnostics"], + baselineModulesAndTypeRefs: true, + edits: [ + { + caption: "modify randomFileForImport by adding import", + edit: sys => sys.prependFile("/src/project/randomFileForImport.ts", `import type { ImportInterface0 } from "pkg0";\n`), + timeouts: sys => sys.runQueuedTimeoutCallbacks(), + }, + { + caption: "modify randomFileForTypeRef by adding typeRef", + edit: sys => sys.prependFile("/src/project/randomFileForTypeRef.ts", `/// \n`), + timeouts: sys => sys.runQueuedTimeoutCallbacks(), + }, + { + caption: "write file not resolved by import", + edit: sys => sys.writeFile("/src/project/pkg1.d.ts", getPkgImportContent("Require", 1)), + timeouts: sys => { + sys.runQueuedTimeoutCallbacks(); // failed lookup + sys.runQueuedTimeoutCallbacks(); // actual update + } + }, + { + caption: "write file not resolved by typeRef", + edit: sys => sys.ensureFileOrFolder({ + path: "/src/project/node_modules/pkg3/index.d.ts", + content: getPkgTypeRefContent("Require", 3) + }), + timeouts: sys => { + sys.runQueuedTimeoutCallbacks(); // failed lookup + sys.runQueuedTimeoutCallbacks(); // actual update + } + }, + { + caption: "delete file with imports", + edit: sys => sys.deleteFile("/src/project/fileWithImports.ts"), + timeouts: sys => sys.runQueuedTimeoutCallbacks(), + }, + { + caption: "delete file with typeRefs", + edit: sys => sys.deleteFile("/src/project/fileWithTypeRefs.ts"), + timeouts: sys => sys.runQueuedTimeoutCallbacks(), + }, + { + caption: "delete resolved import file", + edit: sys => sys.deleteFile("/src/project/pkg0.d.ts"), + timeouts: sys => sys.runQueuedTimeoutCallbacks(), + }, + { + caption: "delete resolved typeRef file", + edit: sys => sys.deleteFile("/src/project/node_modules/pkg2/index.d.ts"), + timeouts: sys => sys.runQueuedTimeoutCallbacks(), + }, + ] + }); + } + }); +}); \ No newline at end of file diff --git a/src/testRunner/unittests/tsserver/cacheResolutions.ts b/src/testRunner/unittests/tsserver/cacheResolutions.ts new file mode 100644 index 00000000000..a9baaa25e3a --- /dev/null +++ b/src/testRunner/unittests/tsserver/cacheResolutions.ts @@ -0,0 +1,280 @@ +import * as ts from "../../_namespaces/ts"; +import * as fakes from "../../_namespaces/fakes"; +import * as Utils from "../../_namespaces/Utils"; +import { + createServerHost, + File, + getTsBuildProjectFile, + libFile, + TestServerHost, +} from "../virtualFileSystemWithWatch"; +import { + solutionBuildWithBaseline, +} from "../tscWatch/helpers"; +import { + baselineTsserverLogs, + createLoggerWithInMemoryLogs, + createSession, + openFilesForSession, +} from "./helpers"; +import { + getPkgImportContent, + getServerHostWithNode16, + getServerHostWithNode16WithBuild, + getServerHostWithOut, + getServerHostWithOutWithBuild, +} from "../tsbuild/cacheResolutionsHelper"; + +describe("unittests:: tsserver:: cacheResolutions:: tsserverProjectSystem caching module resolutions option", () => { + describe("multi file project", () => { + verifyTsserverMultiFile("multi file not built", getServerHostWithNode16); + verifyTsserverMultiFile("multi file", getServerHostWithNode16WithBuild); + function verifyTsserverMultiFile(scenario: string, createHost: () => TestServerHost) { + it(scenario, () => { + const host = fakes.patchHostForBuildInfoReadWrite(createHost()); + const session = createSession(host, { logger: createLoggerWithInMemoryLogs(host) }); + openFilesForSession(["/src/project/randomFileForImport.ts", "/src/project/randomFileForTypeRef.ts"], session); + + session.logger.info("modify randomFileForImport by adding import"); + session.executeCommandSeq({ + command: ts.server.protocol.CommandTypes.Change, + arguments: { + file: "/src/project/randomFileForImport.ts", + line: 1, + offset: 1, + endLine: 1, + endOffset: 1, + insertString: `import type { ImportInterface0 } from "pkg0" assert { "resolution-mode": "import" };\n`, + } + }); + ts.server.updateProjectIfDirty(session.getProjectService().configuredProjects.get("/src/project/tsconfig.json")!); + + session.logger.info("modify randomFileForTypeRef by adding typeRef"); + session.executeCommandSeq({ + command: ts.server.protocol.CommandTypes.Change, + arguments: { + file: "/src/project/randomFileForTypeRef.ts", + line: 1, + offset: 1, + endLine: 1, + endOffset: 1, + insertString: `/// \n`, + } + }); + ts.server.updateProjectIfDirty(session.getProjectService().configuredProjects.get("/src/project/tsconfig.json")!); + + session.logger.info("write file not resolved by import"); + host.writeFile("/src/project/node_modules/pkg1/require.d.ts", getPkgImportContent("Require", 1)); + host.runQueuedTimeoutCallbacks(); // failed lookup + host.runQueuedTimeoutCallbacks(); // actual update + + session.logger.info("write file not resolved by typeRef"); + host.writeFile("/src/project/node_modules/pkg3/require.d.ts", getPkgImportContent("Require", 3)); + host.runQueuedTimeoutCallbacks(); // failed lookup + host.runQueuedTimeoutCallbacks(); // actual update + + session.logger.info("delete file with imports"); + host.deleteFile("/src/project/fileWithImports.ts"); + host.runQueuedTimeoutCallbacks(); + + session.logger.info("delete file with typeRefs"); + host.deleteFile("/src/project/fileWithTypeRefs.ts"); + host.runQueuedTimeoutCallbacks(); + + session.logger.info("delete resolved import file"); + host.deleteFile("/src/project/node_modules/pkg0/import.d.ts"); + host.runQueuedTimeoutCallbacks(); + + session.logger.info("delete resolved typeRef file"); + host.deleteFile("/src/project/node_modules/pkg2/import.d.ts"); + host.runQueuedTimeoutCallbacks(); + + baselineTsserverLogs("cacheResolutions", scenario, session); + }); + } + }); + + describe("with bundle emit", () => { + verifyTsserverBundleEmit("bundle emit not built", getServerHostWithOut); + verifyTsserverBundleEmit("bundle emit", getServerHostWithOutWithBuild); + function verifyTsserverBundleEmit(scenario: string, createHost: () => TestServerHost) { + it(scenario, () => { + const host = fakes.patchHostForBuildInfoReadWrite(createHost()); + const session = createSession(host, { logger: createLoggerWithInMemoryLogs(host) }); + openFilesForSession(["/src/project/randomFileForImport.ts", "/src/project/randomFileForTypeRef.ts"], session); + + session.logger.info("modify randomFileForImport by adding import"); + session.executeCommandSeq({ + command: ts.server.protocol.CommandTypes.Change, + arguments: { + file: "/src/project/randomFileForImport.ts", + line: 1, + offset: 1, + endLine: 1, + endOffset: 1, + insertString: `import type { ImportInterface0 } from "pkg0";\n`, + } + }); + ts.server.updateProjectIfDirty(session.getProjectService().configuredProjects.get("/src/project/tsconfig.json")!); + + session.logger.info("modify randomFileForTypeRef by adding typeRef"); + session.executeCommandSeq({ + command: ts.server.protocol.CommandTypes.Change, + arguments: { + file: "/src/project/randomFileForTypeRef.ts", + line: 1, + offset: 1, + endLine: 1, + endOffset: 1, + insertString: `/// \n`, + } + }); + ts.server.updateProjectIfDirty(session.getProjectService().configuredProjects.get("/src/project/tsconfig.json")!); + + session.logger.info("write file not resolved by import"); + host.writeFile("/src/project/pkg1.d.ts", getPkgImportContent("Require", 1)); + host.runQueuedTimeoutCallbacks(); // failed lookup + host.runQueuedTimeoutCallbacks(); // actual update + + session.logger.info("write file not resolved by typeRef"); + host.ensureFileOrFolder({ + path: "/src/project/node_modules/pkg3/index.d.ts", + content: getPkgImportContent("Require", 3) + }); + host.runQueuedTimeoutCallbacks(); // failed lookup + host.runQueuedTimeoutCallbacks(); // actual update + + session.logger.info("delete file with imports"); + host.deleteFile("/src/project/fileWithImports.ts"); + host.runQueuedTimeoutCallbacks(); + + session.logger.info("delete file with typeRefs"); + host.deleteFile("/src/project/fileWithTypeRefs.ts"); + host.runQueuedTimeoutCallbacks(); + + session.logger.info("delete resolved import file"); + host.deleteFile("/src/project/pkg0.d.ts"); + host.runQueuedTimeoutCallbacks(); + + session.logger.info("delete resolved typeRef file"); + host.deleteFile("/src/project/node_modules/pkg2/index.d.ts"); + host.runQueuedTimeoutCallbacks(); + + baselineTsserverLogs("cacheResolutions", scenario, session); + }); + } + }); + + describe("different projects", () => { + describe("on sample project", () => { + function cacheResolutions(file: File) { + const content = JSON.parse(file.content); + content.compilerOptions = { + ...content.compilerOptions || {}, + cacheResolutions: true, + traceResolution: true, + }; + file.content = JSON.stringify(content, /*replacer*/ undefined, 4); + return file; + } + function setupHost() { + const coreConfig = cacheResolutions(getTsBuildProjectFile("sample1", "core/tsconfig.json")); + const coreIndex = getTsBuildProjectFile("sample1", "core/index.ts"); + const coreAnotherModule = getTsBuildProjectFile("sample1", "core/anotherModule.ts"); + const coreSomeDecl = getTsBuildProjectFile("sample1", "core/some_decl.d.ts"); + const logicConfig = cacheResolutions(getTsBuildProjectFile("sample1", "logic/tsconfig.json")); + const logicIndex = getTsBuildProjectFile("sample1", "logic/index.ts"); + const testsConfig = cacheResolutions(getTsBuildProjectFile("sample1", "tests/tsconfig.json")); + const testsIndex = getTsBuildProjectFile("sample1", "tests/index.ts"); + const host = createServerHost([libFile, coreConfig, coreIndex, coreAnotherModule, coreSomeDecl, logicConfig, logicIndex, testsConfig, testsIndex]); + return { host, testsConfig, testsIndex }; + } + verifyOnProject("sample project", setupHost); + }); + + describe("project where d.ts file contains fewer modules than original file", () => { + function setupHost() { + const coreConfig: File = { + path: `/user/username/projects/sample1/core/tsconfig.json`, + content: JSON.stringify({ compilerOptions: { composite: true, cacheResolutions: true, traceResolution: true } }) + }; + const coreIndex: File = { + path: `/user/username/projects/sample1/core/index.ts`, + content: `export function bar() { return 10; }` + }; + const coreMyClass: File = { + path: `/user/username/projects/sample1/core/myClass.ts`, + content: `export class myClass { }` + }; + const coreAnotherClass: File = { + path: `/user/username/projects/sample1/core/anotherClass.ts`, + content: `export class anotherClass { }` + }; + const logicConfig: File = { + path: `/user/username/projects/sample1/logic/tsconfig.json`, + content: JSON.stringify({ + compilerOptions: { composite: true, cacheResolutions: true, traceResolution: true }, + references: [{ path: "../core" }] + }) + }; + const logicIndex: File = { + path: `/user/username/projects/sample1/logic/index.ts`, + content: Utils.dedent` + import { myClass } from "../core/myClass"; + import { bar } from "../core"; + import { anotherClass } from "../core/anotherClass"; + export function returnMyClass() { + bar(); + return new myClass(); + } + export function returnAnotherClass() { + return new anotherClass(); + } + ` + }; + const testsConfig: File = { + path: `/user/username/projects/sample1/tests/tsconfig.json`, + content: JSON.stringify({ + compilerOptions: { composite: true, cacheResolutions: true, traceResolution: true }, + references: [{ path: "../logic" }] + }) + }; + const testsIndex: File = { + path: `/user/username/projects/sample1/tests/index.ts`, + content: Utils.dedent` + import { returnMyClass } from "../logic"; + returnMyClass(); + ` + }; + const host = createServerHost([libFile, coreConfig, coreIndex, coreMyClass, coreAnotherClass, logicConfig, logicIndex, testsConfig, testsIndex]); + return { host, testsConfig, testsIndex }; + } + + verifyOnProject("dts has fewer resolutions than ts", setupHost); + }); + + function verifyOnProject( + scenario: string, + setupHost: () => { + host: TestServerHost; + testsConfig: File; + testsIndex: File; + }) { + it(scenario, () => { + const { host, testsConfig, testsIndex } = setupHost(); + solutionBuildWithBaseline(host, [testsConfig.path]); + fakes.patchHostForBuildInfoReadWrite(host); + const session = createSession(host, { logger: createLoggerWithInMemoryLogs(host) }); + openFilesForSession([testsIndex], session); + baselineTsserverLogs("cacheResolutions", scenario, session); + }); + it(`${scenario} not built`, () => { + const { host, testsIndex } = setupHost(); + fakes.patchHostForBuildInfoReadWrite(host); + const session = createSession(host, { logger: createLoggerWithInMemoryLogs(host) }); + openFilesForSession([testsIndex], session); + baselineTsserverLogs("cacheResolutions", `${scenario} not built`, session); + }); + } + }); +}); \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/cacheResolutions/bundle-emit.js b/tests/baselines/reference/tsbuild/cacheResolutions/bundle-emit.js new file mode 100644 index 00000000000..44962dee732 --- /dev/null +++ b/tests/baselines/reference/tsbuild/cacheResolutions/bundle-emit.js @@ -0,0 +1,1410 @@ +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project/fileWithImports.ts] +import type { ImportInterface0 } from "pkg0"; +import type { RequireInterface1 } from "pkg1"; + + +//// [/src/project/fileWithTypeRefs.ts] +/// +/// +interface LocalInterface extends ImportInterface2, RequireInterface3 {} +export {} + + +//// [/src/project/node_modules/@types/pkg4/index.d.ts] +export const x = 10; + +//// [/src/project/node_modules/pkg2/index.d.ts] +export {}; +declare global { + interface ImportInterface2 {} +} + + +//// [/src/project/pkg0.d.ts] +export interface ImportInterface0 {} + +//// [/src/project/randomFileForImport.ts] +export const x = 10; + +//// [/src/project/randomFileForTypeRef.ts] +export const x = 10; + +//// [/src/project/tsconfig.json] +{"compilerOptions":{"module":"amd","composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js"},"include":["*.ts"],"exclude":["*.d.ts"]} + + + +Output:: +/lib/tsc -b /src/project --explainFiles +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg1.ts' does not exist. +File '/src/project/pkg1.tsx' does not exist. +File '/src/project/pkg1.d.ts' does not exist. +File '/src/pkg1.ts' does not exist. +File '/src/pkg1.tsx' does not exist. +File '/src/pkg1.d.ts' does not exist. +File '/pkg1.ts' does not exist. +File '/pkg1.tsx' does not exist. +File '/pkg1.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/pkg1.js' does not exist. +File '/src/project/pkg1.jsx' does not exist. +File '/src/pkg1.js' does not exist. +File '/src/pkg1.jsx' does not exist. +File '/pkg1.js' does not exist. +File '/pkg1.jsx' does not exist. +======== Module name 'pkg1' was not resolved. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg3.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +src/project/fileWithImports.ts:2:40 - error TS2792: Cannot find module 'pkg1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? + +2 import type { RequireInterface1 } from "pkg1"; +   ~~~~~~ + +src/project/fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +src/project/fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +lib/lib.d.ts + Default library for target 'es5' +src/project/pkg0.d.ts + Imported via "pkg0" from file 'src/project/fileWithImports.ts' +src/project/fileWithImports.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'src/project/fileWithTypeRefs.ts' +src/project/fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/randomFileForImport.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + +Found 3 errors. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx", + "/src/project/pkg1.d.ts", + "/src/pkg1.ts", + "/src/pkg1.tsx", + "/src/pkg1.d.ts", + "/pkg1.ts", + "/pkg1.tsx", + "/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/pkg1.js", + "/src/project/pkg1.jsx", + "/src/pkg1.js", + "/src/pkg1.jsx", + "/pkg1.js", + "/pkg1.jsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts", + "/src/project/node_modules/pkg3/index.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/project --explainFiles +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg1.ts' does not exist. +File '/src/project/pkg1.tsx' does not exist. +File '/src/project/pkg1.d.ts' does not exist. +File '/src/pkg1.ts' does not exist. +File '/src/pkg1.tsx' does not exist. +File '/src/pkg1.d.ts' does not exist. +File '/pkg1.ts' does not exist. +File '/pkg1.tsx' does not exist. +File '/pkg1.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/pkg1.js' does not exist. +File '/src/project/pkg1.jsx' does not exist. +File '/src/pkg1.js' does not exist. +File '/src/pkg1.jsx' does not exist. +File '/pkg1.js' does not exist. +File '/pkg1.jsx' does not exist. +======== Module name 'pkg1' was not resolved. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg3.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +src/project/fileWithImports.ts:2:40 - error TS2792: Cannot find module 'pkg1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? + +2 import type { RequireInterface1 } from "pkg1"; +   ~~~~~~ + +src/project/fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +src/project/fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +lib/lib.d.ts + Default library for target 'es5' +src/project/pkg0.d.ts + Imported via "pkg0" from file 'src/project/fileWithImports.ts' +src/project/fileWithImports.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'src/project/fileWithTypeRefs.ts' +src/project/fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/randomFileForImport.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + +Found 3 errors. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx", + "/src/project/pkg1.d.ts", + "/src/pkg1.ts", + "/src/pkg1.tsx", + "/src/pkg1.d.ts", + "/pkg1.ts", + "/pkg1.tsx", + "/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/pkg1.js", + "/src/project/pkg1.jsx", + "/src/pkg1.js", + "/src/pkg1.jsx", + "/pkg1.js", + "/pkg1.jsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts", + "/src/project/node_modules/pkg3/index.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + + + + +Change:: write file not resolved by import +Input:: +//// [/src/project/pkg1.d.ts] +export interface RequireInterface1 {} + + + +Output:: +/lib/tsc -b /src/project --explainFiles +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg1.ts' does not exist. +File '/src/project/pkg1.tsx' does not exist. +File '/src/project/pkg1.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg1' was successfully resolved to '/src/project/pkg1.d.ts'. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg3.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +src/project/fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +src/project/fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +lib/lib.d.ts + Default library for target 'es5' +src/project/pkg0.d.ts + Imported via "pkg0" from file 'src/project/fileWithImports.ts' +src/project/pkg1.d.ts + Imported via "pkg1" from file 'src/project/fileWithImports.ts' +src/project/fileWithImports.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'src/project/fileWithTypeRefs.ts' +src/project/fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/randomFileForImport.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + +Found 2 errors. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg1.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts", + "/src/project/node_modules/pkg3/index.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + + + + +Change:: write file not resolved by typeRef +Input:: +//// [/src/project/node_modules/pkg3/index.d.ts] +export {}; +declare global { + interface RequireInterface3 {} +} + + + + +Output:: +/lib/tsc -b /src/project --explainFiles +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg1.ts' does not exist. +File '/src/project/pkg1.tsx' does not exist. +File '/src/project/pkg1.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg1' was successfully resolved to '/src/project/pkg1.d.ts'. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg3/package.json' does not exist. +File '/src/project/node_modules/pkg3.d.ts' does not exist. +File '/src/project/node_modules/pkg3/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg3/index.d.ts', result '/src/project/node_modules/pkg3/index.d.ts'. +======== Type reference directive 'pkg3' was successfully resolved to '/src/project/node_modules/pkg3/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +lib/lib.d.ts + Default library for target 'es5' +src/project/pkg0.d.ts + Imported via "pkg0" from file 'src/project/fileWithImports.ts' +src/project/pkg1.d.ts + Imported via "pkg1" from file 'src/project/fileWithImports.ts' +src/project/fileWithImports.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'src/project/fileWithTypeRefs.ts' +src/project/node_modules/pkg3/index.d.ts + Type library referenced via 'pkg3' from file 'src/project/fileWithTypeRefs.ts' +src/project/fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/randomFileForImport.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +exitCode:: ExitStatus.Success +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg1.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg3/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + + +//// [/out.d.ts] +declare module "fileWithImports" { } +declare module "fileWithTypeRefs" { + export {}; +} +declare module "randomFileForImport" { + export const x = 10; +} +declare module "randomFileForTypeRef" { + export const x = 10; +} + + +//// [/out.js] +define("fileWithImports", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +}); +define("fileWithTypeRefs", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /// + /// +}); +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); + + +//// [/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./src/project","sourceFiles":["./src/project/fileWithImports.ts","./src/project/fileWithTypeRefs.ts","./src/project/randomFileForImport.ts","./src/project/randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":864,"kind":"text"}],"hash":"-31220064334-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n});\r\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /// \r\n /// \r\n});\r\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n exports.x = 10;\r\n});\r\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n exports.x = 10;\r\n});\r\n"},"dts":{"sections":[{"pos":0,"end":233,"kind":"text"}],"hash":"407350366-declare module \"fileWithImports\" { }\r\ndeclare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n"}},"program":{"fileNames":["./lib/lib.d.ts","./src/project/pkg0.d.ts","./src/project/pkg1.d.ts","./src/project/filewithimports.ts","./src/project/node_modules/pkg2/index.d.ts","./src/project/node_modules/pkg3/index.d.ts","./src/project/filewithtyperefs.ts","./src/project/randomfileforimport.ts","./src/project/randomfilefortyperef.ts","./src/project/node_modules/@types/pkg4/index.d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","769951468-export interface ImportInterface0 {}","-3547817137-export interface RequireInterface1 {}","17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n","1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n","-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","-10726455937-export const x = 10;","-10726455937-export const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"407350366-declare module \"fileWithImports\" { }\r\ndeclare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/out.tsbuildinfo.baseline.txt] +====================================================================== +File:: ./out.js +---------------------------------------------------------------------- +text: (0-864) +define("fileWithImports", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +}); +define("fileWithTypeRefs", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /// + /// +}); +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); + +====================================================================== +====================================================================== +File:: ./out.d.ts +---------------------------------------------------------------------- +text: (0-233) +declare module "fileWithImports" { } +declare module "fileWithTypeRefs" { + export {}; +} +declare module "randomFileForImport" { + export const x = 10; +} +declare module "randomFileForTypeRef" { + export const x = 10; +} + +====================================================================== + +//// [/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./src/project", + "sourceFiles": [ + "./src/project/fileWithImports.ts", + "./src/project/fileWithTypeRefs.ts", + "./src/project/randomFileForImport.ts", + "./src/project/randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 864, + "kind": "text" + } + ], + "hash": "-31220064334-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n});\r\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /// \r\n /// \r\n});\r\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n exports.x = 10;\r\n});\r\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n exports.x = 10;\r\n});\r\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 233, + "kind": "text" + } + ], + "hash": "407350366-declare module \"fileWithImports\" { }\r\ndeclare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n" + } + }, + "program": { + "fileNames": [ + "./lib/lib.d.ts", + "./src/project/pkg0.d.ts", + "./src/project/pkg1.d.ts", + "./src/project/filewithimports.ts", + "./src/project/node_modules/pkg2/index.d.ts", + "./src/project/node_modules/pkg3/index.d.ts", + "./src/project/filewithtyperefs.ts", + "./src/project/randomfileforimport.ts", + "./src/project/randomfilefortyperef.ts", + "./src/project/node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/project/pkg0.d.ts": "769951468-export interface ImportInterface0 {}", + "./src/project/pkg1.d.ts": "-3547817137-export interface RequireInterface1 {}", + "./src/project/filewithimports.ts": "17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n", + "./src/project/node_modules/pkg2/index.d.ts": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "./src/project/node_modules/pkg3/index.d.ts": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "./src/project/filewithtyperefs.ts": "-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "./src/project/randomfileforimport.ts": "-10726455937-export const x = 10;", + "./src/project/randomfilefortyperef.ts": "-10726455937-export const x = 10;", + "./src/project/node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "407350366-declare module \"fileWithImports\" { }\r\ndeclare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 3511 +} + + + +Change:: modify randomFileForImport by adding import +Input:: +//// [/src/project/randomFileForImport.ts] +import type { ImportInterface0 } from "pkg0"; +export const x = 10; + + + +Output:: +/lib/tsc -b /src/project --explainFiles +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg1.ts' does not exist. +File '/src/project/pkg1.tsx' does not exist. +File '/src/project/pkg1.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg1' was successfully resolved to '/src/project/pkg1.d.ts'. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg3/package.json' does not exist. +File '/src/project/node_modules/pkg3.d.ts' does not exist. +File '/src/project/node_modules/pkg3/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg3/index.d.ts', result '/src/project/node_modules/pkg3/index.d.ts'. +======== Type reference directive 'pkg3' was successfully resolved to '/src/project/node_modules/pkg3/index.d.ts', primary: false. ======== +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +lib/lib.d.ts + Default library for target 'es5' +src/project/pkg0.d.ts + Imported via "pkg0" from file 'src/project/fileWithImports.ts' + Imported via "pkg0" from file 'src/project/randomFileForImport.ts' +src/project/pkg1.d.ts + Imported via "pkg1" from file 'src/project/fileWithImports.ts' +src/project/fileWithImports.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'src/project/fileWithTypeRefs.ts' +src/project/node_modules/pkg3/index.d.ts + Type library referenced via 'pkg3' from file 'src/project/fileWithTypeRefs.ts' +src/project/fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/randomFileForImport.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +exitCode:: ExitStatus.Success +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg1.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg3/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + + +//// [/out.js] file written with same contents +//// [/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./src/project","sourceFiles":["./src/project/fileWithImports.ts","./src/project/fileWithTypeRefs.ts","./src/project/randomFileForImport.ts","./src/project/randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":864,"kind":"text"}],"hash":"-31220064334-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n});\r\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /// \r\n /// \r\n});\r\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n exports.x = 10;\r\n});\r\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n exports.x = 10;\r\n});\r\n"},"dts":{"sections":[{"pos":0,"end":233,"kind":"text"}],"hash":"407350366-declare module \"fileWithImports\" { }\r\ndeclare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n"}},"program":{"fileNames":["./lib/lib.d.ts","./src/project/pkg0.d.ts","./src/project/pkg1.d.ts","./src/project/filewithimports.ts","./src/project/node_modules/pkg2/index.d.ts","./src/project/node_modules/pkg3/index.d.ts","./src/project/filewithtyperefs.ts","./src/project/randomfileforimport.ts","./src/project/randomfilefortyperef.ts","./src/project/node_modules/@types/pkg4/index.d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","769951468-export interface ImportInterface0 {}","-3547817137-export interface RequireInterface1 {}","17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n","1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n","-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;","-10726455937-export const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"407350366-declare module \"fileWithImports\" { }\r\ndeclare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/out.tsbuildinfo.baseline.txt] file written with same contents +//// [/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./src/project", + "sourceFiles": [ + "./src/project/fileWithImports.ts", + "./src/project/fileWithTypeRefs.ts", + "./src/project/randomFileForImport.ts", + "./src/project/randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 864, + "kind": "text" + } + ], + "hash": "-31220064334-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n});\r\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /// \r\n /// \r\n});\r\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n exports.x = 10;\r\n});\r\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n exports.x = 10;\r\n});\r\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 233, + "kind": "text" + } + ], + "hash": "407350366-declare module \"fileWithImports\" { }\r\ndeclare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n" + } + }, + "program": { + "fileNames": [ + "./lib/lib.d.ts", + "./src/project/pkg0.d.ts", + "./src/project/pkg1.d.ts", + "./src/project/filewithimports.ts", + "./src/project/node_modules/pkg2/index.d.ts", + "./src/project/node_modules/pkg3/index.d.ts", + "./src/project/filewithtyperefs.ts", + "./src/project/randomfileforimport.ts", + "./src/project/randomfilefortyperef.ts", + "./src/project/node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/project/pkg0.d.ts": "769951468-export interface ImportInterface0 {}", + "./src/project/pkg1.d.ts": "-3547817137-export interface RequireInterface1 {}", + "./src/project/filewithimports.ts": "17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n", + "./src/project/node_modules/pkg2/index.d.ts": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "./src/project/node_modules/pkg3/index.d.ts": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "./src/project/filewithtyperefs.ts": "-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "./src/project/randomfileforimport.ts": "10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;", + "./src/project/randomfilefortyperef.ts": "-10726455937-export const x = 10;", + "./src/project/node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "407350366-declare module \"fileWithImports\" { }\r\ndeclare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 3559 +} + + + +Change:: modify randomFileForTypeRef by adding typeRef +Input:: +//// [/src/project/randomFileForTypeRef.ts] +/// +export const x = 10; + + + +Output:: +/lib/tsc -b /src/project --explainFiles +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg1.ts' does not exist. +File '/src/project/pkg1.tsx' does not exist. +File '/src/project/pkg1.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg1' was successfully resolved to '/src/project/pkg1.d.ts'. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg3/package.json' does not exist. +File '/src/project/node_modules/pkg3.d.ts' does not exist. +File '/src/project/node_modules/pkg3/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg3/index.d.ts', result '/src/project/node_modules/pkg3/index.d.ts'. +======== Type reference directive 'pkg3' was successfully resolved to '/src/project/node_modules/pkg3/index.d.ts', primary: false. ======== +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts'. ======== +Resolution for type reference directive 'pkg2' was found in cache from location '/src/project'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +lib/lib.d.ts + Default library for target 'es5' +src/project/pkg0.d.ts + Imported via "pkg0" from file 'src/project/fileWithImports.ts' + Imported via "pkg0" from file 'src/project/randomFileForImport.ts' +src/project/pkg1.d.ts + Imported via "pkg1" from file 'src/project/fileWithImports.ts' +src/project/fileWithImports.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'src/project/fileWithTypeRefs.ts' +src/project/node_modules/pkg3/index.d.ts + Type library referenced via 'pkg3' from file 'src/project/fileWithTypeRefs.ts' +src/project/fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/randomFileForImport.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +exitCode:: ExitStatus.Success +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg1.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg3/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + + +//// [/out.js] +define("fileWithImports", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +}); +define("fileWithTypeRefs", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /// + /// +}); +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + /// + exports.x = 10; +}); + + +//// [/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./src/project","sourceFiles":["./src/project/fileWithImports.ts","./src/project/fileWithTypeRefs.ts","./src/project/randomFileForImport.ts","./src/project/randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":899,"kind":"text"}],"hash":"-30350808392-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n});\r\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /// \r\n /// \r\n});\r\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n exports.x = 10;\r\n});\r\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n /// \r\n exports.x = 10;\r\n});\r\n"},"dts":{"sections":[{"pos":0,"end":233,"kind":"text"}],"hash":"407350366-declare module \"fileWithImports\" { }\r\ndeclare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n"}},"program":{"fileNames":["./lib/lib.d.ts","./src/project/pkg0.d.ts","./src/project/pkg1.d.ts","./src/project/filewithimports.ts","./src/project/node_modules/pkg2/index.d.ts","./src/project/node_modules/pkg3/index.d.ts","./src/project/filewithtyperefs.ts","./src/project/randomfileforimport.ts","./src/project/randomfilefortyperef.ts","./src/project/node_modules/@types/pkg4/index.d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","769951468-export interface ImportInterface0 {}","-3547817137-export interface RequireInterface1 {}","17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n","1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n","-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;","-2210321256-/// \nexport const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"407350366-declare module \"fileWithImports\" { }\r\ndeclare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/out.tsbuildinfo.baseline.txt] +====================================================================== +File:: ./out.js +---------------------------------------------------------------------- +text: (0-899) +define("fileWithImports", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +}); +define("fileWithTypeRefs", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /// + /// +}); +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + /// + exports.x = 10; +}); + +====================================================================== +====================================================================== +File:: ./out.d.ts +---------------------------------------------------------------------- +text: (0-233) +declare module "fileWithImports" { } +declare module "fileWithTypeRefs" { + export {}; +} +declare module "randomFileForImport" { + export const x = 10; +} +declare module "randomFileForTypeRef" { + export const x = 10; +} + +====================================================================== + +//// [/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./src/project", + "sourceFiles": [ + "./src/project/fileWithImports.ts", + "./src/project/fileWithTypeRefs.ts", + "./src/project/randomFileForImport.ts", + "./src/project/randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 899, + "kind": "text" + } + ], + "hash": "-30350808392-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n});\r\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /// \r\n /// \r\n});\r\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n exports.x = 10;\r\n});\r\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n /// \r\n exports.x = 10;\r\n});\r\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 233, + "kind": "text" + } + ], + "hash": "407350366-declare module \"fileWithImports\" { }\r\ndeclare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n" + } + }, + "program": { + "fileNames": [ + "./lib/lib.d.ts", + "./src/project/pkg0.d.ts", + "./src/project/pkg1.d.ts", + "./src/project/filewithimports.ts", + "./src/project/node_modules/pkg2/index.d.ts", + "./src/project/node_modules/pkg3/index.d.ts", + "./src/project/filewithtyperefs.ts", + "./src/project/randomfileforimport.ts", + "./src/project/randomfilefortyperef.ts", + "./src/project/node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/project/pkg0.d.ts": "769951468-export interface ImportInterface0 {}", + "./src/project/pkg1.d.ts": "-3547817137-export interface RequireInterface1 {}", + "./src/project/filewithimports.ts": "17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n", + "./src/project/node_modules/pkg2/index.d.ts": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "./src/project/node_modules/pkg3/index.d.ts": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "./src/project/filewithtyperefs.ts": "-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "./src/project/randomfileforimport.ts": "10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;", + "./src/project/randomfilefortyperef.ts": "-2210321256-/// \nexport const x = 10;", + "./src/project/node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "407350366-declare module \"fileWithImports\" { }\r\ndeclare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 3630 +} + diff --git a/tests/baselines/reference/tsbuild/cacheResolutions/multi-file.js b/tests/baselines/reference/tsbuild/cacheResolutions/multi-file.js new file mode 100644 index 00000000000..a7ed4e8552f --- /dev/null +++ b/tests/baselines/reference/tsbuild/cacheResolutions/multi-file.js @@ -0,0 +1,2851 @@ +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project/fileWithImports.ts] +import type { ImportInterface0 } from "pkg0" assert { "resolution-mode": "import" }; +import type { RequireInterface1 } from "pkg1" assert { "resolution-mode": "require" }; + + +//// [/src/project/fileWithTypeRefs.ts] +/// +/// +interface LocalInterface extends ImportInterface2, RequireInterface3 {} +export {} + + +//// [/src/project/node_modules/@types/pkg4/index.d.ts] +export const x = 10; + +//// [/src/project/node_modules/pkg0/import.d.ts] +export interface ImportInterface0 {} + +//// [/src/project/node_modules/pkg0/package.json] +{"name":"pkg0","version":"0.0.1","exports":{"import":"./import.js","require":"./require.js"}} + +//// [/src/project/node_modules/pkg0/require.d.ts] +export interface RequireInterface0 {} + +//// [/src/project/node_modules/pkg1/import.d.ts] +export interface ImportInterface1 {} + +//// [/src/project/node_modules/pkg1/package.json] +{"name":"pkg1","version":"0.0.1","exports":{"import":"./import.js","require":"./require.js"}} + +//// [/src/project/node_modules/pkg2/import.d.ts] +export {}; +declare global { + interface ImportInterface2 {} +} + + +//// [/src/project/node_modules/pkg2/package.json] +{"name":"pkg2","version":"0.0.1","exports":{"import":"./import.js","require":"./require.js"}} + +//// [/src/project/node_modules/pkg2/require.d.ts] +export {}; +declare global { + interface RequireInterface2 {} +} + + +//// [/src/project/node_modules/pkg3/import.d.ts] +export {}; +declare global { + interface ImportInterface3 {} +} + + +//// [/src/project/node_modules/pkg3/package.json] +{"name":"pkg3","version":"0.0.1","exports":{"import":"./import.js","require":"./require.js"}} + +//// [/src/project/randomFileForImport.ts] +export const x = 10; + +//// [/src/project/randomFileForTypeRef.ts] +export const x = 10; + +//// [/src/project/tsconfig.json] +{"compilerOptions":{"moduleResolution":"node16","composite":true,"cacheResolutions":true,"traceResolution":true},"include":["*.ts"],"exclude":["*.d.ts"]} + + + +Output:: +/lib/tsc -b /src/project --explainFiles +File '/src/project/package.json' does not exist. +File '/src/package.json' does not exist. +File '/package.json' does not exist. +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in CJS mode with conditions 'node', 'require', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.ts' does not exist. +File '/src/project/node_modules/pkg1/require.tsx' does not exist. +File '/src/project/node_modules/pkg1/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.js' does not exist. +File '/src/project/node_modules/pkg1/require.jsx' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Module name 'pkg1' was not resolved. ======== +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg3/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist. +File '/src/project/node_modules/package.json' does not exist. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/lib/package.json' does not exist. +File '/package.json' does not exist according to earlier cached lookups. +src/project/fileWithImports.ts:2:40 - error TS2307: Cannot find module 'pkg1' or its corresponding type declarations. + +2 import type { RequireInterface1 } from "pkg1" assert { "resolution-mode": "require" }; +   ~~~~~~ + +src/project/fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +src/project/fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +lib/lib.d.ts + Default library for target 'es5' +src/project/node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'src/project/fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg0/package.json' does not have field "type" +src/project/fileWithImports.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'src/project/fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg2/package.json' does not have field "type" +src/project/fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/randomFileForImport.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found + +Found 3 errors. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx", + "/src/project/node_modules/pkg1/require.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.ts", + "/src/node_modules/pkg1.tsx", + "/src/node_modules/pkg1.d.ts", + "/src/node_modules/pkg1/index.ts", + "/src/node_modules/pkg1/index.tsx", + "/src/node_modules/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.ts", + "/node_modules/pkg1.tsx", + "/node_modules/pkg1.d.ts", + "/node_modules/pkg1/index.ts", + "/node_modules/pkg1/index.tsx", + "/node_modules/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/node_modules/pkg1/require.js", + "/src/project/node_modules/pkg1/require.jsx", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.js", + "/src/node_modules/pkg1.jsx", + "/src/node_modules/pkg1/index.js", + "/src/node_modules/pkg1/index.jsx", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.js", + "/node_modules/pkg1.jsx", + "/node_modules/pkg1/index.js", + "/node_modules/pkg1/index.jsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json", + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/require.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2],[4]],"referencedMap":[[3,1],[5,2]],"exportedModulesMap":[[3,1],[5,2]],"semanticDiagnosticsPerFile":[1,[3,[{"file":"./filewithimports.ts","start":124,"length":6,"messageText":"Cannot find module 'pkg1' or its corresponding type declarations.","category":1,"code":2307}]],[5,[{"file":"./filewithtyperefs.ts","start":162,"length":17,"messageText":"Cannot find name 'RequireInterface3'.","category":1,"code":2304}]],8,2,4,6,7],"affectedFilesPendingEmit":[3,5,6,7],"emitSignatures":[3,5,6,7]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + [ + "./filewithimports.ts", + [ + { + "file": "./filewithimports.ts", + "start": 124, + "length": 6, + "messageText": "Cannot find module 'pkg1' or its corresponding type declarations.", + "category": 1, + "code": 2307 + } + ] + ], + [ + "./filewithtyperefs.ts", + [ + { + "file": "./filewithtyperefs.ts", + "start": 162, + "length": 17, + "messageText": "Cannot find name 'RequireInterface3'.", + "category": 1, + "code": 2304 + } + ] + ], + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg2/import.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "affectedFilesPendingEmit": [ + [ + "./filewithimports.ts", + "Js | Dts" + ], + [ + "./filewithtyperefs.ts", + "Js | Dts" + ], + [ + "./randomfileforimport.ts", + "Js | Dts" + ], + [ + "./randomfilefortyperef.ts", + "Js | Dts" + ] + ], + "emitSignatures": [ + "./filewithimports.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ] + }, + "version": "FakeTSVersion", + "size": 2250 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -b /src/project --explainFiles +File '/src/project/package.json' does not exist. +File '/src/package.json' does not exist. +File '/package.json' does not exist. +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in CJS mode with conditions 'node', 'require', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.ts' does not exist. +File '/src/project/node_modules/pkg1/require.tsx' does not exist. +File '/src/project/node_modules/pkg1/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.js' does not exist. +File '/src/project/node_modules/pkg1/require.jsx' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Module name 'pkg1' was not resolved. ======== +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg3/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist. +File '/src/project/node_modules/package.json' does not exist. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/lib/package.json' does not exist. +File '/package.json' does not exist according to earlier cached lookups. +src/project/fileWithImports.ts:2:40 - error TS2307: Cannot find module 'pkg1' or its corresponding type declarations. + +2 import type { RequireInterface1 } from "pkg1" assert { "resolution-mode": "require" }; +   ~~~~~~ + +src/project/fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +src/project/fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +lib/lib.d.ts + Default library for target 'es5' +src/project/node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'src/project/fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg0/package.json' does not have field "type" +src/project/fileWithImports.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'src/project/fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg2/package.json' does not have field "type" +src/project/fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/randomFileForImport.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found + +Found 3 errors. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx", + "/src/project/node_modules/pkg1/require.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.ts", + "/src/node_modules/pkg1.tsx", + "/src/node_modules/pkg1.d.ts", + "/src/node_modules/pkg1/index.ts", + "/src/node_modules/pkg1/index.tsx", + "/src/node_modules/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.ts", + "/node_modules/pkg1.tsx", + "/node_modules/pkg1.d.ts", + "/node_modules/pkg1/index.ts", + "/node_modules/pkg1/index.tsx", + "/node_modules/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/node_modules/pkg1/require.js", + "/src/project/node_modules/pkg1/require.jsx", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.js", + "/src/node_modules/pkg1.jsx", + "/src/node_modules/pkg1/index.js", + "/src/node_modules/pkg1/index.jsx", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.js", + "/node_modules/pkg1.jsx", + "/node_modules/pkg1/index.js", + "/node_modules/pkg1/index.jsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json", + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/require.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + + + + +Change:: write file not resolved by import +Input:: +//// [/src/project/node_modules/pkg1/require.d.ts] +export interface RequireInterface1 {} + + + +Output:: +/lib/tsc -b /src/project --explainFiles +File '/src/project/package.json' does not exist. +File '/src/package.json' does not exist. +File '/package.json' does not exist. +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in CJS mode with conditions 'node', 'require', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.ts' does not exist. +File '/src/project/node_modules/pkg1/require.tsx' does not exist. +File '/src/project/node_modules/pkg1/require.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg1/require.d.ts', result '/src/project/node_modules/pkg1/require.d.ts'. +======== Module name 'pkg1' was successfully resolved to '/src/project/node_modules/pkg1/require.d.ts' with Package ID 'pkg1/require.d.ts@0.0.1'. ======== +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg3/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist. +File '/src/project/node_modules/package.json' does not exist. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/lib/package.json' does not exist. +File '/package.json' does not exist according to earlier cached lookups. +src/project/fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +src/project/fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +lib/lib.d.ts + Default library for target 'es5' +src/project/node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'src/project/fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg0/package.json' does not have field "type" +src/project/node_modules/pkg1/require.d.ts + Imported via "pkg1" from file 'src/project/fileWithImports.ts' with packageId 'pkg1/require.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg1/package.json' does not have field "type" +src/project/fileWithImports.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'src/project/fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg2/package.json' does not have field "type" +src/project/fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/randomFileForImport.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found + +Found 2 errors. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/node_modules/pkg1/require.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg1", + "contents": { + "packageJsonContent": { + "name": "pkg1", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg1/require.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg1", + "subModuleName": "require.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/require.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./node_modules/pkg1/require.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"-3547817137-export interface RequireInterface1 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","signature":"-4882119183-export {};\r\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2,3],[5]],"referencedMap":[[4,1],[6,2]],"exportedModulesMap":[[6,2]],"semanticDiagnosticsPerFile":[1,4,[6,[{"file":"./filewithtyperefs.ts","start":162,"length":17,"messageText":"Cannot find name 'RequireInterface3'.","category":1,"code":2304}]],9,2,3,5,7,8],"affectedFilesPendingEmit":[4,6,7,8],"emitSignatures":[4,6,7,8]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg1/require.d.ts": { + "original": { + "version": "-3547817137-export interface RequireInterface1 {}", + "impliedFormat": 1 + }, + "version": "-3547817137-export interface RequireInterface1 {}", + "signature": "-3547817137-export interface RequireInterface1 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": { + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./filewithimports.ts", + [ + "./filewithtyperefs.ts", + [ + { + "file": "./filewithtyperefs.ts", + "start": 162, + "length": 17, + "messageText": "Cannot find name 'RequireInterface3'.", + "category": 1, + "code": 2304 + } + ] + ], + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts", + "./node_modules/pkg2/import.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "affectedFilesPendingEmit": [ + [ + "./filewithimports.ts", + "Js | Dts" + ], + [ + "./filewithtyperefs.ts", + "Js | Dts" + ], + [ + "./randomfileforimport.ts", + "Js | Dts" + ], + [ + "./randomfilefortyperef.ts", + "Js | Dts" + ] + ], + "emitSignatures": [ + "./filewithimports.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ] + }, + "version": "FakeTSVersion", + "size": 2240 +} + + + +Change:: write file not resolved by typeRef +Input:: +//// [/src/project/node_modules/pkg3/require.d.ts] +export {}; +declare global { + interface RequireInterface3 {} +} + + + + +Output:: +/lib/tsc -b /src/project --explainFiles +File '/src/project/package.json' does not exist. +File '/src/package.json' does not exist. +File '/package.json' does not exist. +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in CJS mode with conditions 'node', 'require', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.ts' does not exist. +File '/src/project/node_modules/pkg1/require.tsx' does not exist. +File '/src/project/node_modules/pkg1/require.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg1/require.d.ts', result '/src/project/node_modules/pkg1/require.d.ts'. +======== Module name 'pkg1' was successfully resolved to '/src/project/node_modules/pkg1/require.d.ts' with Package ID 'pkg1/require.d.ts@0.0.1'. ======== +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg3/require.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg3/require.d.ts', result '/src/project/node_modules/pkg3/require.d.ts'. +======== Type reference directive 'pkg3' was successfully resolved to '/src/project/node_modules/pkg3/require.d.ts' with Package ID 'pkg3/require.d.ts@0.0.1', primary: false. ======== +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/node_modules/pkg3/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist. +File '/src/project/node_modules/package.json' does not exist. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/lib/package.json' does not exist. +File '/package.json' does not exist according to earlier cached lookups. +lib/lib.d.ts + Default library for target 'es5' +src/project/node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'src/project/fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg0/package.json' does not have field "type" +src/project/node_modules/pkg1/require.d.ts + Imported via "pkg1" from file 'src/project/fileWithImports.ts' with packageId 'pkg1/require.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg1/package.json' does not have field "type" +src/project/fileWithImports.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'src/project/fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg2/package.json' does not have field "type" +src/project/node_modules/pkg3/require.d.ts + Type library referenced via 'pkg3' from file 'src/project/fileWithTypeRefs.ts' with packageId 'pkg3/require.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg3/package.json' does not have field "type" +src/project/fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/randomFileForImport.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +exitCode:: ExitStatus.Success +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/node_modules/pkg1/require.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg1", + "contents": { + "packageJsonContent": { + "name": "pkg1", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg1/require.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg1", + "subModuleName": "require.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/node_modules/pkg3/require.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg3", + "contents": { + "packageJsonContent": { + "name": "pkg3", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg3/require.d.ts", + "packageId": { + "name": "pkg3", + "subModuleName": "require.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + + +//// [/src/project/fileWithImports.d.ts] +export {}; + + +//// [/src/project/fileWithImports.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + + +//// [/src/project/fileWithTypeRefs.d.ts] +export {}; + + +//// [/src/project/fileWithTypeRefs.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/// +/// + + +//// [/src/project/randomFileForImport.d.ts] +export declare const x = 10; + + +//// [/src/project/randomFileForImport.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.x = 10; + + +//// [/src/project/randomFileForTypeRef.d.ts] +export declare const x = 10; + + +//// [/src/project/randomFileForTypeRef.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.x = 10; + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./node_modules/pkg1/require.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./node_modules/pkg3/require.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"-3547817137-export interface RequireInterface1 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","signature":"-4882119183-export {};\r\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","signature":"-4882119183-export {};\r\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","signature":"-6057683066-export declare const x = 10;\r\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","signature":"-6057683066-export declare const x = 10;\r\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2,3],[5,6]],"referencedMap":[[4,1],[7,2]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,4,7,10,2,3,5,6,8,9],"latestChangedDtsFile":"./randomFileForTypeRef.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg1/require.d.ts": { + "original": { + "version": "-3547817137-export interface RequireInterface1 {}", + "impliedFormat": 1 + }, + "version": "-3547817137-export interface RequireInterface1 {}", + "signature": "-3547817137-export interface RequireInterface1 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg3/require.d.ts": { + "original": { + "version": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "signature": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./filewithimports.ts", + "./filewithtyperefs.ts", + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts", + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForTypeRef.d.ts" + }, + "version": "FakeTSVersion", + "size": 2423 +} + + + +Change:: modify randomFileForImport by adding import +Input:: +//// [/src/project/randomFileForImport.ts] +import type { ImportInterface0 } from "pkg0" assert { "resolution-mode": "import" }; +export const x = 10; + + + +Output:: +/lib/tsc -b /src/project --explainFiles +File '/src/project/package.json' does not exist. +File '/src/package.json' does not exist. +File '/package.json' does not exist. +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in CJS mode with conditions 'node', 'require', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.ts' does not exist. +File '/src/project/node_modules/pkg1/require.tsx' does not exist. +File '/src/project/node_modules/pkg1/require.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg1/require.d.ts', result '/src/project/node_modules/pkg1/require.d.ts'. +======== Module name 'pkg1' was successfully resolved to '/src/project/node_modules/pkg1/require.d.ts' with Package ID 'pkg1/require.d.ts@0.0.1'. ======== +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg3/require.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg3/require.d.ts', result '/src/project/node_modules/pkg3/require.d.ts'. +======== Type reference directive 'pkg3' was successfully resolved to '/src/project/node_modules/pkg3/require.d.ts' with Package ID 'pkg3/require.d.ts@0.0.1', primary: false. ======== +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/node_modules/pkg3/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist. +File '/src/project/node_modules/package.json' does not exist. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/lib/package.json' does not exist. +File '/package.json' does not exist according to earlier cached lookups. +lib/lib.d.ts + Default library for target 'es5' +src/project/node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'src/project/fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + Imported via "pkg0" from file 'src/project/randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg0/package.json' does not have field "type" +src/project/node_modules/pkg1/require.d.ts + Imported via "pkg1" from file 'src/project/fileWithImports.ts' with packageId 'pkg1/require.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg1/package.json' does not have field "type" +src/project/fileWithImports.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'src/project/fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg2/package.json' does not have field "type" +src/project/node_modules/pkg3/require.d.ts + Type library referenced via 'pkg3' from file 'src/project/fileWithTypeRefs.ts' with packageId 'pkg3/require.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg3/package.json' does not have field "type" +src/project/fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/randomFileForImport.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +exitCode:: ExitStatus.Success +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/node_modules/pkg1/require.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg1", + "contents": { + "packageJsonContent": { + "name": "pkg1", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg1/require.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg1", + "subModuleName": "require.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/node_modules/pkg3/require.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg3", + "contents": { + "packageJsonContent": { + "name": "pkg3", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg3/require.d.ts", + "packageId": { + "name": "pkg3", + "subModuleName": "require.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + + +//// [/src/project/randomFileForImport.js] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./node_modules/pkg1/require.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./node_modules/pkg3/require.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"-3547817137-export interface RequireInterface1 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","signature":"-4882119183-export {};\r\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","signature":"-4882119183-export {};\r\n","impliedFormat":1},{"version":"-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;","signature":"-6057683066-export declare const x = 10;\r\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","signature":"-6057683066-export declare const x = 10;\r\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2,3],[5,6],[2]],"referencedMap":[[4,1],[7,2],[8,3]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,4,7,10,2,3,5,6,8,9],"latestChangedDtsFile":"./randomFileForTypeRef.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts" + ], + [ + "./node_modules/pkg0/import.d.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg1/require.d.ts": { + "original": { + "version": "-3547817137-export interface RequireInterface1 {}", + "impliedFormat": 1 + }, + "version": "-3547817137-export interface RequireInterface1 {}", + "signature": "-3547817137-export interface RequireInterface1 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg3/require.d.ts": { + "original": { + "version": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "signature": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": 1 + }, + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts" + ], + "./randomfileforimport.ts": [ + "./node_modules/pkg0/import.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./filewithimports.ts", + "./filewithtyperefs.ts", + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts", + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForTypeRef.d.ts" + }, + "version": "FakeTSVersion", + "size": 2524 +} + + + +Change:: modify randomFileForTypeRef by adding typeRef +Input:: +//// [/src/project/randomFileForTypeRef.ts] +/// +export const x = 10; + + + +Output:: +/lib/tsc -b /src/project --explainFiles +File '/src/project/package.json' does not exist. +File '/src/package.json' does not exist. +File '/package.json' does not exist. +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in CJS mode with conditions 'node', 'require', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.ts' does not exist. +File '/src/project/node_modules/pkg1/require.tsx' does not exist. +File '/src/project/node_modules/pkg1/require.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg1/require.d.ts', result '/src/project/node_modules/pkg1/require.d.ts'. +======== Module name 'pkg1' was successfully resolved to '/src/project/node_modules/pkg1/require.d.ts' with Package ID 'pkg1/require.d.ts@0.0.1'. ======== +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg3/require.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg3/require.d.ts', result '/src/project/node_modules/pkg3/require.d.ts'. +======== Type reference directive 'pkg3' was successfully resolved to '/src/project/node_modules/pkg3/require.d.ts' with Package ID 'pkg3/require.d.ts@0.0.1', primary: false. ======== +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/node_modules/pkg3/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts'. ======== +Resolution for type reference directive 'pkg2' was found in cache from location '/src/project'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist. +File '/src/project/node_modules/package.json' does not exist. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/lib/package.json' does not exist. +File '/package.json' does not exist according to earlier cached lookups. +lib/lib.d.ts + Default library for target 'es5' +src/project/node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'src/project/fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + Imported via "pkg0" from file 'src/project/randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg0/package.json' does not have field "type" +src/project/node_modules/pkg1/require.d.ts + Imported via "pkg1" from file 'src/project/fileWithImports.ts' with packageId 'pkg1/require.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg1/package.json' does not have field "type" +src/project/fileWithImports.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'src/project/fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg2/package.json' does not have field "type" +src/project/node_modules/pkg3/require.d.ts + Type library referenced via 'pkg3' from file 'src/project/fileWithTypeRefs.ts' with packageId 'pkg3/require.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg3/package.json' does not have field "type" +src/project/fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/randomFileForImport.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +exitCode:: ExitStatus.Success +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/node_modules/pkg1/require.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg1", + "contents": { + "packageJsonContent": { + "name": "pkg1", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg1/require.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg1", + "subModuleName": "require.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/node_modules/pkg3/require.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg3", + "contents": { + "packageJsonContent": { + "name": "pkg3", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg3/require.d.ts", + "packageId": { + "name": "pkg3", + "subModuleName": "require.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + + +//// [/src/project/randomFileForTypeRef.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +/// +exports.x = 10; + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./node_modules/pkg1/require.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./node_modules/pkg3/require.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"-3547817137-export interface RequireInterface1 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","signature":"-4882119183-export {};\r\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","signature":"-4882119183-export {};\r\n","impliedFormat":1},{"version":"-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;","signature":"-6057683066-export declare const x = 10;\r\n","impliedFormat":1},{"version":"-8191038086-/// \nexport const x = 10;","signature":"-6057683066-export declare const x = 10;\r\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2,3],[5,6],[2],[5]],"referencedMap":[[4,1],[7,2],[8,3],[9,4]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,4,7,10,2,3,5,6,8,9],"latestChangedDtsFile":"./randomFileForTypeRef.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts" + ], + [ + "./node_modules/pkg0/import.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg1/require.d.ts": { + "original": { + "version": "-3547817137-export interface RequireInterface1 {}", + "impliedFormat": 1 + }, + "version": "-3547817137-export interface RequireInterface1 {}", + "signature": "-3547817137-export interface RequireInterface1 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg3/require.d.ts": { + "original": { + "version": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "signature": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": 1 + }, + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": 1 + }, + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts" + ], + "./randomfileforimport.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./randomfilefortyperef.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./filewithimports.ts", + "./filewithtyperefs.ts", + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts", + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForTypeRef.d.ts" + }, + "version": "FakeTSVersion", + "size": 2593 +} + diff --git a/tests/baselines/reference/tsbuild/sample1/cacheResolutions.js b/tests/baselines/reference/tsbuild/sample1/cacheResolutions.js new file mode 100644 index 00000000000..aa69d064337 --- /dev/null +++ b/tests/baselines/reference/tsbuild/sample1/cacheResolutions.js @@ -0,0 +1,976 @@ +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/core/anotherModule.ts] +export const World = "hello"; + + +//// [/src/core/index.ts] +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } + + +//// [/src/core/some_decl.d.ts] +declare const dts: any; + + +//// [/src/core/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + "cacheResolutions": true + } +} + +//// [/src/logic/index.ts] +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; + + +//// [/src/logic/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true, + "cacheResolutions": true + }, + "references": [ + { + "path": "../core" + } + ] +} + +//// [/src/tests/index.ts] +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; + + +//// [/src/tests/tsconfig.json] +{ + "references": [ + { + "path": "../core" + }, + { + "path": "../logic" + } + ], + "files": [ + "index.ts" + ], + "compilerOptions": { + "composite": true, + "declaration": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true, + "cacheResolutions": true + } +} + +//// [/src/ui/index.ts] +import * as logic from '../logic'; + +export function run() { + console.log(logic.getSecondsInDay()); +} + + +//// [/src/ui/tsconfig.json] +{ + "compilerOptions": { + "skipDefaultLibCheck": true + }, + "references": [ + { "path": "../logic/index" } + ] +} + + + + +Output:: +/lib/tsc --b /src/tests +exitCode:: ExitStatus.Success +Program root files: ["/src/core/anotherModule.ts","/src/core/index.ts","/src/core/some_decl.d.ts"] +Program options: {"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true,"cacheResolutions":true,"configFilePath":"/src/core/tsconfig.json"} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/core/anotherModule.ts +/src/core/index.ts +/src/core/some_decl.d.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/core/anotherModule.ts +/src/core/index.ts +/src/core/some_decl.d.ts + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/core/anothermodule.ts (computed .d.ts during emit) +/src/core/index.ts (computed .d.ts during emit) +/src/core/some_decl.d.ts (used version) + +Program root files: ["/src/logic/index.ts"] +Program options: {"composite":true,"declaration":true,"sourceMap":true,"forceConsistentCasingInFileNames":true,"skipDefaultLibCheck":true,"cacheResolutions":true,"configFilePath":"/src/logic/tsconfig.json"} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/core/index.d.ts +/src/core/anotherModule.d.ts +/src/logic/index.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/core/index.d.ts +/src/core/anotherModule.d.ts +/src/logic/index.ts + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/core/index.d.ts (used version) +/src/core/anothermodule.d.ts (used version) +/src/logic/index.ts (computed .d.ts during emit) + +Program root files: ["/src/tests/index.ts"] +Program options: {"composite":true,"declaration":true,"forceConsistentCasingInFileNames":true,"skipDefaultLibCheck":true,"cacheResolutions":true,"configFilePath":"/src/tests/tsconfig.json"} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/core/index.d.ts +/src/core/anotherModule.d.ts +/src/logic/index.d.ts +/src/tests/index.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/core/index.d.ts +/src/core/anotherModule.d.ts +/src/logic/index.d.ts +/src/tests/index.ts + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/core/index.d.ts (used version) +/src/core/anothermodule.d.ts (used version) +/src/logic/index.d.ts (used version) +/src/tests/index.ts (computed .d.ts during emit) + + +//// [/src/core/anotherModule.d.ts] +export declare const World = "hello"; +//# sourceMappingURL=anotherModule.d.ts.map + +//// [/src/core/anotherModule.d.ts.map] +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} + +//// [/src/core/anotherModule.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.World = void 0; +exports.World = "hello"; + + +//// [/src/core/index.d.ts] +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; +//# sourceMappingURL=index.d.ts.map + +//// [/src/core/index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,EAAE,MAAsB,CAAC;AAChD,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAC/D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB"} + +//// [/src/core/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.multiply = exports.leftPad = exports.someString = void 0; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +exports.leftPad = leftPad; +function multiply(a, b) { return a * b; } +exports.multiply = multiply; + + +//// [/src/core/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"cacheResolutions":true,"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4],"latestChangedDtsFile":"./index.d.ts"},"version":"FakeTSVersion"} + +//// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./anothermodule.ts": { + "original": { + "version": "-2676574883-export const World = \"hello\";\r\n", + "signature": "-8396256275-export declare const World = \"hello\";\r\n" + }, + "version": "-2676574883-export const World = \"hello\";\r\n", + "signature": "-8396256275-export declare const World = \"hello\";\r\n" + }, + "./index.ts": { + "original": { + "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", + "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n" + }, + "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", + "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n" + }, + "./some_decl.d.ts": { + "original": { + "version": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + }, + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + } + }, + "options": { + "cacheResolutions": true, + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "latestChangedDtsFile": "./index.d.ts" + }, + "version": "FakeTSVersion", + "size": 1493 +} + +//// [/src/logic/index.d.ts] +export declare function getSecondsInDay(): number; +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + + +//// [/src/logic/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = exports.getSecondsInDay = void 0; +var c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +exports.getSecondsInDay = getSecondsInDay; +var mod = require("../core/anotherModule"); +exports.m = mod; +//# sourceMappingURL=index.js.map + +//// [/src/logic/index.js.map] +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AAFD,0CAEC;AACD,2CAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} + +//// [/src/logic/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n","-8396256275-export declare const World = \"hello\";\r\n",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"cacheResolutions":true,"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4],"latestChangedDtsFile":"./index.d.ts"},"version":"FakeTSVersion"} + +//// [/src/logic/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n", + "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n" + }, + "../core/anothermodule.d.ts": { + "version": "-8396256275-export declare const World = \"hello\";\r\n", + "signature": "-8396256275-export declare const World = \"hello\";\r\n" + }, + "./index.ts": { + "original": { + "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" + }, + "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" + } + }, + "options": { + "cacheResolutions": true, + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ] + }, + "exportedModulesMap": { + "./index.ts": [ + "../core/anothermodule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "../core/anothermodule.d.ts", + "../core/index.d.ts", + "./index.ts" + ], + "latestChangedDtsFile": "./index.d.ts" + }, + "version": "FakeTSVersion", + "size": 1538 +} + +//// [/src/tests/index.d.ts] +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + + +//// [/src/tests/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +var c = require("../core/index"); +var logic = require("../logic/index"); +c.leftPad("", 10); +logic.getSecondsInDay(); +var mod = require("../core/anotherModule"); +exports.m = mod; + + +//// [/src/tests/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n","-8396256275-export declare const World = \"hello\";\r\n","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"cacheResolutions":true,"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5],"latestChangedDtsFile":"./index.d.ts"},"version":"FakeTSVersion"} + +//// [/src/tests/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/anothermodule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n", + "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n" + }, + "../core/anothermodule.d.ts": { + "version": "-8396256275-export declare const World = \"hello\";\r\n", + "signature": "-8396256275-export declare const World = \"hello\";\r\n" + }, + "../logic/index.d.ts": { + "version": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n", + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" + }, + "./index.ts": { + "original": { + "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" + }, + "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" + } + }, + "options": { + "cacheResolutions": true, + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anothermodule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + }, + "exportedModulesMap": { + "../logic/index.d.ts": [ + "../core/anothermodule.d.ts" + ], + "./index.ts": [ + "../core/anothermodule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "../core/anothermodule.d.ts", + "../core/index.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "latestChangedDtsFile": "./index.d.ts" + }, + "version": "FakeTSVersion", + "size": 1685 +} + + + +Change:: incremental-declaration-changes +Input:: +//// [/src/core/index.ts] +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } + +export class someClass { } + + + +Output:: +/lib/tsc --b /src/tests +exitCode:: ExitStatus.Success +Program root files: ["/src/core/anotherModule.ts","/src/core/index.ts","/src/core/some_decl.d.ts"] +Program options: {"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true,"cacheResolutions":true,"configFilePath":"/src/core/tsconfig.json"} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/core/anotherModule.ts +/src/core/index.ts +/src/core/some_decl.d.ts + +Semantic diagnostics in builder refreshed for:: +/src/core/index.ts + +Shape signatures in builder refreshed for:: +/src/core/index.ts (computed .d.ts) + +Program root files: ["/src/logic/index.ts"] +Program options: {"composite":true,"declaration":true,"sourceMap":true,"forceConsistentCasingInFileNames":true,"skipDefaultLibCheck":true,"cacheResolutions":true,"configFilePath":"/src/logic/tsconfig.json"} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/core/index.d.ts +/src/core/anotherModule.d.ts +/src/logic/index.ts + +Semantic diagnostics in builder refreshed for:: +/src/core/index.d.ts +/src/logic/index.ts + +Shape signatures in builder refreshed for:: +/src/core/index.d.ts (used version) +/src/logic/index.ts (computed .d.ts) + +Program root files: ["/src/tests/index.ts"] +Program options: {"composite":true,"declaration":true,"forceConsistentCasingInFileNames":true,"skipDefaultLibCheck":true,"cacheResolutions":true,"configFilePath":"/src/tests/tsconfig.json"} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/core/index.d.ts +/src/core/anotherModule.d.ts +/src/logic/index.d.ts +/src/tests/index.ts + +Semantic diagnostics in builder refreshed for:: +/src/core/index.d.ts +/src/tests/index.ts + +Shape signatures in builder refreshed for:: +/src/core/index.d.ts (used version) +/src/tests/index.ts (computed .d.ts) + + +//// [/src/core/index.d.ts] +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; +export declare class someClass { +} +//# sourceMappingURL=index.d.ts.map + +//// [/src/core/index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,EAAE,MAAsB,CAAC;AAChD,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAC/D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAEhE,qBAAa,SAAS;CAAI"} + +//// [/src/core/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someClass = exports.multiply = exports.leftPad = exports.someString = void 0; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +exports.leftPad = leftPad; +function multiply(a, b) { return a * b; } +exports.multiply = multiply; +var someClass = /** @class */ (function () { + function someClass() { + } + return someClass; +}()); +exports.someClass = someClass; + + +//// [/src/core/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-13387000654-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }","signature":"-14636110300-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"cacheResolutions":true,"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4],"latestChangedDtsFile":"./index.d.ts"},"version":"FakeTSVersion"} + +//// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./anothermodule.ts": { + "original": { + "version": "-2676574883-export const World = \"hello\";\r\n", + "signature": "-8396256275-export declare const World = \"hello\";\r\n" + }, + "version": "-2676574883-export const World = \"hello\";\r\n", + "signature": "-8396256275-export declare const World = \"hello\";\r\n" + }, + "./index.ts": { + "original": { + "version": "-13387000654-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }", + "signature": "-14636110300-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n" + }, + "version": "-13387000654-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }", + "signature": "-14636110300-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n" + }, + "./some_decl.d.ts": { + "original": { + "version": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + }, + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + } + }, + "options": { + "cacheResolutions": true, + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "latestChangedDtsFile": "./index.d.ts" + }, + "version": "FakeTSVersion", + "size": 1564 +} + +//// [/src/logic/index.js] file written with same contents +//// [/src/logic/index.js.map] file written with same contents +//// [/src/logic/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-14636110300-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n","-8396256275-export declare const World = \"hello\";\r\n",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"cacheResolutions":true,"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4],"latestChangedDtsFile":"./index.d.ts"},"version":"FakeTSVersion"} + +//// [/src/logic/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-14636110300-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n", + "signature": "-14636110300-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n" + }, + "../core/anothermodule.d.ts": { + "version": "-8396256275-export declare const World = \"hello\";\r\n", + "signature": "-8396256275-export declare const World = \"hello\";\r\n" + }, + "./index.ts": { + "original": { + "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" + }, + "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" + } + }, + "options": { + "cacheResolutions": true, + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ] + }, + "exportedModulesMap": { + "./index.ts": [ + "../core/anothermodule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "../core/anothermodule.d.ts", + "../core/index.d.ts", + "./index.ts" + ], + "latestChangedDtsFile": "./index.d.ts" + }, + "version": "FakeTSVersion", + "size": 1581 +} + +//// [/src/tests/index.js] file written with same contents +//// [/src/tests/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-14636110300-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n","-8396256275-export declare const World = \"hello\";\r\n","-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n"}],"options":{"cacheResolutions":true,"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5],"latestChangedDtsFile":"./index.d.ts"},"version":"FakeTSVersion"} + +//// [/src/tests/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/anothermodule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-14636110300-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n", + "signature": "-14636110300-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n" + }, + "../core/anothermodule.d.ts": { + "version": "-8396256275-export declare const World = \"hello\";\r\n", + "signature": "-8396256275-export declare const World = \"hello\";\r\n" + }, + "../logic/index.d.ts": { + "version": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n", + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" + }, + "./index.ts": { + "original": { + "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" + }, + "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" + } + }, + "options": { + "cacheResolutions": true, + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anothermodule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + }, + "exportedModulesMap": { + "../logic/index.d.ts": [ + "../core/anothermodule.d.ts" + ], + "./index.ts": [ + "../core/anothermodule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "../core/anothermodule.d.ts", + "../core/index.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "latestChangedDtsFile": "./index.d.ts" + }, + "version": "FakeTSVersion", + "size": 1728 +} + + + +Change:: incremental-declaration-doesnt-change +Input:: +//// [/src/core/index.ts] +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } + +export class someClass { } +class someClass2 { } + + + +Output:: +/lib/tsc --b /src/tests +exitCode:: ExitStatus.Success +Program root files: ["/src/core/anotherModule.ts","/src/core/index.ts","/src/core/some_decl.d.ts"] +Program options: {"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true,"cacheResolutions":true,"configFilePath":"/src/core/tsconfig.json"} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/core/anotherModule.ts +/src/core/index.ts +/src/core/some_decl.d.ts + +Semantic diagnostics in builder refreshed for:: +/src/core/index.ts + +Shape signatures in builder refreshed for:: +/src/core/index.ts (computed .d.ts) + + +//// [/src/core/index.d.ts.map] file written with same contents +//// [/src/core/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someClass = exports.multiply = exports.leftPad = exports.someString = void 0; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +exports.leftPad = leftPad; +function multiply(a, b) { return a * b; } +exports.multiply = multiply; +var someClass = /** @class */ (function () { + function someClass() { + } + return someClass; +}()); +exports.someClass = someClass; +var someClass2 = /** @class */ (function () { + function someClass2() { + } + return someClass2; +}()); + + +//// [/src/core/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-8396256275-export declare const World = \"hello\";\r\n"},{"version":"-11293323834-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }\nclass someClass2 { }","signature":"-14636110300-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"cacheResolutions":true,"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4],"latestChangedDtsFile":"./index.d.ts"},"version":"FakeTSVersion"} + +//// [/src/core/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./anothermodule.ts": { + "original": { + "version": "-2676574883-export const World = \"hello\";\r\n", + "signature": "-8396256275-export declare const World = \"hello\";\r\n" + }, + "version": "-2676574883-export const World = \"hello\";\r\n", + "signature": "-8396256275-export declare const World = \"hello\";\r\n" + }, + "./index.ts": { + "original": { + "version": "-11293323834-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }\nclass someClass2 { }", + "signature": "-14636110300-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n" + }, + "version": "-11293323834-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }\nclass someClass2 { }", + "signature": "-14636110300-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n" + }, + "./some_decl.d.ts": { + "original": { + "version": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + }, + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + } + }, + "options": { + "cacheResolutions": true, + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "latestChangedDtsFile": "./index.d.ts" + }, + "version": "FakeTSVersion", + "size": 1586 +} + +//// [/src/logic/tsconfig.tsbuildinfo] file changed its modified time +//// [/src/tests/tsconfig.tsbuildinfo] file changed its modified time + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --b /src/tests +exitCode:: ExitStatus.Success + + diff --git a/tests/baselines/reference/tsbuildWatch/cacheResolutions/bundle-emit-already-built.js b/tests/baselines/reference/tsbuildWatch/cacheResolutions/bundle-emit-already-built.js new file mode 100644 index 00000000000..792c1b5562e --- /dev/null +++ b/tests/baselines/reference/tsbuildWatch/cacheResolutions/bundle-emit-already-built.js @@ -0,0 +1,1920 @@ +Input:: +//// [/src/project/tsconfig.json] +{"compilerOptions":{"module":"amd","composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js"},"include":["*.ts"],"exclude":["*.d.ts"]} + +//// [/src/project/fileWithImports.ts] +import type { ImportInterface0 } from "pkg0"; +import type { RequireInterface1 } from "pkg1"; + + +//// [/src/project/randomFileForImport.ts] +export const x = 10; + +//// [/src/project/pkg0.d.ts] +export interface ImportInterface0 {} + +//// [/src/project/fileWithTypeRefs.ts] +/// +/// +interface LocalInterface extends ImportInterface2, RequireInterface3 {} +export {} + + +//// [/src/project/randomFileForTypeRef.ts] +export const x = 10; + +//// [/src/project/node_modules/pkg2/index.d.ts] +export {}; +declare global { + interface ImportInterface2 {} +} + + +//// [/src/project/node_modules/@types/pkg4/index.d.ts] +export const x = 10; + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + + +/a/lib/tsc.js -b -w --explainFiles +Output:: +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg1.ts' does not exist. +File '/src/project/pkg1.tsx' does not exist. +File '/src/project/pkg1.d.ts' does not exist. +File '/src/pkg1.ts' does not exist. +File '/src/pkg1.tsx' does not exist. +File '/src/pkg1.d.ts' does not exist. +File '/pkg1.ts' does not exist. +File '/pkg1.tsx' does not exist. +File '/pkg1.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/pkg1.js' does not exist. +File '/src/project/pkg1.jsx' does not exist. +File '/src/pkg1.js' does not exist. +File '/src/pkg1.jsx' does not exist. +File '/pkg1.js' does not exist. +File '/pkg1.jsx' does not exist. +======== Module name 'pkg1' was not resolved. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg3.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +fileWithImports.ts:2:40 - error TS2792: Cannot find module 'pkg1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? + +2 import type { RequireInterface1 } from "pkg1"; +   ~~~~~~ + +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + + +>> Screen clear +[12:00:37 AM] Starting compilation in watch mode... + +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg1.ts' does not exist. +File '/src/project/pkg1.tsx' does not exist. +File '/src/project/pkg1.d.ts' does not exist. +File '/src/pkg1.ts' does not exist. +File '/src/pkg1.tsx' does not exist. +File '/src/pkg1.d.ts' does not exist. +File '/pkg1.ts' does not exist. +File '/pkg1.tsx' does not exist. +File '/pkg1.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/pkg1.js' does not exist. +File '/src/project/pkg1.jsx' does not exist. +File '/src/pkg1.js' does not exist. +File '/src/pkg1.jsx' does not exist. +File '/pkg1.js' does not exist. +File '/pkg1.jsx' does not exist. +======== Module name 'pkg1' was not resolved. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg3.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +fileWithImports.ts:2:40 - error TS2792: Cannot find module 'pkg1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? + +2 import type { RequireInterface1 } from "pkg1"; +   ~~~~~~ + +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +pkg0.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +[12:00:38 AM] Found 3 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/pkg0.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/index.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx", + "/src/project/pkg1.d.ts", + "/src/pkg1.ts", + "/src/pkg1.tsx", + "/src/pkg1.d.ts", + "/pkg1.ts", + "/pkg1.tsx", + "/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/pkg1.js", + "/src/project/pkg1.jsx", + "/src/pkg1.js", + "/src/pkg1.jsx", + "/pkg1.js", + "/pkg1.jsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts", + "/src/project/node_modules/pkg3/index.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/node_modules/@types/pkg1/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} + +FsWatchesRecursive:: + +exitCode:: ExitStatus.undefined + + +Change:: modify randomFileForImport by adding import + +Input:: +//// [/src/project/randomFileForImport.ts] +import type { ImportInterface0 } from "pkg0"; +export const x = 10; + + +Output:: +>> Screen clear +[12:00:41 AM] File change detected. Starting incremental compilation... + +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg1.ts' does not exist. +File '/src/project/pkg1.tsx' does not exist. +File '/src/project/pkg1.d.ts' does not exist. +File '/src/pkg1.ts' does not exist. +File '/src/pkg1.tsx' does not exist. +File '/src/pkg1.d.ts' does not exist. +File '/pkg1.ts' does not exist. +File '/pkg1.tsx' does not exist. +File '/pkg1.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/pkg1.js' does not exist. +File '/src/project/pkg1.jsx' does not exist. +File '/src/pkg1.js' does not exist. +File '/src/pkg1.jsx' does not exist. +File '/pkg1.js' does not exist. +File '/pkg1.jsx' does not exist. +======== Module name 'pkg1' was not resolved. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg3.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +fileWithImports.ts:2:40 - error TS2792: Cannot find module 'pkg1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? + +2 import type { RequireInterface1 } from "pkg1"; +   ~~~~~~ + +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +pkg0.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' + Imported via "pkg0" from file 'randomFileForImport.ts' +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +[12:00:42 AM] Found 3 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/pkg0.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/index.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx", + "/src/project/pkg1.d.ts", + "/src/pkg1.ts", + "/src/pkg1.tsx", + "/src/pkg1.d.ts", + "/pkg1.ts", + "/pkg1.tsx", + "/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/pkg1.js", + "/src/project/pkg1.jsx", + "/src/pkg1.js", + "/src/pkg1.jsx", + "/pkg1.js", + "/pkg1.jsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts", + "/src/project/node_modules/pkg3/index.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/node_modules/@types/pkg1/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} + +FsWatchesRecursive:: + +exitCode:: ExitStatus.undefined + + +Change:: modify randomFileForTypeRef by adding typeRef + +Input:: +//// [/src/project/randomFileForTypeRef.ts] +/// +export const x = 10; + + +Output:: +>> Screen clear +[12:00:45 AM] File change detected. Starting incremental compilation... + +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg1.ts' does not exist. +File '/src/project/pkg1.tsx' does not exist. +File '/src/project/pkg1.d.ts' does not exist. +File '/src/pkg1.ts' does not exist. +File '/src/pkg1.tsx' does not exist. +File '/src/pkg1.d.ts' does not exist. +File '/pkg1.ts' does not exist. +File '/pkg1.tsx' does not exist. +File '/pkg1.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/pkg1.js' does not exist. +File '/src/project/pkg1.jsx' does not exist. +File '/src/pkg1.js' does not exist. +File '/src/pkg1.jsx' does not exist. +File '/pkg1.js' does not exist. +File '/pkg1.jsx' does not exist. +======== Module name 'pkg1' was not resolved. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg3.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts'. ======== +Resolution for type reference directive 'pkg2' was found in cache from location '/src/project'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +fileWithImports.ts:2:40 - error TS2792: Cannot find module 'pkg1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? + +2 import type { RequireInterface1 } from "pkg1"; +   ~~~~~~ + +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +pkg0.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' + Imported via "pkg0" from file 'randomFileForImport.ts' +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +[12:00:46 AM] Found 3 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/pkg0.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/index.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx", + "/src/project/pkg1.d.ts", + "/src/pkg1.ts", + "/src/pkg1.tsx", + "/src/pkg1.d.ts", + "/pkg1.ts", + "/pkg1.tsx", + "/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/pkg1.js", + "/src/project/pkg1.jsx", + "/src/pkg1.js", + "/src/pkg1.jsx", + "/pkg1.js", + "/pkg1.jsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts", + "/src/project/node_modules/pkg3/index.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/node_modules/@types/pkg1/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} + +FsWatchesRecursive:: + +exitCode:: ExitStatus.undefined + + +Change:: write file not resolved by import and random edit + +Input:: +//// [/src/project/randomFileForImport.ts] +import type { ImportInterface0 } from "pkg0"; +export const x = 10;export const y = 10; + +//// [/src/project/pkg1.d.ts] +export interface RequireInterface1 {} + + +Output:: +>> Screen clear +[12:00:51 AM] File change detected. Starting incremental compilation... + +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg1.ts' does not exist. +File '/src/project/pkg1.tsx' does not exist. +File '/src/project/pkg1.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg1' was successfully resolved to '/src/project/pkg1.d.ts'. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg3.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts'. ======== +Resolution for type reference directive 'pkg2' was found in cache from location '/src/project'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +pkg0.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' + Imported via "pkg0" from file 'randomFileForImport.ts' +pkg1.d.ts + Imported via "pkg1" from file 'fileWithImports.ts' +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +[12:00:52 AM] Found 2 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/pkg0.d.ts +/src/project/pkg1.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/index.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg1.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts", + "/src/project/node_modules/pkg3/index.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/node_modules/@types/pkg1/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} + +FsWatchesRecursive:: + +exitCode:: ExitStatus.undefined + + +Change:: write file not resolved by typeRef and random edit + +Input:: +//// [/src/project/randomFileForImport.ts] +import type { ImportInterface0 } from "pkg0"; +export const x = 10;export const y = 10;export const z = 10; + +//// [/src/project/node_modules/pkg3/index.d.ts] +export {}; +declare global { + interface RequireInterface3 {} +} + + + +Output:: +>> Screen clear +[12:01:00 AM] File change detected. Starting incremental compilation... + +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg1.ts' does not exist. +File '/src/project/pkg1.tsx' does not exist. +File '/src/project/pkg1.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg1' was successfully resolved to '/src/project/pkg1.d.ts'. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg3/package.json' does not exist. +File '/src/project/node_modules/pkg3.d.ts' does not exist. +File '/src/project/node_modules/pkg3/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg3/index.d.ts', result '/src/project/node_modules/pkg3/index.d.ts'. +======== Type reference directive 'pkg3' was successfully resolved to '/src/project/node_modules/pkg3/index.d.ts', primary: false. ======== +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts'. ======== +Resolution for type reference directive 'pkg2' was found in cache from location '/src/project'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +../../a/lib/lib.d.ts + Default library for target 'es5' +pkg0.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' + Imported via "pkg0" from file 'randomFileForImport.ts' +pkg1.d.ts + Imported via "pkg1" from file 'fileWithImports.ts' +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' +node_modules/pkg3/index.d.ts + Type library referenced via 'pkg3' from file 'fileWithTypeRefs.ts' +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +[12:01:12 AM] Found 0 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/pkg0.d.ts +/src/project/pkg1.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/index.d.ts +/src/project/node_modules/pkg3/index.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg1.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg3/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/node_modules/@types/pkg1/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} + +FsWatchesRecursive:: + +exitCode:: ExitStatus.undefined + +//// [/src/project/out.js] +define("fileWithImports", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +}); +define("fileWithTypeRefs", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /// + /// +}); +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.z = exports.y = exports.x = void 0; + exports.x = 10; + exports.y = 10; + exports.z = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + /// + exports.x = 10; +}); + + +//// [/src/project/out.d.ts] +declare module "fileWithImports" { } +declare module "fileWithTypeRefs" { + export {}; +} +declare module "randomFileForImport" { + export const x = 10; + export const y = 10; + export const z = 10; +} +declare module "randomFileForTypeRef" { + export const x = 10; +} + + +//// [/src/project/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./","sourceFiles":["./fileWithImports.ts","./fileWithTypeRefs.ts","./randomFileForImport.ts","./randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":940,"kind":"text"}],"hash":"21057699039-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n});\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n /// \n /// \n});\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.z = exports.y = exports.x = void 0;\n exports.x = 10;\n exports.y = 10;\n exports.z = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n"},"dts":{"sections":[{"pos":0,"end":273,"kind":"text"}],"hash":"-32434225881-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n export const y = 10;\n export const z = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n"}},"program":{"fileNames":["../../a/lib/lib.d.ts","./pkg0.d.ts","./pkg1.d.ts","./filewithimports.ts","./node_modules/pkg2/index.d.ts","./node_modules/pkg3/index.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":["-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","769951468-export interface ImportInterface0 {}","-3547817137-export interface RequireInterface1 {}","17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n","1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n","-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","16859148566-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;export const y = 10;export const z = 10;","-2210321256-/// \nexport const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"-32434225881-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n export const y = 10;\n export const z = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./", + "sourceFiles": [ + "./fileWithImports.ts", + "./fileWithTypeRefs.ts", + "./randomFileForImport.ts", + "./randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 940, + "kind": "text" + } + ], + "hash": "21057699039-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n});\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n /// \n /// \n});\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.z = exports.y = exports.x = void 0;\n exports.x = 10;\n exports.y = 10;\n exports.z = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 273, + "kind": "text" + } + ], + "hash": "-32434225881-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n export const y = 10;\n export const z = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n" + } + }, + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./pkg0.d.ts", + "./pkg1.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/index.d.ts", + "./node_modules/pkg3/index.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "../../a/lib/lib.d.ts": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "./pkg0.d.ts": "769951468-export interface ImportInterface0 {}", + "./pkg1.d.ts": "-3547817137-export interface RequireInterface1 {}", + "./filewithimports.ts": "17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n", + "./node_modules/pkg2/index.d.ts": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "./node_modules/pkg3/index.d.ts": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "./filewithtyperefs.ts": "-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "./randomfileforimport.ts": "16859148566-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;export const y = 10;export const z = 10;", + "./randomfilefortyperef.ts": "-2210321256-/// \nexport const x = 10;", + "./node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "-32434225881-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n export const y = 10;\n export const z = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 3518 +} + +//// [/src/project/out.tsbuildinfo.baseline.txt] +====================================================================== +File:: ./out.js +---------------------------------------------------------------------- +text: (0-940) +define("fileWithImports", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +}); +define("fileWithTypeRefs", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /// + /// +}); +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.z = exports.y = exports.x = void 0; + exports.x = 10; + exports.y = 10; + exports.z = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + /// + exports.x = 10; +}); + +====================================================================== +====================================================================== +File:: ./out.d.ts +---------------------------------------------------------------------- +text: (0-273) +declare module "fileWithImports" { } +declare module "fileWithTypeRefs" { + export {}; +} +declare module "randomFileForImport" { + export const x = 10; + export const y = 10; + export const z = 10; +} +declare module "randomFileForTypeRef" { + export const x = 10; +} + +====================================================================== + + +Change:: Random edit + +Input:: +//// [/src/project/randomFileForImport.ts] +import type { ImportInterface0 } from "pkg0"; +export const x = 10;export const y = 10;export const z = 10;export const k = 10; + + +Output:: +>> Screen clear +[12:01:15 AM] File change detected. Starting incremental compilation... + +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg1.ts' does not exist. +File '/src/project/pkg1.tsx' does not exist. +File '/src/project/pkg1.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg1' was successfully resolved to '/src/project/pkg1.d.ts'. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg3/package.json' does not exist. +File '/src/project/node_modules/pkg3.d.ts' does not exist. +File '/src/project/node_modules/pkg3/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg3/index.d.ts', result '/src/project/node_modules/pkg3/index.d.ts'. +======== Type reference directive 'pkg3' was successfully resolved to '/src/project/node_modules/pkg3/index.d.ts', primary: false. ======== +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts'. ======== +Resolution for type reference directive 'pkg2' was found in cache from location '/src/project'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +../../a/lib/lib.d.ts + Default library for target 'es5' +pkg0.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' + Imported via "pkg0" from file 'randomFileForImport.ts' +pkg1.d.ts + Imported via "pkg1" from file 'fileWithImports.ts' +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' +node_modules/pkg3/index.d.ts + Type library referenced via 'pkg3' from file 'fileWithTypeRefs.ts' +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +[12:01:32 AM] Found 0 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/pkg0.d.ts +/src/project/pkg1.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/index.d.ts +/src/project/node_modules/pkg3/index.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg1.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg3/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/node_modules/@types/pkg1/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} + +FsWatchesRecursive:: + +exitCode:: ExitStatus.undefined + +//// [/src/project/out.js] +define("fileWithImports", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +}); +define("fileWithTypeRefs", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /// + /// +}); +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.k = exports.z = exports.y = exports.x = void 0; + exports.x = 10; + exports.y = 10; + exports.z = 10; + exports.k = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + /// + exports.x = 10; +}); + + +//// [/src/project/out.d.ts] +declare module "fileWithImports" { } +declare module "fileWithTypeRefs" { + export {}; +} +declare module "randomFileForImport" { + export const x = 10; + export const y = 10; + export const z = 10; + export const k = 10; +} +declare module "randomFileForTypeRef" { + export const x = 10; +} + + +//// [/src/project/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./","sourceFiles":["./fileWithImports.ts","./fileWithTypeRefs.ts","./randomFileForImport.ts","./randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":972,"kind":"text"}],"hash":"-14017033189-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n});\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n /// \n /// \n});\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.k = exports.z = exports.y = exports.x = void 0;\n exports.x = 10;\n exports.y = 10;\n exports.z = 10;\n exports.k = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n"},"dts":{"sections":[{"pos":0,"end":298,"kind":"text"}],"hash":"-40150904130-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n export const y = 10;\n export const z = 10;\n export const k = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n"}},"program":{"fileNames":["../../a/lib/lib.d.ts","./pkg0.d.ts","./pkg1.d.ts","./filewithimports.ts","./node_modules/pkg2/index.d.ts","./node_modules/pkg3/index.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":["-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","769951468-export interface ImportInterface0 {}","-3547817137-export interface RequireInterface1 {}","17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n","1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n","-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","6292958787-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;export const y = 10;export const z = 10;export const k = 10;","-2210321256-/// \nexport const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"-40150904130-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n export const y = 10;\n export const z = 10;\n export const k = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./", + "sourceFiles": [ + "./fileWithImports.ts", + "./fileWithTypeRefs.ts", + "./randomFileForImport.ts", + "./randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 972, + "kind": "text" + } + ], + "hash": "-14017033189-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n});\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n /// \n /// \n});\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.k = exports.z = exports.y = exports.x = void 0;\n exports.x = 10;\n exports.y = 10;\n exports.z = 10;\n exports.k = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 298, + "kind": "text" + } + ], + "hash": "-40150904130-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n export const y = 10;\n export const z = 10;\n export const k = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n" + } + }, + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./pkg0.d.ts", + "./pkg1.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/index.d.ts", + "./node_modules/pkg3/index.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "../../a/lib/lib.d.ts": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "./pkg0.d.ts": "769951468-export interface ImportInterface0 {}", + "./pkg1.d.ts": "-3547817137-export interface RequireInterface1 {}", + "./filewithimports.ts": "17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n", + "./node_modules/pkg2/index.d.ts": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "./node_modules/pkg3/index.d.ts": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "./filewithtyperefs.ts": "-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "./randomfileforimport.ts": "6292958787-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;export const y = 10;export const z = 10;export const k = 10;", + "./randomfilefortyperef.ts": "-2210321256-/// \nexport const x = 10;", + "./node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "-40150904130-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n export const y = 10;\n export const z = 10;\n export const k = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 3623 +} + +//// [/src/project/out.tsbuildinfo.baseline.txt] +====================================================================== +File:: ./out.js +---------------------------------------------------------------------- +text: (0-972) +define("fileWithImports", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +}); +define("fileWithTypeRefs", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /// + /// +}); +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.k = exports.z = exports.y = exports.x = void 0; + exports.x = 10; + exports.y = 10; + exports.z = 10; + exports.k = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + /// + exports.x = 10; +}); + +====================================================================== +====================================================================== +File:: ./out.d.ts +---------------------------------------------------------------------- +text: (0-298) +declare module "fileWithImports" { } +declare module "fileWithTypeRefs" { + export {}; +} +declare module "randomFileForImport" { + export const x = 10; + export const y = 10; + export const z = 10; + export const k = 10; +} +declare module "randomFileForTypeRef" { + export const x = 10; +} + +====================================================================== + diff --git a/tests/baselines/reference/tsbuildWatch/cacheResolutions/bundle-emit.js b/tests/baselines/reference/tsbuildWatch/cacheResolutions/bundle-emit.js new file mode 100644 index 00000000000..315296b98c5 --- /dev/null +++ b/tests/baselines/reference/tsbuildWatch/cacheResolutions/bundle-emit.js @@ -0,0 +1,1855 @@ +Input:: +//// [/src/project/tsconfig.json] +{"compilerOptions":{"module":"amd","composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js"},"include":["*.ts"],"exclude":["*.d.ts"]} + +//// [/src/project/fileWithImports.ts] +import type { ImportInterface0 } from "pkg0"; +import type { RequireInterface1 } from "pkg1"; + + +//// [/src/project/randomFileForImport.ts] +export const x = 10; + +//// [/src/project/pkg0.d.ts] +export interface ImportInterface0 {} + +//// [/src/project/fileWithTypeRefs.ts] +/// +/// +interface LocalInterface extends ImportInterface2, RequireInterface3 {} +export {} + + +//// [/src/project/randomFileForTypeRef.ts] +export const x = 10; + +//// [/src/project/node_modules/pkg2/index.d.ts] +export {}; +declare global { + interface ImportInterface2 {} +} + + +//// [/src/project/node_modules/@types/pkg4/index.d.ts] +export const x = 10; + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + + +/a/lib/tsc.js -b -w --explainFiles +Output:: +>> Screen clear +[12:00:37 AM] Starting compilation in watch mode... + +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg1.ts' does not exist. +File '/src/project/pkg1.tsx' does not exist. +File '/src/project/pkg1.d.ts' does not exist. +File '/src/pkg1.ts' does not exist. +File '/src/pkg1.tsx' does not exist. +File '/src/pkg1.d.ts' does not exist. +File '/pkg1.ts' does not exist. +File '/pkg1.tsx' does not exist. +File '/pkg1.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/pkg1.js' does not exist. +File '/src/project/pkg1.jsx' does not exist. +File '/src/pkg1.js' does not exist. +File '/src/pkg1.jsx' does not exist. +File '/pkg1.js' does not exist. +File '/pkg1.jsx' does not exist. +======== Module name 'pkg1' was not resolved. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg3.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +fileWithImports.ts:2:40 - error TS2792: Cannot find module 'pkg1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? + +2 import type { RequireInterface1 } from "pkg1"; +   ~~~~~~ + +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +pkg0.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +[12:00:38 AM] Found 3 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/pkg0.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/index.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx", + "/src/project/pkg1.d.ts", + "/src/pkg1.ts", + "/src/pkg1.tsx", + "/src/pkg1.d.ts", + "/pkg1.ts", + "/pkg1.tsx", + "/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/pkg1.js", + "/src/project/pkg1.jsx", + "/src/pkg1.js", + "/src/pkg1.jsx", + "/pkg1.js", + "/pkg1.jsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts", + "/src/project/node_modules/pkg3/index.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/node_modules/@types/pkg1/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} + +FsWatchesRecursive:: + +exitCode:: ExitStatus.undefined + + +Change:: modify randomFileForImport by adding import + +Input:: +//// [/src/project/randomFileForImport.ts] +import type { ImportInterface0 } from "pkg0"; +export const x = 10; + + +Output:: +>> Screen clear +[12:00:41 AM] File change detected. Starting incremental compilation... + +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg1.ts' does not exist. +File '/src/project/pkg1.tsx' does not exist. +File '/src/project/pkg1.d.ts' does not exist. +File '/src/pkg1.ts' does not exist. +File '/src/pkg1.tsx' does not exist. +File '/src/pkg1.d.ts' does not exist. +File '/pkg1.ts' does not exist. +File '/pkg1.tsx' does not exist. +File '/pkg1.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/pkg1.js' does not exist. +File '/src/project/pkg1.jsx' does not exist. +File '/src/pkg1.js' does not exist. +File '/src/pkg1.jsx' does not exist. +File '/pkg1.js' does not exist. +File '/pkg1.jsx' does not exist. +======== Module name 'pkg1' was not resolved. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg3.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +fileWithImports.ts:2:40 - error TS2792: Cannot find module 'pkg1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? + +2 import type { RequireInterface1 } from "pkg1"; +   ~~~~~~ + +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +pkg0.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' + Imported via "pkg0" from file 'randomFileForImport.ts' +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +[12:00:42 AM] Found 3 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/pkg0.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/index.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx", + "/src/project/pkg1.d.ts", + "/src/pkg1.ts", + "/src/pkg1.tsx", + "/src/pkg1.d.ts", + "/pkg1.ts", + "/pkg1.tsx", + "/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/pkg1.js", + "/src/project/pkg1.jsx", + "/src/pkg1.js", + "/src/pkg1.jsx", + "/pkg1.js", + "/pkg1.jsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts", + "/src/project/node_modules/pkg3/index.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/node_modules/@types/pkg1/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} + +FsWatchesRecursive:: + +exitCode:: ExitStatus.undefined + + +Change:: modify randomFileForTypeRef by adding typeRef + +Input:: +//// [/src/project/randomFileForTypeRef.ts] +/// +export const x = 10; + + +Output:: +>> Screen clear +[12:00:45 AM] File change detected. Starting incremental compilation... + +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg1.ts' does not exist. +File '/src/project/pkg1.tsx' does not exist. +File '/src/project/pkg1.d.ts' does not exist. +File '/src/pkg1.ts' does not exist. +File '/src/pkg1.tsx' does not exist. +File '/src/pkg1.d.ts' does not exist. +File '/pkg1.ts' does not exist. +File '/pkg1.tsx' does not exist. +File '/pkg1.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/pkg1.js' does not exist. +File '/src/project/pkg1.jsx' does not exist. +File '/src/pkg1.js' does not exist. +File '/src/pkg1.jsx' does not exist. +File '/pkg1.js' does not exist. +File '/pkg1.jsx' does not exist. +======== Module name 'pkg1' was not resolved. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg3.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts'. ======== +Resolution for type reference directive 'pkg2' was found in cache from location '/src/project'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +fileWithImports.ts:2:40 - error TS2792: Cannot find module 'pkg1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? + +2 import type { RequireInterface1 } from "pkg1"; +   ~~~~~~ + +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +pkg0.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' + Imported via "pkg0" from file 'randomFileForImport.ts' +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +[12:00:46 AM] Found 3 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/pkg0.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/index.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx", + "/src/project/pkg1.d.ts", + "/src/pkg1.ts", + "/src/pkg1.tsx", + "/src/pkg1.d.ts", + "/pkg1.ts", + "/pkg1.tsx", + "/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/pkg1.js", + "/src/project/pkg1.jsx", + "/src/pkg1.js", + "/src/pkg1.jsx", + "/pkg1.js", + "/pkg1.jsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts", + "/src/project/node_modules/pkg3/index.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/node_modules/@types/pkg1/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} + +FsWatchesRecursive:: + +exitCode:: ExitStatus.undefined + + +Change:: write file not resolved by import and random edit + +Input:: +//// [/src/project/randomFileForImport.ts] +import type { ImportInterface0 } from "pkg0"; +export const x = 10;export const y = 10; + +//// [/src/project/pkg1.d.ts] +export interface RequireInterface1 {} + + +Output:: +>> Screen clear +[12:00:51 AM] File change detected. Starting incremental compilation... + +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg1.ts' does not exist. +File '/src/project/pkg1.tsx' does not exist. +File '/src/project/pkg1.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg1' was successfully resolved to '/src/project/pkg1.d.ts'. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg3.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts'. ======== +Resolution for type reference directive 'pkg2' was found in cache from location '/src/project'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +pkg0.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' + Imported via "pkg0" from file 'randomFileForImport.ts' +pkg1.d.ts + Imported via "pkg1" from file 'fileWithImports.ts' +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +[12:00:52 AM] Found 2 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/pkg0.d.ts +/src/project/pkg1.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/index.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg1.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts", + "/src/project/node_modules/pkg3/index.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/node_modules/@types/pkg1/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} + +FsWatchesRecursive:: + +exitCode:: ExitStatus.undefined + + +Change:: write file not resolved by typeRef and random edit + +Input:: +//// [/src/project/randomFileForImport.ts] +import type { ImportInterface0 } from "pkg0"; +export const x = 10;export const y = 10;export const z = 10; + +//// [/src/project/node_modules/pkg3/index.d.ts] +export {}; +declare global { + interface RequireInterface3 {} +} + + + +Output:: +>> Screen clear +[12:01:00 AM] File change detected. Starting incremental compilation... + +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg1.ts' does not exist. +File '/src/project/pkg1.tsx' does not exist. +File '/src/project/pkg1.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg1' was successfully resolved to '/src/project/pkg1.d.ts'. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg3/package.json' does not exist. +File '/src/project/node_modules/pkg3.d.ts' does not exist. +File '/src/project/node_modules/pkg3/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg3/index.d.ts', result '/src/project/node_modules/pkg3/index.d.ts'. +======== Type reference directive 'pkg3' was successfully resolved to '/src/project/node_modules/pkg3/index.d.ts', primary: false. ======== +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts'. ======== +Resolution for type reference directive 'pkg2' was found in cache from location '/src/project'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +../../a/lib/lib.d.ts + Default library for target 'es5' +pkg0.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' + Imported via "pkg0" from file 'randomFileForImport.ts' +pkg1.d.ts + Imported via "pkg1" from file 'fileWithImports.ts' +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' +node_modules/pkg3/index.d.ts + Type library referenced via 'pkg3' from file 'fileWithTypeRefs.ts' +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +[12:01:12 AM] Found 0 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/pkg0.d.ts +/src/project/pkg1.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/index.d.ts +/src/project/node_modules/pkg3/index.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg1.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg3/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/node_modules/@types/pkg1/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} + +FsWatchesRecursive:: + +exitCode:: ExitStatus.undefined + +//// [/src/project/out.js] +define("fileWithImports", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +}); +define("fileWithTypeRefs", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /// + /// +}); +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.z = exports.y = exports.x = void 0; + exports.x = 10; + exports.y = 10; + exports.z = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + /// + exports.x = 10; +}); + + +//// [/src/project/out.d.ts] +declare module "fileWithImports" { } +declare module "fileWithTypeRefs" { + export {}; +} +declare module "randomFileForImport" { + export const x = 10; + export const y = 10; + export const z = 10; +} +declare module "randomFileForTypeRef" { + export const x = 10; +} + + +//// [/src/project/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./","sourceFiles":["./fileWithImports.ts","./fileWithTypeRefs.ts","./randomFileForImport.ts","./randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":940,"kind":"text"}],"hash":"21057699039-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n});\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n /// \n /// \n});\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.z = exports.y = exports.x = void 0;\n exports.x = 10;\n exports.y = 10;\n exports.z = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n"},"dts":{"sections":[{"pos":0,"end":273,"kind":"text"}],"hash":"-32434225881-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n export const y = 10;\n export const z = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n"}},"program":{"fileNames":["../../a/lib/lib.d.ts","./pkg0.d.ts","./pkg1.d.ts","./filewithimports.ts","./node_modules/pkg2/index.d.ts","./node_modules/pkg3/index.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":["-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","769951468-export interface ImportInterface0 {}","-3547817137-export interface RequireInterface1 {}","17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n","1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n","-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","16859148566-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;export const y = 10;export const z = 10;","-2210321256-/// \nexport const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"-32434225881-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n export const y = 10;\n export const z = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./", + "sourceFiles": [ + "./fileWithImports.ts", + "./fileWithTypeRefs.ts", + "./randomFileForImport.ts", + "./randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 940, + "kind": "text" + } + ], + "hash": "21057699039-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n});\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n /// \n /// \n});\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.z = exports.y = exports.x = void 0;\n exports.x = 10;\n exports.y = 10;\n exports.z = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 273, + "kind": "text" + } + ], + "hash": "-32434225881-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n export const y = 10;\n export const z = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n" + } + }, + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./pkg0.d.ts", + "./pkg1.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/index.d.ts", + "./node_modules/pkg3/index.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "../../a/lib/lib.d.ts": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "./pkg0.d.ts": "769951468-export interface ImportInterface0 {}", + "./pkg1.d.ts": "-3547817137-export interface RequireInterface1 {}", + "./filewithimports.ts": "17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n", + "./node_modules/pkg2/index.d.ts": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "./node_modules/pkg3/index.d.ts": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "./filewithtyperefs.ts": "-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "./randomfileforimport.ts": "16859148566-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;export const y = 10;export const z = 10;", + "./randomfilefortyperef.ts": "-2210321256-/// \nexport const x = 10;", + "./node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "-32434225881-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n export const y = 10;\n export const z = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 3518 +} + +//// [/src/project/out.tsbuildinfo.baseline.txt] +====================================================================== +File:: ./out.js +---------------------------------------------------------------------- +text: (0-940) +define("fileWithImports", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +}); +define("fileWithTypeRefs", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /// + /// +}); +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.z = exports.y = exports.x = void 0; + exports.x = 10; + exports.y = 10; + exports.z = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + /// + exports.x = 10; +}); + +====================================================================== +====================================================================== +File:: ./out.d.ts +---------------------------------------------------------------------- +text: (0-273) +declare module "fileWithImports" { } +declare module "fileWithTypeRefs" { + export {}; +} +declare module "randomFileForImport" { + export const x = 10; + export const y = 10; + export const z = 10; +} +declare module "randomFileForTypeRef" { + export const x = 10; +} + +====================================================================== + + +Change:: Random edit + +Input:: +//// [/src/project/randomFileForImport.ts] +import type { ImportInterface0 } from "pkg0"; +export const x = 10;export const y = 10;export const z = 10;export const k = 10; + + +Output:: +>> Screen clear +[12:01:15 AM] File change detected. Starting incremental compilation... + +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg1.ts' does not exist. +File '/src/project/pkg1.tsx' does not exist. +File '/src/project/pkg1.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg1' was successfully resolved to '/src/project/pkg1.d.ts'. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg3/package.json' does not exist. +File '/src/project/node_modules/pkg3.d.ts' does not exist. +File '/src/project/node_modules/pkg3/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg3/index.d.ts', result '/src/project/node_modules/pkg3/index.d.ts'. +======== Type reference directive 'pkg3' was successfully resolved to '/src/project/node_modules/pkg3/index.d.ts', primary: false. ======== +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts'. ======== +Resolution for type reference directive 'pkg2' was found in cache from location '/src/project'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +../../a/lib/lib.d.ts + Default library for target 'es5' +pkg0.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' + Imported via "pkg0" from file 'randomFileForImport.ts' +pkg1.d.ts + Imported via "pkg1" from file 'fileWithImports.ts' +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' +node_modules/pkg3/index.d.ts + Type library referenced via 'pkg3' from file 'fileWithTypeRefs.ts' +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +[12:01:32 AM] Found 0 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/pkg0.d.ts +/src/project/pkg1.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/index.d.ts +/src/project/node_modules/pkg3/index.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg1.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg3/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/node_modules/@types/pkg1/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} + +FsWatchesRecursive:: + +exitCode:: ExitStatus.undefined + +//// [/src/project/out.js] +define("fileWithImports", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +}); +define("fileWithTypeRefs", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /// + /// +}); +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.k = exports.z = exports.y = exports.x = void 0; + exports.x = 10; + exports.y = 10; + exports.z = 10; + exports.k = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + /// + exports.x = 10; +}); + + +//// [/src/project/out.d.ts] +declare module "fileWithImports" { } +declare module "fileWithTypeRefs" { + export {}; +} +declare module "randomFileForImport" { + export const x = 10; + export const y = 10; + export const z = 10; + export const k = 10; +} +declare module "randomFileForTypeRef" { + export const x = 10; +} + + +//// [/src/project/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./","sourceFiles":["./fileWithImports.ts","./fileWithTypeRefs.ts","./randomFileForImport.ts","./randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":972,"kind":"text"}],"hash":"-14017033189-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n});\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n /// \n /// \n});\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.k = exports.z = exports.y = exports.x = void 0;\n exports.x = 10;\n exports.y = 10;\n exports.z = 10;\n exports.k = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n"},"dts":{"sections":[{"pos":0,"end":298,"kind":"text"}],"hash":"-40150904130-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n export const y = 10;\n export const z = 10;\n export const k = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n"}},"program":{"fileNames":["../../a/lib/lib.d.ts","./pkg0.d.ts","./pkg1.d.ts","./filewithimports.ts","./node_modules/pkg2/index.d.ts","./node_modules/pkg3/index.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":["-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","769951468-export interface ImportInterface0 {}","-3547817137-export interface RequireInterface1 {}","17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n","1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n","-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","6292958787-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;export const y = 10;export const z = 10;export const k = 10;","-2210321256-/// \nexport const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"-40150904130-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n export const y = 10;\n export const z = 10;\n export const k = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./", + "sourceFiles": [ + "./fileWithImports.ts", + "./fileWithTypeRefs.ts", + "./randomFileForImport.ts", + "./randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 972, + "kind": "text" + } + ], + "hash": "-14017033189-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n});\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n /// \n /// \n});\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.k = exports.z = exports.y = exports.x = void 0;\n exports.x = 10;\n exports.y = 10;\n exports.z = 10;\n exports.k = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 298, + "kind": "text" + } + ], + "hash": "-40150904130-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n export const y = 10;\n export const z = 10;\n export const k = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n" + } + }, + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./pkg0.d.ts", + "./pkg1.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/index.d.ts", + "./node_modules/pkg3/index.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "../../a/lib/lib.d.ts": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "./pkg0.d.ts": "769951468-export interface ImportInterface0 {}", + "./pkg1.d.ts": "-3547817137-export interface RequireInterface1 {}", + "./filewithimports.ts": "17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n", + "./node_modules/pkg2/index.d.ts": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "./node_modules/pkg3/index.d.ts": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "./filewithtyperefs.ts": "-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "./randomfileforimport.ts": "6292958787-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;export const y = 10;export const z = 10;export const k = 10;", + "./randomfilefortyperef.ts": "-2210321256-/// \nexport const x = 10;", + "./node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "-40150904130-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n export const y = 10;\n export const z = 10;\n export const k = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 3623 +} + +//// [/src/project/out.tsbuildinfo.baseline.txt] +====================================================================== +File:: ./out.js +---------------------------------------------------------------------- +text: (0-972) +define("fileWithImports", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +}); +define("fileWithTypeRefs", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /// + /// +}); +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.k = exports.z = exports.y = exports.x = void 0; + exports.x = 10; + exports.y = 10; + exports.z = 10; + exports.k = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + /// + exports.x = 10; +}); + +====================================================================== +====================================================================== +File:: ./out.d.ts +---------------------------------------------------------------------- +text: (0-298) +declare module "fileWithImports" { } +declare module "fileWithTypeRefs" { + export {}; +} +declare module "randomFileForImport" { + export const x = 10; + export const y = 10; + export const z = 10; + export const k = 10; +} +declare module "randomFileForTypeRef" { + export const x = 10; +} + +====================================================================== + diff --git a/tests/baselines/reference/tsbuildWatch/cacheResolutions/multi-file-already-built.js b/tests/baselines/reference/tsbuildWatch/cacheResolutions/multi-file-already-built.js new file mode 100644 index 00000000000..427ab55c660 --- /dev/null +++ b/tests/baselines/reference/tsbuildWatch/cacheResolutions/multi-file-already-built.js @@ -0,0 +1,3858 @@ +Input:: +//// [/src/project/tsconfig.json] +{"compilerOptions":{"moduleResolution":"node16","composite":true,"cacheResolutions":true,"traceResolution":true},"include":["*.ts"],"exclude":["*.d.ts"]} + +//// [/src/project/fileWithImports.ts] +import type { ImportInterface0 } from "pkg0" assert { "resolution-mode": "import" }; +import type { RequireInterface1 } from "pkg1" assert { "resolution-mode": "require" }; + + +//// [/src/project/randomFileForImport.ts] +export const x = 10; + +//// [/src/project/node_modules/pkg0/package.json] +{"name":"pkg0","version":"0.0.1","exports":{"import":"./import.js","require":"./require.js"}} + +//// [/src/project/node_modules/pkg0/import.d.ts] +export interface ImportInterface0 {} + +//// [/src/project/node_modules/pkg0/require.d.ts] +export interface RequireInterface0 {} + +//// [/src/project/node_modules/pkg1/package.json] +{"name":"pkg1","version":"0.0.1","exports":{"import":"./import.js","require":"./require.js"}} + +//// [/src/project/node_modules/pkg1/import.d.ts] +export interface ImportInterface1 {} + +//// [/src/project/fileWithTypeRefs.ts] +/// +/// +interface LocalInterface extends ImportInterface2, RequireInterface3 {} +export {} + + +//// [/src/project/randomFileForTypeRef.ts] +export const x = 10; + +//// [/src/project/node_modules/pkg2/package.json] +{"name":"pkg2","version":"0.0.1","exports":{"import":"./import.js","require":"./require.js"}} + +//// [/src/project/node_modules/pkg2/import.d.ts] +export {}; +declare global { + interface ImportInterface2 {} +} + + +//// [/src/project/node_modules/pkg2/require.d.ts] +export {}; +declare global { + interface RequireInterface2 {} +} + + +//// [/src/project/node_modules/pkg3/package.json] +{"name":"pkg3","version":"0.0.1","exports":{"import":"./import.js","require":"./require.js"}} + +//// [/src/project/node_modules/pkg3/import.d.ts] +export {}; +declare global { + interface ImportInterface3 {} +} + + +//// [/src/project/node_modules/@types/pkg4/index.d.ts] +export const x = 10; + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2],[4]],"referencedMap":[[3,1],[5,2]],"exportedModulesMap":[[3,1],[5,2]],"semanticDiagnosticsPerFile":[1,[3,[{"file":"./filewithimports.ts","start":124,"length":6,"messageText":"Cannot find module 'pkg1' or its corresponding type declarations.","category":1,"code":2307}]],[5,[{"file":"./filewithtyperefs.ts","start":162,"length":17,"messageText":"Cannot find name 'RequireInterface3'.","category":1,"code":2304}]],8,2,4,6,7],"affectedFilesPendingEmit":[3,5,6,7],"emitSignatures":[3,5,6,7]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + [ + "./filewithimports.ts", + [ + { + "file": "./filewithimports.ts", + "start": 124, + "length": 6, + "messageText": "Cannot find module 'pkg1' or its corresponding type declarations.", + "category": 1, + "code": 2307 + } + ] + ], + [ + "./filewithtyperefs.ts", + [ + { + "file": "./filewithtyperefs.ts", + "start": 162, + "length": 17, + "messageText": "Cannot find name 'RequireInterface3'.", + "category": 1, + "code": 2304 + } + ] + ], + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg2/import.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "affectedFilesPendingEmit": [ + [ + "./filewithimports.ts", + "Js | Dts" + ], + [ + "./filewithtyperefs.ts", + "Js | Dts" + ], + [ + "./randomfileforimport.ts", + "Js | Dts" + ], + [ + "./randomfilefortyperef.ts", + "Js | Dts" + ] + ], + "emitSignatures": [ + "./filewithimports.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ] + }, + "version": "FakeTSVersion", + "size": 2172 +} + + +/a/lib/tsc.js -b -w --explainFiles +Output:: +File '/src/project/package.json' does not exist. +File '/src/package.json' does not exist. +File '/package.json' does not exist. +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in CJS mode with conditions 'node', 'require', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.ts' does not exist. +File '/src/project/node_modules/pkg1/require.tsx' does not exist. +File '/src/project/node_modules/pkg1/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.js' does not exist. +File '/src/project/node_modules/pkg1/require.jsx' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Module name 'pkg1' was not resolved. ======== +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg3/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist. +File '/src/project/node_modules/package.json' does not exist. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/a/lib/package.json' does not exist. +File '/a/package.json' does not exist. +File '/package.json' does not exist according to earlier cached lookups. +fileWithImports.ts:2:40 - error TS2307: Cannot find module 'pkg1' or its corresponding type declarations. + +2 import type { RequireInterface1 } from "pkg1" assert { "resolution-mode": "require" }; +   ~~~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + + +>> Screen clear +[12:01:04 AM] Starting compilation in watch mode... + +File '/src/project/package.json' does not exist. +File '/src/package.json' does not exist. +File '/package.json' does not exist. +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in CJS mode with conditions 'node', 'require', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.ts' does not exist. +File '/src/project/node_modules/pkg1/require.tsx' does not exist. +File '/src/project/node_modules/pkg1/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.js' does not exist. +File '/src/project/node_modules/pkg1/require.jsx' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Module name 'pkg1' was not resolved. ======== +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg3/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist. +File '/src/project/node_modules/package.json' does not exist. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/a/lib/package.json' does not exist. +File '/a/package.json' does not exist. +File '/package.json' does not exist according to earlier cached lookups. +fileWithImports.ts:2:40 - error TS2307: Cannot find module 'pkg1' or its corresponding type declarations. + +2 import type { RequireInterface1 } from "pkg1" assert { "resolution-mode": "require" }; +   ~~~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +[12:01:05 AM] Found 3 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg0/import.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx", + "/src/project/node_modules/pkg1/require.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.ts", + "/src/node_modules/pkg1.tsx", + "/src/node_modules/pkg1.d.ts", + "/src/node_modules/pkg1/index.ts", + "/src/node_modules/pkg1/index.tsx", + "/src/node_modules/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.ts", + "/node_modules/pkg1.tsx", + "/node_modules/pkg1.d.ts", + "/node_modules/pkg1/index.ts", + "/node_modules/pkg1/index.tsx", + "/node_modules/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/node_modules/pkg1/require.js", + "/src/project/node_modules/pkg1/require.jsx", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.js", + "/src/node_modules/pkg1.jsx", + "/src/node_modules/pkg1/index.js", + "/src/node_modules/pkg1/index.jsx", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.js", + "/node_modules/pkg1.jsx", + "/node_modules/pkg1/index.js", + "/node_modules/pkg1/index.jsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json", + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/require.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/package.json: + {"pollingInterval":2000} +/src/package.json: + {"pollingInterval":2000} +/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg1/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} +/a/lib/package.json: + {"pollingInterval":2000} +/a/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: + +exitCode:: ExitStatus.undefined + + +Change:: modify randomFileForImport by adding import + +Input:: +//// [/src/project/randomFileForImport.ts] +import type { ImportInterface0 } from "pkg0" assert { "resolution-mode": "import" }; +export const x = 10; + + +Output:: +>> Screen clear +[12:01:08 AM] File change detected. Starting incremental compilation... + +File '/src/project/package.json' does not exist. +File '/src/package.json' does not exist. +File '/package.json' does not exist. +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in CJS mode with conditions 'node', 'require', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.ts' does not exist. +File '/src/project/node_modules/pkg1/require.tsx' does not exist. +File '/src/project/node_modules/pkg1/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.js' does not exist. +File '/src/project/node_modules/pkg1/require.jsx' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Module name 'pkg1' was not resolved. ======== +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg3/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist. +File '/src/project/node_modules/package.json' does not exist. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/a/lib/package.json' does not exist. +File '/a/package.json' does not exist. +File '/package.json' does not exist according to earlier cached lookups. +fileWithImports.ts:2:40 - error TS2307: Cannot find module 'pkg1' or its corresponding type declarations. + +2 import type { RequireInterface1 } from "pkg1" assert { "resolution-mode": "require" }; +   ~~~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + Imported via "pkg0" from file 'randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +[12:01:16 AM] Found 3 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg0/import.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project/randomFileForImport.ts + +Shape signatures in builder refreshed for:: +/src/project/randomfileforimport.ts (computed .d.ts) + +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx", + "/src/project/node_modules/pkg1/require.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.ts", + "/src/node_modules/pkg1.tsx", + "/src/node_modules/pkg1.d.ts", + "/src/node_modules/pkg1/index.ts", + "/src/node_modules/pkg1/index.tsx", + "/src/node_modules/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.ts", + "/node_modules/pkg1.tsx", + "/node_modules/pkg1.d.ts", + "/node_modules/pkg1/index.ts", + "/node_modules/pkg1/index.tsx", + "/node_modules/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/node_modules/pkg1/require.js", + "/src/project/node_modules/pkg1/require.jsx", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.js", + "/src/node_modules/pkg1.jsx", + "/src/node_modules/pkg1/index.js", + "/src/node_modules/pkg1/index.jsx", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.js", + "/node_modules/pkg1.jsx", + "/node_modules/pkg1/index.js", + "/node_modules/pkg1/index.jsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json", + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/require.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/package.json: + {"pollingInterval":2000} +/src/package.json: + {"pollingInterval":2000} +/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg1/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} +/a/lib/package.json: + {"pollingInterval":2000} +/a/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: + +exitCode:: ExitStatus.undefined + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","impliedFormat":1},{"version":"-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2],[4]],"referencedMap":[[3,1],[5,2],[6,1]],"exportedModulesMap":[[3,1],[5,2]],"semanticDiagnosticsPerFile":[1,[3,[{"file":"./filewithimports.ts","start":124,"length":6,"messageText":"Cannot find module 'pkg1' or its corresponding type declarations.","category":1,"code":2307}]],[5,[{"file":"./filewithtyperefs.ts","start":162,"length":17,"messageText":"Cannot find name 'RequireInterface3'.","category":1,"code":2304}]],8,2,4,6,7],"affectedFilesPendingEmit":[3,5,6,7],"emitSignatures":[3,5,6,7]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ], + "./randomfileforimport.ts": [ + "./node_modules/pkg0/import.d.ts" + ] + }, + "exportedModulesMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + [ + "./filewithimports.ts", + [ + { + "file": "./filewithimports.ts", + "start": 124, + "length": 6, + "messageText": "Cannot find module 'pkg1' or its corresponding type declarations.", + "category": 1, + "code": 2307 + } + ] + ], + [ + "./filewithtyperefs.ts", + [ + { + "file": "./filewithtyperefs.ts", + "start": 162, + "length": 17, + "messageText": "Cannot find name 'RequireInterface3'.", + "category": 1, + "code": 2304 + } + ] + ], + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg2/import.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "affectedFilesPendingEmit": [ + [ + "./filewithimports.ts", + "Js | Dts" + ], + [ + "./filewithtyperefs.ts", + "Js | Dts" + ], + [ + "./randomfileforimport.ts", + "Js | Dts" + ], + [ + "./randomfilefortyperef.ts", + "Js | Dts" + ] + ], + "emitSignatures": [ + "./filewithimports.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ] + }, + "version": "FakeTSVersion", + "size": 2326 +} + + +Change:: modify randomFileForTypeRef by adding typeRef + +Input:: +//// [/src/project/randomFileForTypeRef.ts] +/// +export const x = 10; + + +Output:: +>> Screen clear +[12:01:19 AM] File change detected. Starting incremental compilation... + +File '/src/project/package.json' does not exist. +File '/src/package.json' does not exist. +File '/package.json' does not exist. +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in CJS mode with conditions 'node', 'require', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.ts' does not exist. +File '/src/project/node_modules/pkg1/require.tsx' does not exist. +File '/src/project/node_modules/pkg1/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.js' does not exist. +File '/src/project/node_modules/pkg1/require.jsx' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Module name 'pkg1' was not resolved. ======== +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg3/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts'. ======== +Resolution for type reference directive 'pkg2' was found in cache from location '/src/project'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist. +File '/src/project/node_modules/package.json' does not exist. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/a/lib/package.json' does not exist. +File '/a/package.json' does not exist. +File '/package.json' does not exist according to earlier cached lookups. +fileWithImports.ts:2:40 - error TS2307: Cannot find module 'pkg1' or its corresponding type declarations. + +2 import type { RequireInterface1 } from "pkg1" assert { "resolution-mode": "require" }; +   ~~~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + Imported via "pkg0" from file 'randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +[12:01:27 AM] Found 3 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg0/import.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project/randomFileForTypeRef.ts + +Shape signatures in builder refreshed for:: +/src/project/randomfilefortyperef.ts (computed .d.ts) + +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx", + "/src/project/node_modules/pkg1/require.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.ts", + "/src/node_modules/pkg1.tsx", + "/src/node_modules/pkg1.d.ts", + "/src/node_modules/pkg1/index.ts", + "/src/node_modules/pkg1/index.tsx", + "/src/node_modules/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.ts", + "/node_modules/pkg1.tsx", + "/node_modules/pkg1.d.ts", + "/node_modules/pkg1/index.ts", + "/node_modules/pkg1/index.tsx", + "/node_modules/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/node_modules/pkg1/require.js", + "/src/project/node_modules/pkg1/require.jsx", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.js", + "/src/node_modules/pkg1.jsx", + "/src/node_modules/pkg1/index.js", + "/src/node_modules/pkg1/index.jsx", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.js", + "/node_modules/pkg1.jsx", + "/node_modules/pkg1/index.js", + "/node_modules/pkg1/index.jsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json", + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/require.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/package.json: + {"pollingInterval":2000} +/src/package.json: + {"pollingInterval":2000} +/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg1/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} +/a/lib/package.json: + {"pollingInterval":2000} +/a/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: + +exitCode:: ExitStatus.undefined + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","impliedFormat":1},{"version":"-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-8191038086-/// \nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2],[4]],"referencedMap":[[3,1],[5,2],[6,1],[7,2]],"exportedModulesMap":[[3,1],[5,2]],"semanticDiagnosticsPerFile":[1,[3,[{"file":"./filewithimports.ts","start":124,"length":6,"messageText":"Cannot find module 'pkg1' or its corresponding type declarations.","category":1,"code":2307}]],[5,[{"file":"./filewithtyperefs.ts","start":162,"length":17,"messageText":"Cannot find name 'RequireInterface3'.","category":1,"code":2304}]],8,2,4,6,7],"affectedFilesPendingEmit":[3,5,6,7],"emitSignatures":[3,5,6,7]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ], + "./randomfileforimport.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./randomfilefortyperef.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + [ + "./filewithimports.ts", + [ + { + "file": "./filewithimports.ts", + "start": 124, + "length": 6, + "messageText": "Cannot find module 'pkg1' or its corresponding type declarations.", + "category": 1, + "code": 2307 + } + ] + ], + [ + "./filewithtyperefs.ts", + [ + { + "file": "./filewithtyperefs.ts", + "start": 162, + "length": 17, + "messageText": "Cannot find name 'RequireInterface3'.", + "category": 1, + "code": 2304 + } + ] + ], + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg2/import.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "affectedFilesPendingEmit": [ + [ + "./filewithimports.ts", + "Js | Dts" + ], + [ + "./filewithtyperefs.ts", + "Js | Dts" + ], + [ + "./randomfileforimport.ts", + "Js | Dts" + ], + [ + "./randomfilefortyperef.ts", + "Js | Dts" + ] + ], + "emitSignatures": [ + "./filewithimports.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ] + }, + "version": "FakeTSVersion", + "size": 2448 +} + + +Change:: write file not resolved by import and random edit + +Input:: +//// [/src/project/randomFileForImport.ts] +import type { ImportInterface0 } from "pkg0" assert { "resolution-mode": "import" }; +export const x = 10;export const y = 10; + +//// [/src/project/node_modules/pkg1/require.d.ts] +export interface RequireInterface1 {} + + +Output:: +>> Screen clear +[12:01:32 AM] File change detected. Starting incremental compilation... + +File '/src/project/package.json' does not exist. +File '/src/package.json' does not exist. +File '/package.json' does not exist. +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in CJS mode with conditions 'node', 'require', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.ts' does not exist. +File '/src/project/node_modules/pkg1/require.tsx' does not exist. +File '/src/project/node_modules/pkg1/require.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg1/require.d.ts', result '/src/project/node_modules/pkg1/require.d.ts'. +======== Module name 'pkg1' was successfully resolved to '/src/project/node_modules/pkg1/require.d.ts' with Package ID 'pkg1/require.d.ts@0.0.1'. ======== +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg3/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts'. ======== +Resolution for type reference directive 'pkg2' was found in cache from location '/src/project'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist. +File '/src/project/node_modules/package.json' does not exist. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/a/lib/package.json' does not exist. +File '/a/package.json' does not exist. +File '/package.json' does not exist according to earlier cached lookups. +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + Imported via "pkg0" from file 'randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" +node_modules/pkg1/require.d.ts + Imported via "pkg1" from file 'fileWithImports.ts' with packageId 'pkg1/require.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg1/package.json' does not have field "type" +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +[12:01:40 AM] Found 2 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg0/import.d.ts +/src/project/node_modules/pkg1/require.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project/node_modules/pkg1/require.d.ts +/src/project/fileWithImports.ts +/src/project/randomFileForImport.ts + +Shape signatures in builder refreshed for:: +/src/project/node_modules/pkg1/require.d.ts (used version) +/src/project/filewithimports.ts (computed .d.ts) +/src/project/randomfileforimport.ts (computed .d.ts) + +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/node_modules/pkg1/require.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg1", + "contents": { + "packageJsonContent": { + "name": "pkg1", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg1/require.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg1", + "subModuleName": "require.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/require.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/package.json: + {"pollingInterval":2000} +/src/package.json: + {"pollingInterval":2000} +/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg1/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} +/a/lib/package.json: + {"pollingInterval":2000} +/a/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: + +exitCode:: ExitStatus.undefined + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./node_modules/pkg1/require.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"-3547817137-export interface RequireInterface1 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","signature":"-3531856636-export {};\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","impliedFormat":1},{"version":"-11409094169-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;export const y = 10;","signature":"-18799098802-export declare const x = 10;\nexport declare const y = 10;\n","impliedFormat":1},{"version":"-8191038086-/// \nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2,3],[5],[2]],"referencedMap":[[4,1],[6,2],[7,3],[8,2]],"exportedModulesMap":[[6,2]],"semanticDiagnosticsPerFile":[1,4,[6,[{"file":"./filewithtyperefs.ts","start":162,"length":17,"messageText":"Cannot find name 'RequireInterface3'.","category":1,"code":2304}]],9,2,3,5,7,8],"affectedFilesPendingEmit":[4,6,7,8],"emitSignatures":[4,6,7,8]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ], + [ + "./node_modules/pkg0/import.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg1/require.d.ts": { + "original": { + "version": "-3547817137-export interface RequireInterface1 {}", + "impliedFormat": 1 + }, + "version": "-3547817137-export interface RequireInterface1 {}", + "signature": "-3547817137-export interface RequireInterface1 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-11409094169-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;export const y = 10;", + "signature": "-18799098802-export declare const x = 10;\nexport declare const y = 10;\n", + "impliedFormat": 1 + }, + "version": "-11409094169-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;export const y = 10;", + "signature": "-18799098802-export declare const x = 10;\nexport declare const y = 10;\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ], + "./randomfileforimport.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./randomfilefortyperef.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": { + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + "./filewithimports.ts", + [ + "./filewithtyperefs.ts", + [ + { + "file": "./filewithtyperefs.ts", + "start": 162, + "length": 17, + "messageText": "Cannot find name 'RequireInterface3'.", + "category": 1, + "code": 2304 + } + ] + ], + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts", + "./node_modules/pkg2/import.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "affectedFilesPendingEmit": [ + [ + "./filewithimports.ts", + "Js | Dts" + ], + [ + "./filewithtyperefs.ts", + "Js | Dts" + ], + [ + "./randomfileforimport.ts", + "Js | Dts" + ], + [ + "./randomfilefortyperef.ts", + "Js | Dts" + ] + ], + "emitSignatures": [ + "./filewithimports.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ] + }, + "version": "FakeTSVersion", + "size": 2492 +} + + +Change:: write file not resolved by typeRef and random edit + +Input:: +//// [/src/project/randomFileForImport.ts] +import type { ImportInterface0 } from "pkg0" assert { "resolution-mode": "import" }; +export const x = 10;export const y = 10;export const z = 10; + +//// [/src/project/node_modules/pkg3/require.d.ts] +export {}; +declare global { + interface RequireInterface3 {} +} + + + +Output:: +>> Screen clear +[12:01:46 AM] File change detected. Starting incremental compilation... + +File '/src/project/package.json' does not exist. +File '/src/package.json' does not exist. +File '/package.json' does not exist. +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in CJS mode with conditions 'node', 'require', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.ts' does not exist. +File '/src/project/node_modules/pkg1/require.tsx' does not exist. +File '/src/project/node_modules/pkg1/require.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg1/require.d.ts', result '/src/project/node_modules/pkg1/require.d.ts'. +======== Module name 'pkg1' was successfully resolved to '/src/project/node_modules/pkg1/require.d.ts' with Package ID 'pkg1/require.d.ts@0.0.1'. ======== +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg3/require.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg3/require.d.ts', result '/src/project/node_modules/pkg3/require.d.ts'. +======== Type reference directive 'pkg3' was successfully resolved to '/src/project/node_modules/pkg3/require.d.ts' with Package ID 'pkg3/require.d.ts@0.0.1', primary: false. ======== +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/node_modules/pkg3/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts'. ======== +Resolution for type reference directive 'pkg2' was found in cache from location '/src/project'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist. +File '/src/project/node_modules/package.json' does not exist. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/a/lib/package.json' does not exist. +File '/a/package.json' does not exist. +File '/package.json' does not exist according to earlier cached lookups. +../../a/lib/lib.d.ts + Default library for target 'es5' +node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + Imported via "pkg0" from file 'randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" +node_modules/pkg1/require.d.ts + Imported via "pkg1" from file 'fileWithImports.ts' with packageId 'pkg1/require.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg1/package.json' does not have field "type" +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" +node_modules/pkg3/require.d.ts + Type library referenced via 'pkg3' from file 'fileWithTypeRefs.ts' with packageId 'pkg3/require.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg3/package.json' does not have field "type" +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +[12:02:10 AM] Found 0 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg0/import.d.ts +/src/project/node_modules/pkg1/require.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/node_modules/pkg3/require.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg0/import.d.ts +/src/project/node_modules/pkg1/require.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/node_modules/pkg3/require.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Shape signatures in builder refreshed for:: +/src/project/node_modules/pkg3/require.d.ts (used version) +/src/project/node_modules/pkg0/import.d.ts (used version) +/src/project/node_modules/pkg1/require.d.ts (used version) +/src/project/filewithimports.ts (computed .d.ts) +/src/project/node_modules/pkg2/import.d.ts (used version) +/src/project/filewithtyperefs.ts (computed .d.ts) +/src/project/randomfileforimport.ts (computed .d.ts) +/src/project/randomfilefortyperef.ts (computed .d.ts) +/src/project/node_modules/@types/pkg4/index.d.ts (used version) + +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/node_modules/pkg1/require.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg1", + "contents": { + "packageJsonContent": { + "name": "pkg1", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg1/require.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg1", + "subModuleName": "require.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/node_modules/pkg3/require.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg3", + "contents": { + "packageJsonContent": { + "name": "pkg3", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg3/require.d.ts", + "packageId": { + "name": "pkg3", + "subModuleName": "require.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/package.json: + {"pollingInterval":2000} +/src/package.json: + {"pollingInterval":2000} +/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg1/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} +/a/lib/package.json: + {"pollingInterval":2000} +/a/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: + +exitCode:: ExitStatus.undefined + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./node_modules/pkg1/require.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./node_modules/pkg3/require.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"-3547817137-export interface RequireInterface1 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","signature":"-3531856636-export {};\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","signature":"-3531856636-export {};\n","impliedFormat":1},{"version":"2513033443-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;export const y = 10;export const z = 10;","signature":"-26065391196-export declare const x = 10;\nexport declare const y = 10;\nexport declare const z = 10;\n","impliedFormat":1},{"version":"-8191038086-/// \nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2,3],[5,6],[2],[5]],"referencedMap":[[4,1],[7,2],[8,3],[9,4]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,4,7,10,2,3,5,6,8,9],"latestChangedDtsFile":"./randomFileForTypeRef.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts" + ], + [ + "./node_modules/pkg0/import.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg1/require.d.ts": { + "original": { + "version": "-3547817137-export interface RequireInterface1 {}", + "impliedFormat": 1 + }, + "version": "-3547817137-export interface RequireInterface1 {}", + "signature": "-3547817137-export interface RequireInterface1 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg3/require.d.ts": { + "original": { + "version": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "signature": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "2513033443-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;export const y = 10;export const z = 10;", + "signature": "-26065391196-export declare const x = 10;\nexport declare const y = 10;\nexport declare const z = 10;\n", + "impliedFormat": 1 + }, + "version": "2513033443-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;export const y = 10;export const z = 10;", + "signature": "-26065391196-export declare const x = 10;\nexport declare const y = 10;\nexport declare const z = 10;\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts" + ], + "./randomfileforimport.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./randomfilefortyperef.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + "./filewithimports.ts", + "./filewithtyperefs.ts", + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts", + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForTypeRef.d.ts" + }, + "version": "FakeTSVersion", + "size": 2607 +} + +//// [/src/project/fileWithImports.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + + +//// [/src/project/fileWithImports.d.ts] +export {}; + + +//// [/src/project/fileWithTypeRefs.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/// +/// + + +//// [/src/project/fileWithTypeRefs.d.ts] +export {}; + + +//// [/src/project/randomFileForImport.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.z = exports.y = exports.x = void 0; +exports.x = 10; +exports.y = 10; +exports.z = 10; + + +//// [/src/project/randomFileForImport.d.ts] +export declare const x = 10; +export declare const y = 10; +export declare const z = 10; + + +//// [/src/project/randomFileForTypeRef.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +/// +exports.x = 10; + + +//// [/src/project/randomFileForTypeRef.d.ts] +export declare const x = 10; + + + +Change:: Random edit + +Input:: +//// [/src/project/randomFileForImport.ts] +import type { ImportInterface0 } from "pkg0" assert { "resolution-mode": "import" }; +export const x = 10;export const y = 10;export const z = 10;export const k = 10; + + +Output:: +>> Screen clear +[12:02:13 AM] File change detected. Starting incremental compilation... + +File '/src/project/package.json' does not exist. +File '/src/package.json' does not exist. +File '/package.json' does not exist. +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in CJS mode with conditions 'node', 'require', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.ts' does not exist. +File '/src/project/node_modules/pkg1/require.tsx' does not exist. +File '/src/project/node_modules/pkg1/require.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg1/require.d.ts', result '/src/project/node_modules/pkg1/require.d.ts'. +======== Module name 'pkg1' was successfully resolved to '/src/project/node_modules/pkg1/require.d.ts' with Package ID 'pkg1/require.d.ts@0.0.1'. ======== +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg3/require.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg3/require.d.ts', result '/src/project/node_modules/pkg3/require.d.ts'. +======== Type reference directive 'pkg3' was successfully resolved to '/src/project/node_modules/pkg3/require.d.ts' with Package ID 'pkg3/require.d.ts@0.0.1', primary: false. ======== +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/node_modules/pkg3/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts'. ======== +Resolution for type reference directive 'pkg2' was found in cache from location '/src/project'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist. +File '/src/project/node_modules/package.json' does not exist. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/a/lib/package.json' does not exist. +File '/a/package.json' does not exist. +File '/package.json' does not exist according to earlier cached lookups. +../../a/lib/lib.d.ts + Default library for target 'es5' +node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + Imported via "pkg0" from file 'randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" +node_modules/pkg1/require.d.ts + Imported via "pkg1" from file 'fileWithImports.ts' with packageId 'pkg1/require.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg1/package.json' does not have field "type" +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" +node_modules/pkg3/require.d.ts + Type library referenced via 'pkg3' from file 'fileWithTypeRefs.ts' with packageId 'pkg3/require.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg3/package.json' does not have field "type" +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +[12:02:27 AM] Found 0 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg0/import.d.ts +/src/project/node_modules/pkg1/require.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/node_modules/pkg3/require.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project/randomFileForImport.ts + +Shape signatures in builder refreshed for:: +/src/project/randomfileforimport.ts (computed .d.ts) + +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/node_modules/pkg1/require.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg1", + "contents": { + "packageJsonContent": { + "name": "pkg1", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg1/require.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg1", + "subModuleName": "require.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/node_modules/pkg3/require.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg3", + "contents": { + "packageJsonContent": { + "name": "pkg3", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg3/require.d.ts", + "packageId": { + "name": "pkg3", + "subModuleName": "require.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/package.json: + {"pollingInterval":2000} +/src/package.json: + {"pollingInterval":2000} +/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg1/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} +/a/lib/package.json: + {"pollingInterval":2000} +/a/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: + +exitCode:: ExitStatus.undefined + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./node_modules/pkg1/require.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./node_modules/pkg3/require.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"-3547817137-export interface RequireInterface1 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","signature":"-3531856636-export {};\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","signature":"-3531856636-export {};\n","impliedFormat":1},{"version":"-6303207792-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;export const y = 10;export const z = 10;export const k = 10;","signature":"-22914839157-export declare const x = 10;\nexport declare const y = 10;\nexport declare const z = 10;\nexport declare const k = 10;\n","impliedFormat":1},{"version":"-8191038086-/// \nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2,3],[5,6],[2],[5]],"referencedMap":[[4,1],[7,2],[8,3],[9,4]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,4,7,10,2,3,5,6,8,9],"latestChangedDtsFile":"./randomFileForImport.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts" + ], + [ + "./node_modules/pkg0/import.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg1/require.d.ts": { + "original": { + "version": "-3547817137-export interface RequireInterface1 {}", + "impliedFormat": 1 + }, + "version": "-3547817137-export interface RequireInterface1 {}", + "signature": "-3547817137-export interface RequireInterface1 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg3/require.d.ts": { + "original": { + "version": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "signature": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-6303207792-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;export const y = 10;export const z = 10;export const k = 10;", + "signature": "-22914839157-export declare const x = 10;\nexport declare const y = 10;\nexport declare const z = 10;\nexport declare const k = 10;\n", + "impliedFormat": 1 + }, + "version": "-6303207792-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;export const y = 10;export const z = 10;export const k = 10;", + "signature": "-22914839157-export declare const x = 10;\nexport declare const y = 10;\nexport declare const z = 10;\nexport declare const k = 10;\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts" + ], + "./randomfileforimport.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./randomfilefortyperef.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + "./filewithimports.ts", + "./filewithtyperefs.ts", + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts", + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForImport.d.ts" + }, + "version": "FakeTSVersion", + "size": 2657 +} + +//// [/src/project/randomFileForImport.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.k = exports.z = exports.y = exports.x = void 0; +exports.x = 10; +exports.y = 10; +exports.z = 10; +exports.k = 10; + + +//// [/src/project/randomFileForImport.d.ts] +export declare const x = 10; +export declare const y = 10; +export declare const z = 10; +export declare const k = 10; + + diff --git a/tests/baselines/reference/tsbuildWatch/cacheResolutions/multi-file.js b/tests/baselines/reference/tsbuildWatch/cacheResolutions/multi-file.js new file mode 100644 index 00000000000..3c0ddcc4aae --- /dev/null +++ b/tests/baselines/reference/tsbuildWatch/cacheResolutions/multi-file.js @@ -0,0 +1,3762 @@ +Input:: +//// [/src/project/tsconfig.json] +{"compilerOptions":{"moduleResolution":"node16","composite":true,"cacheResolutions":true,"traceResolution":true},"include":["*.ts"],"exclude":["*.d.ts"]} + +//// [/src/project/fileWithImports.ts] +import type { ImportInterface0 } from "pkg0" assert { "resolution-mode": "import" }; +import type { RequireInterface1 } from "pkg1" assert { "resolution-mode": "require" }; + + +//// [/src/project/randomFileForImport.ts] +export const x = 10; + +//// [/src/project/node_modules/pkg0/package.json] +{"name":"pkg0","version":"0.0.1","exports":{"import":"./import.js","require":"./require.js"}} + +//// [/src/project/node_modules/pkg0/import.d.ts] +export interface ImportInterface0 {} + +//// [/src/project/node_modules/pkg0/require.d.ts] +export interface RequireInterface0 {} + +//// [/src/project/node_modules/pkg1/package.json] +{"name":"pkg1","version":"0.0.1","exports":{"import":"./import.js","require":"./require.js"}} + +//// [/src/project/node_modules/pkg1/import.d.ts] +export interface ImportInterface1 {} + +//// [/src/project/fileWithTypeRefs.ts] +/// +/// +interface LocalInterface extends ImportInterface2, RequireInterface3 {} +export {} + + +//// [/src/project/randomFileForTypeRef.ts] +export const x = 10; + +//// [/src/project/node_modules/pkg2/package.json] +{"name":"pkg2","version":"0.0.1","exports":{"import":"./import.js","require":"./require.js"}} + +//// [/src/project/node_modules/pkg2/import.d.ts] +export {}; +declare global { + interface ImportInterface2 {} +} + + +//// [/src/project/node_modules/pkg2/require.d.ts] +export {}; +declare global { + interface RequireInterface2 {} +} + + +//// [/src/project/node_modules/pkg3/package.json] +{"name":"pkg3","version":"0.0.1","exports":{"import":"./import.js","require":"./require.js"}} + +//// [/src/project/node_modules/pkg3/import.d.ts] +export {}; +declare global { + interface ImportInterface3 {} +} + + +//// [/src/project/node_modules/@types/pkg4/index.d.ts] +export const x = 10; + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + + +/a/lib/tsc.js -b -w --explainFiles +Output:: +>> Screen clear +[12:00:59 AM] Starting compilation in watch mode... + +File '/src/project/package.json' does not exist. +File '/src/package.json' does not exist. +File '/package.json' does not exist. +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in CJS mode with conditions 'node', 'require', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.ts' does not exist. +File '/src/project/node_modules/pkg1/require.tsx' does not exist. +File '/src/project/node_modules/pkg1/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.js' does not exist. +File '/src/project/node_modules/pkg1/require.jsx' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Module name 'pkg1' was not resolved. ======== +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg3/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist. +File '/src/project/node_modules/package.json' does not exist. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/a/lib/package.json' does not exist. +File '/a/package.json' does not exist. +File '/package.json' does not exist according to earlier cached lookups. +fileWithImports.ts:2:40 - error TS2307: Cannot find module 'pkg1' or its corresponding type declarations. + +2 import type { RequireInterface1 } from "pkg1" assert { "resolution-mode": "require" }; +   ~~~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +[12:01:05 AM] Found 3 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg0/import.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg0/import.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) +/src/project/node_modules/pkg0/import.d.ts (used version) +/src/project/filewithimports.ts (used version) +/src/project/node_modules/pkg2/import.d.ts (used version) +/src/project/filewithtyperefs.ts (used version) +/src/project/randomfileforimport.ts (used version) +/src/project/randomfilefortyperef.ts (used version) +/src/project/node_modules/@types/pkg4/index.d.ts (used version) + +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx", + "/src/project/node_modules/pkg1/require.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.ts", + "/src/node_modules/pkg1.tsx", + "/src/node_modules/pkg1.d.ts", + "/src/node_modules/pkg1/index.ts", + "/src/node_modules/pkg1/index.tsx", + "/src/node_modules/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.ts", + "/node_modules/pkg1.tsx", + "/node_modules/pkg1.d.ts", + "/node_modules/pkg1/index.ts", + "/node_modules/pkg1/index.tsx", + "/node_modules/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/node_modules/pkg1/require.js", + "/src/project/node_modules/pkg1/require.jsx", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.js", + "/src/node_modules/pkg1.jsx", + "/src/node_modules/pkg1/index.js", + "/src/node_modules/pkg1/index.jsx", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.js", + "/node_modules/pkg1.jsx", + "/node_modules/pkg1/index.js", + "/node_modules/pkg1/index.jsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json", + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/require.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/package.json: + {"pollingInterval":2000} +/src/package.json: + {"pollingInterval":2000} +/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg1/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} +/a/lib/package.json: + {"pollingInterval":2000} +/a/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: + +exitCode:: ExitStatus.undefined + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2],[4]],"referencedMap":[[3,1],[5,2]],"exportedModulesMap":[[3,1],[5,2]],"semanticDiagnosticsPerFile":[1,[3,[{"file":"./filewithimports.ts","start":124,"length":6,"messageText":"Cannot find module 'pkg1' or its corresponding type declarations.","category":1,"code":2307}]],[5,[{"file":"./filewithtyperefs.ts","start":162,"length":17,"messageText":"Cannot find name 'RequireInterface3'.","category":1,"code":2304}]],8,2,4,6,7],"affectedFilesPendingEmit":[3,5,6,7],"emitSignatures":[3,5,6,7]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + [ + "./filewithimports.ts", + [ + { + "file": "./filewithimports.ts", + "start": 124, + "length": 6, + "messageText": "Cannot find module 'pkg1' or its corresponding type declarations.", + "category": 1, + "code": 2307 + } + ] + ], + [ + "./filewithtyperefs.ts", + [ + { + "file": "./filewithtyperefs.ts", + "start": 162, + "length": 17, + "messageText": "Cannot find name 'RequireInterface3'.", + "category": 1, + "code": 2304 + } + ] + ], + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg2/import.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "affectedFilesPendingEmit": [ + [ + "./filewithimports.ts", + "Js | Dts" + ], + [ + "./filewithtyperefs.ts", + "Js | Dts" + ], + [ + "./randomfileforimport.ts", + "Js | Dts" + ], + [ + "./randomfilefortyperef.ts", + "Js | Dts" + ] + ], + "emitSignatures": [ + "./filewithimports.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ] + }, + "version": "FakeTSVersion", + "size": 2172 +} + + +Change:: modify randomFileForImport by adding import + +Input:: +//// [/src/project/randomFileForImport.ts] +import type { ImportInterface0 } from "pkg0" assert { "resolution-mode": "import" }; +export const x = 10; + + +Output:: +>> Screen clear +[12:01:08 AM] File change detected. Starting incremental compilation... + +File '/src/project/package.json' does not exist. +File '/src/package.json' does not exist. +File '/package.json' does not exist. +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in CJS mode with conditions 'node', 'require', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.ts' does not exist. +File '/src/project/node_modules/pkg1/require.tsx' does not exist. +File '/src/project/node_modules/pkg1/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.js' does not exist. +File '/src/project/node_modules/pkg1/require.jsx' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Module name 'pkg1' was not resolved. ======== +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg3/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist. +File '/src/project/node_modules/package.json' does not exist. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/a/lib/package.json' does not exist. +File '/a/package.json' does not exist. +File '/package.json' does not exist according to earlier cached lookups. +fileWithImports.ts:2:40 - error TS2307: Cannot find module 'pkg1' or its corresponding type declarations. + +2 import type { RequireInterface1 } from "pkg1" assert { "resolution-mode": "require" }; +   ~~~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + Imported via "pkg0" from file 'randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +[12:01:16 AM] Found 3 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg0/import.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project/randomFileForImport.ts + +Shape signatures in builder refreshed for:: +/src/project/randomfileforimport.ts (computed .d.ts) + +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx", + "/src/project/node_modules/pkg1/require.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.ts", + "/src/node_modules/pkg1.tsx", + "/src/node_modules/pkg1.d.ts", + "/src/node_modules/pkg1/index.ts", + "/src/node_modules/pkg1/index.tsx", + "/src/node_modules/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.ts", + "/node_modules/pkg1.tsx", + "/node_modules/pkg1.d.ts", + "/node_modules/pkg1/index.ts", + "/node_modules/pkg1/index.tsx", + "/node_modules/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/node_modules/pkg1/require.js", + "/src/project/node_modules/pkg1/require.jsx", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.js", + "/src/node_modules/pkg1.jsx", + "/src/node_modules/pkg1/index.js", + "/src/node_modules/pkg1/index.jsx", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.js", + "/node_modules/pkg1.jsx", + "/node_modules/pkg1/index.js", + "/node_modules/pkg1/index.jsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json", + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/require.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/package.json: + {"pollingInterval":2000} +/src/package.json: + {"pollingInterval":2000} +/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg1/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} +/a/lib/package.json: + {"pollingInterval":2000} +/a/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: + +exitCode:: ExitStatus.undefined + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","impliedFormat":1},{"version":"-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2],[4]],"referencedMap":[[3,1],[5,2],[6,1]],"exportedModulesMap":[[3,1],[5,2]],"semanticDiagnosticsPerFile":[1,[3,[{"file":"./filewithimports.ts","start":124,"length":6,"messageText":"Cannot find module 'pkg1' or its corresponding type declarations.","category":1,"code":2307}]],[5,[{"file":"./filewithtyperefs.ts","start":162,"length":17,"messageText":"Cannot find name 'RequireInterface3'.","category":1,"code":2304}]],8,2,4,6,7],"affectedFilesPendingEmit":[3,5,6,7],"emitSignatures":[3,5,6,7]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ], + "./randomfileforimport.ts": [ + "./node_modules/pkg0/import.d.ts" + ] + }, + "exportedModulesMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + [ + "./filewithimports.ts", + [ + { + "file": "./filewithimports.ts", + "start": 124, + "length": 6, + "messageText": "Cannot find module 'pkg1' or its corresponding type declarations.", + "category": 1, + "code": 2307 + } + ] + ], + [ + "./filewithtyperefs.ts", + [ + { + "file": "./filewithtyperefs.ts", + "start": 162, + "length": 17, + "messageText": "Cannot find name 'RequireInterface3'.", + "category": 1, + "code": 2304 + } + ] + ], + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg2/import.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "affectedFilesPendingEmit": [ + [ + "./filewithimports.ts", + "Js | Dts" + ], + [ + "./filewithtyperefs.ts", + "Js | Dts" + ], + [ + "./randomfileforimport.ts", + "Js | Dts" + ], + [ + "./randomfilefortyperef.ts", + "Js | Dts" + ] + ], + "emitSignatures": [ + "./filewithimports.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ] + }, + "version": "FakeTSVersion", + "size": 2326 +} + + +Change:: modify randomFileForTypeRef by adding typeRef + +Input:: +//// [/src/project/randomFileForTypeRef.ts] +/// +export const x = 10; + + +Output:: +>> Screen clear +[12:01:19 AM] File change detected. Starting incremental compilation... + +File '/src/project/package.json' does not exist. +File '/src/package.json' does not exist. +File '/package.json' does not exist. +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in CJS mode with conditions 'node', 'require', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.ts' does not exist. +File '/src/project/node_modules/pkg1/require.tsx' does not exist. +File '/src/project/node_modules/pkg1/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.js' does not exist. +File '/src/project/node_modules/pkg1/require.jsx' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Module name 'pkg1' was not resolved. ======== +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg3/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts'. ======== +Resolution for type reference directive 'pkg2' was found in cache from location '/src/project'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist. +File '/src/project/node_modules/package.json' does not exist. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/a/lib/package.json' does not exist. +File '/a/package.json' does not exist. +File '/package.json' does not exist according to earlier cached lookups. +fileWithImports.ts:2:40 - error TS2307: Cannot find module 'pkg1' or its corresponding type declarations. + +2 import type { RequireInterface1 } from "pkg1" assert { "resolution-mode": "require" }; +   ~~~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + Imported via "pkg0" from file 'randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +[12:01:27 AM] Found 3 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg0/import.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project/randomFileForTypeRef.ts + +Shape signatures in builder refreshed for:: +/src/project/randomfilefortyperef.ts (computed .d.ts) + +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx", + "/src/project/node_modules/pkg1/require.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.ts", + "/src/node_modules/pkg1.tsx", + "/src/node_modules/pkg1.d.ts", + "/src/node_modules/pkg1/index.ts", + "/src/node_modules/pkg1/index.tsx", + "/src/node_modules/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.ts", + "/node_modules/pkg1.tsx", + "/node_modules/pkg1.d.ts", + "/node_modules/pkg1/index.ts", + "/node_modules/pkg1/index.tsx", + "/node_modules/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/node_modules/pkg1/require.js", + "/src/project/node_modules/pkg1/require.jsx", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.js", + "/src/node_modules/pkg1.jsx", + "/src/node_modules/pkg1/index.js", + "/src/node_modules/pkg1/index.jsx", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.js", + "/node_modules/pkg1.jsx", + "/node_modules/pkg1/index.js", + "/node_modules/pkg1/index.jsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json", + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/require.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/package.json: + {"pollingInterval":2000} +/src/package.json: + {"pollingInterval":2000} +/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg1/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} +/a/lib/package.json: + {"pollingInterval":2000} +/a/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: + +exitCode:: ExitStatus.undefined + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","impliedFormat":1},{"version":"-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-8191038086-/// \nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2],[4]],"referencedMap":[[3,1],[5,2],[6,1],[7,2]],"exportedModulesMap":[[3,1],[5,2]],"semanticDiagnosticsPerFile":[1,[3,[{"file":"./filewithimports.ts","start":124,"length":6,"messageText":"Cannot find module 'pkg1' or its corresponding type declarations.","category":1,"code":2307}]],[5,[{"file":"./filewithtyperefs.ts","start":162,"length":17,"messageText":"Cannot find name 'RequireInterface3'.","category":1,"code":2304}]],8,2,4,6,7],"affectedFilesPendingEmit":[3,5,6,7],"emitSignatures":[3,5,6,7]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ], + "./randomfileforimport.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./randomfilefortyperef.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + [ + "./filewithimports.ts", + [ + { + "file": "./filewithimports.ts", + "start": 124, + "length": 6, + "messageText": "Cannot find module 'pkg1' or its corresponding type declarations.", + "category": 1, + "code": 2307 + } + ] + ], + [ + "./filewithtyperefs.ts", + [ + { + "file": "./filewithtyperefs.ts", + "start": 162, + "length": 17, + "messageText": "Cannot find name 'RequireInterface3'.", + "category": 1, + "code": 2304 + } + ] + ], + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg2/import.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "affectedFilesPendingEmit": [ + [ + "./filewithimports.ts", + "Js | Dts" + ], + [ + "./filewithtyperefs.ts", + "Js | Dts" + ], + [ + "./randomfileforimport.ts", + "Js | Dts" + ], + [ + "./randomfilefortyperef.ts", + "Js | Dts" + ] + ], + "emitSignatures": [ + "./filewithimports.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ] + }, + "version": "FakeTSVersion", + "size": 2448 +} + + +Change:: write file not resolved by import and random edit + +Input:: +//// [/src/project/randomFileForImport.ts] +import type { ImportInterface0 } from "pkg0" assert { "resolution-mode": "import" }; +export const x = 10;export const y = 10; + +//// [/src/project/node_modules/pkg1/require.d.ts] +export interface RequireInterface1 {} + + +Output:: +>> Screen clear +[12:01:32 AM] File change detected. Starting incremental compilation... + +File '/src/project/package.json' does not exist. +File '/src/package.json' does not exist. +File '/package.json' does not exist. +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in CJS mode with conditions 'node', 'require', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.ts' does not exist. +File '/src/project/node_modules/pkg1/require.tsx' does not exist. +File '/src/project/node_modules/pkg1/require.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg1/require.d.ts', result '/src/project/node_modules/pkg1/require.d.ts'. +======== Module name 'pkg1' was successfully resolved to '/src/project/node_modules/pkg1/require.d.ts' with Package ID 'pkg1/require.d.ts@0.0.1'. ======== +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg3/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts'. ======== +Resolution for type reference directive 'pkg2' was found in cache from location '/src/project'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist. +File '/src/project/node_modules/package.json' does not exist. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/a/lib/package.json' does not exist. +File '/a/package.json' does not exist. +File '/package.json' does not exist according to earlier cached lookups. +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + Imported via "pkg0" from file 'randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" +node_modules/pkg1/require.d.ts + Imported via "pkg1" from file 'fileWithImports.ts' with packageId 'pkg1/require.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg1/package.json' does not have field "type" +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +[12:01:40 AM] Found 2 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg0/import.d.ts +/src/project/node_modules/pkg1/require.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project/node_modules/pkg1/require.d.ts +/src/project/fileWithImports.ts +/src/project/randomFileForImport.ts + +Shape signatures in builder refreshed for:: +/src/project/node_modules/pkg1/require.d.ts (used version) +/src/project/filewithimports.ts (computed .d.ts) +/src/project/randomfileforimport.ts (computed .d.ts) + +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/node_modules/pkg1/require.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg1", + "contents": { + "packageJsonContent": { + "name": "pkg1", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg1/require.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg1", + "subModuleName": "require.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/require.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/package.json: + {"pollingInterval":2000} +/src/package.json: + {"pollingInterval":2000} +/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg1/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} +/a/lib/package.json: + {"pollingInterval":2000} +/a/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: + +exitCode:: ExitStatus.undefined + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./node_modules/pkg1/require.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"-3547817137-export interface RequireInterface1 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","signature":"-3531856636-export {};\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","impliedFormat":1},{"version":"-11409094169-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;export const y = 10;","signature":"-18799098802-export declare const x = 10;\nexport declare const y = 10;\n","impliedFormat":1},{"version":"-8191038086-/// \nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2,3],[5],[2]],"referencedMap":[[4,1],[6,2],[7,3],[8,2]],"exportedModulesMap":[[6,2]],"semanticDiagnosticsPerFile":[1,4,[6,[{"file":"./filewithtyperefs.ts","start":162,"length":17,"messageText":"Cannot find name 'RequireInterface3'.","category":1,"code":2304}]],9,2,3,5,7,8],"affectedFilesPendingEmit":[4,6,7,8],"emitSignatures":[4,6,7,8]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ], + [ + "./node_modules/pkg0/import.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg1/require.d.ts": { + "original": { + "version": "-3547817137-export interface RequireInterface1 {}", + "impliedFormat": 1 + }, + "version": "-3547817137-export interface RequireInterface1 {}", + "signature": "-3547817137-export interface RequireInterface1 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-11409094169-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;export const y = 10;", + "signature": "-18799098802-export declare const x = 10;\nexport declare const y = 10;\n", + "impliedFormat": 1 + }, + "version": "-11409094169-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;export const y = 10;", + "signature": "-18799098802-export declare const x = 10;\nexport declare const y = 10;\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ], + "./randomfileforimport.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./randomfilefortyperef.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": { + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + "./filewithimports.ts", + [ + "./filewithtyperefs.ts", + [ + { + "file": "./filewithtyperefs.ts", + "start": 162, + "length": 17, + "messageText": "Cannot find name 'RequireInterface3'.", + "category": 1, + "code": 2304 + } + ] + ], + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts", + "./node_modules/pkg2/import.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "affectedFilesPendingEmit": [ + [ + "./filewithimports.ts", + "Js | Dts" + ], + [ + "./filewithtyperefs.ts", + "Js | Dts" + ], + [ + "./randomfileforimport.ts", + "Js | Dts" + ], + [ + "./randomfilefortyperef.ts", + "Js | Dts" + ] + ], + "emitSignatures": [ + "./filewithimports.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ] + }, + "version": "FakeTSVersion", + "size": 2492 +} + + +Change:: write file not resolved by typeRef and random edit + +Input:: +//// [/src/project/randomFileForImport.ts] +import type { ImportInterface0 } from "pkg0" assert { "resolution-mode": "import" }; +export const x = 10;export const y = 10;export const z = 10; + +//// [/src/project/node_modules/pkg3/require.d.ts] +export {}; +declare global { + interface RequireInterface3 {} +} + + + +Output:: +>> Screen clear +[12:01:46 AM] File change detected. Starting incremental compilation... + +File '/src/project/package.json' does not exist. +File '/src/package.json' does not exist. +File '/package.json' does not exist. +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in CJS mode with conditions 'node', 'require', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.ts' does not exist. +File '/src/project/node_modules/pkg1/require.tsx' does not exist. +File '/src/project/node_modules/pkg1/require.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg1/require.d.ts', result '/src/project/node_modules/pkg1/require.d.ts'. +======== Module name 'pkg1' was successfully resolved to '/src/project/node_modules/pkg1/require.d.ts' with Package ID 'pkg1/require.d.ts@0.0.1'. ======== +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg3/require.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg3/require.d.ts', result '/src/project/node_modules/pkg3/require.d.ts'. +======== Type reference directive 'pkg3' was successfully resolved to '/src/project/node_modules/pkg3/require.d.ts' with Package ID 'pkg3/require.d.ts@0.0.1', primary: false. ======== +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/node_modules/pkg3/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts'. ======== +Resolution for type reference directive 'pkg2' was found in cache from location '/src/project'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist. +File '/src/project/node_modules/package.json' does not exist. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/a/lib/package.json' does not exist. +File '/a/package.json' does not exist. +File '/package.json' does not exist according to earlier cached lookups. +../../a/lib/lib.d.ts + Default library for target 'es5' +node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + Imported via "pkg0" from file 'randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" +node_modules/pkg1/require.d.ts + Imported via "pkg1" from file 'fileWithImports.ts' with packageId 'pkg1/require.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg1/package.json' does not have field "type" +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" +node_modules/pkg3/require.d.ts + Type library referenced via 'pkg3' from file 'fileWithTypeRefs.ts' with packageId 'pkg3/require.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg3/package.json' does not have field "type" +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +[12:02:10 AM] Found 0 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg0/import.d.ts +/src/project/node_modules/pkg1/require.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/node_modules/pkg3/require.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg0/import.d.ts +/src/project/node_modules/pkg1/require.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/node_modules/pkg3/require.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Shape signatures in builder refreshed for:: +/src/project/node_modules/pkg3/require.d.ts (used version) +/src/project/node_modules/pkg0/import.d.ts (used version) +/src/project/node_modules/pkg1/require.d.ts (used version) +/src/project/filewithimports.ts (computed .d.ts) +/src/project/node_modules/pkg2/import.d.ts (used version) +/src/project/filewithtyperefs.ts (computed .d.ts) +/src/project/randomfileforimport.ts (computed .d.ts) +/src/project/randomfilefortyperef.ts (computed .d.ts) +/src/project/node_modules/@types/pkg4/index.d.ts (used version) + +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/node_modules/pkg1/require.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg1", + "contents": { + "packageJsonContent": { + "name": "pkg1", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg1/require.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg1", + "subModuleName": "require.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/node_modules/pkg3/require.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg3", + "contents": { + "packageJsonContent": { + "name": "pkg3", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg3/require.d.ts", + "packageId": { + "name": "pkg3", + "subModuleName": "require.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/package.json: + {"pollingInterval":2000} +/src/package.json: + {"pollingInterval":2000} +/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg1/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} +/a/lib/package.json: + {"pollingInterval":2000} +/a/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: + +exitCode:: ExitStatus.undefined + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./node_modules/pkg1/require.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./node_modules/pkg3/require.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"-3547817137-export interface RequireInterface1 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","signature":"-3531856636-export {};\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","signature":"-3531856636-export {};\n","impliedFormat":1},{"version":"2513033443-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;export const y = 10;export const z = 10;","signature":"-26065391196-export declare const x = 10;\nexport declare const y = 10;\nexport declare const z = 10;\n","impliedFormat":1},{"version":"-8191038086-/// \nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2,3],[5,6],[2],[5]],"referencedMap":[[4,1],[7,2],[8,3],[9,4]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,4,7,10,2,3,5,6,8,9],"latestChangedDtsFile":"./randomFileForTypeRef.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts" + ], + [ + "./node_modules/pkg0/import.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg1/require.d.ts": { + "original": { + "version": "-3547817137-export interface RequireInterface1 {}", + "impliedFormat": 1 + }, + "version": "-3547817137-export interface RequireInterface1 {}", + "signature": "-3547817137-export interface RequireInterface1 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg3/require.d.ts": { + "original": { + "version": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "signature": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "2513033443-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;export const y = 10;export const z = 10;", + "signature": "-26065391196-export declare const x = 10;\nexport declare const y = 10;\nexport declare const z = 10;\n", + "impliedFormat": 1 + }, + "version": "2513033443-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;export const y = 10;export const z = 10;", + "signature": "-26065391196-export declare const x = 10;\nexport declare const y = 10;\nexport declare const z = 10;\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts" + ], + "./randomfileforimport.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./randomfilefortyperef.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + "./filewithimports.ts", + "./filewithtyperefs.ts", + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts", + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForTypeRef.d.ts" + }, + "version": "FakeTSVersion", + "size": 2607 +} + +//// [/src/project/fileWithImports.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + + +//// [/src/project/fileWithImports.d.ts] +export {}; + + +//// [/src/project/fileWithTypeRefs.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/// +/// + + +//// [/src/project/fileWithTypeRefs.d.ts] +export {}; + + +//// [/src/project/randomFileForImport.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.z = exports.y = exports.x = void 0; +exports.x = 10; +exports.y = 10; +exports.z = 10; + + +//// [/src/project/randomFileForImport.d.ts] +export declare const x = 10; +export declare const y = 10; +export declare const z = 10; + + +//// [/src/project/randomFileForTypeRef.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +/// +exports.x = 10; + + +//// [/src/project/randomFileForTypeRef.d.ts] +export declare const x = 10; + + + +Change:: Random edit + +Input:: +//// [/src/project/randomFileForImport.ts] +import type { ImportInterface0 } from "pkg0" assert { "resolution-mode": "import" }; +export const x = 10;export const y = 10;export const z = 10;export const k = 10; + + +Output:: +>> Screen clear +[12:02:13 AM] File change detected. Starting incremental compilation... + +File '/src/project/package.json' does not exist. +File '/src/package.json' does not exist. +File '/package.json' does not exist. +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in CJS mode with conditions 'node', 'require', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.ts' does not exist. +File '/src/project/node_modules/pkg1/require.tsx' does not exist. +File '/src/project/node_modules/pkg1/require.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg1/require.d.ts', result '/src/project/node_modules/pkg1/require.d.ts'. +======== Module name 'pkg1' was successfully resolved to '/src/project/node_modules/pkg1/require.d.ts' with Package ID 'pkg1/require.d.ts@0.0.1'. ======== +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg3/require.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg3/require.d.ts', result '/src/project/node_modules/pkg3/require.d.ts'. +======== Type reference directive 'pkg3' was successfully resolved to '/src/project/node_modules/pkg3/require.d.ts' with Package ID 'pkg3/require.d.ts@0.0.1', primary: false. ======== +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/node_modules/pkg3/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts'. ======== +Resolution for type reference directive 'pkg2' was found in cache from location '/src/project'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist. +File '/src/project/node_modules/package.json' does not exist. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/a/lib/package.json' does not exist. +File '/a/package.json' does not exist. +File '/package.json' does not exist according to earlier cached lookups. +../../a/lib/lib.d.ts + Default library for target 'es5' +node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + Imported via "pkg0" from file 'randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" +node_modules/pkg1/require.d.ts + Imported via "pkg1" from file 'fileWithImports.ts' with packageId 'pkg1/require.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg1/package.json' does not have field "type" +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" +node_modules/pkg3/require.d.ts + Type library referenced via 'pkg3' from file 'fileWithTypeRefs.ts' with packageId 'pkg3/require.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg3/package.json' does not have field "type" +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +[12:02:27 AM] Found 0 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg0/import.d.ts +/src/project/node_modules/pkg1/require.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/node_modules/pkg3/require.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project/randomFileForImport.ts + +Shape signatures in builder refreshed for:: +/src/project/randomfileforimport.ts (computed .d.ts) + +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/node_modules/pkg1/require.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg1", + "contents": { + "packageJsonContent": { + "name": "pkg1", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg1/require.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg1", + "subModuleName": "require.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/node_modules/pkg3/require.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg3", + "contents": { + "packageJsonContent": { + "name": "pkg3", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg3/require.d.ts", + "packageId": { + "name": "pkg3", + "subModuleName": "require.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/package.json: + {"pollingInterval":2000} +/src/package.json: + {"pollingInterval":2000} +/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg1/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg2/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg3/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} +/a/lib/package.json: + {"pollingInterval":2000} +/a/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: + +exitCode:: ExitStatus.undefined + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./node_modules/pkg1/require.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./node_modules/pkg3/require.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"-3547817137-export interface RequireInterface1 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","signature":"-3531856636-export {};\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","signature":"-3531856636-export {};\n","impliedFormat":1},{"version":"-6303207792-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;export const y = 10;export const z = 10;export const k = 10;","signature":"-22914839157-export declare const x = 10;\nexport declare const y = 10;\nexport declare const z = 10;\nexport declare const k = 10;\n","impliedFormat":1},{"version":"-8191038086-/// \nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2,3],[5,6],[2],[5]],"referencedMap":[[4,1],[7,2],[8,3],[9,4]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,4,7,10,2,3,5,6,8,9],"latestChangedDtsFile":"./randomFileForImport.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts" + ], + [ + "./node_modules/pkg0/import.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg1/require.d.ts": { + "original": { + "version": "-3547817137-export interface RequireInterface1 {}", + "impliedFormat": 1 + }, + "version": "-3547817137-export interface RequireInterface1 {}", + "signature": "-3547817137-export interface RequireInterface1 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg3/require.d.ts": { + "original": { + "version": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "signature": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-6303207792-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;export const y = 10;export const z = 10;export const k = 10;", + "signature": "-22914839157-export declare const x = 10;\nexport declare const y = 10;\nexport declare const z = 10;\nexport declare const k = 10;\n", + "impliedFormat": 1 + }, + "version": "-6303207792-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;export const y = 10;export const z = 10;export const k = 10;", + "signature": "-22914839157-export declare const x = 10;\nexport declare const y = 10;\nexport declare const z = 10;\nexport declare const k = 10;\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts" + ], + "./randomfileforimport.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./randomfilefortyperef.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + "./filewithimports.ts", + "./filewithtyperefs.ts", + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts", + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForImport.d.ts" + }, + "version": "FakeTSVersion", + "size": 2657 +} + +//// [/src/project/randomFileForImport.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.k = exports.z = exports.y = exports.x = void 0; +exports.x = 10; +exports.y = 10; +exports.z = 10; +exports.k = 10; + + +//// [/src/project/randomFileForImport.d.ts] +export declare const x = 10; +export declare const y = 10; +export declare const z = 10; +export declare const k = 10; + + diff --git a/tests/baselines/reference/tsc/cacheResolutions/bundle-emit.js b/tests/baselines/reference/tsc/cacheResolutions/bundle-emit.js new file mode 100644 index 00000000000..6eb40e88d83 --- /dev/null +++ b/tests/baselines/reference/tsc/cacheResolutions/bundle-emit.js @@ -0,0 +1,2608 @@ +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project/fileWithImports.ts] +import type { ImportInterface0 } from "pkg0"; +import type { RequireInterface1 } from "pkg1"; + + +//// [/src/project/fileWithTypeRefs.ts] +/// +/// +interface LocalInterface extends ImportInterface2, RequireInterface3 {} +export {} + + +//// [/src/project/node_modules/@types/pkg4/index.d.ts] +export const x = 10; + +//// [/src/project/node_modules/pkg2/index.d.ts] +export {}; +declare global { + interface ImportInterface2 {} +} + + +//// [/src/project/pkg0.d.ts] +export interface ImportInterface0 {} + +//// [/src/project/randomFileForImport.ts] +export const x = 10; + +//// [/src/project/randomFileForTypeRef.ts] +export const x = 10; + +//// [/src/project/tsconfig.json] +{"compilerOptions":{"module":"amd","composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js"},"include":["*.ts"],"exclude":["*.d.ts"]} + + + +Output:: +/lib/tsc -p /src/project --explainFiles +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg1.ts' does not exist. +File '/src/project/pkg1.tsx' does not exist. +File '/src/project/pkg1.d.ts' does not exist. +File '/src/pkg1.ts' does not exist. +File '/src/pkg1.tsx' does not exist. +File '/src/pkg1.d.ts' does not exist. +File '/pkg1.ts' does not exist. +File '/pkg1.tsx' does not exist. +File '/pkg1.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/pkg1.js' does not exist. +File '/src/project/pkg1.jsx' does not exist. +File '/src/pkg1.js' does not exist. +File '/src/pkg1.jsx' does not exist. +File '/pkg1.js' does not exist. +File '/pkg1.jsx' does not exist. +======== Module name 'pkg1' was not resolved. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg3.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +src/project/fileWithImports.ts:2:40 - error TS2792: Cannot find module 'pkg1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? + +2 import type { RequireInterface1 } from "pkg1"; +   ~~~~~~ + +src/project/fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +src/project/fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +lib/lib.d.ts + Default library for target 'es5' +src/project/pkg0.d.ts + Imported via "pkg0" from file 'src/project/fileWithImports.ts' +src/project/fileWithImports.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'src/project/fileWithTypeRefs.ts' +src/project/fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/randomFileForImport.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + +Found 3 errors in 2 files. + +Errors Files + 1 src/project/fileWithImports.ts:2 + 2 src/project/fileWithTypeRefs.ts:2 +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx", + "/src/project/pkg1.d.ts", + "/src/pkg1.ts", + "/src/pkg1.tsx", + "/src/pkg1.d.ts", + "/pkg1.ts", + "/pkg1.tsx", + "/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/pkg1.js", + "/src/project/pkg1.jsx", + "/src/pkg1.js", + "/src/pkg1.jsx", + "/pkg1.js", + "/pkg1.jsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts", + "/src/project/node_modules/pkg3/index.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + + +//// [/out.d.ts] +declare module "fileWithImports" { } +declare module "fileWithTypeRefs" { + export {}; +} +declare module "randomFileForImport" { + export const x = 10; +} +declare module "randomFileForTypeRef" { + export const x = 10; +} + + +//// [/out.js] +define("fileWithImports", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +}); +define("fileWithTypeRefs", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /// + /// +}); +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); + + +//// [/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./src/project","sourceFiles":["./src/project/fileWithImports.ts","./src/project/fileWithTypeRefs.ts","./src/project/randomFileForImport.ts","./src/project/randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":864,"kind":"text"}],"hash":"-31220064334-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n});\r\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /// \r\n /// \r\n});\r\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n exports.x = 10;\r\n});\r\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n exports.x = 10;\r\n});\r\n"},"dts":{"sections":[{"pos":0,"end":233,"kind":"text"}],"hash":"407350366-declare module \"fileWithImports\" { }\r\ndeclare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n"}},"program":{"fileNames":["./lib/lib.d.ts","./src/project/pkg0.d.ts","./src/project/filewithimports.ts","./src/project/node_modules/pkg2/index.d.ts","./src/project/filewithtyperefs.ts","./src/project/randomfileforimport.ts","./src/project/randomfilefortyperef.ts","./src/project/node_modules/@types/pkg4/index.d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","769951468-export interface ImportInterface0 {}","17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n","1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","-10726455937-export const x = 10;","-10726455937-export const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"407350366-declare module \"fileWithImports\" { }\r\ndeclare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/out.tsbuildinfo.baseline.txt] +====================================================================== +File:: ./out.js +---------------------------------------------------------------------- +text: (0-864) +define("fileWithImports", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +}); +define("fileWithTypeRefs", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /// + /// +}); +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); + +====================================================================== +====================================================================== +File:: ./out.d.ts +---------------------------------------------------------------------- +text: (0-233) +declare module "fileWithImports" { } +declare module "fileWithTypeRefs" { + export {}; +} +declare module "randomFileForImport" { + export const x = 10; +} +declare module "randomFileForTypeRef" { + export const x = 10; +} + +====================================================================== + +//// [/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./src/project", + "sourceFiles": [ + "./src/project/fileWithImports.ts", + "./src/project/fileWithTypeRefs.ts", + "./src/project/randomFileForImport.ts", + "./src/project/randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 864, + "kind": "text" + } + ], + "hash": "-31220064334-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n});\r\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /// \r\n /// \r\n});\r\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n exports.x = 10;\r\n});\r\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n exports.x = 10;\r\n});\r\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 233, + "kind": "text" + } + ], + "hash": "407350366-declare module \"fileWithImports\" { }\r\ndeclare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n" + } + }, + "program": { + "fileNames": [ + "./lib/lib.d.ts", + "./src/project/pkg0.d.ts", + "./src/project/filewithimports.ts", + "./src/project/node_modules/pkg2/index.d.ts", + "./src/project/filewithtyperefs.ts", + "./src/project/randomfileforimport.ts", + "./src/project/randomfilefortyperef.ts", + "./src/project/node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/project/pkg0.d.ts": "769951468-export interface ImportInterface0 {}", + "./src/project/filewithimports.ts": "17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n", + "./src/project/node_modules/pkg2/index.d.ts": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "./src/project/filewithtyperefs.ts": "-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "./src/project/randomfileforimport.ts": "-10726455937-export const x = 10;", + "./src/project/randomfilefortyperef.ts": "-10726455937-export const x = 10;", + "./src/project/node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "407350366-declare module \"fileWithImports\" { }\r\ndeclare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 3304 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/project --explainFiles +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg1.ts' does not exist. +File '/src/project/pkg1.tsx' does not exist. +File '/src/project/pkg1.d.ts' does not exist. +File '/src/pkg1.ts' does not exist. +File '/src/pkg1.tsx' does not exist. +File '/src/pkg1.d.ts' does not exist. +File '/pkg1.ts' does not exist. +File '/pkg1.tsx' does not exist. +File '/pkg1.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/pkg1.js' does not exist. +File '/src/project/pkg1.jsx' does not exist. +File '/src/pkg1.js' does not exist. +File '/src/pkg1.jsx' does not exist. +File '/pkg1.js' does not exist. +File '/pkg1.jsx' does not exist. +======== Module name 'pkg1' was not resolved. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg3.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +src/project/fileWithImports.ts:2:40 - error TS2792: Cannot find module 'pkg1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? + +2 import type { RequireInterface1 } from "pkg1"; +   ~~~~~~ + +src/project/fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +src/project/fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +lib/lib.d.ts + Default library for target 'es5' +src/project/pkg0.d.ts + Imported via "pkg0" from file 'src/project/fileWithImports.ts' +src/project/fileWithImports.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'src/project/fileWithTypeRefs.ts' +src/project/fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/randomFileForImport.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + +Found 3 errors in 2 files. + +Errors Files + 1 src/project/fileWithImports.ts:2 + 2 src/project/fileWithTypeRefs.ts:2 +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx", + "/src/project/pkg1.d.ts", + "/src/pkg1.ts", + "/src/pkg1.tsx", + "/src/pkg1.d.ts", + "/pkg1.ts", + "/pkg1.tsx", + "/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/pkg1.js", + "/src/project/pkg1.jsx", + "/src/pkg1.js", + "/src/pkg1.jsx", + "/pkg1.js", + "/pkg1.jsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts", + "/src/project/node_modules/pkg3/index.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + + + + +Change:: modify randomFileForImport by adding import +Input:: +//// [/src/project/randomFileForImport.ts] +import type { ImportInterface0 } from "pkg0"; +export const x = 10; + + + +Output:: +/lib/tsc -p /src/project --explainFiles +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg1.ts' does not exist. +File '/src/project/pkg1.tsx' does not exist. +File '/src/project/pkg1.d.ts' does not exist. +File '/src/pkg1.ts' does not exist. +File '/src/pkg1.tsx' does not exist. +File '/src/pkg1.d.ts' does not exist. +File '/pkg1.ts' does not exist. +File '/pkg1.tsx' does not exist. +File '/pkg1.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/pkg1.js' does not exist. +File '/src/project/pkg1.jsx' does not exist. +File '/src/pkg1.js' does not exist. +File '/src/pkg1.jsx' does not exist. +File '/pkg1.js' does not exist. +File '/pkg1.jsx' does not exist. +======== Module name 'pkg1' was not resolved. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg3.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +src/project/fileWithImports.ts:2:40 - error TS2792: Cannot find module 'pkg1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? + +2 import type { RequireInterface1 } from "pkg1"; +   ~~~~~~ + +src/project/fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +src/project/fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +lib/lib.d.ts + Default library for target 'es5' +src/project/pkg0.d.ts + Imported via "pkg0" from file 'src/project/fileWithImports.ts' + Imported via "pkg0" from file 'src/project/randomFileForImport.ts' +src/project/fileWithImports.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'src/project/fileWithTypeRefs.ts' +src/project/fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/randomFileForImport.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + +Found 3 errors in 2 files. + +Errors Files + 1 src/project/fileWithImports.ts:2 + 2 src/project/fileWithTypeRefs.ts:2 +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx", + "/src/project/pkg1.d.ts", + "/src/pkg1.ts", + "/src/pkg1.tsx", + "/src/pkg1.d.ts", + "/pkg1.ts", + "/pkg1.tsx", + "/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/pkg1.js", + "/src/project/pkg1.jsx", + "/src/pkg1.js", + "/src/pkg1.jsx", + "/pkg1.js", + "/pkg1.jsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts", + "/src/project/node_modules/pkg3/index.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + + +//// [/out.js] file written with same contents +//// [/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./src/project","sourceFiles":["./src/project/fileWithImports.ts","./src/project/fileWithTypeRefs.ts","./src/project/randomFileForImport.ts","./src/project/randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":864,"kind":"text"}],"hash":"-31220064334-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n});\r\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /// \r\n /// \r\n});\r\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n exports.x = 10;\r\n});\r\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n exports.x = 10;\r\n});\r\n"},"dts":{"sections":[{"pos":0,"end":233,"kind":"text"}],"hash":"407350366-declare module \"fileWithImports\" { }\r\ndeclare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n"}},"program":{"fileNames":["./lib/lib.d.ts","./src/project/pkg0.d.ts","./src/project/filewithimports.ts","./src/project/node_modules/pkg2/index.d.ts","./src/project/filewithtyperefs.ts","./src/project/randomfileforimport.ts","./src/project/randomfilefortyperef.ts","./src/project/node_modules/@types/pkg4/index.d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","769951468-export interface ImportInterface0 {}","17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n","1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;","-10726455937-export const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"407350366-declare module \"fileWithImports\" { }\r\ndeclare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/out.tsbuildinfo.baseline.txt] file written with same contents +//// [/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./src/project", + "sourceFiles": [ + "./src/project/fileWithImports.ts", + "./src/project/fileWithTypeRefs.ts", + "./src/project/randomFileForImport.ts", + "./src/project/randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 864, + "kind": "text" + } + ], + "hash": "-31220064334-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n});\r\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /// \r\n /// \r\n});\r\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n exports.x = 10;\r\n});\r\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n exports.x = 10;\r\n});\r\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 233, + "kind": "text" + } + ], + "hash": "407350366-declare module \"fileWithImports\" { }\r\ndeclare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n" + } + }, + "program": { + "fileNames": [ + "./lib/lib.d.ts", + "./src/project/pkg0.d.ts", + "./src/project/filewithimports.ts", + "./src/project/node_modules/pkg2/index.d.ts", + "./src/project/filewithtyperefs.ts", + "./src/project/randomfileforimport.ts", + "./src/project/randomfilefortyperef.ts", + "./src/project/node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/project/pkg0.d.ts": "769951468-export interface ImportInterface0 {}", + "./src/project/filewithimports.ts": "17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n", + "./src/project/node_modules/pkg2/index.d.ts": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "./src/project/filewithtyperefs.ts": "-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "./src/project/randomfileforimport.ts": "10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;", + "./src/project/randomfilefortyperef.ts": "-10726455937-export const x = 10;", + "./src/project/node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "407350366-declare module \"fileWithImports\" { }\r\ndeclare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 3352 +} + + + +Change:: modify randomFileForTypeRef by adding typeRef +Input:: +//// [/src/project/randomFileForTypeRef.ts] +/// +export const x = 10; + + + +Output:: +/lib/tsc -p /src/project --explainFiles +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg1.ts' does not exist. +File '/src/project/pkg1.tsx' does not exist. +File '/src/project/pkg1.d.ts' does not exist. +File '/src/pkg1.ts' does not exist. +File '/src/pkg1.tsx' does not exist. +File '/src/pkg1.d.ts' does not exist. +File '/pkg1.ts' does not exist. +File '/pkg1.tsx' does not exist. +File '/pkg1.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/pkg1.js' does not exist. +File '/src/project/pkg1.jsx' does not exist. +File '/src/pkg1.js' does not exist. +File '/src/pkg1.jsx' does not exist. +File '/pkg1.js' does not exist. +File '/pkg1.jsx' does not exist. +======== Module name 'pkg1' was not resolved. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg3.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts'. ======== +Resolution for type reference directive 'pkg2' was found in cache from location '/src/project'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +src/project/fileWithImports.ts:2:40 - error TS2792: Cannot find module 'pkg1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? + +2 import type { RequireInterface1 } from "pkg1"; +   ~~~~~~ + +src/project/fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +src/project/fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +lib/lib.d.ts + Default library for target 'es5' +src/project/pkg0.d.ts + Imported via "pkg0" from file 'src/project/fileWithImports.ts' + Imported via "pkg0" from file 'src/project/randomFileForImport.ts' +src/project/fileWithImports.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'src/project/fileWithTypeRefs.ts' +src/project/fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/randomFileForImport.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + +Found 3 errors in 2 files. + +Errors Files + 1 src/project/fileWithImports.ts:2 + 2 src/project/fileWithTypeRefs.ts:2 +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx", + "/src/project/pkg1.d.ts", + "/src/pkg1.ts", + "/src/pkg1.tsx", + "/src/pkg1.d.ts", + "/pkg1.ts", + "/pkg1.tsx", + "/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/pkg1.js", + "/src/project/pkg1.jsx", + "/src/pkg1.js", + "/src/pkg1.jsx", + "/pkg1.js", + "/pkg1.jsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts", + "/src/project/node_modules/pkg3/index.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + + +//// [/out.js] +define("fileWithImports", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +}); +define("fileWithTypeRefs", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /// + /// +}); +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + /// + exports.x = 10; +}); + + +//// [/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./src/project","sourceFiles":["./src/project/fileWithImports.ts","./src/project/fileWithTypeRefs.ts","./src/project/randomFileForImport.ts","./src/project/randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":899,"kind":"text"}],"hash":"-30350808392-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n});\r\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /// \r\n /// \r\n});\r\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n exports.x = 10;\r\n});\r\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n /// \r\n exports.x = 10;\r\n});\r\n"},"dts":{"sections":[{"pos":0,"end":233,"kind":"text"}],"hash":"407350366-declare module \"fileWithImports\" { }\r\ndeclare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n"}},"program":{"fileNames":["./lib/lib.d.ts","./src/project/pkg0.d.ts","./src/project/filewithimports.ts","./src/project/node_modules/pkg2/index.d.ts","./src/project/filewithtyperefs.ts","./src/project/randomfileforimport.ts","./src/project/randomfilefortyperef.ts","./src/project/node_modules/@types/pkg4/index.d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","769951468-export interface ImportInterface0 {}","17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n","1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;","-2210321256-/// \nexport const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"407350366-declare module \"fileWithImports\" { }\r\ndeclare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/out.tsbuildinfo.baseline.txt] +====================================================================== +File:: ./out.js +---------------------------------------------------------------------- +text: (0-899) +define("fileWithImports", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +}); +define("fileWithTypeRefs", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /// + /// +}); +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + /// + exports.x = 10; +}); + +====================================================================== +====================================================================== +File:: ./out.d.ts +---------------------------------------------------------------------- +text: (0-233) +declare module "fileWithImports" { } +declare module "fileWithTypeRefs" { + export {}; +} +declare module "randomFileForImport" { + export const x = 10; +} +declare module "randomFileForTypeRef" { + export const x = 10; +} + +====================================================================== + +//// [/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./src/project", + "sourceFiles": [ + "./src/project/fileWithImports.ts", + "./src/project/fileWithTypeRefs.ts", + "./src/project/randomFileForImport.ts", + "./src/project/randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 899, + "kind": "text" + } + ], + "hash": "-30350808392-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n});\r\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /// \r\n /// \r\n});\r\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n exports.x = 10;\r\n});\r\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n /// \r\n exports.x = 10;\r\n});\r\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 233, + "kind": "text" + } + ], + "hash": "407350366-declare module \"fileWithImports\" { }\r\ndeclare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n" + } + }, + "program": { + "fileNames": [ + "./lib/lib.d.ts", + "./src/project/pkg0.d.ts", + "./src/project/filewithimports.ts", + "./src/project/node_modules/pkg2/index.d.ts", + "./src/project/filewithtyperefs.ts", + "./src/project/randomfileforimport.ts", + "./src/project/randomfilefortyperef.ts", + "./src/project/node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/project/pkg0.d.ts": "769951468-export interface ImportInterface0 {}", + "./src/project/filewithimports.ts": "17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n", + "./src/project/node_modules/pkg2/index.d.ts": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "./src/project/filewithtyperefs.ts": "-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "./src/project/randomfileforimport.ts": "10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;", + "./src/project/randomfilefortyperef.ts": "-2210321256-/// \nexport const x = 10;", + "./src/project/node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "407350366-declare module \"fileWithImports\" { }\r\ndeclare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 3423 +} + + + +Change:: write file not resolved by import +Input:: +//// [/src/project/pkg1.d.ts] +export interface RequireInterface1 {} + + + +Output:: +/lib/tsc -p /src/project --explainFiles +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg1.ts' does not exist. +File '/src/project/pkg1.tsx' does not exist. +File '/src/project/pkg1.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg1' was successfully resolved to '/src/project/pkg1.d.ts'. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg3.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts'. ======== +Resolution for type reference directive 'pkg2' was found in cache from location '/src/project'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +src/project/fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +src/project/fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +lib/lib.d.ts + Default library for target 'es5' +src/project/pkg0.d.ts + Imported via "pkg0" from file 'src/project/fileWithImports.ts' + Imported via "pkg0" from file 'src/project/randomFileForImport.ts' +src/project/pkg1.d.ts + Imported via "pkg1" from file 'src/project/fileWithImports.ts' +src/project/fileWithImports.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'src/project/fileWithTypeRefs.ts' +src/project/fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/randomFileForImport.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + +Found 2 errors in the same file, starting at: src/project/fileWithTypeRefs.ts:2 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg1.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts", + "/src/project/node_modules/pkg3/index.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + + +//// [/out.js] file written with same contents +//// [/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./src/project","sourceFiles":["./src/project/fileWithImports.ts","./src/project/fileWithTypeRefs.ts","./src/project/randomFileForImport.ts","./src/project/randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":899,"kind":"text"}],"hash":"-30350808392-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n});\r\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /// \r\n /// \r\n});\r\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n exports.x = 10;\r\n});\r\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n /// \r\n exports.x = 10;\r\n});\r\n"},"dts":{"sections":[{"pos":0,"end":233,"kind":"text"}],"hash":"407350366-declare module \"fileWithImports\" { }\r\ndeclare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n"}},"program":{"fileNames":["./lib/lib.d.ts","./src/project/pkg0.d.ts","./src/project/pkg1.d.ts","./src/project/filewithimports.ts","./src/project/node_modules/pkg2/index.d.ts","./src/project/filewithtyperefs.ts","./src/project/randomfileforimport.ts","./src/project/randomfilefortyperef.ts","./src/project/node_modules/@types/pkg4/index.d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","769951468-export interface ImportInterface0 {}","-3547817137-export interface RequireInterface1 {}","17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n","1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;","-2210321256-/// \nexport const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"407350366-declare module \"fileWithImports\" { }\r\ndeclare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/out.tsbuildinfo.baseline.txt] file written with same contents +//// [/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./src/project", + "sourceFiles": [ + "./src/project/fileWithImports.ts", + "./src/project/fileWithTypeRefs.ts", + "./src/project/randomFileForImport.ts", + "./src/project/randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 899, + "kind": "text" + } + ], + "hash": "-30350808392-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n});\r\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /// \r\n /// \r\n});\r\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n exports.x = 10;\r\n});\r\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n /// \r\n exports.x = 10;\r\n});\r\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 233, + "kind": "text" + } + ], + "hash": "407350366-declare module \"fileWithImports\" { }\r\ndeclare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n" + } + }, + "program": { + "fileNames": [ + "./lib/lib.d.ts", + "./src/project/pkg0.d.ts", + "./src/project/pkg1.d.ts", + "./src/project/filewithimports.ts", + "./src/project/node_modules/pkg2/index.d.ts", + "./src/project/filewithtyperefs.ts", + "./src/project/randomfileforimport.ts", + "./src/project/randomfilefortyperef.ts", + "./src/project/node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/project/pkg0.d.ts": "769951468-export interface ImportInterface0 {}", + "./src/project/pkg1.d.ts": "-3547817137-export interface RequireInterface1 {}", + "./src/project/filewithimports.ts": "17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n", + "./src/project/node_modules/pkg2/index.d.ts": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "./src/project/filewithtyperefs.ts": "-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "./src/project/randomfileforimport.ts": "10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;", + "./src/project/randomfilefortyperef.ts": "-2210321256-/// \nexport const x = 10;", + "./src/project/node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "407350366-declare module \"fileWithImports\" { }\r\ndeclare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 3501 +} + + + +Change:: write file not resolved by typeRef +Input:: +//// [/src/project/node_modules/pkg3/index.d.ts] +export {}; +declare global { + interface RequireInterface3 {} +} + + + + +Output:: +/lib/tsc -p /src/project --explainFiles +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg1.ts' does not exist. +File '/src/project/pkg1.tsx' does not exist. +File '/src/project/pkg1.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg1' was successfully resolved to '/src/project/pkg1.d.ts'. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg3/package.json' does not exist. +File '/src/project/node_modules/pkg3.d.ts' does not exist. +File '/src/project/node_modules/pkg3/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg3/index.d.ts', result '/src/project/node_modules/pkg3/index.d.ts'. +======== Type reference directive 'pkg3' was successfully resolved to '/src/project/node_modules/pkg3/index.d.ts', primary: false. ======== +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts'. ======== +Resolution for type reference directive 'pkg2' was found in cache from location '/src/project'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +lib/lib.d.ts + Default library for target 'es5' +src/project/pkg0.d.ts + Imported via "pkg0" from file 'src/project/fileWithImports.ts' + Imported via "pkg0" from file 'src/project/randomFileForImport.ts' +src/project/pkg1.d.ts + Imported via "pkg1" from file 'src/project/fileWithImports.ts' +src/project/fileWithImports.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'src/project/fileWithTypeRefs.ts' +src/project/node_modules/pkg3/index.d.ts + Type library referenced via 'pkg3' from file 'src/project/fileWithTypeRefs.ts' +src/project/fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/randomFileForImport.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +exitCode:: ExitStatus.Success +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg1.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg3/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + + +//// [/out.js] file written with same contents +//// [/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./src/project","sourceFiles":["./src/project/fileWithImports.ts","./src/project/fileWithTypeRefs.ts","./src/project/randomFileForImport.ts","./src/project/randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":899,"kind":"text"}],"hash":"-30350808392-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n});\r\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /// \r\n /// \r\n});\r\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n exports.x = 10;\r\n});\r\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n /// \r\n exports.x = 10;\r\n});\r\n"},"dts":{"sections":[{"pos":0,"end":233,"kind":"text"}],"hash":"407350366-declare module \"fileWithImports\" { }\r\ndeclare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n"}},"program":{"fileNames":["./lib/lib.d.ts","./src/project/pkg0.d.ts","./src/project/pkg1.d.ts","./src/project/filewithimports.ts","./src/project/node_modules/pkg2/index.d.ts","./src/project/node_modules/pkg3/index.d.ts","./src/project/filewithtyperefs.ts","./src/project/randomfileforimport.ts","./src/project/randomfilefortyperef.ts","./src/project/node_modules/@types/pkg4/index.d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","769951468-export interface ImportInterface0 {}","-3547817137-export interface RequireInterface1 {}","17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n","1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n","-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;","-2210321256-/// \nexport const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"407350366-declare module \"fileWithImports\" { }\r\ndeclare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/out.tsbuildinfo.baseline.txt] file written with same contents +//// [/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./src/project", + "sourceFiles": [ + "./src/project/fileWithImports.ts", + "./src/project/fileWithTypeRefs.ts", + "./src/project/randomFileForImport.ts", + "./src/project/randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 899, + "kind": "text" + } + ], + "hash": "-30350808392-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n});\r\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /// \r\n /// \r\n});\r\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n exports.x = 10;\r\n});\r\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n /// \r\n exports.x = 10;\r\n});\r\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 233, + "kind": "text" + } + ], + "hash": "407350366-declare module \"fileWithImports\" { }\r\ndeclare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n" + } + }, + "program": { + "fileNames": [ + "./lib/lib.d.ts", + "./src/project/pkg0.d.ts", + "./src/project/pkg1.d.ts", + "./src/project/filewithimports.ts", + "./src/project/node_modules/pkg2/index.d.ts", + "./src/project/node_modules/pkg3/index.d.ts", + "./src/project/filewithtyperefs.ts", + "./src/project/randomfileforimport.ts", + "./src/project/randomfilefortyperef.ts", + "./src/project/node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/project/pkg0.d.ts": "769951468-export interface ImportInterface0 {}", + "./src/project/pkg1.d.ts": "-3547817137-export interface RequireInterface1 {}", + "./src/project/filewithimports.ts": "17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n", + "./src/project/node_modules/pkg2/index.d.ts": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "./src/project/node_modules/pkg3/index.d.ts": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "./src/project/filewithtyperefs.ts": "-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "./src/project/randomfileforimport.ts": "10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;", + "./src/project/randomfilefortyperef.ts": "-2210321256-/// \nexport const x = 10;", + "./src/project/node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "407350366-declare module \"fileWithImports\" { }\r\ndeclare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 3630 +} + + + +Change:: delete file with imports +Input:: +//// [/src/project/fileWithImports.ts] unlink + + +Output:: +/lib/tsc -p /src/project --explainFiles +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg3/package.json' does not exist. +File '/src/project/node_modules/pkg3.d.ts' does not exist. +File '/src/project/node_modules/pkg3/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg3/index.d.ts', result '/src/project/node_modules/pkg3/index.d.ts'. +======== Type reference directive 'pkg3' was successfully resolved to '/src/project/node_modules/pkg3/index.d.ts', primary: false. ======== +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts'. ======== +Resolution for type reference directive 'pkg2' was found in cache from location '/src/project'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +lib/lib.d.ts + Default library for target 'es5' +src/project/node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'src/project/fileWithTypeRefs.ts' +src/project/node_modules/pkg3/index.d.ts + Type library referenced via 'pkg3' from file 'src/project/fileWithTypeRefs.ts' +src/project/fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/pkg0.d.ts + Imported via "pkg0" from file 'src/project/randomFileForImport.ts' +src/project/randomFileForImport.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +exitCode:: ExitStatus.Success +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg3/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + + +//// [/out.d.ts] +declare module "fileWithTypeRefs" { + export {}; +} +declare module "randomFileForImport" { + export const x = 10; +} +declare module "randomFileForTypeRef" { + export const x = 10; +} + + +//// [/out.js] +define("fileWithTypeRefs", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /// + /// +}); +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + /// + exports.x = 10; +}); + + +//// [/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./src/project","sourceFiles":["./src/project/fileWithTypeRefs.ts","./src/project/randomFileForImport.ts","./src/project/randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":726,"kind":"text"}],"hash":"35847268114-define(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /// \r\n /// \r\n});\r\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n exports.x = 10;\r\n});\r\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n /// \r\n exports.x = 10;\r\n});\r\n"},"dts":{"sections":[{"pos":0,"end":195,"kind":"text"}],"hash":"-4475206613-declare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n"}},"program":{"fileNames":["./lib/lib.d.ts","./src/project/node_modules/pkg2/index.d.ts","./src/project/node_modules/pkg3/index.d.ts","./src/project/filewithtyperefs.ts","./src/project/pkg0.d.ts","./src/project/randomfileforimport.ts","./src/project/randomfilefortyperef.ts","./src/project/node_modules/@types/pkg4/index.d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n","-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","769951468-export interface ImportInterface0 {}","10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;","-2210321256-/// \nexport const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"-4475206613-declare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/out.tsbuildinfo.baseline.txt] +====================================================================== +File:: ./out.js +---------------------------------------------------------------------- +text: (0-726) +define("fileWithTypeRefs", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /// + /// +}); +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + /// + exports.x = 10; +}); + +====================================================================== +====================================================================== +File:: ./out.d.ts +---------------------------------------------------------------------- +text: (0-195) +declare module "fileWithTypeRefs" { + export {}; +} +declare module "randomFileForImport" { + export const x = 10; +} +declare module "randomFileForTypeRef" { + export const x = 10; +} + +====================================================================== + +//// [/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./src/project", + "sourceFiles": [ + "./src/project/fileWithTypeRefs.ts", + "./src/project/randomFileForImport.ts", + "./src/project/randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 726, + "kind": "text" + } + ], + "hash": "35847268114-define(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /// \r\n /// \r\n});\r\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n exports.x = 10;\r\n});\r\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n /// \r\n exports.x = 10;\r\n});\r\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 195, + "kind": "text" + } + ], + "hash": "-4475206613-declare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n" + } + }, + "program": { + "fileNames": [ + "./lib/lib.d.ts", + "./src/project/node_modules/pkg2/index.d.ts", + "./src/project/node_modules/pkg3/index.d.ts", + "./src/project/filewithtyperefs.ts", + "./src/project/pkg0.d.ts", + "./src/project/randomfileforimport.ts", + "./src/project/randomfilefortyperef.ts", + "./src/project/node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/project/node_modules/pkg2/index.d.ts": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "./src/project/node_modules/pkg3/index.d.ts": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "./src/project/filewithtyperefs.ts": "-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "./src/project/pkg0.d.ts": "769951468-export interface ImportInterface0 {}", + "./src/project/randomfileforimport.ts": "10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;", + "./src/project/randomfilefortyperef.ts": "-2210321256-/// \nexport const x = 10;", + "./src/project/node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "-4475206613-declare module \"fileWithTypeRefs\" {\r\n export {};\r\n}\r\ndeclare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 3096 +} + + + +Change:: delete file with typeRefs +Input:: +//// [/src/project/fileWithTypeRefs.ts] unlink + + +Output:: +/lib/tsc -p /src/project --explainFiles +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +lib/lib.d.ts + Default library for target 'es5' +src/project/pkg0.d.ts + Imported via "pkg0" from file 'src/project/randomFileForImport.ts' +src/project/randomFileForImport.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'src/project/randomFileForTypeRef.ts' +src/project/randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +exitCode:: ExitStatus.Success +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + + +//// [/out.d.ts] +declare module "randomFileForImport" { + export const x = 10; +} +declare module "randomFileForTypeRef" { + export const x = 10; +} + + +//// [/out.js] +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + /// + exports.x = 10; +}); + + +//// [/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./src/project","sourceFiles":["./src/project/randomFileForImport.ts","./src/project/randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":482,"kind":"text"}],"hash":"-12813080037-define(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n exports.x = 10;\r\n});\r\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n /// \r\n exports.x = 10;\r\n});\r\n"},"dts":{"sections":[{"pos":0,"end":139,"kind":"text"}],"hash":"-2424074543-declare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n"}},"program":{"fileNames":["./lib/lib.d.ts","./src/project/pkg0.d.ts","./src/project/randomfileforimport.ts","./src/project/node_modules/pkg2/index.d.ts","./src/project/randomfilefortyperef.ts","./src/project/node_modules/@types/pkg4/index.d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","769951468-export interface ImportInterface0 {}","10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;","1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","-2210321256-/// \nexport const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"-2424074543-declare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/out.tsbuildinfo.baseline.txt] +====================================================================== +File:: ./out.js +---------------------------------------------------------------------- +text: (0-482) +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + /// + exports.x = 10; +}); + +====================================================================== +====================================================================== +File:: ./out.d.ts +---------------------------------------------------------------------- +text: (0-139) +declare module "randomFileForImport" { + export const x = 10; +} +declare module "randomFileForTypeRef" { + export const x = 10; +} + +====================================================================== + +//// [/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./src/project", + "sourceFiles": [ + "./src/project/randomFileForImport.ts", + "./src/project/randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 482, + "kind": "text" + } + ], + "hash": "-12813080037-define(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n exports.x = 10;\r\n});\r\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n /// \r\n exports.x = 10;\r\n});\r\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 139, + "kind": "text" + } + ], + "hash": "-2424074543-declare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n" + } + }, + "program": { + "fileNames": [ + "./lib/lib.d.ts", + "./src/project/pkg0.d.ts", + "./src/project/randomfileforimport.ts", + "./src/project/node_modules/pkg2/index.d.ts", + "./src/project/randomfilefortyperef.ts", + "./src/project/node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/project/pkg0.d.ts": "769951468-export interface ImportInterface0 {}", + "./src/project/randomfileforimport.ts": "10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;", + "./src/project/node_modules/pkg2/index.d.ts": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "./src/project/randomfilefortyperef.ts": "-2210321256-/// \nexport const x = 10;", + "./src/project/node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "-2424074543-declare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 2333 +} + + + +Change:: delete resolved import file +Input:: +//// [/src/project/pkg0.d.ts] unlink + + +Output:: +/lib/tsc -p /src/project --explainFiles +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' does not exist. +File '/src/pkg0.ts' does not exist. +File '/src/pkg0.tsx' does not exist. +File '/src/pkg0.d.ts' does not exist. +File '/pkg0.ts' does not exist. +File '/pkg0.tsx' does not exist. +File '/pkg0.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg0.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/pkg0.js' does not exist. +File '/src/project/pkg0.jsx' does not exist. +File '/src/pkg0.js' does not exist. +File '/src/pkg0.jsx' does not exist. +File '/pkg0.js' does not exist. +File '/pkg0.jsx' does not exist. +======== Module name 'pkg0' was not resolved. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +src/project/randomFileForImport.ts:1:39 - error TS2792: Cannot find module 'pkg0'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? + +1 import type { ImportInterface0 } from "pkg0"; +   ~~~~~~ + +lib/lib.d.ts + Default library for target 'es5' +src/project/randomFileForImport.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'src/project/randomFileForTypeRef.ts' +src/project/randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + +Found 1 error in src/project/randomFileForImport.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx", + "/src/project/pkg0.d.ts", + "/src/pkg0.ts", + "/src/pkg0.tsx", + "/src/pkg0.d.ts", + "/pkg0.ts", + "/pkg0.tsx", + "/pkg0.d.ts", + "/src/project/node_modules/@types/pkg0/package.json", + "/src/project/node_modules/@types/pkg0.d.ts", + "/src/project/node_modules/@types/pkg0/index.d.ts", + "/src/node_modules/@types/pkg0/package.json", + "/src/node_modules/@types/pkg0.d.ts", + "/src/node_modules/@types/pkg0/index.d.ts", + "/node_modules/@types/pkg0/package.json", + "/node_modules/@types/pkg0.d.ts", + "/node_modules/@types/pkg0/index.d.ts", + "/src/project/pkg0.js", + "/src/project/pkg0.jsx", + "/src/pkg0.js", + "/src/pkg0.jsx", + "/pkg0.js", + "/pkg0.jsx" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + + +//// [/out.js] file written with same contents +//// [/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./src/project","sourceFiles":["./src/project/randomFileForImport.ts","./src/project/randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":482,"kind":"text"}],"hash":"-12813080037-define(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n exports.x = 10;\r\n});\r\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n /// \r\n exports.x = 10;\r\n});\r\n"},"dts":{"sections":[{"pos":0,"end":139,"kind":"text"}],"hash":"-2424074543-declare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n"}},"program":{"fileNames":["./lib/lib.d.ts","./src/project/randomfileforimport.ts","./src/project/node_modules/pkg2/index.d.ts","./src/project/randomfilefortyperef.ts","./src/project/node_modules/@types/pkg4/index.d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;","1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","-2210321256-/// \nexport const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"-2424074543-declare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/out.tsbuildinfo.baseline.txt] file written with same contents +//// [/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./src/project", + "sourceFiles": [ + "./src/project/randomFileForImport.ts", + "./src/project/randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 482, + "kind": "text" + } + ], + "hash": "-12813080037-define(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n exports.x = 10;\r\n});\r\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n /// \r\n exports.x = 10;\r\n});\r\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 139, + "kind": "text" + } + ], + "hash": "-2424074543-declare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n" + } + }, + "program": { + "fileNames": [ + "./lib/lib.d.ts", + "./src/project/randomfileforimport.ts", + "./src/project/node_modules/pkg2/index.d.ts", + "./src/project/randomfilefortyperef.ts", + "./src/project/node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/project/randomfileforimport.ts": "10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;", + "./src/project/node_modules/pkg2/index.d.ts": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "./src/project/randomfilefortyperef.ts": "-2210321256-/// \nexport const x = 10;", + "./src/project/node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "-2424074543-declare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 2258 +} + + + +Change:: delete resolved typeRef file +Input:: +//// [/src/project/node_modules/pkg2/index.d.ts] unlink + + +Output:: +/lib/tsc -p /src/project --explainFiles +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' does not exist. +File '/src/pkg0.ts' does not exist. +File '/src/pkg0.tsx' does not exist. +File '/src/pkg0.d.ts' does not exist. +File '/pkg0.ts' does not exist. +File '/pkg0.tsx' does not exist. +File '/pkg0.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg0.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/pkg0.js' does not exist. +File '/src/project/pkg0.jsx' does not exist. +File '/src/pkg0.js' does not exist. +File '/src/pkg0.jsx' does not exist. +File '/pkg0.js' does not exist. +File '/pkg0.jsx' does not exist. +======== Module name 'pkg0' was not resolved. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg2.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg2' was not resolved. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +src/project/randomFileForImport.ts:1:39 - error TS2792: Cannot find module 'pkg0'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? + +1 import type { ImportInterface0 } from "pkg0"; +   ~~~~~~ + +src/project/randomFileForTypeRef.ts:1:23 - error TS2688: Cannot find type definition file for 'pkg2'. + +1 /// +   ~~~~ + +lib/lib.d.ts + Default library for target 'es5' +src/project/randomFileForImport.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' +src/project/node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + +Found 2 errors in 2 files. + +Errors Files + 1 src/project/randomFileForImport.ts:1 + 1 src/project/randomFileForTypeRef.ts:1 +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx", + "/src/project/pkg0.d.ts", + "/src/pkg0.ts", + "/src/pkg0.tsx", + "/src/pkg0.d.ts", + "/pkg0.ts", + "/pkg0.tsx", + "/pkg0.d.ts", + "/src/project/node_modules/@types/pkg0/package.json", + "/src/project/node_modules/@types/pkg0.d.ts", + "/src/project/node_modules/@types/pkg0/index.d.ts", + "/src/node_modules/@types/pkg0/package.json", + "/src/node_modules/@types/pkg0.d.ts", + "/src/node_modules/@types/pkg0/index.d.ts", + "/node_modules/@types/pkg0/package.json", + "/node_modules/@types/pkg0.d.ts", + "/node_modules/@types/pkg0/index.d.ts", + "/src/project/pkg0.js", + "/src/project/pkg0.jsx", + "/src/pkg0.js", + "/src/pkg0.jsx", + "/pkg0.js", + "/pkg0.jsx" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts", + "/src/project/node_modules/pkg2/index.d.ts", + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2.d.ts", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/node_modules/pkg2/package.json", + "/src/node_modules/pkg2.d.ts", + "/src/node_modules/pkg2/index.d.ts", + "/src/node_modules/@types/pkg2/package.json", + "/src/node_modules/@types/pkg2.d.ts", + "/src/node_modules/@types/pkg2/index.d.ts", + "/node_modules/pkg2/package.json", + "/node_modules/pkg2.d.ts", + "/node_modules/pkg2/index.d.ts", + "/node_modules/@types/pkg2/package.json", + "/node_modules/@types/pkg2.d.ts", + "/node_modules/@types/pkg2/index.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + + +//// [/out.js] file written with same contents +//// [/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./src/project","sourceFiles":["./src/project/randomFileForImport.ts","./src/project/randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":482,"kind":"text"}],"hash":"-12813080037-define(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n exports.x = 10;\r\n});\r\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n /// \r\n exports.x = 10;\r\n});\r\n"},"dts":{"sections":[{"pos":0,"end":139,"kind":"text"}],"hash":"-2424074543-declare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n"}},"program":{"fileNames":["./lib/lib.d.ts","./src/project/randomfileforimport.ts","./src/project/randomfilefortyperef.ts","./src/project/node_modules/@types/pkg4/index.d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;","-2210321256-/// \nexport const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"-2424074543-declare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/out.tsbuildinfo.baseline.txt] file written with same contents +//// [/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./src/project", + "sourceFiles": [ + "./src/project/randomFileForImport.ts", + "./src/project/randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 482, + "kind": "text" + } + ], + "hash": "-12813080037-define(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n exports.x = 10;\r\n});\r\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.x = void 0;\r\n /// \r\n exports.x = 10;\r\n});\r\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 139, + "kind": "text" + } + ], + "hash": "-2424074543-declare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n" + } + }, + "program": { + "fileNames": [ + "./lib/lib.d.ts", + "./src/project/randomfileforimport.ts", + "./src/project/randomfilefortyperef.ts", + "./src/project/node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "./lib/lib.d.ts": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "./src/project/randomfileforimport.ts": "10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;", + "./src/project/randomfilefortyperef.ts": "-2210321256-/// \nexport const x = 10;", + "./src/project/node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "-2424074543-declare module \"randomFileForImport\" {\r\n export const x = 10;\r\n}\r\ndeclare module \"randomFileForTypeRef\" {\r\n export const x = 10;\r\n}\r\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 2131 +} + diff --git a/tests/baselines/reference/tsc/cacheResolutions/diagnostics-from-cache.js b/tests/baselines/reference/tsc/cacheResolutions/diagnostics-from-cache.js new file mode 100644 index 00000000000..4d119a13ae5 --- /dev/null +++ b/tests/baselines/reference/tsc/cacheResolutions/diagnostics-from-cache.js @@ -0,0 +1,473 @@ +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project/index.ts] +import * as me from "@this/package"; +me.thing() +export function thing(): void {} + + +//// [/src/project/index2.ts] +export function thing(): void {} + + +//// [/src/project/package.json] +{"name":"@this/package","type":"module","exports":{".":{"default":"./dist/index.js","types":"./types/index.d.ts"}}} + +//// [/src/project/randomFileForImport.ts] +export const x = 10; + +//// [/src/project/tsconfig.json] +{"compilerOptions":{"moduleResolution":"nodenext","outDir":"./dist","declaration":true,"declarationDir":"./types","cacheResolutions":true,"traceResolution":true}} + + + +Output:: +/lib/tsc -p /src/project --incremental --explainFiles +Found 'package.json' at '/src/project/package.json'. +======== Resolving module '@this/package' from '/src/project/index.ts'. ======== +Explicitly specified module resolution kind: 'NodeNext'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' exists according to earlier cached lookups. +Matched 'exports' condition 'default'. +Using 'exports' subpath '.' with target './dist/index.js'. +File '/src/project/index.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/index.ts', result '/src/project/index.ts'. +======== Module name '@this/package' was successfully resolved to '/src/project/index.ts'. ======== +File '/src/project/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' exists according to earlier cached lookups. +File '/lib/package.json' does not exist. +File '/package.json' does not exist. +error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file '/src/project/package.json'. Supply the `rootDir` compiler option to disambiguate. + +lib/lib.d.ts + Default library for target 'es5' +src/project/index.ts + Matched by default include pattern '**/*' + Imported via "@this/package" from file 'src/project/index.ts' + File is ECMAScript module because 'src/project/package.json' has field "type" with value "module" +src/project/index2.ts + Matched by default include pattern '**/*' + File is ECMAScript module because 'src/project/package.json' has field "type" with value "module" +src/project/randomFileForImport.ts + Matched by default include pattern '**/*' + File is ECMAScript module because 'src/project/package.json' has field "type" with value "module" + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +File: /src/project/index.ts +packageJsonScope:: { + "packageDirectory": "/src/project", + "contents": { + "packageJsonContent": { + "name": "@this/package", + "type": "module", + "exports": { + ".": { + "default": "./dist/index.js", + "types": "./types/index.d.ts" + } + } + } + } +} +resolvedModules: +@this/package: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/index.ts", + "extension": ".ts", + "isExternalLibraryImport": true + }, + "affectingLocations": [ + "/src/project/package.json" + ], + "resolutionDiagnostics": [ + { + "messageText": "The project root is ambiguous, but is required to resolve export map entry '.' in file '/src/project/package.json'. Supply the `rootDir` compiler option to disambiguate.", + "category": 1, + "code": 2209 + } + ] +} + +File: /src/project/index2.ts +packageJsonScope:: { + "packageDirectory": "/src/project", + "contents": { + "packageJsonContent": { + "name": "@this/package", + "type": "module", + "exports": { + ".": { + "default": "./dist/index.js", + "types": "./types/index.d.ts" + } + } + } + } +} + +File: /src/project/randomFileForImport.ts +packageJsonScope:: { + "packageDirectory": "/src/project", + "contents": { + "packageJsonContent": { + "name": "@this/package", + "type": "module", + "exports": { + ".": { + "default": "./dist/index.js", + "types": "./types/index.d.ts" + } + } + } + } +} + + +//// [/src/project/dist/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.thing = void 0; +var me = require("@this/package"); +me.thing(); +function thing() { } +exports.thing = thing; + + +//// [/src/project/dist/index2.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.thing = void 0; +function thing() { } +exports.thing = thing; + + +//// [/src/project/dist/randomFileForImport.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.x = 10; + + +//// [/src/project/dist/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","../index.ts","../index2.ts","../randomfileforimport.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedFormat":1},{"version":"5618920854-import * as me from \"@this/package\";\nme.thing()\nexport function thing(): void {}\n","signature":"-4018078458-export declare function thing(): void;\r\n","impliedFormat":99},{"version":"5871974342-export function thing(): void {}\n","signature":"-4018078458-export declare function thing(): void;\r\n","impliedFormat":99},{"version":"-10726455937-export const x = 10;","signature":"-6057683066-export declare const x = 10;\r\n","impliedFormat":99}],"options":{"cacheResolutions":true,"declaration":true,"declarationDir":"../types","outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[2,1]],"exportedModulesMap":[]},"version":"FakeTSVersion"} + +//// [/src/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "../index.ts", + "../index2.ts", + "../randomfileforimport.ts" + ], + "fileNamesList": [ + [ + "../index.ts" + ] + ], + "fileInfos": { + "../../../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "../index.ts": { + "original": { + "version": "5618920854-import * as me from \"@this/package\";\nme.thing()\nexport function thing(): void {}\n", + "signature": "-4018078458-export declare function thing(): void;\r\n", + "impliedFormat": 99 + }, + "version": "5618920854-import * as me from \"@this/package\";\nme.thing()\nexport function thing(): void {}\n", + "signature": "-4018078458-export declare function thing(): void;\r\n", + "impliedFormat": "esnext" + }, + "../index2.ts": { + "original": { + "version": "5871974342-export function thing(): void {}\n", + "signature": "-4018078458-export declare function thing(): void;\r\n", + "impliedFormat": 99 + }, + "version": "5871974342-export function thing(): void {}\n", + "signature": "-4018078458-export declare function thing(): void;\r\n", + "impliedFormat": "esnext" + }, + "../randomfileforimport.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": 99 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": "esnext" + } + }, + "options": { + "cacheResolutions": true, + "declaration": true, + "declarationDir": "../types", + "outDir": "./" + }, + "referencedMap": { + "../index.ts": [ + "../index.ts" + ] + }, + "exportedModulesMap": {} + }, + "version": "FakeTSVersion", + "size": 1284 +} + +//// [/src/project/types/index.d.ts] +export declare function thing(): void; + + +//// [/src/project/types/index2.d.ts] +export declare function thing(): void; + + +//// [/src/project/types/randomFileForImport.d.ts] +export declare const x = 10; + + + + +Change:: modify randomFileForImport by adding import +Input:: +//// [/src/project/randomFileForImport.ts] +import * as me from "@this/package"; +export const x = 10; + + + +Output:: +/lib/tsc -p /src/project --incremental --explainFiles +Found 'package.json' at '/src/project/package.json'. +======== Resolving module '@this/package' from '/src/project/index.ts'. ======== +Explicitly specified module resolution kind: 'NodeNext'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' exists according to earlier cached lookups. +Matched 'exports' condition 'default'. +Using 'exports' subpath '.' with target './dist/index.js'. +File '/src/project/index.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/index.ts', result '/src/project/index.ts'. +======== Module name '@this/package' was successfully resolved to '/src/project/index.ts'. ======== +File '/src/project/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' exists according to earlier cached lookups. +======== Resolving module '@this/package' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module '@this/package' was found in cache from location '/src/project'. +======== Module name '@this/package' was successfully resolved to '/src/project/index.ts'. ======== +File '/lib/package.json' does not exist. +File '/package.json' does not exist. +error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file '/src/project/package.json'. Supply the `rootDir` compiler option to disambiguate. + +lib/lib.d.ts + Default library for target 'es5' +src/project/index.ts + Matched by default include pattern '**/*' + Imported via "@this/package" from file 'src/project/index.ts' + Imported via "@this/package" from file 'src/project/randomFileForImport.ts' + File is ECMAScript module because 'src/project/package.json' has field "type" with value "module" +src/project/index2.ts + Matched by default include pattern '**/*' + File is ECMAScript module because 'src/project/package.json' has field "type" with value "module" +src/project/randomFileForImport.ts + Matched by default include pattern '**/*' + File is ECMAScript module because 'src/project/package.json' has field "type" with value "module" + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +File: /src/project/index.ts +packageJsonScope:: { + "packageDirectory": "/src/project", + "contents": { + "packageJsonContent": { + "name": "@this/package", + "type": "module", + "exports": { + ".": { + "default": "./dist/index.js", + "types": "./types/index.d.ts" + } + } + } + } +} +resolvedModules: +@this/package: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/index.ts", + "extension": ".ts", + "isExternalLibraryImport": true + }, + "affectingLocations": [ + "/src/project/package.json" + ], + "resolutionDiagnostics": [ + { + "messageText": "The project root is ambiguous, but is required to resolve export map entry '.' in file '/src/project/package.json'. Supply the `rootDir` compiler option to disambiguate.", + "category": 1, + "code": 2209 + } + ] +} + +File: /src/project/index2.ts +packageJsonScope:: { + "packageDirectory": "/src/project", + "contents": { + "packageJsonContent": { + "name": "@this/package", + "type": "module", + "exports": { + ".": { + "default": "./dist/index.js", + "types": "./types/index.d.ts" + } + } + } + } +} + +File: /src/project/randomFileForImport.ts +packageJsonScope:: { + "packageDirectory": "/src/project", + "contents": { + "packageJsonContent": { + "name": "@this/package", + "type": "module", + "exports": { + ".": { + "default": "./dist/index.js", + "types": "./types/index.d.ts" + } + } + } + } +} +resolvedModules: +@this/package: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/index.ts", + "extension": ".ts", + "isExternalLibraryImport": true + }, + "affectingLocations": [ + "/src/project/package.json" + ], + "resolutionDiagnostics": [ + { + "messageText": "The project root is ambiguous, but is required to resolve export map entry '.' in file '/src/project/package.json'. Supply the `rootDir` compiler option to disambiguate.", + "category": 1, + "code": 2209 + } + ] +} + + +//// [/src/project/dist/randomFileForImport.js] file written with same contents +//// [/src/project/dist/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","../index.ts","../index2.ts","../randomfileforimport.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedFormat":1},{"version":"5618920854-import * as me from \"@this/package\";\nme.thing()\nexport function thing(): void {}\n","signature":"-4018078458-export declare function thing(): void;\r\n","impliedFormat":99},{"version":"5871974342-export function thing(): void {}\n","signature":"-4018078458-export declare function thing(): void;\r\n","impliedFormat":99},{"version":"4314805146-import * as me from \"@this/package\";\nexport const x = 10;","signature":"-6057683066-export declare const x = 10;\r\n","impliedFormat":99}],"options":{"cacheResolutions":true,"declaration":true,"declarationDir":"../types","outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[2,1],[4,1]],"exportedModulesMap":[]},"version":"FakeTSVersion"} + +//// [/src/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "../index.ts", + "../index2.ts", + "../randomfileforimport.ts" + ], + "fileNamesList": [ + [ + "../index.ts" + ] + ], + "fileInfos": { + "../../../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "../index.ts": { + "original": { + "version": "5618920854-import * as me from \"@this/package\";\nme.thing()\nexport function thing(): void {}\n", + "signature": "-4018078458-export declare function thing(): void;\r\n", + "impliedFormat": 99 + }, + "version": "5618920854-import * as me from \"@this/package\";\nme.thing()\nexport function thing(): void {}\n", + "signature": "-4018078458-export declare function thing(): void;\r\n", + "impliedFormat": "esnext" + }, + "../index2.ts": { + "original": { + "version": "5871974342-export function thing(): void {}\n", + "signature": "-4018078458-export declare function thing(): void;\r\n", + "impliedFormat": 99 + }, + "version": "5871974342-export function thing(): void {}\n", + "signature": "-4018078458-export declare function thing(): void;\r\n", + "impliedFormat": "esnext" + }, + "../randomfileforimport.ts": { + "original": { + "version": "4314805146-import * as me from \"@this/package\";\nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": 99 + }, + "version": "4314805146-import * as me from \"@this/package\";\nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": "esnext" + } + }, + "options": { + "cacheResolutions": true, + "declaration": true, + "declarationDir": "../types", + "outDir": "./" + }, + "referencedMap": { + "../index.ts": [ + "../index.ts" + ], + "../randomfileforimport.ts": [ + "../index.ts" + ] + }, + "exportedModulesMap": {} + }, + "version": "FakeTSVersion", + "size": 1328 +} + +//// [/src/project/types/randomFileForImport.d.ts] file written with same contents diff --git a/tests/baselines/reference/tsc/cacheResolutions/multi-file.js b/tests/baselines/reference/tsc/cacheResolutions/multi-file.js new file mode 100644 index 00000000000..a9f8006ec03 --- /dev/null +++ b/tests/baselines/reference/tsc/cacheResolutions/multi-file.js @@ -0,0 +1,4154 @@ +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project/fileWithImports.ts] +import type { ImportInterface0 } from "pkg0" assert { "resolution-mode": "import" }; +import type { RequireInterface1 } from "pkg1" assert { "resolution-mode": "require" }; + + +//// [/src/project/fileWithTypeRefs.ts] +/// +/// +interface LocalInterface extends ImportInterface2, RequireInterface3 {} +export {} + + +//// [/src/project/node_modules/@types/pkg4/index.d.ts] +export const x = 10; + +//// [/src/project/node_modules/pkg0/import.d.ts] +export interface ImportInterface0 {} + +//// [/src/project/node_modules/pkg0/package.json] +{"name":"pkg0","version":"0.0.1","exports":{"import":"./import.js","require":"./require.js"}} + +//// [/src/project/node_modules/pkg0/require.d.ts] +export interface RequireInterface0 {} + +//// [/src/project/node_modules/pkg1/import.d.ts] +export interface ImportInterface1 {} + +//// [/src/project/node_modules/pkg1/package.json] +{"name":"pkg1","version":"0.0.1","exports":{"import":"./import.js","require":"./require.js"}} + +//// [/src/project/node_modules/pkg2/import.d.ts] +export {}; +declare global { + interface ImportInterface2 {} +} + + +//// [/src/project/node_modules/pkg2/package.json] +{"name":"pkg2","version":"0.0.1","exports":{"import":"./import.js","require":"./require.js"}} + +//// [/src/project/node_modules/pkg2/require.d.ts] +export {}; +declare global { + interface RequireInterface2 {} +} + + +//// [/src/project/node_modules/pkg3/import.d.ts] +export {}; +declare global { + interface ImportInterface3 {} +} + + +//// [/src/project/node_modules/pkg3/package.json] +{"name":"pkg3","version":"0.0.1","exports":{"import":"./import.js","require":"./require.js"}} + +//// [/src/project/randomFileForImport.ts] +export const x = 10; + +//// [/src/project/randomFileForTypeRef.ts] +export const x = 10; + +//// [/src/project/tsconfig.json] +{"compilerOptions":{"moduleResolution":"node16","composite":true,"cacheResolutions":true,"traceResolution":true},"include":["*.ts"],"exclude":["*.d.ts"]} + + + +Output:: +/lib/tsc -p /src/project --explainFiles +File '/src/project/package.json' does not exist. +File '/src/package.json' does not exist. +File '/package.json' does not exist. +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in CJS mode with conditions 'node', 'require', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.ts' does not exist. +File '/src/project/node_modules/pkg1/require.tsx' does not exist. +File '/src/project/node_modules/pkg1/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.js' does not exist. +File '/src/project/node_modules/pkg1/require.jsx' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Module name 'pkg1' was not resolved. ======== +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg3/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist. +File '/src/project/node_modules/package.json' does not exist. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/lib/package.json' does not exist. +File '/package.json' does not exist according to earlier cached lookups. +src/project/fileWithImports.ts:2:40 - error TS2307: Cannot find module 'pkg1' or its corresponding type declarations. + +2 import type { RequireInterface1 } from "pkg1" assert { "resolution-mode": "require" }; +   ~~~~~~ + +src/project/fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +src/project/fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +lib/lib.d.ts + Default library for target 'es5' +src/project/node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'src/project/fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg0/package.json' does not have field "type" +src/project/fileWithImports.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'src/project/fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg2/package.json' does not have field "type" +src/project/fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/randomFileForImport.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found + +Found 3 errors in 2 files. + +Errors Files + 1 src/project/fileWithImports.ts:2 + 2 src/project/fileWithTypeRefs.ts:2 +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx", + "/src/project/node_modules/pkg1/require.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.ts", + "/src/node_modules/pkg1.tsx", + "/src/node_modules/pkg1.d.ts", + "/src/node_modules/pkg1/index.ts", + "/src/node_modules/pkg1/index.tsx", + "/src/node_modules/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.ts", + "/node_modules/pkg1.tsx", + "/node_modules/pkg1.d.ts", + "/node_modules/pkg1/index.ts", + "/node_modules/pkg1/index.tsx", + "/node_modules/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/node_modules/pkg1/require.js", + "/src/project/node_modules/pkg1/require.jsx", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.js", + "/src/node_modules/pkg1.jsx", + "/src/node_modules/pkg1/index.js", + "/src/node_modules/pkg1/index.jsx", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.js", + "/node_modules/pkg1.jsx", + "/node_modules/pkg1/index.js", + "/node_modules/pkg1/index.jsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json", + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/require.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + + +//// [/src/project/fileWithImports.d.ts] +export {}; + + +//// [/src/project/fileWithImports.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + + +//// [/src/project/fileWithTypeRefs.d.ts] +export {}; + + +//// [/src/project/fileWithTypeRefs.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/// +/// + + +//// [/src/project/randomFileForImport.d.ts] +export declare const x = 10; + + +//// [/src/project/randomFileForImport.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.x = 10; + + +//// [/src/project/randomFileForTypeRef.d.ts] +export declare const x = 10; + + +//// [/src/project/randomFileForTypeRef.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.x = 10; + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","signature":"-4882119183-export {};\r\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","signature":"-4882119183-export {};\r\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","signature":"-6057683066-export declare const x = 10;\r\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","signature":"-6057683066-export declare const x = 10;\r\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2],[4]],"referencedMap":[[3,1],[5,2]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,[3,[{"file":"./filewithimports.ts","start":124,"length":6,"messageText":"Cannot find module 'pkg1' or its corresponding type declarations.","category":1,"code":2307}]],[5,[{"file":"./filewithtyperefs.ts","start":162,"length":17,"messageText":"Cannot find name 'RequireInterface3'.","category":1,"code":2304}]],8,2,4,6,7],"latestChangedDtsFile":"./randomFileForTypeRef.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + [ + "./filewithimports.ts", + [ + { + "file": "./filewithimports.ts", + "start": 124, + "length": 6, + "messageText": "Cannot find module 'pkg1' or its corresponding type declarations.", + "category": 1, + "code": 2307 + } + ] + ], + [ + "./filewithtyperefs.ts", + [ + { + "file": "./filewithtyperefs.ts", + "start": 162, + "length": 17, + "messageText": "Cannot find name 'RequireInterface3'.", + "category": 1, + "code": 2304 + } + ] + ], + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg2/import.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForTypeRef.d.ts" + }, + "version": "FakeTSVersion", + "size": 2428 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -p /src/project --explainFiles +File '/src/project/package.json' does not exist. +File '/src/package.json' does not exist. +File '/package.json' does not exist. +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in CJS mode with conditions 'node', 'require', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.ts' does not exist. +File '/src/project/node_modules/pkg1/require.tsx' does not exist. +File '/src/project/node_modules/pkg1/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.js' does not exist. +File '/src/project/node_modules/pkg1/require.jsx' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Module name 'pkg1' was not resolved. ======== +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg3/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist. +File '/src/project/node_modules/package.json' does not exist. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/lib/package.json' does not exist. +File '/package.json' does not exist according to earlier cached lookups. +src/project/fileWithImports.ts:2:40 - error TS2307: Cannot find module 'pkg1' or its corresponding type declarations. + +2 import type { RequireInterface1 } from "pkg1" assert { "resolution-mode": "require" }; +   ~~~~~~ + +src/project/fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +src/project/fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +lib/lib.d.ts + Default library for target 'es5' +src/project/node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'src/project/fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg0/package.json' does not have field "type" +src/project/fileWithImports.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'src/project/fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg2/package.json' does not have field "type" +src/project/fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/randomFileForImport.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found + +Found 3 errors in 2 files. + +Errors Files + 1 src/project/fileWithImports.ts:2 + 2 src/project/fileWithTypeRefs.ts:2 +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx", + "/src/project/node_modules/pkg1/require.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.ts", + "/src/node_modules/pkg1.tsx", + "/src/node_modules/pkg1.d.ts", + "/src/node_modules/pkg1/index.ts", + "/src/node_modules/pkg1/index.tsx", + "/src/node_modules/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.ts", + "/node_modules/pkg1.tsx", + "/node_modules/pkg1.d.ts", + "/node_modules/pkg1/index.ts", + "/node_modules/pkg1/index.tsx", + "/node_modules/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/node_modules/pkg1/require.js", + "/src/project/node_modules/pkg1/require.jsx", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.js", + "/src/node_modules/pkg1.jsx", + "/src/node_modules/pkg1/index.js", + "/src/node_modules/pkg1/index.jsx", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.js", + "/node_modules/pkg1.jsx", + "/node_modules/pkg1/index.js", + "/node_modules/pkg1/index.jsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json", + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/require.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + + + + +Change:: modify randomFileForImport by adding import +Input:: +//// [/src/project/randomFileForImport.ts] +import type { ImportInterface0 } from "pkg0" assert { "resolution-mode": "import" }; +export const x = 10; + + + +Output:: +/lib/tsc -p /src/project --explainFiles +File '/src/project/package.json' does not exist. +File '/src/package.json' does not exist. +File '/package.json' does not exist. +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in CJS mode with conditions 'node', 'require', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.ts' does not exist. +File '/src/project/node_modules/pkg1/require.tsx' does not exist. +File '/src/project/node_modules/pkg1/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.js' does not exist. +File '/src/project/node_modules/pkg1/require.jsx' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Module name 'pkg1' was not resolved. ======== +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg3/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist. +File '/src/project/node_modules/package.json' does not exist. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/lib/package.json' does not exist. +File '/package.json' does not exist according to earlier cached lookups. +src/project/fileWithImports.ts:2:40 - error TS2307: Cannot find module 'pkg1' or its corresponding type declarations. + +2 import type { RequireInterface1 } from "pkg1" assert { "resolution-mode": "require" }; +   ~~~~~~ + +src/project/fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +src/project/fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +lib/lib.d.ts + Default library for target 'es5' +src/project/node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'src/project/fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + Imported via "pkg0" from file 'src/project/randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg0/package.json' does not have field "type" +src/project/fileWithImports.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'src/project/fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg2/package.json' does not have field "type" +src/project/fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/randomFileForImport.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found + +Found 3 errors in 2 files. + +Errors Files + 1 src/project/fileWithImports.ts:2 + 2 src/project/fileWithTypeRefs.ts:2 +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx", + "/src/project/node_modules/pkg1/require.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.ts", + "/src/node_modules/pkg1.tsx", + "/src/node_modules/pkg1.d.ts", + "/src/node_modules/pkg1/index.ts", + "/src/node_modules/pkg1/index.tsx", + "/src/node_modules/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.ts", + "/node_modules/pkg1.tsx", + "/node_modules/pkg1.d.ts", + "/node_modules/pkg1/index.ts", + "/node_modules/pkg1/index.tsx", + "/node_modules/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/node_modules/pkg1/require.js", + "/src/project/node_modules/pkg1/require.jsx", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.js", + "/src/node_modules/pkg1.jsx", + "/src/node_modules/pkg1/index.js", + "/src/node_modules/pkg1/index.jsx", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.js", + "/node_modules/pkg1.jsx", + "/node_modules/pkg1/index.js", + "/node_modules/pkg1/index.jsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json", + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/require.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + + +//// [/src/project/randomFileForImport.js] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","signature":"-4882119183-export {};\r\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","signature":"-4882119183-export {};\r\n","impliedFormat":1},{"version":"-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;","signature":"-6057683066-export declare const x = 10;\r\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","signature":"-6057683066-export declare const x = 10;\r\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2],[4]],"referencedMap":[[3,1],[5,2],[6,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,[3,[{"file":"./filewithimports.ts","start":124,"length":6,"messageText":"Cannot find module 'pkg1' or its corresponding type declarations.","category":1,"code":2307}]],[5,[{"file":"./filewithtyperefs.ts","start":162,"length":17,"messageText":"Cannot find name 'RequireInterface3'.","category":1,"code":2304}]],8,2,4,6,7],"latestChangedDtsFile":"./randomFileForTypeRef.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": 1 + }, + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ], + "./randomfileforimport.ts": [ + "./node_modules/pkg0/import.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + [ + "./filewithimports.ts", + [ + { + "file": "./filewithimports.ts", + "start": 124, + "length": 6, + "messageText": "Cannot find module 'pkg1' or its corresponding type declarations.", + "category": 1, + "code": 2307 + } + ] + ], + [ + "./filewithtyperefs.ts", + [ + { + "file": "./filewithtyperefs.ts", + "start": 162, + "length": 17, + "messageText": "Cannot find name 'RequireInterface3'.", + "category": 1, + "code": 2304 + } + ] + ], + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg2/import.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForTypeRef.d.ts" + }, + "version": "FakeTSVersion", + "size": 2525 +} + + + +Change:: modify randomFileForTypeRef by adding typeRef +Input:: +//// [/src/project/randomFileForTypeRef.ts] +/// +export const x = 10; + + + +Output:: +/lib/tsc -p /src/project --explainFiles +File '/src/project/package.json' does not exist. +File '/src/package.json' does not exist. +File '/package.json' does not exist. +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in CJS mode with conditions 'node', 'require', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.ts' does not exist. +File '/src/project/node_modules/pkg1/require.tsx' does not exist. +File '/src/project/node_modules/pkg1/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.js' does not exist. +File '/src/project/node_modules/pkg1/require.jsx' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Module name 'pkg1' was not resolved. ======== +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg3/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts'. ======== +Resolution for type reference directive 'pkg2' was found in cache from location '/src/project'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist. +File '/src/project/node_modules/package.json' does not exist. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/lib/package.json' does not exist. +File '/package.json' does not exist according to earlier cached lookups. +src/project/fileWithImports.ts:2:40 - error TS2307: Cannot find module 'pkg1' or its corresponding type declarations. + +2 import type { RequireInterface1 } from "pkg1" assert { "resolution-mode": "require" }; +   ~~~~~~ + +src/project/fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +src/project/fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +lib/lib.d.ts + Default library for target 'es5' +src/project/node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'src/project/fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + Imported via "pkg0" from file 'src/project/randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg0/package.json' does not have field "type" +src/project/fileWithImports.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'src/project/fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg2/package.json' does not have field "type" +src/project/fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/randomFileForImport.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found + +Found 3 errors in 2 files. + +Errors Files + 1 src/project/fileWithImports.ts:2 + 2 src/project/fileWithTypeRefs.ts:2 +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx", + "/src/project/node_modules/pkg1/require.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.ts", + "/src/node_modules/pkg1.tsx", + "/src/node_modules/pkg1.d.ts", + "/src/node_modules/pkg1/index.ts", + "/src/node_modules/pkg1/index.tsx", + "/src/node_modules/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.ts", + "/node_modules/pkg1.tsx", + "/node_modules/pkg1.d.ts", + "/node_modules/pkg1/index.ts", + "/node_modules/pkg1/index.tsx", + "/node_modules/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/node_modules/pkg1/require.js", + "/src/project/node_modules/pkg1/require.jsx", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.js", + "/src/node_modules/pkg1.jsx", + "/src/node_modules/pkg1/index.js", + "/src/node_modules/pkg1/index.jsx", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.js", + "/node_modules/pkg1.jsx", + "/node_modules/pkg1/index.js", + "/node_modules/pkg1/index.jsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json", + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/require.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + + +//// [/src/project/randomFileForTypeRef.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +/// +exports.x = 10; + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","signature":"-4882119183-export {};\r\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","signature":"-4882119183-export {};\r\n","impliedFormat":1},{"version":"-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;","signature":"-6057683066-export declare const x = 10;\r\n","impliedFormat":1},{"version":"-8191038086-/// \nexport const x = 10;","signature":"-6057683066-export declare const x = 10;\r\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2],[4]],"referencedMap":[[3,1],[5,2],[6,1],[7,2]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,[3,[{"file":"./filewithimports.ts","start":124,"length":6,"messageText":"Cannot find module 'pkg1' or its corresponding type declarations.","category":1,"code":2307}]],[5,[{"file":"./filewithtyperefs.ts","start":162,"length":17,"messageText":"Cannot find name 'RequireInterface3'.","category":1,"code":2304}]],8,2,4,6,7],"latestChangedDtsFile":"./randomFileForTypeRef.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": 1 + }, + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": 1 + }, + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ], + "./randomfileforimport.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./randomfilefortyperef.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + [ + "./filewithimports.ts", + [ + { + "file": "./filewithimports.ts", + "start": 124, + "length": 6, + "messageText": "Cannot find module 'pkg1' or its corresponding type declarations.", + "category": 1, + "code": 2307 + } + ] + ], + [ + "./filewithtyperefs.ts", + [ + { + "file": "./filewithtyperefs.ts", + "start": 162, + "length": 17, + "messageText": "Cannot find name 'RequireInterface3'.", + "category": 1, + "code": 2304 + } + ] + ], + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg2/import.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForTypeRef.d.ts" + }, + "version": "FakeTSVersion", + "size": 2590 +} + + + +Change:: write file not resolved by import +Input:: +//// [/src/project/node_modules/pkg1/require.d.ts] +export interface RequireInterface1 {} + + + +Output:: +/lib/tsc -p /src/project --explainFiles +File '/src/project/package.json' does not exist. +File '/src/package.json' does not exist. +File '/package.json' does not exist. +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in CJS mode with conditions 'node', 'require', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.ts' does not exist. +File '/src/project/node_modules/pkg1/require.tsx' does not exist. +File '/src/project/node_modules/pkg1/require.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg1/require.d.ts', result '/src/project/node_modules/pkg1/require.d.ts'. +======== Module name 'pkg1' was successfully resolved to '/src/project/node_modules/pkg1/require.d.ts' with Package ID 'pkg1/require.d.ts@0.0.1'. ======== +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg3/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts'. ======== +Resolution for type reference directive 'pkg2' was found in cache from location '/src/project'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist. +File '/src/project/node_modules/package.json' does not exist. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/lib/package.json' does not exist. +File '/package.json' does not exist according to earlier cached lookups. +src/project/fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +src/project/fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +lib/lib.d.ts + Default library for target 'es5' +src/project/node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'src/project/fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + Imported via "pkg0" from file 'src/project/randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg0/package.json' does not have field "type" +src/project/node_modules/pkg1/require.d.ts + Imported via "pkg1" from file 'src/project/fileWithImports.ts' with packageId 'pkg1/require.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg1/package.json' does not have field "type" +src/project/fileWithImports.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'src/project/fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg2/package.json' does not have field "type" +src/project/fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/randomFileForImport.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found + +Found 2 errors in the same file, starting at: src/project/fileWithTypeRefs.ts:2 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/node_modules/pkg1/require.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg1", + "contents": { + "packageJsonContent": { + "name": "pkg1", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg1/require.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg1", + "subModuleName": "require.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/require.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + + +//// [/src/project/fileWithImports.js] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./node_modules/pkg1/require.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"-3547817137-export interface RequireInterface1 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","signature":"-4882119183-export {};\r\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","signature":"-4882119183-export {};\r\n","impliedFormat":1},{"version":"-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;","signature":"-6057683066-export declare const x = 10;\r\n","impliedFormat":1},{"version":"-8191038086-/// \nexport const x = 10;","signature":"-6057683066-export declare const x = 10;\r\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2,3],[5],[2]],"referencedMap":[[4,1],[6,2],[7,3],[8,2]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,4,[6,[{"file":"./filewithtyperefs.ts","start":162,"length":17,"messageText":"Cannot find name 'RequireInterface3'.","category":1,"code":2304}]],9,2,3,5,7,8],"latestChangedDtsFile":"./randomFileForTypeRef.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ], + [ + "./node_modules/pkg0/import.d.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg1/require.d.ts": { + "original": { + "version": "-3547817137-export interface RequireInterface1 {}", + "impliedFormat": 1 + }, + "version": "-3547817137-export interface RequireInterface1 {}", + "signature": "-3547817137-export interface RequireInterface1 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": 1 + }, + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": 1 + }, + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ], + "./randomfileforimport.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./randomfilefortyperef.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./filewithimports.ts", + [ + "./filewithtyperefs.ts", + [ + { + "file": "./filewithtyperefs.ts", + "start": 162, + "length": 17, + "messageText": "Cannot find name 'RequireInterface3'.", + "category": 1, + "code": 2304 + } + ] + ], + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts", + "./node_modules/pkg2/import.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForTypeRef.d.ts" + }, + "version": "FakeTSVersion", + "size": 2549 +} + + + +Change:: write file not resolved by typeRef +Input:: +//// [/src/project/node_modules/pkg3/require.d.ts] +export {}; +declare global { + interface RequireInterface3 {} +} + + + + +Output:: +/lib/tsc -p /src/project --explainFiles +File '/src/project/package.json' does not exist. +File '/src/package.json' does not exist. +File '/package.json' does not exist. +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in CJS mode with conditions 'node', 'require', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.ts' does not exist. +File '/src/project/node_modules/pkg1/require.tsx' does not exist. +File '/src/project/node_modules/pkg1/require.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg1/require.d.ts', result '/src/project/node_modules/pkg1/require.d.ts'. +======== Module name 'pkg1' was successfully resolved to '/src/project/node_modules/pkg1/require.d.ts' with Package ID 'pkg1/require.d.ts@0.0.1'. ======== +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg3/require.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg3/require.d.ts', result '/src/project/node_modules/pkg3/require.d.ts'. +======== Type reference directive 'pkg3' was successfully resolved to '/src/project/node_modules/pkg3/require.d.ts' with Package ID 'pkg3/require.d.ts@0.0.1', primary: false. ======== +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/node_modules/pkg3/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts'. ======== +Resolution for type reference directive 'pkg2' was found in cache from location '/src/project'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist. +File '/src/project/node_modules/package.json' does not exist. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/lib/package.json' does not exist. +File '/package.json' does not exist according to earlier cached lookups. +lib/lib.d.ts + Default library for target 'es5' +src/project/node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'src/project/fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + Imported via "pkg0" from file 'src/project/randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg0/package.json' does not have field "type" +src/project/node_modules/pkg1/require.d.ts + Imported via "pkg1" from file 'src/project/fileWithImports.ts' with packageId 'pkg1/require.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg1/package.json' does not have field "type" +src/project/fileWithImports.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'src/project/fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg2/package.json' does not have field "type" +src/project/node_modules/pkg3/require.d.ts + Type library referenced via 'pkg3' from file 'src/project/fileWithTypeRefs.ts' with packageId 'pkg3/require.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg3/package.json' does not have field "type" +src/project/fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/randomFileForImport.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +exitCode:: ExitStatus.Success +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/node_modules/pkg1/require.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg1", + "contents": { + "packageJsonContent": { + "name": "pkg1", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg1/require.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg1", + "subModuleName": "require.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/node_modules/pkg3/require.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg3", + "contents": { + "packageJsonContent": { + "name": "pkg3", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg3/require.d.ts", + "packageId": { + "name": "pkg3", + "subModuleName": "require.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + + +//// [/src/project/fileWithImports.js] file written with same contents +//// [/src/project/fileWithTypeRefs.js] file written with same contents +//// [/src/project/randomFileForImport.js] file written with same contents +//// [/src/project/randomFileForTypeRef.js] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./node_modules/pkg1/require.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./node_modules/pkg3/require.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"-3547817137-export interface RequireInterface1 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","signature":"-4882119183-export {};\r\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","signature":"-4882119183-export {};\r\n","impliedFormat":1},{"version":"-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;","signature":"-6057683066-export declare const x = 10;\r\n","impliedFormat":1},{"version":"-8191038086-/// \nexport const x = 10;","signature":"-6057683066-export declare const x = 10;\r\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2,3],[5,6],[2],[5]],"referencedMap":[[4,1],[7,2],[8,3],[9,4]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,4,7,10,2,3,5,6,8,9],"latestChangedDtsFile":"./randomFileForTypeRef.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts" + ], + [ + "./node_modules/pkg0/import.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg1/require.d.ts": { + "original": { + "version": "-3547817137-export interface RequireInterface1 {}", + "impliedFormat": 1 + }, + "version": "-3547817137-export interface RequireInterface1 {}", + "signature": "-3547817137-export interface RequireInterface1 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg3/require.d.ts": { + "original": { + "version": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "signature": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": 1 + }, + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": 1 + }, + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts" + ], + "./randomfileforimport.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./randomfilefortyperef.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./filewithimports.ts", + "./filewithtyperefs.ts", + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts", + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForTypeRef.d.ts" + }, + "version": "FakeTSVersion", + "size": 2593 +} + + + +Change:: delete file with imports +Input:: +//// [/src/project/fileWithImports.ts] unlink + + +Output:: +/lib/tsc -p /src/project --explainFiles +File '/src/project/package.json' does not exist. +File '/src/package.json' does not exist. +File '/package.json' does not exist. +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg3/require.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg3/require.d.ts', result '/src/project/node_modules/pkg3/require.d.ts'. +======== Type reference directive 'pkg3' was successfully resolved to '/src/project/node_modules/pkg3/require.d.ts' with Package ID 'pkg3/require.d.ts@0.0.1', primary: false. ======== +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/node_modules/pkg3/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts'. ======== +Resolution for type reference directive 'pkg2' was found in cache from location '/src/project'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist. +File '/src/project/node_modules/package.json' does not exist. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/lib/package.json' does not exist. +File '/package.json' does not exist according to earlier cached lookups. +lib/lib.d.ts + Default library for target 'es5' +src/project/node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'src/project/fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg2/package.json' does not have field "type" +src/project/node_modules/pkg3/require.d.ts + Type library referenced via 'pkg3' from file 'src/project/fileWithTypeRefs.ts' with packageId 'pkg3/require.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg3/package.json' does not have field "type" +src/project/fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'src/project/randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg0/package.json' does not have field "type" +src/project/randomFileForImport.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +exitCode:: ExitStatus.Success +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/node_modules/pkg3/require.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg3", + "contents": { + "packageJsonContent": { + "name": "pkg3", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg3/require.d.ts", + "packageId": { + "name": "pkg3", + "subModuleName": "require.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./node_modules/pkg2/import.d.ts","./node_modules/pkg3/require.d.ts","./filewithtyperefs.ts","./node_modules/pkg0/import.d.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","signature":"-4882119183-export {};\r\n","impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;","signature":"-6057683066-export declare const x = 10;\r\n","impliedFormat":1},{"version":"-8191038086-/// \nexport const x = 10;","signature":"-6057683066-export declare const x = 10;\r\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2,3],[5],[2]],"referencedMap":[[4,1],[6,2],[7,3]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,4,8,5,2,3,6,7],"latestChangedDtsFile":"./randomFileForTypeRef.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts", + "./filewithtyperefs.ts", + "./node_modules/pkg0/import.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts" + ], + [ + "./node_modules/pkg0/import.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg3/require.d.ts": { + "original": { + "version": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "signature": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-4882119183-export {};\r\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": 1 + }, + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": 1 + }, + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts" + ], + "./randomfileforimport.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./randomfilefortyperef.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./filewithtyperefs.ts", + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForTypeRef.d.ts" + }, + "version": "FakeTSVersion", + "size": 2165 +} + + + +Change:: delete file with typeRefs +Input:: +//// [/src/project/fileWithTypeRefs.ts] unlink + + +Output:: +/lib/tsc -p /src/project --explainFiles +File '/src/project/package.json' does not exist. +File '/src/package.json' does not exist. +File '/package.json' does not exist. +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist. +File '/src/project/node_modules/package.json' does not exist. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/lib/package.json' does not exist. +File '/package.json' does not exist according to earlier cached lookups. +lib/lib.d.ts + Default library for target 'es5' +src/project/node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'src/project/randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg0/package.json' does not have field "type" +src/project/randomFileForImport.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'src/project/randomFileForTypeRef.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg2/package.json' does not have field "type" +src/project/randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +exitCode:: ExitStatus.Success +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + + +//// [/src/project/randomFileForImport.js] file written with same contents +//// [/src/project/randomFileForTypeRef.js] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./randomfileforimport.ts","./node_modules/pkg2/import.d.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;","signature":"-6057683066-export declare const x = 10;\r\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-8191038086-/// \nexport const x = 10;","signature":"-6057683066-export declare const x = 10;\r\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2],[4]],"referencedMap":[[3,1],[5,2]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,6,2,4,3,5],"latestChangedDtsFile":"./randomFileForTypeRef.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./randomfileforimport.ts", + "./node_modules/pkg2/import.d.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": 1 + }, + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": 1 + }, + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./randomfileforimport.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./randomfilefortyperef.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg2/import.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForTypeRef.d.ts" + }, + "version": "FakeTSVersion", + "size": 1658 +} + + + +Change:: delete resolved import file +Input:: +//// [/src/project/node_modules/pkg0/import.d.ts] unlink + + +Output:: +/lib/tsc -p /src/project --explainFiles +File '/src/project/package.json' does not exist. +File '/src/package.json' does not exist. +File '/package.json' does not exist. +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' does not exist. +Saw non-matching condition 'require'. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.js' does not exist. +File '/src/project/node_modules/pkg0/import.jsx' does not exist. +Saw non-matching condition 'require'. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Module name 'pkg0' was not resolved. ======== +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist. +File '/src/project/node_modules/package.json' does not exist. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/lib/package.json' does not exist. +File '/package.json' does not exist according to earlier cached lookups. +src/project/randomFileForImport.ts:1:39 - error TS2307: Cannot find module 'pkg0' or its corresponding type declarations. + +1 import type { ImportInterface0 } from "pkg0" assert { "resolution-mode": "import" }; +   ~~~~~~ + +lib/lib.d.ts + Default library for target 'es5' +src/project/randomFileForImport.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'src/project/randomFileForTypeRef.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'src/project/node_modules/pkg2/package.json' does not have field "type" +src/project/randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found + +Found 1 error in src/project/randomFileForImport.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx", + "/src/project/node_modules/pkg0/import.d.ts", + "/src/project/node_modules/@types/pkg0/package.json", + "/src/node_modules/pkg0/package.json", + "/src/node_modules/@types/pkg0/package.json", + "/node_modules/pkg0/package.json", + "/node_modules/@types/pkg0/package.json", + "/src/project/node_modules/pkg0/import.js", + "/src/project/node_modules/pkg0/import.jsx", + "/src/node_modules/pkg0/package.json", + "/node_modules/pkg0/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json", + "/src/project/node_modules/pkg0/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + + +//// [/src/project/randomFileForImport.js] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./randomfileforimport.ts","./node_modules/pkg2/import.d.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedFormat":1},{"version":"-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;","signature":"-6057683066-export declare const x = 10;\r\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-8191038086-/// \nexport const x = 10;","signature":"-6057683066-export declare const x = 10;\r\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[3]],"referencedMap":[[4,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,5,3,[2,[{"file":"./randomfileforimport.ts","start":38,"length":6,"messageText":"Cannot find module 'pkg0' or its corresponding type declarations.","category":1,"code":2307}]],4],"latestChangedDtsFile":"./randomFileForTypeRef.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./randomfileforimport.ts", + "./node_modules/pkg2/import.d.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": 1 + }, + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": 1 + }, + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./randomfilefortyperef.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg2/import.d.ts", + [ + "./randomfileforimport.ts", + [ + { + "file": "./randomfileforimport.ts", + "start": 38, + "length": 6, + "messageText": "Cannot find module 'pkg0' or its corresponding type declarations.", + "category": 1, + "code": 2307 + } + ] + ], + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForTypeRef.d.ts" + }, + "version": "FakeTSVersion", + "size": 1702 +} + + + +Change:: delete resolved typeRef file +Input:: +//// [/src/project/node_modules/pkg2/import.d.ts] unlink + + +Output:: +/lib/tsc -p /src/project --explainFiles +File '/src/project/package.json' does not exist. +File '/src/package.json' does not exist. +File '/package.json' does not exist. +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' does not exist. +Saw non-matching condition 'require'. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.js' does not exist. +File '/src/project/node_modules/pkg0/import.jsx' does not exist. +Saw non-matching condition 'require'. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Module name 'pkg0' was not resolved. ======== +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' does not exist. +Saw non-matching condition 'require'. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg2' was not resolved. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist. +File '/src/project/node_modules/package.json' does not exist. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/lib/package.json' does not exist. +File '/package.json' does not exist according to earlier cached lookups. +src/project/randomFileForImport.ts:1:39 - error TS2307: Cannot find module 'pkg0' or its corresponding type declarations. + +1 import type { ImportInterface0 } from "pkg0" assert { "resolution-mode": "import" }; +   ~~~~~~ + +src/project/randomFileForTypeRef.ts:1:23 - error TS2688: Cannot find type definition file for 'pkg2'. + +1 /// +   ~~~~ + +lib/lib.d.ts + Default library for target 'es5' +src/project/randomFileForImport.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'src/project/tsconfig.json' + File is CommonJS module because 'package.json' was not found +src/project/node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found + +Found 2 errors in 2 files. + +Errors Files + 1 src/project/randomFileForImport.ts:1 + 1 src/project/randomFileForTypeRef.ts:1 +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx", + "/src/project/node_modules/pkg0/import.d.ts", + "/src/project/node_modules/@types/pkg0/package.json", + "/src/node_modules/pkg0/package.json", + "/src/node_modules/@types/pkg0/package.json", + "/node_modules/pkg0/package.json", + "/node_modules/@types/pkg0/package.json", + "/src/project/node_modules/pkg0/import.js", + "/src/project/node_modules/pkg0/import.jsx", + "/src/node_modules/pkg0/package.json", + "/node_modules/pkg0/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json", + "/src/project/node_modules/pkg0/package.json" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/pkg2/import.d.ts", + "/src/project/node_modules/@types/pkg2/package.json", + "/src/node_modules/pkg2/package.json", + "/src/node_modules/@types/pkg2/package.json", + "/node_modules/pkg2/package.json", + "/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + + +//// [/src/project/randomFileForImport.js] file written with same contents +//// [/src/project/randomFileForTypeRef.js] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedFormat":1},{"version":"-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;","signature":"-6057683066-export declare const x = 10;\r\n","impliedFormat":1},{"version":"-8191038086-/// \nexport const x = 10;","signature":"-6057683066-export declare const x = 10;\r\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,4,[2,[{"file":"./randomfileforimport.ts","start":38,"length":6,"messageText":"Cannot find module 'pkg0' or its corresponding type declarations.","category":1,"code":2307}]],3],"latestChangedDtsFile":"./randomFileForTypeRef.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": 1 + }, + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": 1 + }, + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./node_modules/@types/pkg4/index.d.ts", + [ + "./randomfileforimport.ts", + [ + { + "file": "./randomfileforimport.ts", + "start": 38, + "length": 6, + "messageText": "Cannot find module 'pkg0' or its corresponding type declarations.", + "category": 1, + "code": 2307 + } + ] + ], + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForTypeRef.d.ts" + }, + "version": "FakeTSVersion", + "size": 1503 +} + diff --git a/tests/baselines/reference/tsc/cacheResolutions/pathsBasePath.js b/tests/baselines/reference/tsc/cacheResolutions/pathsBasePath.js new file mode 100644 index 00000000000..c2364a3b825 --- /dev/null +++ b/tests/baselines/reference/tsc/cacheResolutions/pathsBasePath.js @@ -0,0 +1,315 @@ +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project/lib/pkg0/index.d.ts] +export interface ImportInterface0 {} + +//// [/src/project/main.ts] +import type { ImportInterface0 } from "pkg0"; + + +//// [/src/project/randomFileForImport.ts] +export const x = 10; + +//// [/src/project/tsconfig.json] +{"compilerOptions":{"paths":{"*":["./lib/*"]},"composite":true,"cacheResolutions":true,"traceResolution":true},"files":["main.ts","randomFileForImport.ts"]} + + + +Output:: +/lib/tsc -p /src/project --explainFiles +======== Resolving module 'pkg0' from '/src/project/main.ts'. ======== +Module resolution kind is not specified, using 'NodeJs'. +'paths' option is specified, looking for a pattern to match module name 'pkg0'. +Module name 'pkg0', matched pattern '*'. +Trying substitution './lib/*', candidate module location: './lib/pkg0'. +Loading module as file / folder, candidate module location '/src/project/lib/pkg0', target file types: TypeScript, Declaration. +File '/src/project/lib/pkg0.ts' does not exist. +File '/src/project/lib/pkg0.tsx' does not exist. +File '/src/project/lib/pkg0.d.ts' does not exist. +File '/src/project/lib/pkg0/package.json' does not exist. +File '/src/project/lib/pkg0/index.ts' does not exist. +File '/src/project/lib/pkg0/index.tsx' does not exist. +File '/src/project/lib/pkg0/index.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/lib/pkg0/index.d.ts'. ======== +lib/lib.d.ts + Default library for target 'es5' +src/project/lib/pkg0/index.d.ts + Imported via "pkg0" from file 'src/project/main.ts' +src/project/main.ts + Part of 'files' list in tsconfig.json +src/project/randomFileForImport.ts + Part of 'files' list in tsconfig.json +exitCode:: ExitStatus.Success +File: /src/project/main.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/lib/pkg0/index.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/lib/pkg0.ts", + "/src/project/lib/pkg0.tsx", + "/src/project/lib/pkg0.d.ts", + "/src/project/lib/pkg0/package.json", + "/src/project/lib/pkg0/index.ts", + "/src/project/lib/pkg0/index.tsx" + ] +} + + +//// [/src/project/main.d.ts] +export {}; + + +//// [/src/project/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + + +//// [/src/project/randomFileForImport.d.ts] +export declare const x = 10; + + +//// [/src/project/randomFileForImport.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.x = 10; + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./lib/pkg0/index.d.ts","./main.ts","./randomfileforimport.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"769951468-export interface ImportInterface0 {}",{"version":"7372004325-import type { ImportInterface0 } from \"pkg0\";\n","signature":"-4882119183-export {};\r\n"},{"version":"-10726455937-export const x = 10;","signature":"-6057683066-export declare const x = 10;\r\n"}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4],"latestChangedDtsFile":"./randomFileForImport.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./lib/pkg0/index.d.ts", + "./main.ts", + "./randomfileforimport.ts" + ], + "fileNamesList": [ + [ + "./lib/pkg0/index.d.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./lib/pkg0/index.d.ts": { + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}" + }, + "./main.ts": { + "original": { + "version": "7372004325-import type { ImportInterface0 } from \"pkg0\";\n", + "signature": "-4882119183-export {};\r\n" + }, + "version": "7372004325-import type { ImportInterface0 } from \"pkg0\";\n", + "signature": "-4882119183-export {};\r\n" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n" + }, + "version": "-10726455937-export const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./main.ts": [ + "./lib/pkg0/index.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./lib/pkg0/index.d.ts", + "./main.ts", + "./randomfileforimport.ts" + ], + "latestChangedDtsFile": "./randomFileForImport.d.ts" + }, + "version": "FakeTSVersion", + "size": 1114 +} + + + +Change:: modify randomFileForImport by adding import +Input:: +//// [/src/project/randomFileForImport.ts] +import type { ImportInterface0 } from "pkg0"; +export const x = 10; + + + +Output:: +/lib/tsc -p /src/project --explainFiles +======== Resolving module 'pkg0' from '/src/project/main.ts'. ======== +Module resolution kind is not specified, using 'NodeJs'. +'paths' option is specified, looking for a pattern to match module name 'pkg0'. +Module name 'pkg0', matched pattern '*'. +Trying substitution './lib/*', candidate module location: './lib/pkg0'. +Loading module as file / folder, candidate module location '/src/project/lib/pkg0', target file types: TypeScript, Declaration. +File '/src/project/lib/pkg0.ts' does not exist. +File '/src/project/lib/pkg0.tsx' does not exist. +File '/src/project/lib/pkg0.d.ts' does not exist. +File '/src/project/lib/pkg0/package.json' does not exist. +File '/src/project/lib/pkg0/index.ts' does not exist. +File '/src/project/lib/pkg0/index.tsx' does not exist. +File '/src/project/lib/pkg0/index.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/lib/pkg0/index.d.ts'. ======== +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/lib/pkg0/index.d.ts'. ======== +lib/lib.d.ts + Default library for target 'es5' +src/project/lib/pkg0/index.d.ts + Imported via "pkg0" from file 'src/project/main.ts' + Imported via "pkg0" from file 'src/project/randomFileForImport.ts' +src/project/main.ts + Part of 'files' list in tsconfig.json +src/project/randomFileForImport.ts + Part of 'files' list in tsconfig.json +exitCode:: ExitStatus.Success +File: /src/project/main.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/lib/pkg0/index.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/lib/pkg0.ts", + "/src/project/lib/pkg0.tsx", + "/src/project/lib/pkg0.d.ts", + "/src/project/lib/pkg0/package.json", + "/src/project/lib/pkg0/index.ts", + "/src/project/lib/pkg0/index.tsx" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/lib/pkg0/index.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/lib/pkg0.ts", + "/src/project/lib/pkg0.tsx", + "/src/project/lib/pkg0.d.ts", + "/src/project/lib/pkg0/package.json", + "/src/project/lib/pkg0/index.ts", + "/src/project/lib/pkg0/index.tsx" + ] +} + + +//// [/src/project/randomFileForImport.js] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./lib/pkg0/index.d.ts","./main.ts","./randomfileforimport.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"769951468-export interface ImportInterface0 {}",{"version":"7372004325-import type { ImportInterface0 } from \"pkg0\";\n","signature":"-4882119183-export {};\r\n"},{"version":"10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;","signature":"-6057683066-export declare const x = 10;\r\n"}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2]],"referencedMap":[[3,1],[4,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4],"latestChangedDtsFile":"./randomFileForImport.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./lib/pkg0/index.d.ts", + "./main.ts", + "./randomfileforimport.ts" + ], + "fileNamesList": [ + [ + "./lib/pkg0/index.d.ts" + ] + ], + "fileInfos": { + "../../lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./lib/pkg0/index.d.ts": { + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}" + }, + "./main.ts": { + "original": { + "version": "7372004325-import type { ImportInterface0 } from \"pkg0\";\n", + "signature": "-4882119183-export {};\r\n" + }, + "version": "7372004325-import type { ImportInterface0 } from \"pkg0\";\n", + "signature": "-4882119183-export {};\r\n" + }, + "./randomfileforimport.ts": { + "original": { + "version": "10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n" + }, + "version": "10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;", + "signature": "-6057683066-export declare const x = 10;\r\n" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./main.ts": [ + "./lib/pkg0/index.d.ts" + ], + "./randomfileforimport.ts": [ + "./lib/pkg0/index.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./lib/pkg0/index.d.ts", + "./main.ts", + "./randomfileforimport.ts" + ], + "latestChangedDtsFile": "./randomFileForImport.d.ts" + }, + "version": "FakeTSVersion", + "size": 1168 +} + diff --git a/tests/baselines/reference/tsc/cacheResolutions/resolutions-with-symlinks-when-not-built.js b/tests/baselines/reference/tsc/cacheResolutions/resolutions-with-symlinks-when-not-built.js new file mode 100644 index 00000000000..dc382c51330 --- /dev/null +++ b/tests/baselines/reference/tsc/cacheResolutions/resolutions-with-symlinks-when-not-built.js @@ -0,0 +1,191 @@ +Input:: +//// [/src/project/tsconfig.json] +{"compilerOptions":{"composite":true,"cacheResolutions":true,"traceResolution":true,"preserveSymlinks":false},"files":["main.ts","randomFileForImport.ts"]} + +//// [/src/project/main.ts] +import type { ImportInterface0 } from "pkg0"; + + +//// [/src/project/randomFileForImport.ts] +export const x = 10; + +//// [/src/project/lib/pkg0/index.d.ts] +export interface ImportInterface0 {} + +//// [/src/project/node_modules/pkg0/index.d.ts] symlink(/src/project/lib/pkg0/index.d.ts) +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + + +/a/lib/tsc.js -p /src/project --explainFiles +Output:: +======== Resolving module 'pkg0' from '/src/project/main.ts'. ======== +Module resolution kind is not specified, using 'NodeJs'. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, Declaration. +File '/src/project/node_modules/pkg0/package.json' does not exist. +File '/src/project/node_modules/pkg0.ts' does not exist. +File '/src/project/node_modules/pkg0.tsx' does not exist. +File '/src/project/node_modules/pkg0.d.ts' does not exist. +File '/src/project/node_modules/pkg0/index.ts' does not exist. +File '/src/project/node_modules/pkg0/index.tsx' does not exist. +File '/src/project/node_modules/pkg0/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/index.d.ts', result '/src/project/lib/pkg0/index.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/lib/pkg0/index.d.ts'. ======== +a/lib/lib.d.ts + Default library for target 'es5' +src/project/lib/pkg0/index.d.ts + Imported via "pkg0" from file 'src/project/main.ts' +src/project/main.ts + Part of 'files' list in tsconfig.json +src/project/randomFileForImport.ts + Part of 'files' list in tsconfig.json + + +Program root files: ["/src/project/main.ts","/src/project/randomFileForImport.ts"] +Program options: {"composite":true,"cacheResolutions":true,"traceResolution":true,"preserveSymlinks":false,"project":"/src/project","explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/lib/pkg0/index.d.ts +/src/project/main.ts +/src/project/randomFileForImport.ts + +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/src/project/lib/pkg0/index.d.ts +/src/project/main.ts +/src/project/randomFileForImport.ts + +Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) +/src/project/lib/pkg0/index.d.ts (used version) +/src/project/main.ts (computed .d.ts during emit) +/src/project/randomfileforimport.ts (computed .d.ts during emit) + +File: /src/project/main.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/lib/pkg0/index.d.ts", + "originalPath": "/src/project/node_modules/pkg0/index.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/pkg0/package.json", + "/src/project/node_modules/pkg0.ts", + "/src/project/node_modules/pkg0.tsx", + "/src/project/node_modules/pkg0.d.ts", + "/src/project/node_modules/pkg0/index.ts", + "/src/project/node_modules/pkg0/index.tsx" + ] +} + +PolledWatches:: + +FsWatches:: + +FsWatchesRecursive:: + +exitCode:: ExitStatus.Success + +//// [/src/project/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + + +//// [/src/project/main.d.ts] +export {}; + + +//// [/src/project/randomFileForImport.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.x = 10; + + +//// [/src/project/randomFileForImport.d.ts] +export declare const x = 10; + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./lib/pkg0/index.d.ts","./main.ts","./randomfileforimport.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"769951468-export interface ImportInterface0 {}",{"version":"7372004325-import type { ImportInterface0 } from \"pkg0\";\n","signature":"-3531856636-export {};\n"},{"version":"-10726455937-export const x = 10;","signature":"-6821242887-export declare const x = 10;\n"}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4],"latestChangedDtsFile":"./randomFileForImport.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./lib/pkg0/index.d.ts", + "./main.ts", + "./randomfileforimport.ts" + ], + "fileNamesList": [ + [ + "./lib/pkg0/index.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./lib/pkg0/index.d.ts": { + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}" + }, + "./main.ts": { + "original": { + "version": "7372004325-import type { ImportInterface0 } from \"pkg0\";\n", + "signature": "-3531856636-export {};\n" + }, + "version": "7372004325-import type { ImportInterface0 } from \"pkg0\";\n", + "signature": "-3531856636-export {};\n" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n" + }, + "version": "-10726455937-export const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./main.ts": [ + "./lib/pkg0/index.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + "./lib/pkg0/index.d.ts", + "./main.ts", + "./randomfileforimport.ts" + ], + "latestChangedDtsFile": "./randomFileForImport.d.ts" + }, + "version": "FakeTSVersion", + "size": 1032 +} + diff --git a/tests/baselines/reference/tsc/cacheResolutions/resolutions-with-symlinks-with-preserveSymlinks-when-not-built.js b/tests/baselines/reference/tsc/cacheResolutions/resolutions-with-symlinks-with-preserveSymlinks-when-not-built.js new file mode 100644 index 00000000000..ff67d325a74 --- /dev/null +++ b/tests/baselines/reference/tsc/cacheResolutions/resolutions-with-symlinks-with-preserveSymlinks-when-not-built.js @@ -0,0 +1,189 @@ +Input:: +//// [/src/project/tsconfig.json] +{"compilerOptions":{"composite":true,"cacheResolutions":true,"traceResolution":true,"preserveSymlinks":true},"files":["main.ts","randomFileForImport.ts"]} + +//// [/src/project/main.ts] +import type { ImportInterface0 } from "pkg0"; + + +//// [/src/project/randomFileForImport.ts] +export const x = 10; + +//// [/src/project/lib/pkg0/index.d.ts] +export interface ImportInterface0 {} + +//// [/src/project/node_modules/pkg0/index.d.ts] symlink(/src/project/lib/pkg0/index.d.ts) +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + + +/a/lib/tsc.js -p /src/project --explainFiles +Output:: +======== Resolving module 'pkg0' from '/src/project/main.ts'. ======== +Module resolution kind is not specified, using 'NodeJs'. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, Declaration. +File '/src/project/node_modules/pkg0/package.json' does not exist. +File '/src/project/node_modules/pkg0.ts' does not exist. +File '/src/project/node_modules/pkg0.tsx' does not exist. +File '/src/project/node_modules/pkg0.d.ts' does not exist. +File '/src/project/node_modules/pkg0/index.ts' does not exist. +File '/src/project/node_modules/pkg0/index.tsx' does not exist. +File '/src/project/node_modules/pkg0/index.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/index.d.ts'. ======== +a/lib/lib.d.ts + Default library for target 'es5' +src/project/node_modules/pkg0/index.d.ts + Imported via "pkg0" from file 'src/project/main.ts' +src/project/main.ts + Part of 'files' list in tsconfig.json +src/project/randomFileForImport.ts + Part of 'files' list in tsconfig.json + + +Program root files: ["/src/project/main.ts","/src/project/randomFileForImport.ts"] +Program options: {"composite":true,"cacheResolutions":true,"traceResolution":true,"preserveSymlinks":true,"project":"/src/project","explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg0/index.d.ts +/src/project/main.ts +/src/project/randomFileForImport.ts + +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg0/index.d.ts +/src/project/main.ts +/src/project/randomFileForImport.ts + +Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) +/src/project/node_modules/pkg0/index.d.ts (used version) +/src/project/main.ts (computed .d.ts during emit) +/src/project/randomfileforimport.ts (computed .d.ts during emit) + +File: /src/project/main.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/index.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/pkg0/package.json", + "/src/project/node_modules/pkg0.ts", + "/src/project/node_modules/pkg0.tsx", + "/src/project/node_modules/pkg0.d.ts", + "/src/project/node_modules/pkg0/index.ts", + "/src/project/node_modules/pkg0/index.tsx" + ] +} + +PolledWatches:: + +FsWatches:: + +FsWatchesRecursive:: + +exitCode:: ExitStatus.Success + +//// [/src/project/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + + +//// [/src/project/main.d.ts] +export {}; + + +//// [/src/project/randomFileForImport.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.x = 10; + + +//// [/src/project/randomFileForImport.d.ts] +export declare const x = 10; + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./node_modules/pkg0/index.d.ts","./main.ts","./randomfileforimport.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"769951468-export interface ImportInterface0 {}",{"version":"7372004325-import type { ImportInterface0 } from \"pkg0\";\n","signature":"-3531856636-export {};\n"},{"version":"-10726455937-export const x = 10;","signature":"-6821242887-export declare const x = 10;\n"}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,3,2,4],"latestChangedDtsFile":"./randomFileForImport.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./node_modules/pkg0/index.d.ts", + "./main.ts", + "./randomfileforimport.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/index.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./node_modules/pkg0/index.d.ts": { + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}" + }, + "./main.ts": { + "original": { + "version": "7372004325-import type { ImportInterface0 } from \"pkg0\";\n", + "signature": "-3531856636-export {};\n" + }, + "version": "7372004325-import type { ImportInterface0 } from \"pkg0\";\n", + "signature": "-3531856636-export {};\n" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n" + }, + "version": "-10726455937-export const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./main.ts": [ + "./node_modules/pkg0/index.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + "./main.ts", + "./node_modules/pkg0/index.d.ts", + "./randomfileforimport.ts" + ], + "latestChangedDtsFile": "./randomFileForImport.d.ts" + }, + "version": "FakeTSVersion", + "size": 1041 +} + diff --git a/tests/baselines/reference/tsc/cacheResolutions/resolutions-with-symlinks-with-preserveSymlinks.js b/tests/baselines/reference/tsc/cacheResolutions/resolutions-with-symlinks-with-preserveSymlinks.js new file mode 100644 index 00000000000..962aaafc3b5 --- /dev/null +++ b/tests/baselines/reference/tsc/cacheResolutions/resolutions-with-symlinks-with-preserveSymlinks.js @@ -0,0 +1,280 @@ +Input:: +//// [/src/project/tsconfig.json] +{"compilerOptions":{"composite":true,"cacheResolutions":true,"traceResolution":true,"preserveSymlinks":true},"files":["main.ts","randomFileForImport.ts"]} + +//// [/src/project/main.ts] +import type { ImportInterface0 } from "pkg0"; + + +//// [/src/project/randomFileForImport.ts] +import type { ImportInterface0 } from "pkg0"; +export const x = 10; + +//// [/src/project/lib/pkg0/index.d.ts] +export interface ImportInterface0 {} + +//// [/src/project/node_modules/pkg0/index.d.ts] symlink(/src/project/lib/pkg0/index.d.ts) +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + +//// [/src/project/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + + +//// [/src/project/main.d.ts] +export {}; + + +//// [/src/project/randomFileForImport.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.x = 10; + + +//// [/src/project/randomFileForImport.d.ts] +export declare const x = 10; + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./node_modules/pkg0/index.d.ts","./main.ts","./randomfileforimport.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"769951468-export interface ImportInterface0 {}",{"version":"7372004325-import type { ImportInterface0 } from \"pkg0\";\n","signature":"-3531856636-export {};\n"},{"version":"-10726455937-export const x = 10;","signature":"-6821242887-export declare const x = 10;\n"}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,3,2,4],"latestChangedDtsFile":"./randomFileForImport.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./node_modules/pkg0/index.d.ts", + "./main.ts", + "./randomfileforimport.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/index.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./node_modules/pkg0/index.d.ts": { + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}" + }, + "./main.ts": { + "original": { + "version": "7372004325-import type { ImportInterface0 } from \"pkg0\";\n", + "signature": "-3531856636-export {};\n" + }, + "version": "7372004325-import type { ImportInterface0 } from \"pkg0\";\n", + "signature": "-3531856636-export {};\n" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n" + }, + "version": "-10726455937-export const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./main.ts": [ + "./node_modules/pkg0/index.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + "./main.ts", + "./node_modules/pkg0/index.d.ts", + "./randomfileforimport.ts" + ], + "latestChangedDtsFile": "./randomFileForImport.d.ts" + }, + "version": "FakeTSVersion", + "size": 1041 +} + + +/a/lib/tsc.js -p /src/project --explainFiles +Output:: +======== Resolving module 'pkg0' from '/src/project/main.ts'. ======== +Module resolution kind is not specified, using 'NodeJs'. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, Declaration. +File '/src/project/node_modules/pkg0/package.json' does not exist. +File '/src/project/node_modules/pkg0.ts' does not exist. +File '/src/project/node_modules/pkg0.tsx' does not exist. +File '/src/project/node_modules/pkg0.d.ts' does not exist. +File '/src/project/node_modules/pkg0/index.ts' does not exist. +File '/src/project/node_modules/pkg0/index.tsx' does not exist. +File '/src/project/node_modules/pkg0/index.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/index.d.ts'. ======== +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/index.d.ts'. ======== +a/lib/lib.d.ts + Default library for target 'es5' +src/project/node_modules/pkg0/index.d.ts + Imported via "pkg0" from file 'src/project/main.ts' + Imported via "pkg0" from file 'src/project/randomFileForImport.ts' +src/project/main.ts + Part of 'files' list in tsconfig.json +src/project/randomFileForImport.ts + Part of 'files' list in tsconfig.json + + +Program root files: ["/src/project/main.ts","/src/project/randomFileForImport.ts"] +Program options: {"composite":true,"cacheResolutions":true,"traceResolution":true,"preserveSymlinks":true,"project":"/src/project","explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg0/index.d.ts +/src/project/main.ts +/src/project/randomFileForImport.ts + +Semantic diagnostics in builder refreshed for:: +/src/project/randomFileForImport.ts + +Shape signatures in builder refreshed for:: +/src/project/randomfileforimport.ts (computed .d.ts) + +File: /src/project/main.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/index.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/pkg0/package.json", + "/src/project/node_modules/pkg0.ts", + "/src/project/node_modules/pkg0.tsx", + "/src/project/node_modules/pkg0.d.ts", + "/src/project/node_modules/pkg0/index.ts", + "/src/project/node_modules/pkg0/index.tsx" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/index.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/pkg0/package.json", + "/src/project/node_modules/pkg0.ts", + "/src/project/node_modules/pkg0.tsx", + "/src/project/node_modules/pkg0.d.ts", + "/src/project/node_modules/pkg0/index.ts", + "/src/project/node_modules/pkg0/index.tsx" + ] +} + +PolledWatches:: + +FsWatches:: + +FsWatchesRecursive:: + +exitCode:: ExitStatus.Success + +//// [/src/project/randomFileForImport.js] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./node_modules/pkg0/index.d.ts","./main.ts","./randomfileforimport.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"769951468-export interface ImportInterface0 {}",{"version":"7372004325-import type { ImportInterface0 } from \"pkg0\";\n","signature":"-3531856636-export {};\n"},{"version":"10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n"}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2]],"referencedMap":[[3,1],[4,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,3,2,4],"latestChangedDtsFile":"./randomFileForImport.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./node_modules/pkg0/index.d.ts", + "./main.ts", + "./randomfileforimport.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/index.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./node_modules/pkg0/index.d.ts": { + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}" + }, + "./main.ts": { + "original": { + "version": "7372004325-import type { ImportInterface0 } from \"pkg0\";\n", + "signature": "-3531856636-export {};\n" + }, + "version": "7372004325-import type { ImportInterface0 } from \"pkg0\";\n", + "signature": "-3531856636-export {};\n" + }, + "./randomfileforimport.ts": { + "original": { + "version": "10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n" + }, + "version": "10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./main.ts": [ + "./node_modules/pkg0/index.d.ts" + ], + "./randomfileforimport.ts": [ + "./node_modules/pkg0/index.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + "./main.ts", + "./node_modules/pkg0/index.d.ts", + "./randomfileforimport.ts" + ], + "latestChangedDtsFile": "./randomFileForImport.d.ts" + }, + "version": "FakeTSVersion", + "size": 1095 +} + diff --git a/tests/baselines/reference/tsc/cacheResolutions/resolutions-with-symlinks.js b/tests/baselines/reference/tsc/cacheResolutions/resolutions-with-symlinks.js new file mode 100644 index 00000000000..e2615a20f4c --- /dev/null +++ b/tests/baselines/reference/tsc/cacheResolutions/resolutions-with-symlinks.js @@ -0,0 +1,283 @@ +Input:: +//// [/src/project/tsconfig.json] +{"compilerOptions":{"composite":true,"cacheResolutions":true,"traceResolution":true,"preserveSymlinks":false},"files":["main.ts","randomFileForImport.ts"]} + +//// [/src/project/main.ts] +import type { ImportInterface0 } from "pkg0"; + + +//// [/src/project/randomFileForImport.ts] +import type { ImportInterface0 } from "pkg0"; +export const x = 10; + +//// [/src/project/lib/pkg0/index.d.ts] +export interface ImportInterface0 {} + +//// [/src/project/node_modules/pkg0/index.d.ts] symlink(/src/project/lib/pkg0/index.d.ts) +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + +//// [/src/project/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + + +//// [/src/project/main.d.ts] +export {}; + + +//// [/src/project/randomFileForImport.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.x = 10; + + +//// [/src/project/randomFileForImport.d.ts] +export declare const x = 10; + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./lib/pkg0/index.d.ts","./main.ts","./randomfileforimport.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"769951468-export interface ImportInterface0 {}",{"version":"7372004325-import type { ImportInterface0 } from \"pkg0\";\n","signature":"-3531856636-export {};\n"},{"version":"-10726455937-export const x = 10;","signature":"-6821242887-export declare const x = 10;\n"}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4],"latestChangedDtsFile":"./randomFileForImport.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./lib/pkg0/index.d.ts", + "./main.ts", + "./randomfileforimport.ts" + ], + "fileNamesList": [ + [ + "./lib/pkg0/index.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./lib/pkg0/index.d.ts": { + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}" + }, + "./main.ts": { + "original": { + "version": "7372004325-import type { ImportInterface0 } from \"pkg0\";\n", + "signature": "-3531856636-export {};\n" + }, + "version": "7372004325-import type { ImportInterface0 } from \"pkg0\";\n", + "signature": "-3531856636-export {};\n" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n" + }, + "version": "-10726455937-export const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./main.ts": [ + "./lib/pkg0/index.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + "./lib/pkg0/index.d.ts", + "./main.ts", + "./randomfileforimport.ts" + ], + "latestChangedDtsFile": "./randomFileForImport.d.ts" + }, + "version": "FakeTSVersion", + "size": 1032 +} + + +/a/lib/tsc.js -p /src/project --explainFiles +Output:: +======== Resolving module 'pkg0' from '/src/project/main.ts'. ======== +Module resolution kind is not specified, using 'NodeJs'. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, Declaration. +File '/src/project/node_modules/pkg0/package.json' does not exist. +File '/src/project/node_modules/pkg0.ts' does not exist. +File '/src/project/node_modules/pkg0.tsx' does not exist. +File '/src/project/node_modules/pkg0.d.ts' does not exist. +File '/src/project/node_modules/pkg0/index.ts' does not exist. +File '/src/project/node_modules/pkg0/index.tsx' does not exist. +File '/src/project/node_modules/pkg0/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/index.d.ts', result '/src/project/lib/pkg0/index.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/lib/pkg0/index.d.ts'. ======== +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Resolution for module 'pkg0' was found in cache from location '/src/project'. +======== Module name 'pkg0' was successfully resolved to '/src/project/lib/pkg0/index.d.ts'. ======== +a/lib/lib.d.ts + Default library for target 'es5' +src/project/lib/pkg0/index.d.ts + Imported via "pkg0" from file 'src/project/main.ts' + Imported via "pkg0" from file 'src/project/randomFileForImport.ts' +src/project/main.ts + Part of 'files' list in tsconfig.json +src/project/randomFileForImport.ts + Part of 'files' list in tsconfig.json + + +Program root files: ["/src/project/main.ts","/src/project/randomFileForImport.ts"] +Program options: {"composite":true,"cacheResolutions":true,"traceResolution":true,"preserveSymlinks":false,"project":"/src/project","explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/lib/pkg0/index.d.ts +/src/project/main.ts +/src/project/randomFileForImport.ts + +Semantic diagnostics in builder refreshed for:: +/src/project/randomFileForImport.ts + +Shape signatures in builder refreshed for:: +/src/project/randomfileforimport.ts (computed .d.ts) + +File: /src/project/main.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/lib/pkg0/index.d.ts", + "originalPath": "/src/project/node_modules/pkg0/index.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/pkg0/package.json", + "/src/project/node_modules/pkg0.ts", + "/src/project/node_modules/pkg0.tsx", + "/src/project/node_modules/pkg0.d.ts", + "/src/project/node_modules/pkg0/index.ts", + "/src/project/node_modules/pkg0/index.tsx" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/lib/pkg0/index.d.ts", + "originalPath": "/src/project/node_modules/pkg0/index.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/pkg0/package.json", + "/src/project/node_modules/pkg0.ts", + "/src/project/node_modules/pkg0.tsx", + "/src/project/node_modules/pkg0.d.ts", + "/src/project/node_modules/pkg0/index.ts", + "/src/project/node_modules/pkg0/index.tsx" + ] +} + +PolledWatches:: + +FsWatches:: + +FsWatchesRecursive:: + +exitCode:: ExitStatus.Success + +//// [/src/project/randomFileForImport.js] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./lib/pkg0/index.d.ts","./main.ts","./randomfileforimport.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"769951468-export interface ImportInterface0 {}",{"version":"7372004325-import type { ImportInterface0 } from \"pkg0\";\n","signature":"-3531856636-export {};\n"},{"version":"10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n"}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2]],"referencedMap":[[3,1],[4,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4],"latestChangedDtsFile":"./randomFileForImport.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./lib/pkg0/index.d.ts", + "./main.ts", + "./randomfileforimport.ts" + ], + "fileNamesList": [ + [ + "./lib/pkg0/index.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./lib/pkg0/index.d.ts": { + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}" + }, + "./main.ts": { + "original": { + "version": "7372004325-import type { ImportInterface0 } from \"pkg0\";\n", + "signature": "-3531856636-export {};\n" + }, + "version": "7372004325-import type { ImportInterface0 } from \"pkg0\";\n", + "signature": "-3531856636-export {};\n" + }, + "./randomfileforimport.ts": { + "original": { + "version": "10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n" + }, + "version": "10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./main.ts": [ + "./lib/pkg0/index.d.ts" + ], + "./randomfileforimport.ts": [ + "./lib/pkg0/index.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + "./lib/pkg0/index.d.ts", + "./main.ts", + "./randomfileforimport.ts" + ], + "latestChangedDtsFile": "./randomFileForImport.d.ts" + }, + "version": "FakeTSVersion", + "size": 1086 +} + diff --git a/tests/baselines/reference/tscWatch/cacheResolutions/bundle-emit-already-built.js b/tests/baselines/reference/tscWatch/cacheResolutions/bundle-emit-already-built.js new file mode 100644 index 00000000000..04bb6981247 --- /dev/null +++ b/tests/baselines/reference/tscWatch/cacheResolutions/bundle-emit-already-built.js @@ -0,0 +1,2803 @@ +Input:: +//// [/src/project/tsconfig.json] +{"compilerOptions":{"module":"amd","composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js"},"include":["*.ts"],"exclude":["*.d.ts"]} + +//// [/src/project/fileWithImports.ts] +import type { ImportInterface0 } from "pkg0"; +import type { RequireInterface1 } from "pkg1"; + + +//// [/src/project/randomFileForImport.ts] +export const x = 10; + +//// [/src/project/pkg0.d.ts] +export interface ImportInterface0 {} + +//// [/src/project/fileWithTypeRefs.ts] +/// +/// +interface LocalInterface extends ImportInterface2, RequireInterface3 {} +export {} + + +//// [/src/project/randomFileForTypeRef.ts] +export const x = 10; + +//// [/src/project/node_modules/pkg2/index.d.ts] +export {}; +declare global { + interface ImportInterface2 {} +} + + +//// [/src/project/node_modules/@types/pkg4/index.d.ts] +export const x = 10; + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + + +/a/lib/tsc.js -w --explainFiles --extendedDiagnostics +Output:: +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg1.ts' does not exist. +File '/src/project/pkg1.tsx' does not exist. +File '/src/project/pkg1.d.ts' does not exist. +File '/src/pkg1.ts' does not exist. +File '/src/pkg1.tsx' does not exist. +File '/src/pkg1.d.ts' does not exist. +File '/pkg1.ts' does not exist. +File '/pkg1.tsx' does not exist. +File '/pkg1.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/pkg1.js' does not exist. +File '/src/project/pkg1.jsx' does not exist. +File '/src/pkg1.js' does not exist. +File '/src/pkg1.jsx' does not exist. +File '/pkg1.js' does not exist. +File '/pkg1.jsx' does not exist. +======== Module name 'pkg1' was not resolved. ======== +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg3.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +fileWithImports.ts:2:40 - error TS2792: Cannot find module 'pkg1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? + +2 import type { RequireInterface1 } from "pkg1"; +   ~~~~~~ + +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +[12:00:37 AM] Starting compilation in watch mode... + +Current directory: /src/project CaseSensitiveFileNames: false +FileWatcher:: Added:: WatchInfo: /src/project/tsconfig.json 2000 undefined Config file +Synchronizing program +CreatingProgramWith:: + roots: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +FileWatcher:: Added:: WatchInfo: /src/project/fileWithImports.ts 250 undefined Source file +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg1.ts' does not exist. +File '/src/project/pkg1.tsx' does not exist. +File '/src/project/pkg1.d.ts' does not exist. +File '/src/pkg1.ts' does not exist. +File '/src/pkg1.tsx' does not exist. +File '/src/pkg1.d.ts' does not exist. +File '/pkg1.ts' does not exist. +File '/pkg1.tsx' does not exist. +File '/pkg1.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/pkg1.js' does not exist. +File '/src/project/pkg1.jsx' does not exist. +File '/src/pkg1.js' does not exist. +File '/src/pkg1.jsx' does not exist. +File '/pkg1.js' does not exist. +File '/pkg1.jsx' does not exist. +======== Module name 'pkg1' was not resolved. ======== +FileWatcher:: Added:: WatchInfo: /src/project/pkg0.d.ts 250 undefined Source file +FileWatcher:: Added:: WatchInfo: /src/project/fileWithTypeRefs.ts 250 undefined Source file +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg3.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +FileWatcher:: Added:: WatchInfo: /src/project/node_modules/pkg2/index.d.ts 250 undefined Source file +FileWatcher:: Added:: WatchInfo: /src/project/randomFileForImport.ts 250 undefined Source file +FileWatcher:: Added:: WatchInfo: /src/project/randomFileForTypeRef.ts 250 undefined Source file +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +FileWatcher:: Added:: WatchInfo: /src/project/node_modules/@types/pkg4/index.d.ts 250 undefined Source file +FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 250 undefined Source file +DirectoryWatcher:: Added:: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules/@types 1 undefined Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules/@types 1 undefined Type roots +DirectoryWatcher:: Triggered with /src/project/out.js :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/out.js :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/out.d.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/out.d.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/out.tsbuildinfo :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/out.tsbuildinfo :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +fileWithImports.ts:2:40 - error TS2792: Cannot find module 'pkg1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? + +2 import type { RequireInterface1 } from "pkg1"; +   ~~~~~~ + +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +pkg0.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +[12:00:44 AM] Found 3 errors. Watching for file changes. + +DirectoryWatcher:: Triggered with /src/project/out.tsbuildinfo.readable.baseline.txt :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/out.tsbuildinfo.readable.baseline.txt :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/out.tsbuildinfo.baseline.txt :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/out.tsbuildinfo.baseline.txt :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Added:: WatchInfo: /src/project 0 undefined Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project 0 undefined Wild card directory + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/pkg0.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/index.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx", + "/src/project/pkg1.d.ts", + "/src/pkg1.ts", + "/src/pkg1.tsx", + "/src/pkg1.d.ts", + "/pkg1.ts", + "/pkg1.tsx", + "/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/pkg1.js", + "/src/project/pkg1.jsx", + "/src/pkg1.js", + "/src/pkg1.jsx", + "/pkg1.js", + "/pkg1.jsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts", + "/src/project/node_modules/pkg3/index.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/filewithimports.ts: + {} +/src/project/pkg0.d.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/node_modules/pkg2/index.d.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/out.js] +define("fileWithImports", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +}); +define("fileWithTypeRefs", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /// + /// +}); +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); + + +//// [/src/project/out.d.ts] +declare module "fileWithImports" { } +declare module "fileWithTypeRefs" { + export {}; +} +declare module "randomFileForImport" { + export const x = 10; +} +declare module "randomFileForTypeRef" { + export const x = 10; +} + + +//// [/src/project/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./","sourceFiles":["./fileWithImports.ts","./fileWithTypeRefs.ts","./randomFileForImport.ts","./randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":842,"kind":"text"}],"hash":"7392736852-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n});\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n /// \n /// \n});\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\n"},"dts":{"sections":[{"pos":0,"end":223,"kind":"text"}],"hash":"-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n"}},"program":{"fileNames":["../../a/lib/lib.d.ts","./pkg0.d.ts","./filewithimports.ts","./node_modules/pkg2/index.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":["-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","769951468-export interface ImportInterface0 {}","17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n","1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","-10726455937-export const x = 10;","-10726455937-export const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./", + "sourceFiles": [ + "./fileWithImports.ts", + "./fileWithTypeRefs.ts", + "./randomFileForImport.ts", + "./randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 842, + "kind": "text" + } + ], + "hash": "7392736852-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n});\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n /// \n /// \n});\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 223, + "kind": "text" + } + ], + "hash": "-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n" + } + }, + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./pkg0.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/index.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "../../a/lib/lib.d.ts": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "./pkg0.d.ts": "769951468-export interface ImportInterface0 {}", + "./filewithimports.ts": "17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n", + "./node_modules/pkg2/index.d.ts": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "./filewithtyperefs.ts": "-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "./randomfileforimport.ts": "-10726455937-export const x = 10;", + "./randomfilefortyperef.ts": "-10726455937-export const x = 10;", + "./node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 3007 +} + +//// [/src/project/out.tsbuildinfo.baseline.txt] +====================================================================== +File:: ./out.js +---------------------------------------------------------------------- +text: (0-842) +define("fileWithImports", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +}); +define("fileWithTypeRefs", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /// + /// +}); +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); + +====================================================================== +====================================================================== +File:: ./out.d.ts +---------------------------------------------------------------------- +text: (0-223) +declare module "fileWithImports" { } +declare module "fileWithTypeRefs" { + export {}; +} +declare module "randomFileForImport" { + export const x = 10; +} +declare module "randomFileForTypeRef" { + export const x = 10; +} + +====================================================================== + + +Change:: modify randomFileForImport by adding import + +Input:: +//// [/src/project/randomFileForImport.ts] +import type { ImportInterface0 } from "pkg0"; +export const x = 10; + + +Output:: +FileWatcher:: Triggered with /src/project/randomFileForImport.ts 1:: WatchInfo: /src/project/randomFileForImport.ts 250 undefined Source file +Scheduling update +Elapsed:: *ms FileWatcher:: Triggered with /src/project/randomFileForImport.ts 1:: WatchInfo: /src/project/randomFileForImport.ts 250 undefined Source file +Synchronizing program +[12:00:51 AM] File change detected. Starting incremental compilation... + +CreatingProgramWith:: + roots: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Reusing resolution of module 'pkg0' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +Reusing resolution of module 'pkg1' from '/src/project/fileWithImports.ts' of old program, it was not resolved. +Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Reusing resolution of type reference directive 'pkg3' from '/src/project/fileWithTypeRefs.ts' of old program, it was not resolved. +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +fileWithImports.ts:2:40 - error TS2792: Cannot find module 'pkg1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? + +2 import type { RequireInterface1 } from "pkg1"; +   ~~~~~~ + +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +pkg0.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' + Imported via "pkg0" from file 'randomFileForImport.ts' +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +[12:00:58 AM] Found 3 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: SafeModules +Program files:: +/a/lib/lib.d.ts +/src/project/pkg0.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/index.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx", + "/src/project/pkg1.d.ts", + "/src/pkg1.ts", + "/src/pkg1.tsx", + "/src/pkg1.d.ts", + "/pkg1.ts", + "/pkg1.tsx", + "/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/pkg1.js", + "/src/project/pkg1.jsx", + "/src/pkg1.js", + "/src/pkg1.jsx", + "/pkg1.js", + "/pkg1.jsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts", + "/src/project/node_modules/pkg3/index.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/filewithimports.ts: + {} +/src/project/pkg0.d.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/node_modules/pkg2/index.d.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/out.js] file written with same contents +//// [/src/project/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./","sourceFiles":["./fileWithImports.ts","./fileWithTypeRefs.ts","./randomFileForImport.ts","./randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":842,"kind":"text"}],"hash":"7392736852-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n});\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n /// \n /// \n});\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\n"},"dts":{"sections":[{"pos":0,"end":223,"kind":"text"}],"hash":"-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n"}},"program":{"fileNames":["../../a/lib/lib.d.ts","./pkg0.d.ts","./filewithimports.ts","./node_modules/pkg2/index.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":["-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","769951468-export interface ImportInterface0 {}","17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n","1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;","-10726455937-export const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./", + "sourceFiles": [ + "./fileWithImports.ts", + "./fileWithTypeRefs.ts", + "./randomFileForImport.ts", + "./randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 842, + "kind": "text" + } + ], + "hash": "7392736852-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n});\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n /// \n /// \n});\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 223, + "kind": "text" + } + ], + "hash": "-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n" + } + }, + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./pkg0.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/index.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "../../a/lib/lib.d.ts": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "./pkg0.d.ts": "769951468-export interface ImportInterface0 {}", + "./filewithimports.ts": "17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n", + "./node_modules/pkg2/index.d.ts": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "./filewithtyperefs.ts": "-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "./randomfileforimport.ts": "10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;", + "./randomfilefortyperef.ts": "-10726455937-export const x = 10;", + "./node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 3055 +} + +//// [/src/project/out.tsbuildinfo.baseline.txt] file written with same contents + +Change:: modify randomFileForTypeRef by adding typeRef + +Input:: +//// [/src/project/randomFileForTypeRef.ts] +/// +export const x = 10; + + +Output:: +FileWatcher:: Triggered with /src/project/randomFileForTypeRef.ts 1:: WatchInfo: /src/project/randomFileForTypeRef.ts 250 undefined Source file +Scheduling update +Elapsed:: *ms FileWatcher:: Triggered with /src/project/randomFileForTypeRef.ts 1:: WatchInfo: /src/project/randomFileForTypeRef.ts 250 undefined Source file +Synchronizing program +[12:01:07 AM] File change detected. Starting incremental compilation... + +CreatingProgramWith:: + roots: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Reusing resolution of module 'pkg0' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +Reusing resolution of module 'pkg1' from '/src/project/fileWithImports.ts' of old program, it was not resolved. +Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Reusing resolution of type reference directive 'pkg3' from '/src/project/fileWithTypeRefs.ts' of old program, it was not resolved. +Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +fileWithImports.ts:2:40 - error TS2792: Cannot find module 'pkg1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? + +2 import type { RequireInterface1 } from "pkg1"; +   ~~~~~~ + +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +pkg0.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' + Imported via "pkg0" from file 'randomFileForImport.ts' +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +[12:01:14 AM] Found 3 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: SafeModules +Program files:: +/a/lib/lib.d.ts +/src/project/pkg0.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/index.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx", + "/src/project/pkg1.d.ts", + "/src/pkg1.ts", + "/src/pkg1.tsx", + "/src/pkg1.d.ts", + "/pkg1.ts", + "/pkg1.tsx", + "/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/pkg1.js", + "/src/project/pkg1.jsx", + "/src/pkg1.js", + "/src/pkg1.jsx", + "/pkg1.js", + "/pkg1.jsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts", + "/src/project/node_modules/pkg3/index.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/filewithimports.ts: + {} +/src/project/pkg0.d.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/node_modules/pkg2/index.d.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/out.js] +define("fileWithImports", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +}); +define("fileWithTypeRefs", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /// + /// +}); +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + /// + exports.x = 10; +}); + + +//// [/src/project/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./","sourceFiles":["./fileWithImports.ts","./fileWithTypeRefs.ts","./randomFileForImport.ts","./randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":876,"kind":"text"}],"hash":"-18578624915-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n});\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n /// \n /// \n});\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n"},"dts":{"sections":[{"pos":0,"end":223,"kind":"text"}],"hash":"-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n"}},"program":{"fileNames":["../../a/lib/lib.d.ts","./pkg0.d.ts","./filewithimports.ts","./node_modules/pkg2/index.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":["-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","769951468-export interface ImportInterface0 {}","17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n","1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;","-2210321256-/// \nexport const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./", + "sourceFiles": [ + "./fileWithImports.ts", + "./fileWithTypeRefs.ts", + "./randomFileForImport.ts", + "./randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 876, + "kind": "text" + } + ], + "hash": "-18578624915-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n});\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n /// \n /// \n});\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 223, + "kind": "text" + } + ], + "hash": "-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n" + } + }, + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./pkg0.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/index.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "../../a/lib/lib.d.ts": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "./pkg0.d.ts": "769951468-export interface ImportInterface0 {}", + "./filewithimports.ts": "17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n", + "./node_modules/pkg2/index.d.ts": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "./filewithtyperefs.ts": "-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "./randomfileforimport.ts": "10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;", + "./randomfilefortyperef.ts": "-2210321256-/// \nexport const x = 10;", + "./node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 3126 +} + +//// [/src/project/out.tsbuildinfo.baseline.txt] +====================================================================== +File:: ./out.js +---------------------------------------------------------------------- +text: (0-876) +define("fileWithImports", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +}); +define("fileWithTypeRefs", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /// + /// +}); +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + /// + exports.x = 10; +}); + +====================================================================== +====================================================================== +File:: ./out.d.ts +---------------------------------------------------------------------- +text: (0-223) +declare module "fileWithImports" { } +declare module "fileWithTypeRefs" { + export {}; +} +declare module "randomFileForImport" { + export const x = 10; +} +declare module "randomFileForTypeRef" { + export const x = 10; +} + +====================================================================== + + +Change:: write file not resolved by import + +Input:: +//// [/src/project/pkg1.d.ts] +export interface RequireInterface1 {} + + +Output:: +DirectoryWatcher:: Triggered with /src/project/pkg1.d.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Scheduling invalidateFailedLookup +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/pkg1.d.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/pkg1.d.ts :: WatchInfo: /src/project 0 undefined Wild card directory +Project: /src/project/tsconfig.json Detected excluded file: /src/project/pkg1.d.ts +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/pkg1.d.ts :: WatchInfo: /src/project 0 undefined Wild card directory +Scheduling update +Synchronizing program +[12:01:24 AM] File change detected. Starting incremental compilation... + +CreatingProgramWith:: + roots: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Reusing resolution of module 'pkg0' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg1.ts' does not exist. +File '/src/project/pkg1.tsx' does not exist. +File '/src/project/pkg1.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg1' was successfully resolved to '/src/project/pkg1.d.ts'. ======== +FileWatcher:: Added:: WatchInfo: /src/project/pkg1.d.ts 250 undefined Source file +Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Reusing resolution of type reference directive 'pkg3' from '/src/project/fileWithTypeRefs.ts' of old program, it was not resolved. +Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +pkg0.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' + Imported via "pkg0" from file 'randomFileForImport.ts' +pkg1.d.ts + Imported via "pkg1" from file 'fileWithImports.ts' +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +[12:01:31 AM] Found 2 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: SafeModules +Program files:: +/a/lib/lib.d.ts +/src/project/pkg0.d.ts +/src/project/pkg1.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/index.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg1.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts", + "/src/project/node_modules/pkg3/index.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/filewithimports.ts: + {} +/src/project/pkg0.d.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/node_modules/pkg2/index.d.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} +/src/project/pkg1.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/out.js] file written with same contents +//// [/src/project/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./","sourceFiles":["./fileWithImports.ts","./fileWithTypeRefs.ts","./randomFileForImport.ts","./randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":876,"kind":"text"}],"hash":"-18578624915-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n});\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n /// \n /// \n});\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n"},"dts":{"sections":[{"pos":0,"end":223,"kind":"text"}],"hash":"-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n"}},"program":{"fileNames":["../../a/lib/lib.d.ts","./pkg0.d.ts","./pkg1.d.ts","./filewithimports.ts","./node_modules/pkg2/index.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":["-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","769951468-export interface ImportInterface0 {}","-3547817137-export interface RequireInterface1 {}","17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n","1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;","-2210321256-/// \nexport const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./", + "sourceFiles": [ + "./fileWithImports.ts", + "./fileWithTypeRefs.ts", + "./randomFileForImport.ts", + "./randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 876, + "kind": "text" + } + ], + "hash": "-18578624915-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n});\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n /// \n /// \n});\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 223, + "kind": "text" + } + ], + "hash": "-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n" + } + }, + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./pkg0.d.ts", + "./pkg1.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/index.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "../../a/lib/lib.d.ts": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "./pkg0.d.ts": "769951468-export interface ImportInterface0 {}", + "./pkg1.d.ts": "-3547817137-export interface RequireInterface1 {}", + "./filewithimports.ts": "17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n", + "./node_modules/pkg2/index.d.ts": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "./filewithtyperefs.ts": "-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "./randomfileforimport.ts": "10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;", + "./randomfilefortyperef.ts": "-2210321256-/// \nexport const x = 10;", + "./node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 3192 +} + +//// [/src/project/out.tsbuildinfo.baseline.txt] file written with same contents + +Change:: write file not resolved by typeRef + +Input:: +//// [/src/project/node_modules/pkg3/index.d.ts] +export {}; +declare global { + interface RequireInterface3 {} +} + + + +Output:: +DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3 :: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +Scheduling invalidateFailedLookup +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3 :: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3/index.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +Scheduling invalidateFailedLookup, Cancelled earlier one +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3/index.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +Scheduling update +Synchronizing program +[12:01:42 AM] File change detected. Starting incremental compilation... + +CreatingProgramWith:: + roots: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Reusing resolution of module 'pkg0' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +Reusing resolution of module 'pkg1' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/pkg1.d.ts'. +Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg3/package.json' does not exist. +File '/src/project/node_modules/pkg3.d.ts' does not exist. +File '/src/project/node_modules/pkg3/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg3/index.d.ts', result '/src/project/node_modules/pkg3/index.d.ts'. +======== Type reference directive 'pkg3' was successfully resolved to '/src/project/node_modules/pkg3/index.d.ts', primary: false. ======== +FileWatcher:: Added:: WatchInfo: /src/project/node_modules/pkg3/index.d.ts 250 undefined Source file +Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +../../a/lib/lib.d.ts + Default library for target 'es5' +pkg0.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' + Imported via "pkg0" from file 'randomFileForImport.ts' +pkg1.d.ts + Imported via "pkg1" from file 'fileWithImports.ts' +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' +node_modules/pkg3/index.d.ts + Type library referenced via 'pkg3' from file 'fileWithTypeRefs.ts' +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +[12:01:49 AM] Found 0 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: SafeModules +Program files:: +/a/lib/lib.d.ts +/src/project/pkg0.d.ts +/src/project/pkg1.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/index.d.ts +/src/project/node_modules/pkg3/index.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg1.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg3/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/filewithimports.ts: + {} +/src/project/pkg0.d.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/node_modules/pkg2/index.d.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} +/src/project/pkg1.d.ts: + {} +/src/project/node_modules/pkg3/index.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/out.js] file written with same contents +//// [/src/project/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./","sourceFiles":["./fileWithImports.ts","./fileWithTypeRefs.ts","./randomFileForImport.ts","./randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":876,"kind":"text"}],"hash":"-18578624915-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n});\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n /// \n /// \n});\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n"},"dts":{"sections":[{"pos":0,"end":223,"kind":"text"}],"hash":"-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n"}},"program":{"fileNames":["../../a/lib/lib.d.ts","./pkg0.d.ts","./pkg1.d.ts","./filewithimports.ts","./node_modules/pkg2/index.d.ts","./node_modules/pkg3/index.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":["-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","769951468-export interface ImportInterface0 {}","-3547817137-export interface RequireInterface1 {}","17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n","1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n","-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;","-2210321256-/// \nexport const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./", + "sourceFiles": [ + "./fileWithImports.ts", + "./fileWithTypeRefs.ts", + "./randomFileForImport.ts", + "./randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 876, + "kind": "text" + } + ], + "hash": "-18578624915-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n});\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n /// \n /// \n});\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 223, + "kind": "text" + } + ], + "hash": "-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n" + } + }, + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./pkg0.d.ts", + "./pkg1.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/index.d.ts", + "./node_modules/pkg3/index.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "../../a/lib/lib.d.ts": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "./pkg0.d.ts": "769951468-export interface ImportInterface0 {}", + "./pkg1.d.ts": "-3547817137-export interface RequireInterface1 {}", + "./filewithimports.ts": "17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n", + "./node_modules/pkg2/index.d.ts": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "./node_modules/pkg3/index.d.ts": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "./filewithtyperefs.ts": "-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "./randomfileforimport.ts": "10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;", + "./randomfilefortyperef.ts": "-2210321256-/// \nexport const x = 10;", + "./node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 3309 +} + +//// [/src/project/out.tsbuildinfo.baseline.txt] file written with same contents + +Change:: delete file with imports + +Input:: +//// [/src/project/fileWithImports.ts] deleted + +Output:: +FileWatcher:: Triggered with /src/project/fileWithImports.ts 2:: WatchInfo: /src/project/fileWithImports.ts 250 undefined Source file +Scheduling update +Elapsed:: *ms FileWatcher:: Triggered with /src/project/fileWithImports.ts 2:: WatchInfo: /src/project/fileWithImports.ts 250 undefined Source file +DirectoryWatcher:: Triggered with /src/project/fileWithImports.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Scheduling invalidateFailedLookup +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithImports.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/fileWithImports.ts :: WatchInfo: /src/project 0 undefined Wild card directory +Scheduling update +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithImports.ts :: WatchInfo: /src/project 0 undefined Wild card directory +Reloading new file names and options +Synchronizing program +[12:01:57 AM] File change detected. Starting incremental compilation... + +CreatingProgramWith:: + roots: ["/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Reusing resolution of type reference directive 'pkg3' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg3/index.d.ts'. +Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +FileWatcher:: Close:: WatchInfo: /src/project/pkg1.d.ts 250 undefined Source file +FileWatcher:: Close:: WatchInfo: /src/project/fileWithImports.ts 250 undefined Source file +../../a/lib/lib.d.ts + Default library for target 'es5' +node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' +node_modules/pkg3/index.d.ts + Type library referenced via 'pkg3' from file 'fileWithTypeRefs.ts' +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +pkg0.d.ts + Imported via "pkg0" from file 'randomFileForImport.ts' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +[12:02:07 AM] Found 0 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg2/index.d.ts +/src/project/node_modules/pkg3/index.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/pkg0.d.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg3/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/pkg0.d.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/node_modules/pkg2/index.d.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} +/src/project/node_modules/pkg3/index.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/out.js] +define("fileWithTypeRefs", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /// + /// +}); +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + /// + exports.x = 10; +}); + + +//// [/src/project/out.d.ts] +declare module "fileWithTypeRefs" { + export {}; +} +declare module "randomFileForImport" { + export const x = 10; +} +declare module "randomFileForTypeRef" { + export const x = 10; +} + + +//// [/src/project/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./","sourceFiles":["./fileWithTypeRefs.ts","./randomFileForImport.ts","./randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":707,"kind":"text"}],"hash":"34328935995-define(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n /// \n /// \n});\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n"},"dts":{"sections":[{"pos":0,"end":186,"kind":"text"}],"hash":"-27533230922-declare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n"}},"program":{"fileNames":["../../a/lib/lib.d.ts","./node_modules/pkg2/index.d.ts","./node_modules/pkg3/index.d.ts","./filewithtyperefs.ts","./pkg0.d.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":["-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n","-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","769951468-export interface ImportInterface0 {}","10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;","-2210321256-/// \nexport const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"-27533230922-declare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./", + "sourceFiles": [ + "./fileWithTypeRefs.ts", + "./randomFileForImport.ts", + "./randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 707, + "kind": "text" + } + ], + "hash": "34328935995-define(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n /// \n /// \n});\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 186, + "kind": "text" + } + ], + "hash": "-27533230922-declare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n" + } + }, + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./node_modules/pkg2/index.d.ts", + "./node_modules/pkg3/index.d.ts", + "./filewithtyperefs.ts", + "./pkg0.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "../../a/lib/lib.d.ts": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "./node_modules/pkg2/index.d.ts": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "./node_modules/pkg3/index.d.ts": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "./filewithtyperefs.ts": "-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "./pkg0.d.ts": "769951468-export interface ImportInterface0 {}", + "./randomfileforimport.ts": "10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;", + "./randomfilefortyperef.ts": "-2210321256-/// \nexport const x = 10;", + "./node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "-27533230922-declare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 2819 +} + +//// [/src/project/out.tsbuildinfo.baseline.txt] +====================================================================== +File:: ./out.js +---------------------------------------------------------------------- +text: (0-707) +define("fileWithTypeRefs", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /// + /// +}); +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + /// + exports.x = 10; +}); + +====================================================================== +====================================================================== +File:: ./out.d.ts +---------------------------------------------------------------------- +text: (0-186) +declare module "fileWithTypeRefs" { + export {}; +} +declare module "randomFileForImport" { + export const x = 10; +} +declare module "randomFileForTypeRef" { + export const x = 10; +} + +====================================================================== + + +Change:: delete file with typeRefs + +Input:: +//// [/src/project/fileWithTypeRefs.ts] deleted + +Output:: +FileWatcher:: Triggered with /src/project/fileWithTypeRefs.ts 2:: WatchInfo: /src/project/fileWithTypeRefs.ts 250 undefined Source file +Scheduling update +Elapsed:: *ms FileWatcher:: Triggered with /src/project/fileWithTypeRefs.ts 2:: WatchInfo: /src/project/fileWithTypeRefs.ts 250 undefined Source file +DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Scheduling invalidateFailedLookup +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.ts :: WatchInfo: /src/project 0 undefined Wild card directory +Scheduling update +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.ts :: WatchInfo: /src/project 0 undefined Wild card directory +Reloading new file names and options +Synchronizing program +[12:02:16 AM] File change detected. Starting incremental compilation... + +CreatingProgramWith:: + roots: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +FileWatcher:: Close:: WatchInfo: /src/project/node_modules/pkg3/index.d.ts 250 undefined Source file +FileWatcher:: Close:: WatchInfo: /src/project/fileWithTypeRefs.ts 250 undefined Source file +../../a/lib/lib.d.ts + Default library for target 'es5' +pkg0.d.ts + Imported via "pkg0" from file 'randomFileForImport.ts' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'randomFileForTypeRef.ts' +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +[12:02:26 AM] Found 0 errors. Watching for file changes. + + + +Program root files: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/pkg0.d.ts +/src/project/randomFileForImport.ts +/src/project/node_modules/pkg2/index.d.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/pkg0.d.ts: + {} +/src/project/node_modules/pkg2/index.d.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/out.js] +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + /// + exports.x = 10; +}); + + +//// [/src/project/out.d.ts] +declare module "randomFileForImport" { + export const x = 10; +} +declare module "randomFileForTypeRef" { + export const x = 10; +} + + +//// [/src/project/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./","sourceFiles":["./randomFileForImport.ts","./randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":469,"kind":"text"}],"hash":"-34049342926-define(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n"},"dts":{"sections":[{"pos":0,"end":133,"kind":"text"}],"hash":"-5552028765-declare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n"}},"program":{"fileNames":["../../a/lib/lib.d.ts","./pkg0.d.ts","./randomfileforimport.ts","./node_modules/pkg2/index.d.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":["-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","769951468-export interface ImportInterface0 {}","10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;","1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","-2210321256-/// \nexport const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"-5552028765-declare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./", + "sourceFiles": [ + "./randomFileForImport.ts", + "./randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 469, + "kind": "text" + } + ], + "hash": "-34049342926-define(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 133, + "kind": "text" + } + ], + "hash": "-5552028765-declare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n" + } + }, + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./pkg0.d.ts", + "./randomfileforimport.ts", + "./node_modules/pkg2/index.d.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "../../a/lib/lib.d.ts": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "./pkg0.d.ts": "769951468-export interface ImportInterface0 {}", + "./randomfileforimport.ts": "10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;", + "./node_modules/pkg2/index.d.ts": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "./randomfilefortyperef.ts": "-2210321256-/// \nexport const x = 10;", + "./node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "-5552028765-declare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 2114 +} + +//// [/src/project/out.tsbuildinfo.baseline.txt] +====================================================================== +File:: ./out.js +---------------------------------------------------------------------- +text: (0-469) +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + /// + exports.x = 10; +}); + +====================================================================== +====================================================================== +File:: ./out.d.ts +---------------------------------------------------------------------- +text: (0-133) +declare module "randomFileForImport" { + export const x = 10; +} +declare module "randomFileForTypeRef" { + export const x = 10; +} + +====================================================================== + + +Change:: delete resolved import file + +Input:: +//// [/src/project/pkg0.d.ts] deleted + +Output:: +FileWatcher:: Triggered with /src/project/pkg0.d.ts 2:: WatchInfo: /src/project/pkg0.d.ts 250 undefined Source file +Scheduling update +Elapsed:: *ms FileWatcher:: Triggered with /src/project/pkg0.d.ts 2:: WatchInfo: /src/project/pkg0.d.ts 250 undefined Source file +DirectoryWatcher:: Triggered with /src/project/pkg0.d.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Scheduling invalidateFailedLookup +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/pkg0.d.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/pkg0.d.ts :: WatchInfo: /src/project 0 undefined Wild card directory +Project: /src/project/tsconfig.json Detected excluded file: /src/project/pkg0.d.ts +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/pkg0.d.ts :: WatchInfo: /src/project 0 undefined Wild card directory +Synchronizing program +[12:02:34 AM] File change detected. Starting incremental compilation... + +CreatingProgramWith:: + roots: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +FileWatcher:: Close:: WatchInfo: /src/project/pkg0.d.ts 250 undefined Source file +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' does not exist. +File '/src/pkg0.ts' does not exist. +File '/src/pkg0.tsx' does not exist. +File '/src/pkg0.d.ts' does not exist. +File '/pkg0.ts' does not exist. +File '/pkg0.tsx' does not exist. +File '/pkg0.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg0.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/pkg0.js' does not exist. +File '/src/project/pkg0.jsx' does not exist. +File '/src/pkg0.js' does not exist. +File '/src/pkg0.jsx' does not exist. +File '/pkg0.js' does not exist. +File '/pkg0.jsx' does not exist. +======== Module name 'pkg0' was not resolved. ======== +Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +randomFileForImport.ts:1:39 - error TS2792: Cannot find module 'pkg0'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? + +1 import type { ImportInterface0 } from "pkg0"; +   ~~~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'randomFileForTypeRef.ts' +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +[12:02:41 AM] Found 1 error. Watching for file changes. + + + +Program root files: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/randomFileForImport.ts +/src/project/node_modules/pkg2/index.d.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx", + "/src/project/pkg0.d.ts", + "/src/pkg0.ts", + "/src/pkg0.tsx", + "/src/pkg0.d.ts", + "/pkg0.ts", + "/pkg0.tsx", + "/pkg0.d.ts", + "/src/project/node_modules/@types/pkg0/package.json", + "/src/project/node_modules/@types/pkg0.d.ts", + "/src/project/node_modules/@types/pkg0/index.d.ts", + "/src/node_modules/@types/pkg0/package.json", + "/src/node_modules/@types/pkg0.d.ts", + "/src/node_modules/@types/pkg0/index.d.ts", + "/node_modules/@types/pkg0/package.json", + "/node_modules/@types/pkg0.d.ts", + "/node_modules/@types/pkg0/index.d.ts", + "/src/project/pkg0.js", + "/src/project/pkg0.jsx", + "/src/pkg0.js", + "/src/pkg0.jsx", + "/pkg0.js", + "/pkg0.jsx" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/node_modules/pkg2/index.d.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/out.js] file written with same contents +//// [/src/project/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./","sourceFiles":["./randomFileForImport.ts","./randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":469,"kind":"text"}],"hash":"-34049342926-define(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n"},"dts":{"sections":[{"pos":0,"end":133,"kind":"text"}],"hash":"-5552028765-declare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n"}},"program":{"fileNames":["../../a/lib/lib.d.ts","./randomfileforimport.ts","./node_modules/pkg2/index.d.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":["-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;","1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","-2210321256-/// \nexport const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"-5552028765-declare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./", + "sourceFiles": [ + "./randomFileForImport.ts", + "./randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 469, + "kind": "text" + } + ], + "hash": "-34049342926-define(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 133, + "kind": "text" + } + ], + "hash": "-5552028765-declare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n" + } + }, + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./randomfileforimport.ts", + "./node_modules/pkg2/index.d.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "../../a/lib/lib.d.ts": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "./randomfileforimport.ts": "10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;", + "./node_modules/pkg2/index.d.ts": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "./randomfilefortyperef.ts": "-2210321256-/// \nexport const x = 10;", + "./node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "-5552028765-declare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 2051 +} + +//// [/src/project/out.tsbuildinfo.baseline.txt] file written with same contents + +Change:: delete resolved typeRef file + +Input:: +//// [/src/project/node_modules/pkg2/index.d.ts] deleted + +Output:: +FileWatcher:: Triggered with /src/project/node_modules/pkg2/index.d.ts 2:: WatchInfo: /src/project/node_modules/pkg2/index.d.ts 250 undefined Source file +Scheduling update +Elapsed:: *ms FileWatcher:: Triggered with /src/project/node_modules/pkg2/index.d.ts 2:: WatchInfo: /src/project/node_modules/pkg2/index.d.ts 250 undefined Source file +DirectoryWatcher:: Triggered with /src/project/node_modules/pkg2/index.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +Scheduling invalidateFailedLookup +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg2/index.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +Synchronizing program +[12:02:49 AM] File change detected. Starting incremental compilation... + +CreatingProgramWith:: + roots: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +FileWatcher:: Close:: WatchInfo: /src/project/node_modules/pkg2/index.d.ts 250 undefined Source file +Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was not resolved. +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg2.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg2' was not resolved. ======== +Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +randomFileForImport.ts:1:39 - error TS2792: Cannot find module 'pkg0'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? + +1 import type { ImportInterface0 } from "pkg0"; +   ~~~~~~ + +randomFileForTypeRef.ts:1:23 - error TS2688: Cannot find type definition file for 'pkg2'. + +1 /// +   ~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +[12:02:56 AM] Found 2 errors. Watching for file changes. + + + +Program root files: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx", + "/src/project/pkg0.d.ts", + "/src/pkg0.ts", + "/src/pkg0.tsx", + "/src/pkg0.d.ts", + "/pkg0.ts", + "/pkg0.tsx", + "/pkg0.d.ts", + "/src/project/node_modules/@types/pkg0/package.json", + "/src/project/node_modules/@types/pkg0.d.ts", + "/src/project/node_modules/@types/pkg0/index.d.ts", + "/src/node_modules/@types/pkg0/package.json", + "/src/node_modules/@types/pkg0.d.ts", + "/src/node_modules/@types/pkg0/index.d.ts", + "/node_modules/@types/pkg0/package.json", + "/node_modules/@types/pkg0.d.ts", + "/node_modules/@types/pkg0/index.d.ts", + "/src/project/pkg0.js", + "/src/project/pkg0.jsx", + "/src/pkg0.js", + "/src/pkg0.jsx", + "/pkg0.js", + "/pkg0.jsx" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts", + "/src/project/node_modules/pkg2/index.d.ts", + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2.d.ts", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/node_modules/pkg2/package.json", + "/src/node_modules/pkg2.d.ts", + "/src/node_modules/pkg2/index.d.ts", + "/src/node_modules/@types/pkg2/package.json", + "/src/node_modules/@types/pkg2.d.ts", + "/src/node_modules/@types/pkg2/index.d.ts", + "/node_modules/pkg2/package.json", + "/node_modules/pkg2.d.ts", + "/node_modules/pkg2/index.d.ts", + "/node_modules/@types/pkg2/package.json", + "/node_modules/@types/pkg2.d.ts", + "/node_modules/@types/pkg2/index.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/out.js] file written with same contents +//// [/src/project/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./","sourceFiles":["./randomFileForImport.ts","./randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":469,"kind":"text"}],"hash":"-34049342926-define(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n"},"dts":{"sections":[{"pos":0,"end":133,"kind":"text"}],"hash":"-5552028765-declare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n"}},"program":{"fileNames":["../../a/lib/lib.d.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":["-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;","-2210321256-/// \nexport const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"-5552028765-declare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./", + "sourceFiles": [ + "./randomFileForImport.ts", + "./randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 469, + "kind": "text" + } + ], + "hash": "-34049342926-define(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 133, + "kind": "text" + } + ], + "hash": "-5552028765-declare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n" + } + }, + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "../../a/lib/lib.d.ts": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "./randomfileforimport.ts": "10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;", + "./randomfilefortyperef.ts": "-2210321256-/// \nexport const x = 10;", + "./node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "-5552028765-declare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 1936 +} + +//// [/src/project/out.tsbuildinfo.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tscWatch/cacheResolutions/bundle-emit.js b/tests/baselines/reference/tscWatch/cacheResolutions/bundle-emit.js new file mode 100644 index 00000000000..d491828f453 --- /dev/null +++ b/tests/baselines/reference/tscWatch/cacheResolutions/bundle-emit.js @@ -0,0 +1,2739 @@ +Input:: +//// [/src/project/tsconfig.json] +{"compilerOptions":{"module":"amd","composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js"},"include":["*.ts"],"exclude":["*.d.ts"]} + +//// [/src/project/fileWithImports.ts] +import type { ImportInterface0 } from "pkg0"; +import type { RequireInterface1 } from "pkg1"; + + +//// [/src/project/randomFileForImport.ts] +export const x = 10; + +//// [/src/project/pkg0.d.ts] +export interface ImportInterface0 {} + +//// [/src/project/fileWithTypeRefs.ts] +/// +/// +interface LocalInterface extends ImportInterface2, RequireInterface3 {} +export {} + + +//// [/src/project/randomFileForTypeRef.ts] +export const x = 10; + +//// [/src/project/node_modules/pkg2/index.d.ts] +export {}; +declare global { + interface ImportInterface2 {} +} + + +//// [/src/project/node_modules/@types/pkg4/index.d.ts] +export const x = 10; + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + + +/a/lib/tsc.js -w --explainFiles --extendedDiagnostics +Output:: +[12:00:37 AM] Starting compilation in watch mode... + +Current directory: /src/project CaseSensitiveFileNames: false +FileWatcher:: Added:: WatchInfo: /src/project/tsconfig.json 2000 undefined Config file +Synchronizing program +CreatingProgramWith:: + roots: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +FileWatcher:: Added:: WatchInfo: /src/project/fileWithImports.ts 250 undefined Source file +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg1.ts' does not exist. +File '/src/project/pkg1.tsx' does not exist. +File '/src/project/pkg1.d.ts' does not exist. +File '/src/pkg1.ts' does not exist. +File '/src/pkg1.tsx' does not exist. +File '/src/pkg1.d.ts' does not exist. +File '/pkg1.ts' does not exist. +File '/pkg1.tsx' does not exist. +File '/pkg1.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/pkg1.js' does not exist. +File '/src/project/pkg1.jsx' does not exist. +File '/src/pkg1.js' does not exist. +File '/src/pkg1.jsx' does not exist. +File '/pkg1.js' does not exist. +File '/pkg1.jsx' does not exist. +======== Module name 'pkg1' was not resolved. ======== +FileWatcher:: Added:: WatchInfo: /src/project/pkg0.d.ts 250 undefined Source file +FileWatcher:: Added:: WatchInfo: /src/project/fileWithTypeRefs.ts 250 undefined Source file +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg3.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +FileWatcher:: Added:: WatchInfo: /src/project/node_modules/pkg2/index.d.ts 250 undefined Source file +FileWatcher:: Added:: WatchInfo: /src/project/randomFileForImport.ts 250 undefined Source file +FileWatcher:: Added:: WatchInfo: /src/project/randomFileForTypeRef.ts 250 undefined Source file +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +FileWatcher:: Added:: WatchInfo: /src/project/node_modules/@types/pkg4/index.d.ts 250 undefined Source file +FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 250 undefined Source file +DirectoryWatcher:: Added:: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules/@types 1 undefined Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules/@types 1 undefined Type roots +DirectoryWatcher:: Triggered with /src/project/out.js :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/out.js :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/out.d.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/out.d.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/out.tsbuildinfo :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/out.tsbuildinfo :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +fileWithImports.ts:2:40 - error TS2792: Cannot find module 'pkg1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? + +2 import type { RequireInterface1 } from "pkg1"; +   ~~~~~~ + +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +pkg0.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +[12:00:44 AM] Found 3 errors. Watching for file changes. + +DirectoryWatcher:: Triggered with /src/project/out.tsbuildinfo.readable.baseline.txt :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/out.tsbuildinfo.readable.baseline.txt :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/out.tsbuildinfo.baseline.txt :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/out.tsbuildinfo.baseline.txt :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Added:: WatchInfo: /src/project 0 undefined Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project 0 undefined Wild card directory + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/pkg0.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/index.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx", + "/src/project/pkg1.d.ts", + "/src/pkg1.ts", + "/src/pkg1.tsx", + "/src/pkg1.d.ts", + "/pkg1.ts", + "/pkg1.tsx", + "/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/pkg1.js", + "/src/project/pkg1.jsx", + "/src/pkg1.js", + "/src/pkg1.jsx", + "/pkg1.js", + "/pkg1.jsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts", + "/src/project/node_modules/pkg3/index.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/filewithimports.ts: + {} +/src/project/pkg0.d.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/node_modules/pkg2/index.d.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/out.js] +define("fileWithImports", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +}); +define("fileWithTypeRefs", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /// + /// +}); +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); + + +//// [/src/project/out.d.ts] +declare module "fileWithImports" { } +declare module "fileWithTypeRefs" { + export {}; +} +declare module "randomFileForImport" { + export const x = 10; +} +declare module "randomFileForTypeRef" { + export const x = 10; +} + + +//// [/src/project/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./","sourceFiles":["./fileWithImports.ts","./fileWithTypeRefs.ts","./randomFileForImport.ts","./randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":842,"kind":"text"}],"hash":"7392736852-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n});\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n /// \n /// \n});\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\n"},"dts":{"sections":[{"pos":0,"end":223,"kind":"text"}],"hash":"-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n"}},"program":{"fileNames":["../../a/lib/lib.d.ts","./pkg0.d.ts","./filewithimports.ts","./node_modules/pkg2/index.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":["-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","769951468-export interface ImportInterface0 {}","17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n","1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","-10726455937-export const x = 10;","-10726455937-export const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./", + "sourceFiles": [ + "./fileWithImports.ts", + "./fileWithTypeRefs.ts", + "./randomFileForImport.ts", + "./randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 842, + "kind": "text" + } + ], + "hash": "7392736852-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n});\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n /// \n /// \n});\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 223, + "kind": "text" + } + ], + "hash": "-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n" + } + }, + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./pkg0.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/index.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "../../a/lib/lib.d.ts": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "./pkg0.d.ts": "769951468-export interface ImportInterface0 {}", + "./filewithimports.ts": "17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n", + "./node_modules/pkg2/index.d.ts": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "./filewithtyperefs.ts": "-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "./randomfileforimport.ts": "-10726455937-export const x = 10;", + "./randomfilefortyperef.ts": "-10726455937-export const x = 10;", + "./node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 3007 +} + +//// [/src/project/out.tsbuildinfo.baseline.txt] +====================================================================== +File:: ./out.js +---------------------------------------------------------------------- +text: (0-842) +define("fileWithImports", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +}); +define("fileWithTypeRefs", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /// + /// +}); +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); + +====================================================================== +====================================================================== +File:: ./out.d.ts +---------------------------------------------------------------------- +text: (0-223) +declare module "fileWithImports" { } +declare module "fileWithTypeRefs" { + export {}; +} +declare module "randomFileForImport" { + export const x = 10; +} +declare module "randomFileForTypeRef" { + export const x = 10; +} + +====================================================================== + + +Change:: modify randomFileForImport by adding import + +Input:: +//// [/src/project/randomFileForImport.ts] +import type { ImportInterface0 } from "pkg0"; +export const x = 10; + + +Output:: +FileWatcher:: Triggered with /src/project/randomFileForImport.ts 1:: WatchInfo: /src/project/randomFileForImport.ts 250 undefined Source file +Scheduling update +Elapsed:: *ms FileWatcher:: Triggered with /src/project/randomFileForImport.ts 1:: WatchInfo: /src/project/randomFileForImport.ts 250 undefined Source file +Synchronizing program +[12:00:51 AM] File change detected. Starting incremental compilation... + +CreatingProgramWith:: + roots: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Reusing resolution of module 'pkg0' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +Reusing resolution of module 'pkg1' from '/src/project/fileWithImports.ts' of old program, it was not resolved. +Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Reusing resolution of type reference directive 'pkg3' from '/src/project/fileWithTypeRefs.ts' of old program, it was not resolved. +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +fileWithImports.ts:2:40 - error TS2792: Cannot find module 'pkg1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? + +2 import type { RequireInterface1 } from "pkg1"; +   ~~~~~~ + +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +pkg0.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' + Imported via "pkg0" from file 'randomFileForImport.ts' +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +[12:00:58 AM] Found 3 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: SafeModules +Program files:: +/a/lib/lib.d.ts +/src/project/pkg0.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/index.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx", + "/src/project/pkg1.d.ts", + "/src/pkg1.ts", + "/src/pkg1.tsx", + "/src/pkg1.d.ts", + "/pkg1.ts", + "/pkg1.tsx", + "/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/pkg1.js", + "/src/project/pkg1.jsx", + "/src/pkg1.js", + "/src/pkg1.jsx", + "/pkg1.js", + "/pkg1.jsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts", + "/src/project/node_modules/pkg3/index.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/filewithimports.ts: + {} +/src/project/pkg0.d.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/node_modules/pkg2/index.d.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/out.js] file written with same contents +//// [/src/project/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./","sourceFiles":["./fileWithImports.ts","./fileWithTypeRefs.ts","./randomFileForImport.ts","./randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":842,"kind":"text"}],"hash":"7392736852-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n});\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n /// \n /// \n});\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\n"},"dts":{"sections":[{"pos":0,"end":223,"kind":"text"}],"hash":"-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n"}},"program":{"fileNames":["../../a/lib/lib.d.ts","./pkg0.d.ts","./filewithimports.ts","./node_modules/pkg2/index.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":["-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","769951468-export interface ImportInterface0 {}","17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n","1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;","-10726455937-export const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./", + "sourceFiles": [ + "./fileWithImports.ts", + "./fileWithTypeRefs.ts", + "./randomFileForImport.ts", + "./randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 842, + "kind": "text" + } + ], + "hash": "7392736852-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n});\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n /// \n /// \n});\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 223, + "kind": "text" + } + ], + "hash": "-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n" + } + }, + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./pkg0.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/index.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "../../a/lib/lib.d.ts": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "./pkg0.d.ts": "769951468-export interface ImportInterface0 {}", + "./filewithimports.ts": "17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n", + "./node_modules/pkg2/index.d.ts": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "./filewithtyperefs.ts": "-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "./randomfileforimport.ts": "10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;", + "./randomfilefortyperef.ts": "-10726455937-export const x = 10;", + "./node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 3055 +} + +//// [/src/project/out.tsbuildinfo.baseline.txt] file written with same contents + +Change:: modify randomFileForTypeRef by adding typeRef + +Input:: +//// [/src/project/randomFileForTypeRef.ts] +/// +export const x = 10; + + +Output:: +FileWatcher:: Triggered with /src/project/randomFileForTypeRef.ts 1:: WatchInfo: /src/project/randomFileForTypeRef.ts 250 undefined Source file +Scheduling update +Elapsed:: *ms FileWatcher:: Triggered with /src/project/randomFileForTypeRef.ts 1:: WatchInfo: /src/project/randomFileForTypeRef.ts 250 undefined Source file +Synchronizing program +[12:01:07 AM] File change detected. Starting incremental compilation... + +CreatingProgramWith:: + roots: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Reusing resolution of module 'pkg0' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +Reusing resolution of module 'pkg1' from '/src/project/fileWithImports.ts' of old program, it was not resolved. +Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Reusing resolution of type reference directive 'pkg3' from '/src/project/fileWithTypeRefs.ts' of old program, it was not resolved. +Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +fileWithImports.ts:2:40 - error TS2792: Cannot find module 'pkg1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? + +2 import type { RequireInterface1 } from "pkg1"; +   ~~~~~~ + +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +pkg0.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' + Imported via "pkg0" from file 'randomFileForImport.ts' +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +[12:01:14 AM] Found 3 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: SafeModules +Program files:: +/a/lib/lib.d.ts +/src/project/pkg0.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/index.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx", + "/src/project/pkg1.d.ts", + "/src/pkg1.ts", + "/src/pkg1.tsx", + "/src/pkg1.d.ts", + "/pkg1.ts", + "/pkg1.tsx", + "/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/pkg1.js", + "/src/project/pkg1.jsx", + "/src/pkg1.js", + "/src/pkg1.jsx", + "/pkg1.js", + "/pkg1.jsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts", + "/src/project/node_modules/pkg3/index.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/filewithimports.ts: + {} +/src/project/pkg0.d.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/node_modules/pkg2/index.d.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/out.js] +define("fileWithImports", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +}); +define("fileWithTypeRefs", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /// + /// +}); +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + /// + exports.x = 10; +}); + + +//// [/src/project/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./","sourceFiles":["./fileWithImports.ts","./fileWithTypeRefs.ts","./randomFileForImport.ts","./randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":876,"kind":"text"}],"hash":"-18578624915-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n});\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n /// \n /// \n});\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n"},"dts":{"sections":[{"pos":0,"end":223,"kind":"text"}],"hash":"-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n"}},"program":{"fileNames":["../../a/lib/lib.d.ts","./pkg0.d.ts","./filewithimports.ts","./node_modules/pkg2/index.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":["-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","769951468-export interface ImportInterface0 {}","17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n","1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;","-2210321256-/// \nexport const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./", + "sourceFiles": [ + "./fileWithImports.ts", + "./fileWithTypeRefs.ts", + "./randomFileForImport.ts", + "./randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 876, + "kind": "text" + } + ], + "hash": "-18578624915-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n});\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n /// \n /// \n});\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 223, + "kind": "text" + } + ], + "hash": "-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n" + } + }, + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./pkg0.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/index.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "../../a/lib/lib.d.ts": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "./pkg0.d.ts": "769951468-export interface ImportInterface0 {}", + "./filewithimports.ts": "17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n", + "./node_modules/pkg2/index.d.ts": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "./filewithtyperefs.ts": "-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "./randomfileforimport.ts": "10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;", + "./randomfilefortyperef.ts": "-2210321256-/// \nexport const x = 10;", + "./node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 3126 +} + +//// [/src/project/out.tsbuildinfo.baseline.txt] +====================================================================== +File:: ./out.js +---------------------------------------------------------------------- +text: (0-876) +define("fileWithImports", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +}); +define("fileWithTypeRefs", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /// + /// +}); +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + /// + exports.x = 10; +}); + +====================================================================== +====================================================================== +File:: ./out.d.ts +---------------------------------------------------------------------- +text: (0-223) +declare module "fileWithImports" { } +declare module "fileWithTypeRefs" { + export {}; +} +declare module "randomFileForImport" { + export const x = 10; +} +declare module "randomFileForTypeRef" { + export const x = 10; +} + +====================================================================== + + +Change:: write file not resolved by import + +Input:: +//// [/src/project/pkg1.d.ts] +export interface RequireInterface1 {} + + +Output:: +DirectoryWatcher:: Triggered with /src/project/pkg1.d.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Scheduling invalidateFailedLookup +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/pkg1.d.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/pkg1.d.ts :: WatchInfo: /src/project 0 undefined Wild card directory +Project: /src/project/tsconfig.json Detected excluded file: /src/project/pkg1.d.ts +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/pkg1.d.ts :: WatchInfo: /src/project 0 undefined Wild card directory +Scheduling update +Synchronizing program +[12:01:24 AM] File change detected. Starting incremental compilation... + +CreatingProgramWith:: + roots: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Reusing resolution of module 'pkg0' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg1.ts' does not exist. +File '/src/project/pkg1.tsx' does not exist. +File '/src/project/pkg1.d.ts' exist - use it as a name resolution result. +======== Module name 'pkg1' was successfully resolved to '/src/project/pkg1.d.ts'. ======== +FileWatcher:: Added:: WatchInfo: /src/project/pkg1.d.ts 250 undefined Source file +Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Reusing resolution of type reference directive 'pkg3' from '/src/project/fileWithTypeRefs.ts' of old program, it was not resolved. +Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +pkg0.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' + Imported via "pkg0" from file 'randomFileForImport.ts' +pkg1.d.ts + Imported via "pkg1" from file 'fileWithImports.ts' +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +[12:01:31 AM] Found 2 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: SafeModules +Program files:: +/a/lib/lib.d.ts +/src/project/pkg0.d.ts +/src/project/pkg1.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/index.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg1.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts", + "/src/project/node_modules/pkg3/index.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/filewithimports.ts: + {} +/src/project/pkg0.d.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/node_modules/pkg2/index.d.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} +/src/project/pkg1.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/out.js] file written with same contents +//// [/src/project/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./","sourceFiles":["./fileWithImports.ts","./fileWithTypeRefs.ts","./randomFileForImport.ts","./randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":876,"kind":"text"}],"hash":"-18578624915-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n});\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n /// \n /// \n});\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n"},"dts":{"sections":[{"pos":0,"end":223,"kind":"text"}],"hash":"-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n"}},"program":{"fileNames":["../../a/lib/lib.d.ts","./pkg0.d.ts","./pkg1.d.ts","./filewithimports.ts","./node_modules/pkg2/index.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":["-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","769951468-export interface ImportInterface0 {}","-3547817137-export interface RequireInterface1 {}","17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n","1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;","-2210321256-/// \nexport const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./", + "sourceFiles": [ + "./fileWithImports.ts", + "./fileWithTypeRefs.ts", + "./randomFileForImport.ts", + "./randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 876, + "kind": "text" + } + ], + "hash": "-18578624915-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n});\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n /// \n /// \n});\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 223, + "kind": "text" + } + ], + "hash": "-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n" + } + }, + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./pkg0.d.ts", + "./pkg1.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/index.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "../../a/lib/lib.d.ts": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "./pkg0.d.ts": "769951468-export interface ImportInterface0 {}", + "./pkg1.d.ts": "-3547817137-export interface RequireInterface1 {}", + "./filewithimports.ts": "17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n", + "./node_modules/pkg2/index.d.ts": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "./filewithtyperefs.ts": "-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "./randomfileforimport.ts": "10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;", + "./randomfilefortyperef.ts": "-2210321256-/// \nexport const x = 10;", + "./node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 3192 +} + +//// [/src/project/out.tsbuildinfo.baseline.txt] file written with same contents + +Change:: write file not resolved by typeRef + +Input:: +//// [/src/project/node_modules/pkg3/index.d.ts] +export {}; +declare global { + interface RequireInterface3 {} +} + + + +Output:: +DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3 :: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +Scheduling invalidateFailedLookup +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3 :: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3/index.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +Scheduling invalidateFailedLookup, Cancelled earlier one +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3/index.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +Scheduling update +Synchronizing program +[12:01:42 AM] File change detected. Starting incremental compilation... + +CreatingProgramWith:: + roots: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Reusing resolution of module 'pkg0' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +Reusing resolution of module 'pkg1' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/pkg1.d.ts'. +Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg3/package.json' does not exist. +File '/src/project/node_modules/pkg3.d.ts' does not exist. +File '/src/project/node_modules/pkg3/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg3/index.d.ts', result '/src/project/node_modules/pkg3/index.d.ts'. +======== Type reference directive 'pkg3' was successfully resolved to '/src/project/node_modules/pkg3/index.d.ts', primary: false. ======== +FileWatcher:: Added:: WatchInfo: /src/project/node_modules/pkg3/index.d.ts 250 undefined Source file +Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +../../a/lib/lib.d.ts + Default library for target 'es5' +pkg0.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' + Imported via "pkg0" from file 'randomFileForImport.ts' +pkg1.d.ts + Imported via "pkg1" from file 'fileWithImports.ts' +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' +node_modules/pkg3/index.d.ts + Type library referenced via 'pkg3' from file 'fileWithTypeRefs.ts' +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +[12:01:49 AM] Found 0 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: SafeModules +Program files:: +/a/lib/lib.d.ts +/src/project/pkg0.d.ts +/src/project/pkg1.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/index.d.ts +/src/project/node_modules/pkg3/index.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} +pkg1: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg1.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg1.ts", + "/src/project/pkg1.tsx" + ] +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg3/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/filewithimports.ts: + {} +/src/project/pkg0.d.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/node_modules/pkg2/index.d.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} +/src/project/pkg1.d.ts: + {} +/src/project/node_modules/pkg3/index.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/out.js] file written with same contents +//// [/src/project/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./","sourceFiles":["./fileWithImports.ts","./fileWithTypeRefs.ts","./randomFileForImport.ts","./randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":876,"kind":"text"}],"hash":"-18578624915-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n});\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n /// \n /// \n});\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n"},"dts":{"sections":[{"pos":0,"end":223,"kind":"text"}],"hash":"-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n"}},"program":{"fileNames":["../../a/lib/lib.d.ts","./pkg0.d.ts","./pkg1.d.ts","./filewithimports.ts","./node_modules/pkg2/index.d.ts","./node_modules/pkg3/index.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":["-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","769951468-export interface ImportInterface0 {}","-3547817137-export interface RequireInterface1 {}","17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n","1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n","-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;","-2210321256-/// \nexport const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./", + "sourceFiles": [ + "./fileWithImports.ts", + "./fileWithTypeRefs.ts", + "./randomFileForImport.ts", + "./randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 876, + "kind": "text" + } + ], + "hash": "-18578624915-define(\"fileWithImports\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n});\ndefine(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n /// \n /// \n});\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 223, + "kind": "text" + } + ], + "hash": "-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n" + } + }, + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./pkg0.d.ts", + "./pkg1.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/index.d.ts", + "./node_modules/pkg3/index.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "../../a/lib/lib.d.ts": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "./pkg0.d.ts": "769951468-export interface ImportInterface0 {}", + "./pkg1.d.ts": "-3547817137-export interface RequireInterface1 {}", + "./filewithimports.ts": "17369432329-import type { ImportInterface0 } from \"pkg0\";\nimport type { RequireInterface1 } from \"pkg1\";\n", + "./node_modules/pkg2/index.d.ts": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "./node_modules/pkg3/index.d.ts": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "./filewithtyperefs.ts": "-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "./randomfileforimport.ts": "10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;", + "./randomfilefortyperef.ts": "-2210321256-/// \nexport const x = 10;", + "./node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "-19355952260-declare module \"fileWithImports\" { }\ndeclare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 3309 +} + +//// [/src/project/out.tsbuildinfo.baseline.txt] file written with same contents + +Change:: delete file with imports + +Input:: +//// [/src/project/fileWithImports.ts] deleted + +Output:: +FileWatcher:: Triggered with /src/project/fileWithImports.ts 2:: WatchInfo: /src/project/fileWithImports.ts 250 undefined Source file +Scheduling update +Elapsed:: *ms FileWatcher:: Triggered with /src/project/fileWithImports.ts 2:: WatchInfo: /src/project/fileWithImports.ts 250 undefined Source file +DirectoryWatcher:: Triggered with /src/project/fileWithImports.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Scheduling invalidateFailedLookup +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithImports.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/fileWithImports.ts :: WatchInfo: /src/project 0 undefined Wild card directory +Scheduling update +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithImports.ts :: WatchInfo: /src/project 0 undefined Wild card directory +Reloading new file names and options +Synchronizing program +[12:01:57 AM] File change detected. Starting incremental compilation... + +CreatingProgramWith:: + roots: ["/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Reusing resolution of type reference directive 'pkg3' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg3/index.d.ts'. +Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +FileWatcher:: Close:: WatchInfo: /src/project/pkg1.d.ts 250 undefined Source file +FileWatcher:: Close:: WatchInfo: /src/project/fileWithImports.ts 250 undefined Source file +../../a/lib/lib.d.ts + Default library for target 'es5' +node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' +node_modules/pkg3/index.d.ts + Type library referenced via 'pkg3' from file 'fileWithTypeRefs.ts' +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +pkg0.d.ts + Imported via "pkg0" from file 'randomFileForImport.ts' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +[12:02:07 AM] Found 0 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg2/index.d.ts +/src/project/node_modules/pkg3/index.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/pkg0.d.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} +pkg3: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg3/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/package.json", + "/src/project/node_modules/pkg3.d.ts" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/pkg0.d.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/node_modules/pkg2/index.d.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} +/src/project/node_modules/pkg3/index.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/out.js] +define("fileWithTypeRefs", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /// + /// +}); +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + /// + exports.x = 10; +}); + + +//// [/src/project/out.d.ts] +declare module "fileWithTypeRefs" { + export {}; +} +declare module "randomFileForImport" { + export const x = 10; +} +declare module "randomFileForTypeRef" { + export const x = 10; +} + + +//// [/src/project/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./","sourceFiles":["./fileWithTypeRefs.ts","./randomFileForImport.ts","./randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":707,"kind":"text"}],"hash":"34328935995-define(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n /// \n /// \n});\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n"},"dts":{"sections":[{"pos":0,"end":186,"kind":"text"}],"hash":"-27533230922-declare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n"}},"program":{"fileNames":["../../a/lib/lib.d.ts","./node_modules/pkg2/index.d.ts","./node_modules/pkg3/index.d.ts","./filewithtyperefs.ts","./pkg0.d.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":["-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n","-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","769951468-export interface ImportInterface0 {}","10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;","-2210321256-/// \nexport const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"-27533230922-declare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./", + "sourceFiles": [ + "./fileWithTypeRefs.ts", + "./randomFileForImport.ts", + "./randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 707, + "kind": "text" + } + ], + "hash": "34328935995-define(\"fileWithTypeRefs\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n /// \n /// \n});\ndefine(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 186, + "kind": "text" + } + ], + "hash": "-27533230922-declare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n" + } + }, + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./node_modules/pkg2/index.d.ts", + "./node_modules/pkg3/index.d.ts", + "./filewithtyperefs.ts", + "./pkg0.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "../../a/lib/lib.d.ts": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "./node_modules/pkg2/index.d.ts": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "./node_modules/pkg3/index.d.ts": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "./filewithtyperefs.ts": "-9965483727-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "./pkg0.d.ts": "769951468-export interface ImportInterface0 {}", + "./randomfileforimport.ts": "10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;", + "./randomfilefortyperef.ts": "-2210321256-/// \nexport const x = 10;", + "./node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "-27533230922-declare module \"fileWithTypeRefs\" {\n export {};\n}\ndeclare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 2819 +} + +//// [/src/project/out.tsbuildinfo.baseline.txt] +====================================================================== +File:: ./out.js +---------------------------------------------------------------------- +text: (0-707) +define("fileWithTypeRefs", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + /// + /// +}); +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + /// + exports.x = 10; +}); + +====================================================================== +====================================================================== +File:: ./out.d.ts +---------------------------------------------------------------------- +text: (0-186) +declare module "fileWithTypeRefs" { + export {}; +} +declare module "randomFileForImport" { + export const x = 10; +} +declare module "randomFileForTypeRef" { + export const x = 10; +} + +====================================================================== + + +Change:: delete file with typeRefs + +Input:: +//// [/src/project/fileWithTypeRefs.ts] deleted + +Output:: +FileWatcher:: Triggered with /src/project/fileWithTypeRefs.ts 2:: WatchInfo: /src/project/fileWithTypeRefs.ts 250 undefined Source file +Scheduling update +Elapsed:: *ms FileWatcher:: Triggered with /src/project/fileWithTypeRefs.ts 2:: WatchInfo: /src/project/fileWithTypeRefs.ts 250 undefined Source file +DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Scheduling invalidateFailedLookup +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.ts :: WatchInfo: /src/project 0 undefined Wild card directory +Scheduling update +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.ts :: WatchInfo: /src/project 0 undefined Wild card directory +Reloading new file names and options +Synchronizing program +[12:02:16 AM] File change detected. Starting incremental compilation... + +CreatingProgramWith:: + roots: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +FileWatcher:: Close:: WatchInfo: /src/project/node_modules/pkg3/index.d.ts 250 undefined Source file +FileWatcher:: Close:: WatchInfo: /src/project/fileWithTypeRefs.ts 250 undefined Source file +../../a/lib/lib.d.ts + Default library for target 'es5' +pkg0.d.ts + Imported via "pkg0" from file 'randomFileForImport.ts' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'randomFileForTypeRef.ts' +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +[12:02:26 AM] Found 0 errors. Watching for file changes. + + + +Program root files: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/pkg0.d.ts +/src/project/randomFileForImport.ts +/src/project/node_modules/pkg2/index.d.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "resolvedModule": { + "resolvedFileName": "/src/project/pkg0.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": false + }, + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/pkg0.d.ts: + {} +/src/project/node_modules/pkg2/index.d.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/out.js] +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + /// + exports.x = 10; +}); + + +//// [/src/project/out.d.ts] +declare module "randomFileForImport" { + export const x = 10; +} +declare module "randomFileForTypeRef" { + export const x = 10; +} + + +//// [/src/project/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./","sourceFiles":["./randomFileForImport.ts","./randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":469,"kind":"text"}],"hash":"-34049342926-define(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n"},"dts":{"sections":[{"pos":0,"end":133,"kind":"text"}],"hash":"-5552028765-declare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n"}},"program":{"fileNames":["../../a/lib/lib.d.ts","./pkg0.d.ts","./randomfileforimport.ts","./node_modules/pkg2/index.d.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":["-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","769951468-export interface ImportInterface0 {}","10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;","1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","-2210321256-/// \nexport const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"-5552028765-declare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./", + "sourceFiles": [ + "./randomFileForImport.ts", + "./randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 469, + "kind": "text" + } + ], + "hash": "-34049342926-define(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 133, + "kind": "text" + } + ], + "hash": "-5552028765-declare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n" + } + }, + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./pkg0.d.ts", + "./randomfileforimport.ts", + "./node_modules/pkg2/index.d.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "../../a/lib/lib.d.ts": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "./pkg0.d.ts": "769951468-export interface ImportInterface0 {}", + "./randomfileforimport.ts": "10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;", + "./node_modules/pkg2/index.d.ts": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "./randomfilefortyperef.ts": "-2210321256-/// \nexport const x = 10;", + "./node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "-5552028765-declare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 2114 +} + +//// [/src/project/out.tsbuildinfo.baseline.txt] +====================================================================== +File:: ./out.js +---------------------------------------------------------------------- +text: (0-469) +define("randomFileForImport", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); +define("randomFileForTypeRef", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + /// + exports.x = 10; +}); + +====================================================================== +====================================================================== +File:: ./out.d.ts +---------------------------------------------------------------------- +text: (0-133) +declare module "randomFileForImport" { + export const x = 10; +} +declare module "randomFileForTypeRef" { + export const x = 10; +} + +====================================================================== + + +Change:: delete resolved import file + +Input:: +//// [/src/project/pkg0.d.ts] deleted + +Output:: +FileWatcher:: Triggered with /src/project/pkg0.d.ts 2:: WatchInfo: /src/project/pkg0.d.ts 250 undefined Source file +Scheduling update +Elapsed:: *ms FileWatcher:: Triggered with /src/project/pkg0.d.ts 2:: WatchInfo: /src/project/pkg0.d.ts 250 undefined Source file +DirectoryWatcher:: Triggered with /src/project/pkg0.d.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Scheduling invalidateFailedLookup +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/pkg0.d.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/pkg0.d.ts :: WatchInfo: /src/project 0 undefined Wild card directory +Project: /src/project/tsconfig.json Detected excluded file: /src/project/pkg0.d.ts +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/pkg0.d.ts :: WatchInfo: /src/project 0 undefined Wild card directory +Synchronizing program +[12:02:34 AM] File change detected. Starting incremental compilation... + +CreatingProgramWith:: + roots: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +FileWatcher:: Close:: WatchInfo: /src/project/pkg0.d.ts 250 undefined Source file +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/project/pkg0.ts' does not exist. +File '/src/project/pkg0.tsx' does not exist. +File '/src/project/pkg0.d.ts' does not exist. +File '/src/pkg0.ts' does not exist. +File '/src/pkg0.tsx' does not exist. +File '/src/pkg0.d.ts' does not exist. +File '/pkg0.ts' does not exist. +File '/pkg0.tsx' does not exist. +File '/pkg0.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg0.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/pkg0.js' does not exist. +File '/src/project/pkg0.jsx' does not exist. +File '/src/pkg0.js' does not exist. +File '/src/pkg0.jsx' does not exist. +File '/pkg0.js' does not exist. +File '/pkg0.jsx' does not exist. +======== Module name 'pkg0' was not resolved. ======== +Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +randomFileForImport.ts:1:39 - error TS2792: Cannot find module 'pkg0'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? + +1 import type { ImportInterface0 } from "pkg0"; +   ~~~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'randomFileForTypeRef.ts' +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +[12:02:41 AM] Found 1 error. Watching for file changes. + + + +Program root files: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/randomFileForImport.ts +/src/project/node_modules/pkg2/index.d.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx", + "/src/project/pkg0.d.ts", + "/src/pkg0.ts", + "/src/pkg0.tsx", + "/src/pkg0.d.ts", + "/pkg0.ts", + "/pkg0.tsx", + "/pkg0.d.ts", + "/src/project/node_modules/@types/pkg0/package.json", + "/src/project/node_modules/@types/pkg0.d.ts", + "/src/project/node_modules/@types/pkg0/index.d.ts", + "/src/node_modules/@types/pkg0/package.json", + "/src/node_modules/@types/pkg0.d.ts", + "/src/node_modules/@types/pkg0/index.d.ts", + "/node_modules/@types/pkg0/package.json", + "/node_modules/@types/pkg0.d.ts", + "/node_modules/@types/pkg0/index.d.ts", + "/src/project/pkg0.js", + "/src/project/pkg0.jsx", + "/src/pkg0.js", + "/src/pkg0.jsx", + "/pkg0.js", + "/pkg0.jsx" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/node_modules/pkg2/index.d.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/out.js] file written with same contents +//// [/src/project/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./","sourceFiles":["./randomFileForImport.ts","./randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":469,"kind":"text"}],"hash":"-34049342926-define(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n"},"dts":{"sections":[{"pos":0,"end":133,"kind":"text"}],"hash":"-5552028765-declare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n"}},"program":{"fileNames":["../../a/lib/lib.d.ts","./randomfileforimport.ts","./node_modules/pkg2/index.d.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":["-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;","1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","-2210321256-/// \nexport const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"-5552028765-declare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./", + "sourceFiles": [ + "./randomFileForImport.ts", + "./randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 469, + "kind": "text" + } + ], + "hash": "-34049342926-define(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 133, + "kind": "text" + } + ], + "hash": "-5552028765-declare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n" + } + }, + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./randomfileforimport.ts", + "./node_modules/pkg2/index.d.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "../../a/lib/lib.d.ts": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "./randomfileforimport.ts": "10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;", + "./node_modules/pkg2/index.d.ts": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "./randomfilefortyperef.ts": "-2210321256-/// \nexport const x = 10;", + "./node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "-5552028765-declare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 2051 +} + +//// [/src/project/out.tsbuildinfo.baseline.txt] file written with same contents + +Change:: delete resolved typeRef file + +Input:: +//// [/src/project/node_modules/pkg2/index.d.ts] deleted + +Output:: +FileWatcher:: Triggered with /src/project/node_modules/pkg2/index.d.ts 2:: WatchInfo: /src/project/node_modules/pkg2/index.d.ts 250 undefined Source file +Scheduling update +Elapsed:: *ms FileWatcher:: Triggered with /src/project/node_modules/pkg2/index.d.ts 2:: WatchInfo: /src/project/node_modules/pkg2/index.d.ts 250 undefined Source file +DirectoryWatcher:: Triggered with /src/project/node_modules/pkg2/index.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +Scheduling invalidateFailedLookup +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg2/index.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +Synchronizing program +[12:02:49 AM] File change detected. Starting incremental compilation... + +CreatingProgramWith:: + roots: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +FileWatcher:: Close:: WatchInfo: /src/project/node_modules/pkg2/index.d.ts 250 undefined Source file +Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was not resolved. +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' does not exist. +File '/src/project/node_modules/pkg2.d.ts' does not exist. +File '/src/project/node_modules/pkg2/index.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg2.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg2' was not resolved. ======== +Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +randomFileForImport.ts:1:39 - error TS2792: Cannot find module 'pkg0'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? + +1 import type { ImportInterface0 } from "pkg0"; +   ~~~~~~ + +randomFileForTypeRef.ts:1:23 - error TS2688: Cannot find type definition file for 'pkg2'. + +1 /// +   ~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' +[12:02:56 AM] Found 2 errors. Watching for file changes. + + + +Program root files: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: { + "failedLookupLocations": [ + "/src/project/pkg0.ts", + "/src/project/pkg0.tsx", + "/src/project/pkg0.d.ts", + "/src/pkg0.ts", + "/src/pkg0.tsx", + "/src/pkg0.d.ts", + "/pkg0.ts", + "/pkg0.tsx", + "/pkg0.d.ts", + "/src/project/node_modules/@types/pkg0/package.json", + "/src/project/node_modules/@types/pkg0.d.ts", + "/src/project/node_modules/@types/pkg0/index.d.ts", + "/src/node_modules/@types/pkg0/package.json", + "/src/node_modules/@types/pkg0.d.ts", + "/src/node_modules/@types/pkg0/index.d.ts", + "/node_modules/@types/pkg0/package.json", + "/node_modules/@types/pkg0.d.ts", + "/node_modules/@types/pkg0/index.d.ts", + "/src/project/pkg0.js", + "/src/project/pkg0.jsx", + "/src/pkg0.js", + "/src/pkg0.jsx", + "/pkg0.js", + "/pkg0.jsx" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/project/node_modules/pkg2/package.json", + "/src/project/node_modules/pkg2.d.ts", + "/src/project/node_modules/pkg2/index.d.ts", + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/@types/pkg2.d.ts", + "/src/project/node_modules/@types/pkg2/index.d.ts", + "/src/node_modules/pkg2/package.json", + "/src/node_modules/pkg2.d.ts", + "/src/node_modules/pkg2/index.d.ts", + "/src/node_modules/@types/pkg2/package.json", + "/src/node_modules/@types/pkg2.d.ts", + "/src/node_modules/@types/pkg2/index.d.ts", + "/node_modules/pkg2/package.json", + "/node_modules/pkg2.d.ts", + "/node_modules/pkg2/index.d.ts", + "/node_modules/@types/pkg2/package.json", + "/node_modules/@types/pkg2.d.ts", + "/node_modules/@types/pkg2/index.d.ts" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/out.js] file written with same contents +//// [/src/project/out.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"./","sourceFiles":["./randomFileForImport.ts","./randomFileForTypeRef.ts"],"js":{"sections":[{"pos":0,"end":469,"kind":"text"}],"hash":"-34049342926-define(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n"},"dts":{"sections":[{"pos":0,"end":133,"kind":"text"}],"hash":"-5552028765-declare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n"}},"program":{"fileNames":["../../a/lib/lib.d.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":["-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;","-2210321256-/// \nexport const x = 10;","-10726455937-export const x = 10;"],"options":{"cacheResolutions":true,"composite":true,"module":2,"out":"./out.js"},"outSignature":"-5552028765-declare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n","latestChangedDtsFile":"./out.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/out.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "./", + "sourceFiles": [ + "./randomFileForImport.ts", + "./randomFileForTypeRef.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 469, + "kind": "text" + } + ], + "hash": "-34049342926-define(\"randomFileForImport\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n exports.x = 10;\n});\ndefine(\"randomFileForTypeRef\", [\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.x = void 0;\n /// \n exports.x = 10;\n});\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 133, + "kind": "text" + } + ], + "hash": "-5552028765-declare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n" + } + }, + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "../../a/lib/lib.d.ts": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "./randomfileforimport.ts": "10580737119-import type { ImportInterface0 } from \"pkg0\";\nexport const x = 10;", + "./randomfilefortyperef.ts": "-2210321256-/// \nexport const x = 10;", + "./node_modules/@types/pkg4/index.d.ts": "-10726455937-export const x = 10;" + }, + "options": { + "cacheResolutions": true, + "composite": true, + "module": 2, + "out": "./out.js" + }, + "outSignature": "-5552028765-declare module \"randomFileForImport\" {\n export const x = 10;\n}\ndeclare module \"randomFileForTypeRef\" {\n export const x = 10;\n}\n", + "latestChangedDtsFile": "./out.d.ts" + }, + "version": "FakeTSVersion", + "size": 1936 +} + +//// [/src/project/out.tsbuildinfo.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tscWatch/cacheResolutions/multi-file-already-built.js b/tests/baselines/reference/tscWatch/cacheResolutions/multi-file-already-built.js new file mode 100644 index 00000000000..13ec04e0886 --- /dev/null +++ b/tests/baselines/reference/tscWatch/cacheResolutions/multi-file-already-built.js @@ -0,0 +1,4625 @@ +Input:: +//// [/src/project/tsconfig.json] +{"compilerOptions":{"moduleResolution":"node16","composite":true,"cacheResolutions":true,"traceResolution":true},"include":["*.ts"],"exclude":["*.d.ts"]} + +//// [/src/project/fileWithImports.ts] +import type { ImportInterface0 } from "pkg0" assert { "resolution-mode": "import" }; +import type { RequireInterface1 } from "pkg1" assert { "resolution-mode": "require" }; + + +//// [/src/project/randomFileForImport.ts] +export const x = 10; + +//// [/src/project/node_modules/pkg0/package.json] +{"name":"pkg0","version":"0.0.1","exports":{"import":"./import.js","require":"./require.js"}} + +//// [/src/project/node_modules/pkg0/import.d.ts] +export interface ImportInterface0 {} + +//// [/src/project/node_modules/pkg0/require.d.ts] +export interface RequireInterface0 {} + +//// [/src/project/node_modules/pkg1/package.json] +{"name":"pkg1","version":"0.0.1","exports":{"import":"./import.js","require":"./require.js"}} + +//// [/src/project/node_modules/pkg1/import.d.ts] +export interface ImportInterface1 {} + +//// [/src/project/fileWithTypeRefs.ts] +/// +/// +interface LocalInterface extends ImportInterface2, RequireInterface3 {} +export {} + + +//// [/src/project/randomFileForTypeRef.ts] +export const x = 10; + +//// [/src/project/node_modules/pkg2/package.json] +{"name":"pkg2","version":"0.0.1","exports":{"import":"./import.js","require":"./require.js"}} + +//// [/src/project/node_modules/pkg2/import.d.ts] +export {}; +declare global { + interface ImportInterface2 {} +} + + +//// [/src/project/node_modules/pkg2/require.d.ts] +export {}; +declare global { + interface RequireInterface2 {} +} + + +//// [/src/project/node_modules/pkg3/package.json] +{"name":"pkg3","version":"0.0.1","exports":{"import":"./import.js","require":"./require.js"}} + +//// [/src/project/node_modules/pkg3/import.d.ts] +export {}; +declare global { + interface ImportInterface3 {} +} + + +//// [/src/project/node_modules/@types/pkg4/index.d.ts] +export const x = 10; + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2],[4]],"referencedMap":[[3,1],[5,2]],"exportedModulesMap":[[3,1],[5,2]],"semanticDiagnosticsPerFile":[1,[3,[{"file":"./filewithimports.ts","start":124,"length":6,"messageText":"Cannot find module 'pkg1' or its corresponding type declarations.","category":1,"code":2307}]],[5,[{"file":"./filewithtyperefs.ts","start":162,"length":17,"messageText":"Cannot find name 'RequireInterface3'.","category":1,"code":2304}]],8,2,4,6,7],"affectedFilesPendingEmit":[3,5,6,7],"emitSignatures":[3,5,6,7]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + [ + "./filewithimports.ts", + [ + { + "file": "./filewithimports.ts", + "start": 124, + "length": 6, + "messageText": "Cannot find module 'pkg1' or its corresponding type declarations.", + "category": 1, + "code": 2307 + } + ] + ], + [ + "./filewithtyperefs.ts", + [ + { + "file": "./filewithtyperefs.ts", + "start": 162, + "length": 17, + "messageText": "Cannot find name 'RequireInterface3'.", + "category": 1, + "code": 2304 + } + ] + ], + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg2/import.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "affectedFilesPendingEmit": [ + [ + "./filewithimports.ts", + "Js | Dts" + ], + [ + "./filewithtyperefs.ts", + "Js | Dts" + ], + [ + "./randomfileforimport.ts", + "Js | Dts" + ], + [ + "./randomfilefortyperef.ts", + "Js | Dts" + ] + ], + "emitSignatures": [ + "./filewithimports.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ] + }, + "version": "FakeTSVersion", + "size": 2172 +} + + +/a/lib/tsc.js -w --explainFiles --extendedDiagnostics +Output:: +File '/src/project/package.json' does not exist. +File '/src/package.json' does not exist. +File '/package.json' does not exist. +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in CJS mode with conditions 'node', 'require', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.ts' does not exist. +File '/src/project/node_modules/pkg1/require.tsx' does not exist. +File '/src/project/node_modules/pkg1/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.js' does not exist. +File '/src/project/node_modules/pkg1/require.jsx' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Module name 'pkg1' was not resolved. ======== +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg3/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist. +File '/src/project/node_modules/package.json' does not exist. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/a/lib/package.json' does not exist. +File '/a/package.json' does not exist. +File '/package.json' does not exist according to earlier cached lookups. +fileWithImports.ts:2:40 - error TS2307: Cannot find module 'pkg1' or its corresponding type declarations. + +2 import type { RequireInterface1 } from "pkg1" assert { "resolution-mode": "require" }; +   ~~~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +[12:01:04 AM] Starting compilation in watch mode... + +Current directory: /src/project CaseSensitiveFileNames: false +FileWatcher:: Added:: WatchInfo: /src/project/tsconfig.json 2000 undefined Config file +Synchronizing program +CreatingProgramWith:: + roots: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +File '/src/project/package.json' does not exist. +File '/src/package.json' does not exist. +File '/package.json' does not exist. +FileWatcher:: Added:: WatchInfo: /src/project/fileWithImports.ts 250 undefined Source file +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in CJS mode with conditions 'node', 'require', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.ts' does not exist. +File '/src/project/node_modules/pkg1/require.tsx' does not exist. +File '/src/project/node_modules/pkg1/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.js' does not exist. +File '/src/project/node_modules/pkg1/require.jsx' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Module name 'pkg1' was not resolved. ======== +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +FileWatcher:: Added:: WatchInfo: /src/project/node_modules/pkg0/import.d.ts 250 undefined Source file +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +FileWatcher:: Added:: WatchInfo: /src/project/fileWithTypeRefs.ts 250 undefined Source file +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg3/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +FileWatcher:: Added:: WatchInfo: /src/project/node_modules/pkg2/import.d.ts 250 undefined Source file +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +FileWatcher:: Added:: WatchInfo: /src/project/randomFileForImport.ts 250 undefined Source file +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +FileWatcher:: Added:: WatchInfo: /src/project/randomFileForTypeRef.ts 250 undefined Source file +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist. +File '/src/project/node_modules/package.json' does not exist. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +FileWatcher:: Added:: WatchInfo: /src/project/node_modules/@types/pkg4/index.d.ts 250 undefined Source file +File '/a/lib/package.json' does not exist. +File '/a/package.json' does not exist. +File '/package.json' does not exist according to earlier cached lookups. +FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 250 undefined Source file +DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +DirectoryWatcher:: Added:: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project 0 undefined Failed Lookup Locations +FileWatcher:: Added:: WatchInfo: /src/project/node_modules/pkg0/package.json 2000 undefined File location affecting resolution +FileWatcher:: Added:: WatchInfo: /src/project/node_modules/pkg1/package.json 2000 undefined File location affecting resolution +FileWatcher:: Added:: WatchInfo: /src/project/node_modules/pkg2/package.json 2000 undefined File location affecting resolution +FileWatcher:: Added:: WatchInfo: /src/project/node_modules/pkg3/package.json 2000 undefined File location affecting resolution +FileWatcher:: Added:: WatchInfo: /src/project/node_modules/@types/pkg4/package.json 2000 undefined File location affecting resolution +FileWatcher:: Added:: WatchInfo: /src/project/node_modules/@types/package.json 2000 undefined File location affecting resolution +FileWatcher:: Added:: WatchInfo: /src/project/node_modules/package.json 2000 undefined File location affecting resolution +DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules/@types 1 undefined Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules/@types 1 undefined Type roots +DirectoryWatcher:: Triggered with /src/project/fileWithImports.js :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithImports.js :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/fileWithImports.d.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithImports.d.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.js :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.js :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.d.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.d.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/randomFileForImport.js :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/randomFileForImport.js :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/randomFileForImport.d.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/randomFileForImport.d.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/randomFileForTypeRef.js :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/randomFileForTypeRef.js :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/randomFileForTypeRef.d.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/randomFileForTypeRef.d.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +fileWithImports.ts:2:40 - error TS2307: Cannot find module 'pkg1' or its corresponding type declarations. + +2 import type { RequireInterface1 } from "pkg1" assert { "resolution-mode": "require" }; +   ~~~~~~ + +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +[12:01:24 AM] Found 3 errors. Watching for file changes. + +DirectoryWatcher:: Added:: WatchInfo: /src/project 0 undefined Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project 0 undefined Wild card directory + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg0/import.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx", + "/src/project/node_modules/pkg1/require.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.ts", + "/src/node_modules/pkg1.tsx", + "/src/node_modules/pkg1.d.ts", + "/src/node_modules/pkg1/index.ts", + "/src/node_modules/pkg1/index.tsx", + "/src/node_modules/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.ts", + "/node_modules/pkg1.tsx", + "/node_modules/pkg1.d.ts", + "/node_modules/pkg1/index.ts", + "/node_modules/pkg1/index.tsx", + "/node_modules/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/node_modules/pkg1/require.js", + "/src/project/node_modules/pkg1/require.jsx", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.js", + "/src/node_modules/pkg1.jsx", + "/src/node_modules/pkg1/index.js", + "/src/node_modules/pkg1/index.jsx", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.js", + "/node_modules/pkg1.jsx", + "/node_modules/pkg1/index.js", + "/node_modules/pkg1/index.jsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json", + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/require.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/filewithimports.ts: + {} +/src/project/node_modules/pkg0/import.d.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/node_modules/pkg2/import.d.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","signature":"-3531856636-export {};\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","signature":"-3531856636-export {};\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2],[4]],"referencedMap":[[3,1],[5,2]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,[3,[{"file":"./filewithimports.ts","start":124,"length":6,"messageText":"Cannot find module 'pkg1' or its corresponding type declarations.","category":1,"code":2307}]],[5,[{"file":"./filewithtyperefs.ts","start":162,"length":17,"messageText":"Cannot find name 'RequireInterface3'.","category":1,"code":2304}]],8,2,4,6,7],"latestChangedDtsFile":"./randomFileForTypeRef.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + [ + "./filewithimports.ts", + [ + { + "file": "./filewithimports.ts", + "start": 124, + "length": 6, + "messageText": "Cannot find module 'pkg1' or its corresponding type declarations.", + "category": 1, + "code": 2307 + } + ] + ], + [ + "./filewithtyperefs.ts", + [ + { + "file": "./filewithtyperefs.ts", + "start": 162, + "length": 17, + "messageText": "Cannot find name 'RequireInterface3'.", + "category": 1, + "code": 2304 + } + ] + ], + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg2/import.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForTypeRef.d.ts" + }, + "version": "FakeTSVersion", + "size": 2342 +} + +//// [/src/project/fileWithImports.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + + +//// [/src/project/fileWithImports.d.ts] +export {}; + + +//// [/src/project/fileWithTypeRefs.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/// +/// + + +//// [/src/project/fileWithTypeRefs.d.ts] +export {}; + + +//// [/src/project/randomFileForImport.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.x = 10; + + +//// [/src/project/randomFileForImport.d.ts] +export declare const x = 10; + + +//// [/src/project/randomFileForTypeRef.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.x = 10; + + +//// [/src/project/randomFileForTypeRef.d.ts] +export declare const x = 10; + + + +Change:: modify randomFileForImport by adding import + +Input:: +//// [/src/project/randomFileForImport.ts] +import type { ImportInterface0 } from "pkg0" assert { "resolution-mode": "import" }; +export const x = 10; + + +Output:: +FileWatcher:: Triggered with /src/project/randomFileForImport.ts 1:: WatchInfo: /src/project/randomFileForImport.ts 250 undefined Source file +Scheduling update +Elapsed:: *ms FileWatcher:: Triggered with /src/project/randomFileForImport.ts 1:: WatchInfo: /src/project/randomFileForImport.ts 250 undefined Source file +Synchronizing program +[12:01:30 AM] File change detected. Starting incremental compilation... + +CreatingProgramWith:: + roots: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +File '/a/lib/package.json' does not exist according to earlier cached lookups. +File '/a/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of module 'pkg0' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +Reusing resolution of module 'pkg1' from '/src/project/fileWithImports.ts' of old program, it was not resolved. +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Reusing resolution of type reference directive 'pkg3' from '/src/project/fileWithTypeRefs.ts' of old program, it was not resolved. +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/a/lib/package.json' does not exist according to earlier cached lookups. +File '/a/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +fileWithImports.ts:2:40 - error TS2307: Cannot find module 'pkg1' or its corresponding type declarations. + +2 import type { RequireInterface1 } from "pkg1" assert { "resolution-mode": "require" }; +   ~~~~~~ + +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + Imported via "pkg0" from file 'randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +[12:01:37 AM] Found 3 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: SafeModules +Program files:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg0/import.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project/randomFileForImport.ts + +Shape signatures in builder refreshed for:: +/src/project/randomfileforimport.ts (computed .d.ts) + +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx", + "/src/project/node_modules/pkg1/require.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.ts", + "/src/node_modules/pkg1.tsx", + "/src/node_modules/pkg1.d.ts", + "/src/node_modules/pkg1/index.ts", + "/src/node_modules/pkg1/index.tsx", + "/src/node_modules/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.ts", + "/node_modules/pkg1.tsx", + "/node_modules/pkg1.d.ts", + "/node_modules/pkg1/index.ts", + "/node_modules/pkg1/index.tsx", + "/node_modules/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/node_modules/pkg1/require.js", + "/src/project/node_modules/pkg1/require.jsx", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.js", + "/src/node_modules/pkg1.jsx", + "/src/node_modules/pkg1/index.js", + "/src/node_modules/pkg1/index.jsx", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.js", + "/node_modules/pkg1.jsx", + "/node_modules/pkg1/index.js", + "/node_modules/pkg1/index.jsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json", + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/require.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/filewithimports.ts: + {} +/src/project/node_modules/pkg0/import.d.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/node_modules/pkg2/import.d.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","signature":"-3531856636-export {};\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","signature":"-3531856636-export {};\n","impliedFormat":1},{"version":"-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2],[4]],"referencedMap":[[3,1],[5,2],[6,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,[3,[{"file":"./filewithimports.ts","start":124,"length":6,"messageText":"Cannot find module 'pkg1' or its corresponding type declarations.","category":1,"code":2307}]],[5,[{"file":"./filewithtyperefs.ts","start":162,"length":17,"messageText":"Cannot find name 'RequireInterface3'.","category":1,"code":2304}]],8,2,4,6,7],"latestChangedDtsFile":"./randomFileForTypeRef.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ], + "./randomfileforimport.ts": [ + "./node_modules/pkg0/import.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + [ + "./filewithimports.ts", + [ + { + "file": "./filewithimports.ts", + "start": 124, + "length": 6, + "messageText": "Cannot find module 'pkg1' or its corresponding type declarations.", + "category": 1, + "code": 2307 + } + ] + ], + [ + "./filewithtyperefs.ts", + [ + { + "file": "./filewithtyperefs.ts", + "start": 162, + "length": 17, + "messageText": "Cannot find name 'RequireInterface3'.", + "category": 1, + "code": 2304 + } + ] + ], + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg2/import.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForTypeRef.d.ts" + }, + "version": "FakeTSVersion", + "size": 2439 +} + +//// [/src/project/randomFileForImport.js] file written with same contents + +Change:: modify randomFileForTypeRef by adding typeRef + +Input:: +//// [/src/project/randomFileForTypeRef.ts] +/// +export const x = 10; + + +Output:: +FileWatcher:: Triggered with /src/project/randomFileForTypeRef.ts 1:: WatchInfo: /src/project/randomFileForTypeRef.ts 250 undefined Source file +Scheduling update +Elapsed:: *ms FileWatcher:: Triggered with /src/project/randomFileForTypeRef.ts 1:: WatchInfo: /src/project/randomFileForTypeRef.ts 250 undefined Source file +Synchronizing program +[12:01:43 AM] File change detected. Starting incremental compilation... + +CreatingProgramWith:: + roots: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +File '/a/lib/package.json' does not exist according to earlier cached lookups. +File '/a/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of module 'pkg0' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +Reusing resolution of module 'pkg1' from '/src/project/fileWithImports.ts' of old program, it was not resolved. +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Reusing resolution of type reference directive 'pkg3' from '/src/project/fileWithTypeRefs.ts' of old program, it was not resolved. +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/a/lib/package.json' does not exist according to earlier cached lookups. +File '/a/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +fileWithImports.ts:2:40 - error TS2307: Cannot find module 'pkg1' or its corresponding type declarations. + +2 import type { RequireInterface1 } from "pkg1" assert { "resolution-mode": "require" }; +   ~~~~~~ + +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + Imported via "pkg0" from file 'randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +[12:01:50 AM] Found 3 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: SafeModules +Program files:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg0/import.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project/randomFileForTypeRef.ts + +Shape signatures in builder refreshed for:: +/src/project/randomfilefortyperef.ts (computed .d.ts) + +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx", + "/src/project/node_modules/pkg1/require.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.ts", + "/src/node_modules/pkg1.tsx", + "/src/node_modules/pkg1.d.ts", + "/src/node_modules/pkg1/index.ts", + "/src/node_modules/pkg1/index.tsx", + "/src/node_modules/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.ts", + "/node_modules/pkg1.tsx", + "/node_modules/pkg1.d.ts", + "/node_modules/pkg1/index.ts", + "/node_modules/pkg1/index.tsx", + "/node_modules/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/node_modules/pkg1/require.js", + "/src/project/node_modules/pkg1/require.jsx", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.js", + "/src/node_modules/pkg1.jsx", + "/src/node_modules/pkg1/index.js", + "/src/node_modules/pkg1/index.jsx", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.js", + "/node_modules/pkg1.jsx", + "/node_modules/pkg1/index.js", + "/node_modules/pkg1/index.jsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json", + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/require.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/filewithimports.ts: + {} +/src/project/node_modules/pkg0/import.d.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/node_modules/pkg2/import.d.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","signature":"-3531856636-export {};\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","signature":"-3531856636-export {};\n","impliedFormat":1},{"version":"-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-8191038086-/// \nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2],[4]],"referencedMap":[[3,1],[5,2],[6,1],[7,2]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,[3,[{"file":"./filewithimports.ts","start":124,"length":6,"messageText":"Cannot find module 'pkg1' or its corresponding type declarations.","category":1,"code":2307}]],[5,[{"file":"./filewithtyperefs.ts","start":162,"length":17,"messageText":"Cannot find name 'RequireInterface3'.","category":1,"code":2304}]],8,2,4,6,7],"latestChangedDtsFile":"./randomFileForTypeRef.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ], + "./randomfileforimport.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./randomfilefortyperef.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + [ + "./filewithimports.ts", + [ + { + "file": "./filewithimports.ts", + "start": 124, + "length": 6, + "messageText": "Cannot find module 'pkg1' or its corresponding type declarations.", + "category": 1, + "code": 2307 + } + ] + ], + [ + "./filewithtyperefs.ts", + [ + { + "file": "./filewithtyperefs.ts", + "start": 162, + "length": 17, + "messageText": "Cannot find name 'RequireInterface3'.", + "category": 1, + "code": 2304 + } + ] + ], + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg2/import.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForTypeRef.d.ts" + }, + "version": "FakeTSVersion", + "size": 2504 +} + +//// [/src/project/randomFileForTypeRef.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +/// +exports.x = 10; + + + +Change:: write file not resolved by import + +Input:: +//// [/src/project/node_modules/pkg1/require.d.ts] +export interface RequireInterface1 {} + + +Output:: +DirectoryWatcher:: Triggered with /src/project/node_modules/pkg1/require.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +Scheduling invalidateFailedLookup +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg1/require.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +Scheduling update +Synchronizing program +[12:01:57 AM] File change detected. Starting incremental compilation... + +CreatingProgramWith:: + roots: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +File '/a/lib/package.json' does not exist according to earlier cached lookups. +File '/a/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of module 'pkg0' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in CJS mode with conditions 'node', 'require', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.ts' does not exist. +File '/src/project/node_modules/pkg1/require.tsx' does not exist. +File '/src/project/node_modules/pkg1/require.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg1/require.d.ts', result '/src/project/node_modules/pkg1/require.d.ts'. +======== Module name 'pkg1' was successfully resolved to '/src/project/node_modules/pkg1/require.d.ts' with Package ID 'pkg1/require.d.ts@0.0.1'. ======== +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +FileWatcher:: Added:: WatchInfo: /src/project/node_modules/pkg1/require.d.ts 250 undefined Source file +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Reusing resolution of type reference directive 'pkg3' from '/src/project/fileWithTypeRefs.ts' of old program, it was not resolved. +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/a/lib/package.json' does not exist according to earlier cached lookups. +File '/a/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + Imported via "pkg0" from file 'randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" +node_modules/pkg1/require.d.ts + Imported via "pkg1" from file 'fileWithImports.ts' with packageId 'pkg1/require.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg1/package.json' does not have field "type" +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +[12:02:04 AM] Found 2 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: SafeModules +Program files:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg0/import.d.ts +/src/project/node_modules/pkg1/require.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project/node_modules/pkg1/require.d.ts +/src/project/fileWithImports.ts + +Shape signatures in builder refreshed for:: +/src/project/node_modules/pkg1/require.d.ts (used version) +/src/project/filewithimports.ts (computed .d.ts) + +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/node_modules/pkg1/require.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg1", + "contents": { + "packageJsonContent": { + "name": "pkg1", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg1/require.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg1", + "subModuleName": "require.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/require.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/filewithimports.ts: + {} +/src/project/node_modules/pkg0/import.d.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/node_modules/pkg2/import.d.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} +/src/project/node_modules/pkg1/require.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./node_modules/pkg1/require.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"-3547817137-export interface RequireInterface1 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","signature":"-3531856636-export {};\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","signature":"-3531856636-export {};\n","impliedFormat":1},{"version":"-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-8191038086-/// \nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2,3],[5],[2]],"referencedMap":[[4,1],[6,2],[7,3],[8,2]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,4,[6,[{"file":"./filewithtyperefs.ts","start":162,"length":17,"messageText":"Cannot find name 'RequireInterface3'.","category":1,"code":2304}]],9,2,3,5,7,8],"latestChangedDtsFile":"./randomFileForTypeRef.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ], + [ + "./node_modules/pkg0/import.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg1/require.d.ts": { + "original": { + "version": "-3547817137-export interface RequireInterface1 {}", + "impliedFormat": 1 + }, + "version": "-3547817137-export interface RequireInterface1 {}", + "signature": "-3547817137-export interface RequireInterface1 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ], + "./randomfileforimport.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./randomfilefortyperef.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + "./filewithimports.ts", + [ + "./filewithtyperefs.ts", + [ + { + "file": "./filewithtyperefs.ts", + "start": 162, + "length": 17, + "messageText": "Cannot find name 'RequireInterface3'.", + "category": 1, + "code": 2304 + } + ] + ], + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts", + "./node_modules/pkg2/import.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForTypeRef.d.ts" + }, + "version": "FakeTSVersion", + "size": 2463 +} + +//// [/src/project/fileWithImports.js] file written with same contents + +Change:: write file not resolved by typeRef + +Input:: +//// [/src/project/node_modules/pkg3/require.d.ts] +export {}; +declare global { + interface RequireInterface3 {} +} + + + +Output:: +DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3/require.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +Scheduling invalidateFailedLookup +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3/require.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +Scheduling update +Synchronizing program +[12:02:10 AM] File change detected. Starting incremental compilation... + +CreatingProgramWith:: + roots: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +File '/a/lib/package.json' does not exist according to earlier cached lookups. +File '/a/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of module 'pkg0' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +Reusing resolution of module 'pkg1' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg1/require.d.ts' with Package ID 'pkg1/require.d.ts@0.0.1'. +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg3/require.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg3/require.d.ts', result '/src/project/node_modules/pkg3/require.d.ts'. +======== Type reference directive 'pkg3' was successfully resolved to '/src/project/node_modules/pkg3/require.d.ts' with Package ID 'pkg3/require.d.ts@0.0.1', primary: false. ======== +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/node_modules/pkg3/package.json' exists according to earlier cached lookups. +FileWatcher:: Added:: WatchInfo: /src/project/node_modules/pkg3/require.d.ts 250 undefined Source file +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/a/lib/package.json' does not exist according to earlier cached lookups. +File '/a/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +../../a/lib/lib.d.ts + Default library for target 'es5' +node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + Imported via "pkg0" from file 'randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" +node_modules/pkg1/require.d.ts + Imported via "pkg1" from file 'fileWithImports.ts' with packageId 'pkg1/require.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg1/package.json' does not have field "type" +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" +node_modules/pkg3/require.d.ts + Type library referenced via 'pkg3' from file 'fileWithTypeRefs.ts' with packageId 'pkg3/require.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg3/package.json' does not have field "type" +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +[12:02:26 AM] Found 0 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: SafeModules +Program files:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg0/import.d.ts +/src/project/node_modules/pkg1/require.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/node_modules/pkg3/require.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg0/import.d.ts +/src/project/node_modules/pkg1/require.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/node_modules/pkg3/require.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Shape signatures in builder refreshed for:: +/src/project/node_modules/pkg3/require.d.ts (used version) +/src/project/node_modules/pkg0/import.d.ts (used version) +/src/project/node_modules/pkg1/require.d.ts (used version) +/src/project/filewithimports.ts (computed .d.ts) +/src/project/node_modules/pkg2/import.d.ts (used version) +/src/project/filewithtyperefs.ts (computed .d.ts) +/src/project/randomfileforimport.ts (computed .d.ts) +/src/project/randomfilefortyperef.ts (computed .d.ts) +/src/project/node_modules/@types/pkg4/index.d.ts (used version) + +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/node_modules/pkg1/require.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg1", + "contents": { + "packageJsonContent": { + "name": "pkg1", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg1/require.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg1", + "subModuleName": "require.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/node_modules/pkg3/require.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg3", + "contents": { + "packageJsonContent": { + "name": "pkg3", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg3/require.d.ts", + "packageId": { + "name": "pkg3", + "subModuleName": "require.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/filewithimports.ts: + {} +/src/project/node_modules/pkg0/import.d.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/node_modules/pkg2/import.d.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} +/src/project/node_modules/pkg1/require.d.ts: + {} +/src/project/node_modules/pkg3/require.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./node_modules/pkg1/require.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./node_modules/pkg3/require.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"-3547817137-export interface RequireInterface1 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","signature":"-3531856636-export {};\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","signature":"-3531856636-export {};\n","impliedFormat":1},{"version":"-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-8191038086-/// \nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2,3],[5,6],[2],[5]],"referencedMap":[[4,1],[7,2],[8,3],[9,4]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,4,7,10,2,3,5,6,8,9],"latestChangedDtsFile":"./randomFileForTypeRef.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts" + ], + [ + "./node_modules/pkg0/import.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg1/require.d.ts": { + "original": { + "version": "-3547817137-export interface RequireInterface1 {}", + "impliedFormat": 1 + }, + "version": "-3547817137-export interface RequireInterface1 {}", + "signature": "-3547817137-export interface RequireInterface1 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg3/require.d.ts": { + "original": { + "version": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "signature": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts" + ], + "./randomfileforimport.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./randomfilefortyperef.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + "./filewithimports.ts", + "./filewithtyperefs.ts", + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts", + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForTypeRef.d.ts" + }, + "version": "FakeTSVersion", + "size": 2507 +} + +//// [/src/project/fileWithImports.js] file written with same contents +//// [/src/project/fileWithTypeRefs.js] file written with same contents +//// [/src/project/randomFileForImport.js] file written with same contents +//// [/src/project/randomFileForTypeRef.js] file written with same contents + +Change:: delete file with imports + +Input:: +//// [/src/project/fileWithImports.ts] deleted + +Output:: +FileWatcher:: Triggered with /src/project/fileWithImports.ts 2:: WatchInfo: /src/project/fileWithImports.ts 250 undefined Source file +Scheduling update +Elapsed:: *ms FileWatcher:: Triggered with /src/project/fileWithImports.ts 2:: WatchInfo: /src/project/fileWithImports.ts 250 undefined Source file +DirectoryWatcher:: Triggered with /src/project/fileWithImports.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Scheduling invalidateFailedLookup +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithImports.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/fileWithImports.ts :: WatchInfo: /src/project 0 undefined Wild card directory +Scheduling update +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithImports.ts :: WatchInfo: /src/project 0 undefined Wild card directory +Reloading new file names and options +Synchronizing program +[12:02:31 AM] File change detected. Starting incremental compilation... + +CreatingProgramWith:: + roots: ["/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Reusing resolution of type reference directive 'pkg3' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg3/require.d.ts' with Package ID 'pkg3/require.d.ts@0.0.1'. +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/node_modules/pkg3/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/a/lib/package.json' does not exist according to earlier cached lookups. +File '/a/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +FileWatcher:: Close:: WatchInfo: /src/project/node_modules/pkg1/require.d.ts 250 undefined Source file +FileWatcher:: Close:: WatchInfo: /src/project/fileWithImports.ts 250 undefined Source file +FileWatcher:: Close:: WatchInfo: /src/project/node_modules/pkg1/package.json 2000 undefined File location affecting resolution +../../a/lib/lib.d.ts + Default library for target 'es5' +node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" +node_modules/pkg3/require.d.ts + Type library referenced via 'pkg3' from file 'fileWithTypeRefs.ts' with packageId 'pkg3/require.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg3/package.json' does not have field "type" +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +[12:02:35 AM] Found 0 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/node_modules/pkg3/require.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/node_modules/pkg0/import.d.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/node_modules/pkg3/require.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg3", + "contents": { + "packageJsonContent": { + "name": "pkg3", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg3/require.d.ts", + "packageId": { + "name": "pkg3", + "subModuleName": "require.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/node_modules/pkg0/import.d.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/node_modules/pkg2/import.d.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} +/src/project/node_modules/pkg3/require.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./node_modules/pkg2/import.d.ts","./node_modules/pkg3/require.d.ts","./filewithtyperefs.ts","./node_modules/pkg0/import.d.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","signature":"-3531856636-export {};\n","impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-8191038086-/// \nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2,3],[5],[2]],"referencedMap":[[4,1],[6,2],[7,3]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,4,8,5,2,3,6,7],"latestChangedDtsFile":"./randomFileForTypeRef.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts", + "./filewithtyperefs.ts", + "./node_modules/pkg0/import.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts" + ], + [ + "./node_modules/pkg0/import.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg3/require.d.ts": { + "original": { + "version": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "signature": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts" + ], + "./randomfileforimport.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./randomfilefortyperef.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + "./filewithtyperefs.ts", + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForTypeRef.d.ts" + }, + "version": "FakeTSVersion", + "size": 2081 +} + + +Change:: delete file with typeRefs + +Input:: +//// [/src/project/fileWithTypeRefs.ts] deleted + +Output:: +FileWatcher:: Triggered with /src/project/fileWithTypeRefs.ts 2:: WatchInfo: /src/project/fileWithTypeRefs.ts 250 undefined Source file +Scheduling update +Elapsed:: *ms FileWatcher:: Triggered with /src/project/fileWithTypeRefs.ts 2:: WatchInfo: /src/project/fileWithTypeRefs.ts 250 undefined Source file +DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Scheduling invalidateFailedLookup +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.ts :: WatchInfo: /src/project 0 undefined Wild card directory +Scheduling update +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.ts :: WatchInfo: /src/project 0 undefined Wild card directory +Reloading new file names and options +Synchronizing program +[12:02:41 AM] File change detected. Starting incremental compilation... + +CreatingProgramWith:: + roots: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/a/lib/package.json' does not exist according to earlier cached lookups. +File '/a/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +FileWatcher:: Close:: WatchInfo: /src/project/node_modules/pkg3/require.d.ts 250 undefined Source file +FileWatcher:: Close:: WatchInfo: /src/project/fileWithTypeRefs.ts 250 undefined Source file +FileWatcher:: Close:: WatchInfo: /src/project/node_modules/pkg3/package.json 2000 undefined File location affecting resolution +../../a/lib/lib.d.ts + Default library for target 'es5' +node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'randomFileForTypeRef.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +[12:02:51 AM] Found 0 errors. Watching for file changes. + + + +Program root files: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg0/import.d.ts +/src/project/randomFileForImport.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project/node_modules/pkg0/import.d.ts +/src/project/randomFileForImport.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Shape signatures in builder refreshed for:: +/src/project/node_modules/pkg0/import.d.ts (used version) +/src/project/randomfileforimport.ts (computed .d.ts) +/src/project/node_modules/pkg2/import.d.ts (used version) +/src/project/randomfilefortyperef.ts (computed .d.ts) +/src/project/node_modules/@types/pkg4/index.d.ts (used version) + +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/node_modules/pkg0/import.d.ts: + {} +/src/project/node_modules/pkg2/import.d.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./randomfileforimport.ts","./node_modules/pkg2/import.d.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-8191038086-/// \nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2],[4]],"referencedMap":[[3,1],[5,2]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,6,2,4,3,5],"latestChangedDtsFile":"./randomFileForTypeRef.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./randomfileforimport.ts", + "./node_modules/pkg2/import.d.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./randomfileforimport.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./randomfilefortyperef.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg2/import.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForTypeRef.d.ts" + }, + "version": "FakeTSVersion", + "size": 1576 +} + +//// [/src/project/randomFileForImport.js] file written with same contents +//// [/src/project/randomFileForTypeRef.js] file written with same contents + +Change:: delete resolved import file + +Input:: +//// [/src/project/node_modules/pkg0/import.d.ts] deleted + +Output:: +FileWatcher:: Triggered with /src/project/node_modules/pkg0/import.d.ts 2:: WatchInfo: /src/project/node_modules/pkg0/import.d.ts 250 undefined Source file +Scheduling update +Elapsed:: *ms FileWatcher:: Triggered with /src/project/node_modules/pkg0/import.d.ts 2:: WatchInfo: /src/project/node_modules/pkg0/import.d.ts 250 undefined Source file +DirectoryWatcher:: Triggered with /src/project/node_modules/pkg0/import.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +Scheduling invalidateFailedLookup +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg0/import.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +Synchronizing program +[12:02:56 AM] File change detected. Starting incremental compilation... + +CreatingProgramWith:: + roots: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +File '/a/lib/package.json' does not exist according to earlier cached lookups. +File '/a/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +FileWatcher:: Close:: WatchInfo: /src/project/node_modules/pkg0/import.d.ts 250 undefined Source file +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' does not exist. +Saw non-matching condition 'require'. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.js' does not exist. +File '/src/project/node_modules/pkg0/import.jsx' does not exist. +Saw non-matching condition 'require'. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Module name 'pkg0' was not resolved. ======== +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/a/lib/package.json' does not exist according to earlier cached lookups. +File '/a/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +randomFileForImport.ts:1:39 - error TS2307: Cannot find module 'pkg0' or its corresponding type declarations. + +1 import type { ImportInterface0 } from "pkg0" assert { "resolution-mode": "import" }; +   ~~~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'randomFileForTypeRef.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +[12:03:03 AM] Found 1 error. Watching for file changes. + + + +Program root files: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/randomFileForImport.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project/randomFileForImport.ts + +Shape signatures in builder refreshed for:: +/src/project/randomfileforimport.ts (computed .d.ts) + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx", + "/src/project/node_modules/pkg0/import.d.ts", + "/src/project/node_modules/@types/pkg0/package.json", + "/src/node_modules/pkg0/package.json", + "/src/node_modules/@types/pkg0/package.json", + "/node_modules/pkg0/package.json", + "/node_modules/@types/pkg0/package.json", + "/src/project/node_modules/pkg0/import.js", + "/src/project/node_modules/pkg0/import.jsx", + "/src/node_modules/pkg0/package.json", + "/node_modules/pkg0/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json", + "/src/project/node_modules/pkg0/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/node_modules/pkg2/import.d.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./randomfileforimport.ts","./node_modules/pkg2/import.d.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-8191038086-/// \nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[3]],"referencedMap":[[4,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,5,3,[2,[{"file":"./randomfileforimport.ts","start":38,"length":6,"messageText":"Cannot find module 'pkg0' or its corresponding type declarations.","category":1,"code":2307}]],4],"latestChangedDtsFile":"./randomFileForTypeRef.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./randomfileforimport.ts", + "./node_modules/pkg2/import.d.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./randomfilefortyperef.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg2/import.d.ts", + [ + "./randomfileforimport.ts", + [ + { + "file": "./randomfileforimport.ts", + "start": 38, + "length": 6, + "messageText": "Cannot find module 'pkg0' or its corresponding type declarations.", + "category": 1, + "code": 2307 + } + ] + ], + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForTypeRef.d.ts" + }, + "version": "FakeTSVersion", + "size": 1620 +} + +//// [/src/project/randomFileForImport.js] file written with same contents + +Change:: delete resolved typeRef file + +Input:: +//// [/src/project/node_modules/pkg2/import.d.ts] deleted + +Output:: +FileWatcher:: Triggered with /src/project/node_modules/pkg2/import.d.ts 2:: WatchInfo: /src/project/node_modules/pkg2/import.d.ts 250 undefined Source file +Scheduling update +Elapsed:: *ms FileWatcher:: Triggered with /src/project/node_modules/pkg2/import.d.ts 2:: WatchInfo: /src/project/node_modules/pkg2/import.d.ts 250 undefined Source file +DirectoryWatcher:: Triggered with /src/project/node_modules/pkg2/import.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +Scheduling invalidateFailedLookup +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg2/import.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +Synchronizing program +[12:03:08 AM] File change detected. Starting incremental compilation... + +CreatingProgramWith:: + roots: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +File '/a/lib/package.json' does not exist according to earlier cached lookups. +File '/a/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +FileWatcher:: Close:: WatchInfo: /src/project/node_modules/pkg2/import.d.ts 250 undefined Source file +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was not resolved. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' does not exist. +Saw non-matching condition 'require'. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg2' was not resolved. ======== +Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/a/lib/package.json' does not exist according to earlier cached lookups. +File '/a/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +randomFileForImport.ts:1:39 - error TS2307: Cannot find module 'pkg0' or its corresponding type declarations. + +1 import type { ImportInterface0 } from "pkg0" assert { "resolution-mode": "import" }; +   ~~~~~~ + +randomFileForTypeRef.ts:1:23 - error TS2688: Cannot find type definition file for 'pkg2'. + +1 /// +   ~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +[12:03:18 AM] Found 2 errors. Watching for file changes. + + + +Program root files: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Shape signatures in builder refreshed for:: +/src/project/randomfilefortyperef.ts (computed .d.ts) +/src/project/randomfileforimport.ts (computed .d.ts) +/src/project/node_modules/@types/pkg4/index.d.ts (used version) + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx", + "/src/project/node_modules/pkg0/import.d.ts", + "/src/project/node_modules/@types/pkg0/package.json", + "/src/node_modules/pkg0/package.json", + "/src/node_modules/@types/pkg0/package.json", + "/node_modules/pkg0/package.json", + "/node_modules/@types/pkg0/package.json", + "/src/project/node_modules/pkg0/import.js", + "/src/project/node_modules/pkg0/import.jsx", + "/src/node_modules/pkg0/package.json", + "/node_modules/pkg0/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json", + "/src/project/node_modules/pkg0/package.json" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/pkg2/import.d.ts", + "/src/project/node_modules/@types/pkg2/package.json", + "/src/node_modules/pkg2/package.json", + "/src/node_modules/@types/pkg2/package.json", + "/node_modules/pkg2/package.json", + "/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-8191038086-/// \nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,4,[2,[{"file":"./randomfileforimport.ts","start":38,"length":6,"messageText":"Cannot find module 'pkg0' or its corresponding type declarations.","category":1,"code":2307}]],3],"latestChangedDtsFile":"./randomFileForTypeRef.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + "./node_modules/@types/pkg4/index.d.ts", + [ + "./randomfileforimport.ts", + [ + { + "file": "./randomfileforimport.ts", + "start": 38, + "length": 6, + "messageText": "Cannot find module 'pkg0' or its corresponding type declarations.", + "category": 1, + "code": 2307 + } + ] + ], + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForTypeRef.d.ts" + }, + "version": "FakeTSVersion", + "size": 1421 +} + +//// [/src/project/randomFileForImport.js] file written with same contents +//// [/src/project/randomFileForTypeRef.js] file written with same contents diff --git a/tests/baselines/reference/tscWatch/cacheResolutions/multi-file.js b/tests/baselines/reference/tscWatch/cacheResolutions/multi-file.js new file mode 100644 index 00000000000..4937a7a919d --- /dev/null +++ b/tests/baselines/reference/tscWatch/cacheResolutions/multi-file.js @@ -0,0 +1,4349 @@ +Input:: +//// [/src/project/tsconfig.json] +{"compilerOptions":{"moduleResolution":"node16","composite":true,"cacheResolutions":true,"traceResolution":true},"include":["*.ts"],"exclude":["*.d.ts"]} + +//// [/src/project/fileWithImports.ts] +import type { ImportInterface0 } from "pkg0" assert { "resolution-mode": "import" }; +import type { RequireInterface1 } from "pkg1" assert { "resolution-mode": "require" }; + + +//// [/src/project/randomFileForImport.ts] +export const x = 10; + +//// [/src/project/node_modules/pkg0/package.json] +{"name":"pkg0","version":"0.0.1","exports":{"import":"./import.js","require":"./require.js"}} + +//// [/src/project/node_modules/pkg0/import.d.ts] +export interface ImportInterface0 {} + +//// [/src/project/node_modules/pkg0/require.d.ts] +export interface RequireInterface0 {} + +//// [/src/project/node_modules/pkg1/package.json] +{"name":"pkg1","version":"0.0.1","exports":{"import":"./import.js","require":"./require.js"}} + +//// [/src/project/node_modules/pkg1/import.d.ts] +export interface ImportInterface1 {} + +//// [/src/project/fileWithTypeRefs.ts] +/// +/// +interface LocalInterface extends ImportInterface2, RequireInterface3 {} +export {} + + +//// [/src/project/randomFileForTypeRef.ts] +export const x = 10; + +//// [/src/project/node_modules/pkg2/package.json] +{"name":"pkg2","version":"0.0.1","exports":{"import":"./import.js","require":"./require.js"}} + +//// [/src/project/node_modules/pkg2/import.d.ts] +export {}; +declare global { + interface ImportInterface2 {} +} + + +//// [/src/project/node_modules/pkg2/require.d.ts] +export {}; +declare global { + interface RequireInterface2 {} +} + + +//// [/src/project/node_modules/pkg3/package.json] +{"name":"pkg3","version":"0.0.1","exports":{"import":"./import.js","require":"./require.js"}} + +//// [/src/project/node_modules/pkg3/import.d.ts] +export {}; +declare global { + interface ImportInterface3 {} +} + + +//// [/src/project/node_modules/@types/pkg4/index.d.ts] +export const x = 10; + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + + +/a/lib/tsc.js -w --explainFiles --extendedDiagnostics +Output:: +[12:00:59 AM] Starting compilation in watch mode... + +Current directory: /src/project CaseSensitiveFileNames: false +FileWatcher:: Added:: WatchInfo: /src/project/tsconfig.json 2000 undefined Config file +Synchronizing program +CreatingProgramWith:: + roots: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +File '/src/project/package.json' does not exist. +File '/src/package.json' does not exist. +File '/package.json' does not exist. +FileWatcher:: Added:: WatchInfo: /src/project/fileWithImports.ts 250 undefined Source file +======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in CJS mode with conditions 'node', 'require', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.ts' does not exist. +File '/src/project/node_modules/pkg1/require.tsx' does not exist. +File '/src/project/node_modules/pkg1/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.js' does not exist. +File '/src/project/node_modules/pkg1/require.jsx' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Module name 'pkg1' was not resolved. ======== +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +FileWatcher:: Added:: WatchInfo: /src/project/node_modules/pkg0/import.d.ts 250 undefined Source file +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +FileWatcher:: Added:: WatchInfo: /src/project/fileWithTypeRefs.ts 250 undefined Source file +======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg3/require.d.ts' does not exist. +File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg3' was not resolved. ======== +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +FileWatcher:: Added:: WatchInfo: /src/project/node_modules/pkg2/import.d.ts 250 undefined Source file +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +FileWatcher:: Added:: WatchInfo: /src/project/randomFileForImport.ts 250 undefined Source file +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +FileWatcher:: Added:: WatchInfo: /src/project/randomFileForTypeRef.ts 250 undefined Source file +======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist. +File '/src/project/node_modules/package.json' does not exist. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +FileWatcher:: Added:: WatchInfo: /src/project/node_modules/@types/pkg4/index.d.ts 250 undefined Source file +File '/a/lib/package.json' does not exist. +File '/a/package.json' does not exist. +File '/package.json' does not exist according to earlier cached lookups. +FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 250 undefined Source file +DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +DirectoryWatcher:: Added:: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project 0 undefined Failed Lookup Locations +FileWatcher:: Added:: WatchInfo: /src/project/node_modules/pkg0/package.json 2000 undefined File location affecting resolution +FileWatcher:: Added:: WatchInfo: /src/project/node_modules/pkg1/package.json 2000 undefined File location affecting resolution +FileWatcher:: Added:: WatchInfo: /src/project/node_modules/pkg2/package.json 2000 undefined File location affecting resolution +FileWatcher:: Added:: WatchInfo: /src/project/node_modules/pkg3/package.json 2000 undefined File location affecting resolution +FileWatcher:: Added:: WatchInfo: /src/project/node_modules/@types/pkg4/package.json 2000 undefined File location affecting resolution +FileWatcher:: Added:: WatchInfo: /src/project/node_modules/@types/package.json 2000 undefined File location affecting resolution +FileWatcher:: Added:: WatchInfo: /src/project/node_modules/package.json 2000 undefined File location affecting resolution +DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules/@types 1 undefined Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules/@types 1 undefined Type roots +DirectoryWatcher:: Triggered with /src/project/fileWithImports.js :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithImports.js :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/fileWithImports.d.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithImports.d.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.js :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.js :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.d.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.d.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/randomFileForImport.js :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/randomFileForImport.js :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/randomFileForImport.d.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/randomFileForImport.d.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/randomFileForTypeRef.js :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/randomFileForTypeRef.js :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/randomFileForTypeRef.d.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/randomFileForTypeRef.d.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/tsconfig.tsbuildinfo :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/tsconfig.tsbuildinfo :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +fileWithImports.ts:2:40 - error TS2307: Cannot find module 'pkg1' or its corresponding type declarations. + +2 import type { RequireInterface1 } from "pkg1" assert { "resolution-mode": "require" }; +   ~~~~~~ + +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +[12:01:18 AM] Found 3 errors. Watching for file changes. + +DirectoryWatcher:: Triggered with /src/project/tsconfig.tsbuildinfo.readable.baseline.txt :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/tsconfig.tsbuildinfo.readable.baseline.txt :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Added:: WatchInfo: /src/project 0 undefined Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project 0 undefined Wild card directory + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg0/import.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg0/import.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) +/src/project/node_modules/pkg0/import.d.ts (used version) +/src/project/filewithimports.ts (computed .d.ts during emit) +/src/project/node_modules/pkg2/import.d.ts (used version) +/src/project/filewithtyperefs.ts (computed .d.ts during emit) +/src/project/randomfileforimport.ts (computed .d.ts during emit) +/src/project/randomfilefortyperef.ts (computed .d.ts during emit) +/src/project/node_modules/@types/pkg4/index.d.ts (used version) + +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx", + "/src/project/node_modules/pkg1/require.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.ts", + "/src/node_modules/pkg1.tsx", + "/src/node_modules/pkg1.d.ts", + "/src/node_modules/pkg1/index.ts", + "/src/node_modules/pkg1/index.tsx", + "/src/node_modules/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.ts", + "/node_modules/pkg1.tsx", + "/node_modules/pkg1.d.ts", + "/node_modules/pkg1/index.ts", + "/node_modules/pkg1/index.tsx", + "/node_modules/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/node_modules/pkg1/require.js", + "/src/project/node_modules/pkg1/require.jsx", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.js", + "/src/node_modules/pkg1.jsx", + "/src/node_modules/pkg1/index.js", + "/src/node_modules/pkg1/index.jsx", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.js", + "/node_modules/pkg1.jsx", + "/node_modules/pkg1/index.js", + "/node_modules/pkg1/index.jsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json", + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/require.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/filewithimports.ts: + {} +/src/project/node_modules/pkg0/import.d.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/node_modules/pkg2/import.d.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/fileWithImports.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + + +//// [/src/project/fileWithImports.d.ts] +export {}; + + +//// [/src/project/fileWithTypeRefs.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/// +/// + + +//// [/src/project/fileWithTypeRefs.d.ts] +export {}; + + +//// [/src/project/randomFileForImport.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.x = 10; + + +//// [/src/project/randomFileForImport.d.ts] +export declare const x = 10; + + +//// [/src/project/randomFileForTypeRef.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.x = 10; + + +//// [/src/project/randomFileForTypeRef.d.ts] +export declare const x = 10; + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","signature":"-3531856636-export {};\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","signature":"-3531856636-export {};\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2],[4]],"referencedMap":[[3,1],[5,2]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,[3,[{"file":"./filewithimports.ts","start":124,"length":6,"messageText":"Cannot find module 'pkg1' or its corresponding type declarations.","category":1,"code":2307}]],[5,[{"file":"./filewithtyperefs.ts","start":162,"length":17,"messageText":"Cannot find name 'RequireInterface3'.","category":1,"code":2304}]],8,2,4,6,7],"latestChangedDtsFile":"./randomFileForTypeRef.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + [ + "./filewithimports.ts", + [ + { + "file": "./filewithimports.ts", + "start": 124, + "length": 6, + "messageText": "Cannot find module 'pkg1' or its corresponding type declarations.", + "category": 1, + "code": 2307 + } + ] + ], + [ + "./filewithtyperefs.ts", + [ + { + "file": "./filewithtyperefs.ts", + "start": 162, + "length": 17, + "messageText": "Cannot find name 'RequireInterface3'.", + "category": 1, + "code": 2304 + } + ] + ], + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg2/import.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForTypeRef.d.ts" + }, + "version": "FakeTSVersion", + "size": 2342 +} + + +Change:: modify randomFileForImport by adding import + +Input:: +//// [/src/project/randomFileForImport.ts] +import type { ImportInterface0 } from "pkg0" assert { "resolution-mode": "import" }; +export const x = 10; + + +Output:: +FileWatcher:: Triggered with /src/project/randomFileForImport.ts 1:: WatchInfo: /src/project/randomFileForImport.ts 250 undefined Source file +Scheduling update +Elapsed:: *ms FileWatcher:: Triggered with /src/project/randomFileForImport.ts 1:: WatchInfo: /src/project/randomFileForImport.ts 250 undefined Source file +Synchronizing program +[12:01:23 AM] File change detected. Starting incremental compilation... + +CreatingProgramWith:: + roots: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +File '/a/lib/package.json' does not exist according to earlier cached lookups. +File '/a/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of module 'pkg0' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +Reusing resolution of module 'pkg1' from '/src/project/fileWithImports.ts' of old program, it was not resolved. +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Reusing resolution of type reference directive 'pkg3' from '/src/project/fileWithTypeRefs.ts' of old program, it was not resolved. +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/a/lib/package.json' does not exist according to earlier cached lookups. +File '/a/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +fileWithImports.ts:2:40 - error TS2307: Cannot find module 'pkg1' or its corresponding type declarations. + +2 import type { RequireInterface1 } from "pkg1" assert { "resolution-mode": "require" }; +   ~~~~~~ + +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + Imported via "pkg0" from file 'randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +[12:01:30 AM] Found 3 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: SafeModules +Program files:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg0/import.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project/randomFileForImport.ts + +Shape signatures in builder refreshed for:: +/src/project/randomfileforimport.ts (computed .d.ts) + +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx", + "/src/project/node_modules/pkg1/require.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.ts", + "/src/node_modules/pkg1.tsx", + "/src/node_modules/pkg1.d.ts", + "/src/node_modules/pkg1/index.ts", + "/src/node_modules/pkg1/index.tsx", + "/src/node_modules/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.ts", + "/node_modules/pkg1.tsx", + "/node_modules/pkg1.d.ts", + "/node_modules/pkg1/index.ts", + "/node_modules/pkg1/index.tsx", + "/node_modules/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/node_modules/pkg1/require.js", + "/src/project/node_modules/pkg1/require.jsx", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.js", + "/src/node_modules/pkg1.jsx", + "/src/node_modules/pkg1/index.js", + "/src/node_modules/pkg1/index.jsx", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.js", + "/node_modules/pkg1.jsx", + "/node_modules/pkg1/index.js", + "/node_modules/pkg1/index.jsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json", + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/require.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/filewithimports.ts: + {} +/src/project/node_modules/pkg0/import.d.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/node_modules/pkg2/import.d.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/randomFileForImport.js] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","signature":"-3531856636-export {};\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","signature":"-3531856636-export {};\n","impliedFormat":1},{"version":"-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2],[4]],"referencedMap":[[3,1],[5,2],[6,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,[3,[{"file":"./filewithimports.ts","start":124,"length":6,"messageText":"Cannot find module 'pkg1' or its corresponding type declarations.","category":1,"code":2307}]],[5,[{"file":"./filewithtyperefs.ts","start":162,"length":17,"messageText":"Cannot find name 'RequireInterface3'.","category":1,"code":2304}]],8,2,4,6,7],"latestChangedDtsFile":"./randomFileForTypeRef.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ], + "./randomfileforimport.ts": [ + "./node_modules/pkg0/import.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + [ + "./filewithimports.ts", + [ + { + "file": "./filewithimports.ts", + "start": 124, + "length": 6, + "messageText": "Cannot find module 'pkg1' or its corresponding type declarations.", + "category": 1, + "code": 2307 + } + ] + ], + [ + "./filewithtyperefs.ts", + [ + { + "file": "./filewithtyperefs.ts", + "start": 162, + "length": 17, + "messageText": "Cannot find name 'RequireInterface3'.", + "category": 1, + "code": 2304 + } + ] + ], + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg2/import.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForTypeRef.d.ts" + }, + "version": "FakeTSVersion", + "size": 2439 +} + + +Change:: modify randomFileForTypeRef by adding typeRef + +Input:: +//// [/src/project/randomFileForTypeRef.ts] +/// +export const x = 10; + + +Output:: +FileWatcher:: Triggered with /src/project/randomFileForTypeRef.ts 1:: WatchInfo: /src/project/randomFileForTypeRef.ts 250 undefined Source file +Scheduling update +Elapsed:: *ms FileWatcher:: Triggered with /src/project/randomFileForTypeRef.ts 1:: WatchInfo: /src/project/randomFileForTypeRef.ts 250 undefined Source file +Synchronizing program +[12:01:36 AM] File change detected. Starting incremental compilation... + +CreatingProgramWith:: + roots: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +File '/a/lib/package.json' does not exist according to earlier cached lookups. +File '/a/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of module 'pkg0' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +Reusing resolution of module 'pkg1' from '/src/project/fileWithImports.ts' of old program, it was not resolved. +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Reusing resolution of type reference directive 'pkg3' from '/src/project/fileWithTypeRefs.ts' of old program, it was not resolved. +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/a/lib/package.json' does not exist according to earlier cached lookups. +File '/a/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +fileWithImports.ts:2:40 - error TS2307: Cannot find module 'pkg1' or its corresponding type declarations. + +2 import type { RequireInterface1 } from "pkg1" assert { "resolution-mode": "require" }; +   ~~~~~~ + +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + Imported via "pkg0" from file 'randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +[12:01:43 AM] Found 3 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: SafeModules +Program files:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg0/import.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project/randomFileForTypeRef.ts + +Shape signatures in builder refreshed for:: +/src/project/randomfilefortyperef.ts (computed .d.ts) + +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx", + "/src/project/node_modules/pkg1/require.d.ts", + "/src/project/node_modules/@types/pkg1/package.json", + "/src/project/node_modules/@types/pkg1.d.ts", + "/src/project/node_modules/@types/pkg1/index.d.ts", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.ts", + "/src/node_modules/pkg1.tsx", + "/src/node_modules/pkg1.d.ts", + "/src/node_modules/pkg1/index.ts", + "/src/node_modules/pkg1/index.tsx", + "/src/node_modules/pkg1/index.d.ts", + "/src/node_modules/@types/pkg1/package.json", + "/src/node_modules/@types/pkg1.d.ts", + "/src/node_modules/@types/pkg1/index.d.ts", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.ts", + "/node_modules/pkg1.tsx", + "/node_modules/pkg1.d.ts", + "/node_modules/pkg1/index.ts", + "/node_modules/pkg1/index.tsx", + "/node_modules/pkg1/index.d.ts", + "/node_modules/@types/pkg1/package.json", + "/node_modules/@types/pkg1.d.ts", + "/node_modules/@types/pkg1/index.d.ts", + "/src/project/node_modules/pkg1/require.js", + "/src/project/node_modules/pkg1/require.jsx", + "/src/node_modules/pkg1/package.json", + "/src/node_modules/pkg1.js", + "/src/node_modules/pkg1.jsx", + "/src/node_modules/pkg1/index.js", + "/src/node_modules/pkg1/index.jsx", + "/node_modules/pkg1/package.json", + "/node_modules/pkg1.js", + "/node_modules/pkg1.jsx", + "/node_modules/pkg1/index.js", + "/node_modules/pkg1/index.jsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json", + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/require.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/filewithimports.ts: + {} +/src/project/node_modules/pkg0/import.d.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/node_modules/pkg2/import.d.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/randomFileForTypeRef.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +/// +exports.x = 10; + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","signature":"-3531856636-export {};\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","signature":"-3531856636-export {};\n","impliedFormat":1},{"version":"-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-8191038086-/// \nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2],[4]],"referencedMap":[[3,1],[5,2],[6,1],[7,2]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,[3,[{"file":"./filewithimports.ts","start":124,"length":6,"messageText":"Cannot find module 'pkg1' or its corresponding type declarations.","category":1,"code":2307}]],[5,[{"file":"./filewithtyperefs.ts","start":162,"length":17,"messageText":"Cannot find name 'RequireInterface3'.","category":1,"code":2304}]],8,2,4,6,7],"latestChangedDtsFile":"./randomFileForTypeRef.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ], + "./randomfileforimport.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./randomfilefortyperef.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + [ + "./filewithimports.ts", + [ + { + "file": "./filewithimports.ts", + "start": 124, + "length": 6, + "messageText": "Cannot find module 'pkg1' or its corresponding type declarations.", + "category": 1, + "code": 2307 + } + ] + ], + [ + "./filewithtyperefs.ts", + [ + { + "file": "./filewithtyperefs.ts", + "start": 162, + "length": 17, + "messageText": "Cannot find name 'RequireInterface3'.", + "category": 1, + "code": 2304 + } + ] + ], + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg2/import.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForTypeRef.d.ts" + }, + "version": "FakeTSVersion", + "size": 2504 +} + + +Change:: write file not resolved by import + +Input:: +//// [/src/project/node_modules/pkg1/require.d.ts] +export interface RequireInterface1 {} + + +Output:: +DirectoryWatcher:: Triggered with /src/project/node_modules/pkg1/require.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +Scheduling invalidateFailedLookup +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg1/require.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +Scheduling update +Synchronizing program +[12:01:50 AM] File change detected. Starting incremental compilation... + +CreatingProgramWith:: + roots: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +File '/a/lib/package.json' does not exist according to earlier cached lookups. +File '/a/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of module 'pkg0' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in CJS mode with conditions 'node', 'require', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg1/require.ts' does not exist. +File '/src/project/node_modules/pkg1/require.tsx' does not exist. +File '/src/project/node_modules/pkg1/require.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg1/require.d.ts', result '/src/project/node_modules/pkg1/require.d.ts'. +======== Module name 'pkg1' was successfully resolved to '/src/project/node_modules/pkg1/require.d.ts' with Package ID 'pkg1/require.d.ts@0.0.1'. ======== +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +FileWatcher:: Added:: WatchInfo: /src/project/node_modules/pkg1/require.d.ts 250 undefined Source file +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Reusing resolution of type reference directive 'pkg3' from '/src/project/fileWithTypeRefs.ts' of old program, it was not resolved. +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/a/lib/package.json' does not exist according to earlier cached lookups. +File '/a/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +fileWithTypeRefs.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg3'. + +2 /// +   ~~~~ + +fileWithTypeRefs.ts:3:52 - error TS2304: Cannot find name 'RequireInterface3'. + +3 interface LocalInterface extends ImportInterface2, RequireInterface3 {} +   ~~~~~~~~~~~~~~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + Imported via "pkg0" from file 'randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" +node_modules/pkg1/require.d.ts + Imported via "pkg1" from file 'fileWithImports.ts' with packageId 'pkg1/require.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg1/package.json' does not have field "type" +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +[12:01:57 AM] Found 2 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: SafeModules +Program files:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg0/import.d.ts +/src/project/node_modules/pkg1/require.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project/node_modules/pkg1/require.d.ts +/src/project/fileWithImports.ts + +Shape signatures in builder refreshed for:: +/src/project/node_modules/pkg1/require.d.ts (used version) +/src/project/filewithimports.ts (computed .d.ts) + +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/node_modules/pkg1/require.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg1", + "contents": { + "packageJsonContent": { + "name": "pkg1", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg1/require.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg1", + "subModuleName": "require.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/project/node_modules/pkg3/require.d.ts", + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3.d.ts", + "/src/project/node_modules/@types/pkg3/index.d.ts", + "/src/node_modules/pkg3/package.json", + "/src/node_modules/pkg3.d.ts", + "/src/node_modules/pkg3/index.d.ts", + "/src/node_modules/@types/pkg3/package.json", + "/src/node_modules/@types/pkg3.d.ts", + "/src/node_modules/@types/pkg3/index.d.ts", + "/node_modules/pkg3/package.json", + "/node_modules/pkg3.d.ts", + "/node_modules/pkg3/index.d.ts", + "/node_modules/@types/pkg3/package.json", + "/node_modules/@types/pkg3.d.ts", + "/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/filewithimports.ts: + {} +/src/project/node_modules/pkg0/import.d.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/node_modules/pkg2/import.d.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} +/src/project/node_modules/pkg1/require.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/fileWithImports.js] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./node_modules/pkg1/require.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"-3547817137-export interface RequireInterface1 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","signature":"-3531856636-export {};\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","signature":"-3531856636-export {};\n","impliedFormat":1},{"version":"-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-8191038086-/// \nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2,3],[5],[2]],"referencedMap":[[4,1],[6,2],[7,3],[8,2]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,4,[6,[{"file":"./filewithtyperefs.ts","start":162,"length":17,"messageText":"Cannot find name 'RequireInterface3'.","category":1,"code":2304}]],9,2,3,5,7,8],"latestChangedDtsFile":"./randomFileForTypeRef.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ], + [ + "./node_modules/pkg0/import.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg1/require.d.ts": { + "original": { + "version": "-3547817137-export interface RequireInterface1 {}", + "impliedFormat": 1 + }, + "version": "-3547817137-export interface RequireInterface1 {}", + "signature": "-3547817137-export interface RequireInterface1 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ], + "./randomfileforimport.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./randomfilefortyperef.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + "./filewithimports.ts", + [ + "./filewithtyperefs.ts", + [ + { + "file": "./filewithtyperefs.ts", + "start": 162, + "length": 17, + "messageText": "Cannot find name 'RequireInterface3'.", + "category": 1, + "code": 2304 + } + ] + ], + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts", + "./node_modules/pkg2/import.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForTypeRef.d.ts" + }, + "version": "FakeTSVersion", + "size": 2463 +} + + +Change:: write file not resolved by typeRef + +Input:: +//// [/src/project/node_modules/pkg3/require.d.ts] +export {}; +declare global { + interface RequireInterface3 {} +} + + + +Output:: +DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3/require.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +Scheduling invalidateFailedLookup +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3/require.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +Scheduling update +Synchronizing program +[12:02:03 AM] File change detected. Starting incremental compilation... + +CreatingProgramWith:: + roots: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +File '/a/lib/package.json' does not exist according to earlier cached lookups. +File '/a/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of module 'pkg0' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +Reusing resolution of module 'pkg1' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg1/require.d.ts' with Package ID 'pkg1/require.d.ts@0.0.1'. +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Saw non-matching condition 'import'. +Matched 'exports' condition 'require'. +Using 'exports' subpath '.' with target './require.js'. +File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg3/require.d.ts' exist - use it as a name resolution result. +Resolving real path for '/src/project/node_modules/pkg3/require.d.ts', result '/src/project/node_modules/pkg3/require.d.ts'. +======== Type reference directive 'pkg3' was successfully resolved to '/src/project/node_modules/pkg3/require.d.ts' with Package ID 'pkg3/require.d.ts@0.0.1', primary: false. ======== +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/node_modules/pkg3/package.json' exists according to earlier cached lookups. +FileWatcher:: Added:: WatchInfo: /src/project/node_modules/pkg3/require.d.ts 250 undefined Source file +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/a/lib/package.json' does not exist according to earlier cached lookups. +File '/a/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +../../a/lib/lib.d.ts + Default library for target 'es5' +node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + Imported via "pkg0" from file 'randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" +node_modules/pkg1/require.d.ts + Imported via "pkg1" from file 'fileWithImports.ts' with packageId 'pkg1/require.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg1/package.json' does not have field "type" +fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" +node_modules/pkg3/require.d.ts + Type library referenced via 'pkg3' from file 'fileWithTypeRefs.ts' with packageId 'pkg3/require.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg3/package.json' does not have field "type" +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +[12:02:19 AM] Found 0 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: SafeModules +Program files:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg0/import.d.ts +/src/project/node_modules/pkg1/require.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/node_modules/pkg3/require.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg0/import.d.ts +/src/project/node_modules/pkg1/require.d.ts +/src/project/fileWithImports.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/node_modules/pkg3/require.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Shape signatures in builder refreshed for:: +/src/project/node_modules/pkg3/require.d.ts (used version) +/src/project/node_modules/pkg0/import.d.ts (used version) +/src/project/node_modules/pkg1/require.d.ts (used version) +/src/project/filewithimports.ts (computed .d.ts) +/src/project/node_modules/pkg2/import.d.ts (used version) +/src/project/filewithtyperefs.ts (computed .d.ts) +/src/project/randomfileforimport.ts (computed .d.ts) +/src/project/randomfilefortyperef.ts (computed .d.ts) +/src/project/node_modules/@types/pkg4/index.d.ts (used version) + +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/node_modules/pkg1/require.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg1", + "contents": { + "packageJsonContent": { + "name": "pkg1", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithImports.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} +pkg1: commonjs: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg1/require.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg1", + "subModuleName": "require.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg1/require.ts", + "/src/project/node_modules/pkg1/require.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg1/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/node_modules/pkg3/require.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg3", + "contents": { + "packageJsonContent": { + "name": "pkg3", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg3/require.d.ts", + "packageId": { + "name": "pkg3", + "subModuleName": "require.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/filewithimports.ts: + {} +/src/project/node_modules/pkg0/import.d.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/node_modules/pkg2/import.d.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} +/src/project/node_modules/pkg1/require.d.ts: + {} +/src/project/node_modules/pkg3/require.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/fileWithImports.js] file written with same contents +//// [/src/project/fileWithTypeRefs.js] file written with same contents +//// [/src/project/randomFileForImport.js] file written with same contents +//// [/src/project/randomFileForTypeRef.js] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./node_modules/pkg1/require.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./node_modules/pkg3/require.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"-3547817137-export interface RequireInterface1 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","signature":"-3531856636-export {};\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","signature":"-3531856636-export {};\n","impliedFormat":1},{"version":"-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-8191038086-/// \nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2,3],[5,6],[2],[5]],"referencedMap":[[4,1],[7,2],[8,3],[9,4]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,4,7,10,2,3,5,6,8,9],"latestChangedDtsFile":"./randomFileForTypeRef.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts" + ], + [ + "./node_modules/pkg0/import.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg1/require.d.ts": { + "original": { + "version": "-3547817137-export interface RequireInterface1 {}", + "impliedFormat": 1 + }, + "version": "-3547817137-export interface RequireInterface1 {}", + "signature": "-3547817137-export interface RequireInterface1 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg3/require.d.ts": { + "original": { + "version": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "signature": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts" + ], + "./randomfileforimport.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./randomfilefortyperef.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + "./filewithimports.ts", + "./filewithtyperefs.ts", + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg1/require.d.ts", + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForTypeRef.d.ts" + }, + "version": "FakeTSVersion", + "size": 2507 +} + + +Change:: delete file with imports + +Input:: +//// [/src/project/fileWithImports.ts] deleted + +Output:: +FileWatcher:: Triggered with /src/project/fileWithImports.ts 2:: WatchInfo: /src/project/fileWithImports.ts 250 undefined Source file +Scheduling update +Elapsed:: *ms FileWatcher:: Triggered with /src/project/fileWithImports.ts 2:: WatchInfo: /src/project/fileWithImports.ts 250 undefined Source file +DirectoryWatcher:: Triggered with /src/project/fileWithImports.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Scheduling invalidateFailedLookup +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithImports.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/fileWithImports.ts :: WatchInfo: /src/project 0 undefined Wild card directory +Scheduling update +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithImports.ts :: WatchInfo: /src/project 0 undefined Wild card directory +Reloading new file names and options +Synchronizing program +[12:02:24 AM] File change detected. Starting incremental compilation... + +CreatingProgramWith:: + roots: ["/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Reusing resolution of type reference directive 'pkg3' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg3/require.d.ts' with Package ID 'pkg3/require.d.ts@0.0.1'. +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +File '/src/project/node_modules/pkg3/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/a/lib/package.json' does not exist according to earlier cached lookups. +File '/a/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +FileWatcher:: Close:: WatchInfo: /src/project/node_modules/pkg1/require.d.ts 250 undefined Source file +FileWatcher:: Close:: WatchInfo: /src/project/fileWithImports.ts 250 undefined Source file +FileWatcher:: Close:: WatchInfo: /src/project/node_modules/pkg1/package.json 2000 undefined File location affecting resolution +../../a/lib/lib.d.ts + Default library for target 'es5' +node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" +node_modules/pkg3/require.d.ts + Type library referenced via 'pkg3' from file 'fileWithTypeRefs.ts' with packageId 'pkg3/require.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg3/package.json' does not have field "type" +fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +[12:02:28 AM] Found 0 errors. Watching for file changes. + + + +Program root files: ["/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/node_modules/pkg3/require.d.ts +/src/project/fileWithTypeRefs.ts +/src/project/node_modules/pkg0/import.d.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/node_modules/pkg3/require.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg3", + "contents": { + "packageJsonContent": { + "name": "pkg3", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/fileWithTypeRefs.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} +pkg3: commonjs: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg3/require.d.ts", + "packageId": { + "name": "pkg3", + "subModuleName": "require.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg3/package.json", + "/src/project/node_modules/@types/pkg3/index.d.ts" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg3/package.json" + ] +} + +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/node_modules/pkg0/import.d.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/node_modules/pkg2/import.d.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} +/src/project/node_modules/pkg3/require.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./node_modules/pkg2/import.d.ts","./node_modules/pkg3/require.d.ts","./filewithtyperefs.ts","./node_modules/pkg0/import.d.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","signature":"-3531856636-export {};\n","impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-8191038086-/// \nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2,3],[5],[2]],"referencedMap":[[4,1],[6,2],[7,3]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,4,8,5,2,3,6,7],"latestChangedDtsFile":"./randomFileForTypeRef.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts", + "./filewithtyperefs.ts", + "./node_modules/pkg0/import.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts" + ], + [ + "./node_modules/pkg0/import.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg3/require.d.ts": { + "original": { + "version": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "signature": "-6568745979-export {};\ndeclare global {\n interface RequireInterface3 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-3531856636-export {};\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts" + ], + "./randomfileforimport.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./randomfilefortyperef.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + "./filewithtyperefs.ts", + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg2/import.d.ts", + "./node_modules/pkg3/require.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForTypeRef.d.ts" + }, + "version": "FakeTSVersion", + "size": 2081 +} + + +Change:: delete file with typeRefs + +Input:: +//// [/src/project/fileWithTypeRefs.ts] deleted + +Output:: +FileWatcher:: Triggered with /src/project/fileWithTypeRefs.ts 2:: WatchInfo: /src/project/fileWithTypeRefs.ts 250 undefined Source file +Scheduling update +Elapsed:: *ms FileWatcher:: Triggered with /src/project/fileWithTypeRefs.ts 2:: WatchInfo: /src/project/fileWithTypeRefs.ts 250 undefined Source file +DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +Scheduling invalidateFailedLookup +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.ts :: WatchInfo: /src/project 0 undefined Failed Lookup Locations +DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.ts :: WatchInfo: /src/project 0 undefined Wild card directory +Scheduling update +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.ts :: WatchInfo: /src/project 0 undefined Wild card directory +Reloading new file names and options +Synchronizing program +[12:02:34 AM] File change detected. Starting incremental compilation... + +CreatingProgramWith:: + roots: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/a/lib/package.json' does not exist according to earlier cached lookups. +File '/a/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +FileWatcher:: Close:: WatchInfo: /src/project/node_modules/pkg3/require.d.ts 250 undefined Source file +FileWatcher:: Close:: WatchInfo: /src/project/fileWithTypeRefs.ts 250 undefined Source file +FileWatcher:: Close:: WatchInfo: /src/project/node_modules/pkg3/package.json 2000 undefined File location affecting resolution +../../a/lib/lib.d.ts + Default library for target 'es5' +node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'randomFileForTypeRef.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +[12:02:44 AM] Found 0 errors. Watching for file changes. + + + +Program root files: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/node_modules/pkg0/import.d.ts +/src/project/randomFileForImport.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project/node_modules/pkg0/import.d.ts +/src/project/randomFileForImport.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Shape signatures in builder refreshed for:: +/src/project/node_modules/pkg0/import.d.ts (used version) +/src/project/randomfileforimport.ts (computed .d.ts) +/src/project/node_modules/pkg2/import.d.ts (used version) +/src/project/randomfilefortyperef.ts (computed .d.ts) +/src/project/node_modules/@types/pkg4/index.d.ts (used version) + +File: /src/project/node_modules/pkg0/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg0", + "contents": { + "packageJsonContent": { + "name": "pkg0", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "resolvedModule": { + "resolvedFileName": "/src/project/node_modules/pkg0/import.d.ts", + "extension": ".d.ts", + "isExternalLibraryImport": true, + "packageId": { + "name": "pkg0", + "subModuleName": "import.d.ts", + "version": "0.0.1" + } + }, + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/node_modules/pkg0/import.d.ts: + {} +/src/project/node_modules/pkg2/import.d.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/randomFileForImport.js] file written with same contents +//// [/src/project/randomFileForTypeRef.js] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./randomfileforimport.ts","./node_modules/pkg2/import.d.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-8191038086-/// \nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2],[4]],"referencedMap":[[3,1],[5,2]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,6,2,4,3,5],"latestChangedDtsFile":"./randomFileForTypeRef.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./randomfileforimport.ts", + "./node_modules/pkg2/import.d.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./randomfileforimport.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./randomfilefortyperef.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg2/import.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForTypeRef.d.ts" + }, + "version": "FakeTSVersion", + "size": 1576 +} + + +Change:: delete resolved import file + +Input:: +//// [/src/project/node_modules/pkg0/import.d.ts] deleted + +Output:: +FileWatcher:: Triggered with /src/project/node_modules/pkg0/import.d.ts 2:: WatchInfo: /src/project/node_modules/pkg0/import.d.ts 250 undefined Source file +Scheduling update +Elapsed:: *ms FileWatcher:: Triggered with /src/project/node_modules/pkg0/import.d.ts 2:: WatchInfo: /src/project/node_modules/pkg0/import.d.ts 250 undefined Source file +DirectoryWatcher:: Triggered with /src/project/node_modules/pkg0/import.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +Scheduling invalidateFailedLookup +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg0/import.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +Synchronizing program +[12:02:49 AM] File change detected. Starting incremental compilation... + +CreatingProgramWith:: + roots: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +File '/a/lib/package.json' does not exist according to earlier cached lookups. +File '/a/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +FileWatcher:: Close:: WatchInfo: /src/project/node_modules/pkg0/import.d.ts 250 undefined Source file +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Explicitly specified module resolution kind: 'Node16'. +Resolving in ESM mode with conditions 'node', 'import', 'types'. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.ts' does not exist. +File '/src/project/node_modules/pkg0/import.tsx' does not exist. +File '/src/project/node_modules/pkg0/import.d.ts' does not exist. +Saw non-matching condition 'require'. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg0/import.js' does not exist. +File '/src/project/node_modules/pkg0/import.jsx' does not exist. +Saw non-matching condition 'require'. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Module name 'pkg0' was not resolved. ======== +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/a/lib/package.json' does not exist according to earlier cached lookups. +File '/a/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +randomFileForImport.ts:1:39 - error TS2307: Cannot find module 'pkg0' or its corresponding type declarations. + +1 import type { ImportInterface0 } from "pkg0" assert { "resolution-mode": "import" }; +   ~~~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'randomFileForTypeRef.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +[12:02:56 AM] Found 1 error. Watching for file changes. + + + +Program root files: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/randomFileForImport.ts +/src/project/node_modules/pkg2/import.d.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project/randomFileForImport.ts + +Shape signatures in builder refreshed for:: +/src/project/randomfileforimport.ts (computed .d.ts) + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx", + "/src/project/node_modules/pkg0/import.d.ts", + "/src/project/node_modules/@types/pkg0/package.json", + "/src/node_modules/pkg0/package.json", + "/src/node_modules/@types/pkg0/package.json", + "/node_modules/pkg0/package.json", + "/node_modules/@types/pkg0/package.json", + "/src/project/node_modules/pkg0/import.js", + "/src/project/node_modules/pkg0/import.jsx", + "/src/node_modules/pkg0/package.json", + "/node_modules/pkg0/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json", + "/src/project/node_modules/pkg0/package.json" + ] +} + +File: /src/project/node_modules/pkg2/import.d.ts +packageJsonScope:: { + "packageDirectory": "/src/project/node_modules/pkg2", + "contents": { + "packageJsonContent": { + "name": "pkg2", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } + } + } +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "resolvedTypeReferenceDirective": { + "primary": false, + "resolvedFileName": "/src/project/node_modules/pkg2/import.d.ts", + "packageId": { + "name": "pkg2", + "subModuleName": "import.d.ts", + "version": "0.0.1" + }, + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/node_modules/pkg2/import.d.ts: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/randomFileForImport.js] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./randomfileforimport.ts","./node_modules/pkg2/import.d.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-8191038086-/// \nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[3]],"referencedMap":[[4,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,5,3,[2,[{"file":"./randomfileforimport.ts","start":38,"length":6,"messageText":"Cannot find module 'pkg0' or its corresponding type declarations.","category":1,"code":2307}]],4],"latestChangedDtsFile":"./randomFileForTypeRef.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./randomfileforimport.ts", + "./node_modules/pkg2/import.d.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./randomfilefortyperef.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg2/import.d.ts", + [ + "./randomfileforimport.ts", + [ + { + "file": "./randomfileforimport.ts", + "start": 38, + "length": 6, + "messageText": "Cannot find module 'pkg0' or its corresponding type declarations.", + "category": 1, + "code": 2307 + } + ] + ], + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForTypeRef.d.ts" + }, + "version": "FakeTSVersion", + "size": 1620 +} + + +Change:: delete resolved typeRef file + +Input:: +//// [/src/project/node_modules/pkg2/import.d.ts] deleted + +Output:: +FileWatcher:: Triggered with /src/project/node_modules/pkg2/import.d.ts 2:: WatchInfo: /src/project/node_modules/pkg2/import.d.ts 250 undefined Source file +Scheduling update +Elapsed:: *ms FileWatcher:: Triggered with /src/project/node_modules/pkg2/import.d.ts 2:: WatchInfo: /src/project/node_modules/pkg2/import.d.ts 250 undefined Source file +DirectoryWatcher:: Triggered with /src/project/node_modules/pkg2/import.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +Scheduling invalidateFailedLookup +Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg2/import.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Failed Lookup Locations +Synchronizing program +[12:03:01 AM] File change detected. Starting incremental compilation... + +CreatingProgramWith:: + roots: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] + options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +File '/a/lib/package.json' does not exist according to earlier cached lookups. +File '/a/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +FileWatcher:: Close:: WatchInfo: /src/project/node_modules/pkg2/import.d.ts 250 undefined Source file +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was not resolved. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts', root directory '/src/project/node_modules/@types'. ======== +Resolving with primary search path '/src/project/node_modules/@types'. +Looking up in 'node_modules' folder, initial location '/src/project'. +File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Matched 'exports' condition 'import'. +Using 'exports' subpath '.' with target './import.js'. +File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +File '/src/project/node_modules/pkg2/import.d.ts' does not exist. +Saw non-matching condition 'require'. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +======== Type reference directive 'pkg2' was not resolved. ======== +Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +File '/src/project/package.json' does not exist according to earlier cached lookups. +File '/src/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +File '/a/lib/package.json' does not exist according to earlier cached lookups. +File '/a/package.json' does not exist according to earlier cached lookups. +File '/package.json' does not exist according to earlier cached lookups. +randomFileForImport.ts:1:39 - error TS2307: Cannot find module 'pkg0' or its corresponding type declarations. + +1 import type { ImportInterface0 } from "pkg0" assert { "resolution-mode": "import" }; +   ~~~~~~ + +randomFileForTypeRef.ts:1:23 - error TS2688: Cannot find type definition file for 'pkg2'. + +1 /// +   ~~~~ + +../../a/lib/lib.d.ts + Default library for target 'es5' +randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found +node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found +[12:03:11 AM] Found 2 errors. Watching for file changes. + + + +Program root files: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] +Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project/randomFileForImport.ts +/src/project/randomFileForTypeRef.ts +/src/project/node_modules/@types/pkg4/index.d.ts + +Shape signatures in builder refreshed for:: +/src/project/randomfilefortyperef.ts (computed .d.ts) +/src/project/randomfileforimport.ts (computed .d.ts) +/src/project/node_modules/@types/pkg4/index.d.ts (used version) + +File: /src/project/randomFileForImport.ts +resolvedModules: +pkg0: esnext: { + "failedLookupLocations": [ + "/src/project/package.json", + "/src/package.json", + "/package.json", + "/src/project/node_modules/pkg0/import.ts", + "/src/project/node_modules/pkg0/import.tsx", + "/src/project/node_modules/pkg0/import.d.ts", + "/src/project/node_modules/@types/pkg0/package.json", + "/src/node_modules/pkg0/package.json", + "/src/node_modules/@types/pkg0/package.json", + "/node_modules/pkg0/package.json", + "/node_modules/@types/pkg0/package.json", + "/src/project/node_modules/pkg0/import.js", + "/src/project/node_modules/pkg0/import.jsx", + "/src/node_modules/pkg0/package.json", + "/node_modules/pkg0/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg0/package.json", + "/src/project/node_modules/pkg0/package.json" + ] +} + +File: /src/project/randomFileForTypeRef.ts +resolvedTypeReferenceDirectiveNames: +pkg2: esnext: { + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg2/package.json", + "/src/project/node_modules/pkg2/import.d.ts", + "/src/project/node_modules/@types/pkg2/package.json", + "/src/node_modules/pkg2/package.json", + "/src/node_modules/@types/pkg2/package.json", + "/node_modules/pkg2/package.json", + "/node_modules/@types/pkg2/package.json" + ], + "affectingLocations": [ + "/src/project/node_modules/pkg2/package.json" + ] +} + +automaticTypeDirectiveResolutions: +pkg4: { + "resolvedTypeReferenceDirective": { + "primary": true, + "resolvedFileName": "/src/project/node_modules/@types/pkg4/index.d.ts", + "isExternalLibraryImport": true + }, + "failedLookupLocations": [ + "/src/project/node_modules/@types/pkg4/package.json" + ] +} + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project/randomfileforimport.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/node_modules/@types/pkg4/index.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +exitCode:: ExitStatus.undefined + +//// [/src/project/randomFileForImport.js] file written with same contents +//// [/src/project/randomFileForTypeRef.js] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-8191038086-/// \nexport const x = 10;","signature":"-6821242887-export declare const x = 10;\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,4,[2,[{"file":"./randomfileforimport.ts","start":38,"length":6,"messageText":"Cannot find module 'pkg0' or its corresponding type declarations.","category":1,"code":2307}]],3],"latestChangedDtsFile":"./randomFileForTypeRef.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8633945300-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": 1 + }, + "version": "-8191038086-/// \nexport const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + "./node_modules/@types/pkg4/index.d.ts", + [ + "./randomfileforimport.ts", + [ + { + "file": "./randomfileforimport.ts", + "start": 38, + "length": 6, + "messageText": "Cannot find module 'pkg0' or its corresponding type declarations.", + "category": 1, + "code": 2307 + } + ] + ], + "./randomfilefortyperef.ts" + ], + "latestChangedDtsFile": "./randomFileForTypeRef.d.ts" + }, + "version": "FakeTSVersion", + "size": 1421 +} + diff --git a/tests/baselines/reference/tsserver/cacheResolutions/bundle-emit-not-built.js b/tests/baselines/reference/tsserver/cacheResolutions/bundle-emit-not-built.js new file mode 100644 index 00000000000..eacf5d49a95 --- /dev/null +++ b/tests/baselines/reference/tsserver/cacheResolutions/bundle-emit-not-built.js @@ -0,0 +1,1293 @@ +Info 0 [00:00:37.000] Provided types map file "/a/lib/typesMap.json" doesn't exist +Info 1 [00:00:38.000] request: + { + "command": "open", + "arguments": { + "file": "/src/project/randomFileForImport.ts" + }, + "seq": 1, + "type": "request" + } +Before request +//// [/src/project/tsconfig.json] +{"compilerOptions":{"module":"amd","composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js"},"include":["*.ts"],"exclude":["*.d.ts"]} + +//// [/src/project/fileWithImports.ts] +import type { ImportInterface0 } from "pkg0"; +import type { RequireInterface1 } from "pkg1"; + + +//// [/src/project/randomFileForImport.ts] +export const x = 10; + +//// [/src/project/pkg0.d.ts] +export interface ImportInterface0 {} + +//// [/src/project/fileWithTypeRefs.ts] +/// +/// +interface LocalInterface extends ImportInterface2, RequireInterface3 {} +export {} + + +//// [/src/project/randomFileForTypeRef.ts] +export const x = 10; + +//// [/src/project/node_modules/pkg2/index.d.ts] +export {}; +declare global { + interface ImportInterface2 {} +} + + +//// [/src/project/node_modules/@types/pkg4/index.d.ts] +export const x = 10; + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + + +PolledWatches:: + +FsWatches:: + +FsWatchesRecursive:: + +Info 2 [00:00:39.000] Search path: /src/project +Info 3 [00:00:40.000] For info: /src/project/randomFileForImport.ts :: Config file name: /src/project/tsconfig.json +Info 4 [00:00:41.000] Creating configuration project /src/project/tsconfig.json +Info 5 [00:00:42.000] FileWatcher:: Added:: WatchInfo: /src/project/tsconfig.json 2000 undefined Project: /src/project/tsconfig.json WatchType: Config file +Info 6 [00:00:43.000] Config: /src/project/tsconfig.json : { + "rootNames": [ + "/src/project/fileWithImports.ts", + "/src/project/fileWithTypeRefs.ts", + "/src/project/randomFileForImport.ts", + "/src/project/randomFileForTypeRef.ts" + ], + "options": { + "module": 2, + "composite": true, + "cacheResolutions": true, + "traceResolution": true, + "out": "./out.js", + "configFilePath": "/src/project/tsconfig.json" + } +} +Info 7 [00:00:44.000] DirectoryWatcher:: Added:: WatchInfo: /src/project 0 undefined Config: /src/project/tsconfig.json WatchType: Wild card directory +Info 8 [00:00:45.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project 0 undefined Config: /src/project/tsconfig.json WatchType: Wild card directory +Info 9 [00:00:46.000] FileWatcher:: Added:: WatchInfo: /src/project/fileWithImports.ts 500 undefined WatchType: Closed Script info +Info 10 [00:00:47.000] FileWatcher:: Added:: WatchInfo: /src/project/fileWithTypeRefs.ts 500 undefined WatchType: Closed Script info +Info 11 [00:00:48.000] FileWatcher:: Added:: WatchInfo: /src/project/randomFileForTypeRef.ts 500 undefined WatchType: Closed Script info +Info 12 [00:00:49.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 13 [00:00:50.000] ======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Info 14 [00:00:51.000] Module resolution kind is not specified, using 'Classic'. +Info 15 [00:00:52.000] File '/src/project/pkg0.ts' does not exist. +Info 16 [00:00:53.000] File '/src/project/pkg0.tsx' does not exist. +Info 17 [00:00:54.000] File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +Info 18 [00:00:55.000] ======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +Info 19 [00:00:56.000] ======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Info 20 [00:00:57.000] Module resolution kind is not specified, using 'Classic'. +Info 21 [00:00:58.000] File '/src/project/pkg1.ts' does not exist. +Info 22 [00:00:59.000] File '/src/project/pkg1.tsx' does not exist. +Info 23 [00:01:00.000] File '/src/project/pkg1.d.ts' does not exist. +Info 24 [00:01:01.000] File '/src/pkg1.ts' does not exist. +Info 25 [00:01:02.000] File '/src/pkg1.tsx' does not exist. +Info 26 [00:01:03.000] File '/src/pkg1.d.ts' does not exist. +Info 27 [00:01:04.000] File '/pkg1.ts' does not exist. +Info 28 [00:01:05.000] File '/pkg1.tsx' does not exist. +Info 29 [00:01:06.000] File '/pkg1.d.ts' does not exist. +Info 30 [00:01:07.000] File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Info 31 [00:01:08.000] Directory '/src/node_modules' does not exist, skipping all lookups in it. +Info 32 [00:01:09.000] Directory '/node_modules' does not exist, skipping all lookups in it. +Info 33 [00:01:10.000] File '/src/project/pkg1.js' does not exist. +Info 34 [00:01:11.000] File '/src/project/pkg1.jsx' does not exist. +Info 35 [00:01:12.000] File '/src/pkg1.js' does not exist. +Info 36 [00:01:13.000] File '/src/pkg1.jsx' does not exist. +Info 37 [00:01:14.000] File '/pkg1.js' does not exist. +Info 38 [00:01:15.000] File '/pkg1.jsx' does not exist. +Info 39 [00:01:16.000] ======== Module name 'pkg1' was not resolved. ======== +Info 40 [00:01:17.000] FileWatcher:: Added:: WatchInfo: /src/project/pkg0.d.ts 500 undefined WatchType: Closed Script info +Info 41 [00:01:18.000] ======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Info 42 [00:01:19.000] Resolving with primary search path '/src/project/node_modules/@types'. +Info 43 [00:01:20.000] Looking up in 'node_modules' folder, initial location '/src/project'. +Info 44 [00:01:21.000] File '/src/project/node_modules/pkg2/package.json' does not exist. +Info 45 [00:01:22.000] File '/src/project/node_modules/pkg2.d.ts' does not exist. +Info 46 [00:01:23.000] File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Info 47 [00:01:24.000] Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +Info 48 [00:01:25.000] ======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +Info 49 [00:01:26.000] ======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Info 50 [00:01:27.000] Resolving with primary search path '/src/project/node_modules/@types'. +Info 51 [00:01:28.000] Looking up in 'node_modules' folder, initial location '/src/project'. +Info 52 [00:01:29.000] File '/src/project/node_modules/pkg3.d.ts' does not exist. +Info 53 [00:01:30.000] File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Info 54 [00:01:31.000] Directory '/src/node_modules' does not exist, skipping all lookups in it. +Info 55 [00:01:32.000] Directory '/node_modules' does not exist, skipping all lookups in it. +Info 56 [00:01:33.000] ======== Type reference directive 'pkg3' was not resolved. ======== +Info 57 [00:01:34.000] DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 58 [00:01:35.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 59 [00:01:36.000] ======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Info 60 [00:01:37.000] Resolving with primary search path '/src/project/node_modules/@types'. +Info 61 [00:01:38.000] File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +Info 62 [00:01:39.000] File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Info 63 [00:01:40.000] Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 64 [00:01:41.000] ======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +Info 65 [00:01:42.000] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined WatchType: Closed Script info +Info 66 [00:01:43.000] DirectoryWatcher:: Added:: WatchInfo: /src/project 0 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 67 [00:01:44.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project 0 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 68 [00:01:45.000] DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 69 [00:01:46.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 70 [00:01:47.000] DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules/@types 1 undefined Project: /src/project/tsconfig.json WatchType: Type roots +Info 71 [00:01:48.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules/@types 1 undefined Project: /src/project/tsconfig.json WatchType: Type roots +Info 72 [00:01:49.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 73 [00:01:50.000] Project '/src/project/tsconfig.json' (Configured) +Info 74 [00:01:51.000] Files (8) + /a/lib/lib.d.ts + /src/project/pkg0.d.ts + /src/project/fileWithImports.ts + /src/project/node_modules/pkg2/index.d.ts + /src/project/fileWithTypeRefs.ts + /src/project/randomFileForImport.ts + /src/project/randomFileForTypeRef.ts + /src/project/node_modules/@types/pkg4/index.d.ts + + + ../../a/lib/lib.d.ts + Default library for target 'es5' + pkg0.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' + fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' + fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + +Info 75 [00:01:52.000] ----------------------------------------------- +Info 76 [00:01:53.000] Search path: /src/project +Info 77 [00:01:54.000] For info: /src/project/tsconfig.json :: No config files found. +Info 78 [00:01:55.000] Project '/src/project/tsconfig.json' (Configured) +Info 78 [00:01:56.000] Files (8) + +Info 78 [00:01:57.000] ----------------------------------------------- +Info 78 [00:01:58.000] Open files: +Info 78 [00:01:59.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 78 [00:02:00.000] Projects: /src/project/tsconfig.json +After request + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 78 [00:02:01.000] response: + { + "responseRequired": false + } +Info 79 [00:02:02.000] request: + { + "command": "open", + "arguments": { + "file": "/src/project/randomFileForTypeRef.ts" + }, + "seq": 2, + "type": "request" + } +Before request + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 80 [00:02:03.000] FileWatcher:: Close:: WatchInfo: /src/project/randomFileForTypeRef.ts 500 undefined WatchType: Closed Script info +Info 81 [00:02:04.000] Search path: /src/project +Info 82 [00:02:05.000] For info: /src/project/randomFileForTypeRef.ts :: Config file name: /src/project/tsconfig.json +Info 83 [00:02:06.000] Search path: /src/project +Info 84 [00:02:07.000] For info: /src/project/tsconfig.json :: No config files found. +Info 85 [00:02:08.000] Project '/src/project/tsconfig.json' (Configured) +Info 85 [00:02:09.000] Files (8) + +Info 85 [00:02:10.000] ----------------------------------------------- +Info 85 [00:02:11.000] Open files: +Info 85 [00:02:12.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 85 [00:02:13.000] Projects: /src/project/tsconfig.json +Info 85 [00:02:14.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 85 [00:02:15.000] Projects: /src/project/tsconfig.json +After request + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 85 [00:02:16.000] response: + { + "responseRequired": false + } +Info 86 [00:02:17.000] modify randomFileForImport by adding import +Info 87 [00:02:18.000] request: + { + "command": "change", + "arguments": { + "file": "/src/project/randomFileForImport.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "import type { ImportInterface0 } from \"pkg0\";\n" + }, + "seq": 3, + "type": "request" + } +Before request + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +After request + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 88 [00:02:19.000] response: + { + "responseRequired": false + } +Info 89 [00:02:20.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 90 [00:02:21.000] Reusing resolution of module 'pkg0' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +Info 91 [00:02:22.000] Reusing resolution of module 'pkg1' from '/src/project/fileWithImports.ts' of old program, it was not resolved. +Info 92 [00:02:23.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Info 93 [00:02:24.000] Reusing resolution of type reference directive 'pkg3' from '/src/project/fileWithTypeRefs.ts' of old program, it was not resolved. +Info 94 [00:02:25.000] ======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Info 95 [00:02:26.000] Module resolution kind is not specified, using 'Classic'. +Info 96 [00:02:27.000] File '/src/project/pkg0.ts' does not exist. +Info 97 [00:02:28.000] File '/src/project/pkg0.tsx' does not exist. +Info 98 [00:02:29.000] File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +Info 99 [00:02:30.000] ======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +Info 100 [00:02:31.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 101 [00:02:32.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 2 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info 102 [00:02:33.000] Different program with same set of files +Info 103 [00:02:34.000] modify randomFileForTypeRef by adding typeRef +Info 104 [00:02:35.000] request: + { + "command": "change", + "arguments": { + "file": "/src/project/randomFileForTypeRef.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "/// \n" + }, + "seq": 4, + "type": "request" + } +Before request + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +After request + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 105 [00:02:36.000] response: + { + "responseRequired": false + } +Info 106 [00:02:37.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 107 [00:02:38.000] Reusing resolution of module 'pkg0' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +Info 108 [00:02:39.000] Reusing resolution of module 'pkg1' from '/src/project/fileWithImports.ts' of old program, it was not resolved. +Info 109 [00:02:40.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Info 110 [00:02:41.000] Reusing resolution of type reference directive 'pkg3' from '/src/project/fileWithTypeRefs.ts' of old program, it was not resolved. +Info 111 [00:02:42.000] Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +Info 112 [00:02:43.000] ======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts', root directory '/src/project/node_modules/@types'. ======== +Info 113 [00:02:44.000] Resolving with primary search path '/src/project/node_modules/@types'. +Info 114 [00:02:45.000] Looking up in 'node_modules' folder, initial location '/src/project'. +Info 115 [00:02:46.000] File '/src/project/node_modules/pkg2/package.json' does not exist according to earlier cached lookups. +Info 116 [00:02:47.000] File '/src/project/node_modules/pkg2.d.ts' does not exist. +Info 117 [00:02:48.000] File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Info 118 [00:02:49.000] Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +Info 119 [00:02:50.000] ======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +Info 120 [00:02:51.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 121 [00:02:52.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 3 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info 122 [00:02:53.000] Different program with same set of files +Info 123 [00:02:54.000] write file not resolved by import +Info 124 [00:02:57.000] DirectoryWatcher:: Triggered with /src/project/pkg1.d.ts :: WatchInfo: /src/project 0 undefined Config: /src/project/tsconfig.json WatchType: Wild card directory +Info 125 [00:02:58.000] Project: /src/project/tsconfig.json Detected excluded file: /src/project/pkg1.d.ts +Info 126 [00:02:59.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/pkg1.d.ts :: WatchInfo: /src/project 0 undefined Config: /src/project/tsconfig.json WatchType: Wild card directory +Info 127 [00:03:00.000] DirectoryWatcher:: Triggered with /src/project/pkg1.d.ts :: WatchInfo: /src/project 0 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 128 [00:03:01.000] Scheduled: /src/project/tsconfig.jsonFailedLookupInvalidation +Info 129 [00:03:02.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/pkg1.d.ts :: WatchInfo: /src/project 0 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Before running timeout callbacks +//// [/src/project/pkg1.d.ts] +export interface RequireInterface1 {} + + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 130 [00:03:03.000] Running: /src/project/tsconfig.jsonFailedLookupInvalidation +Info 131 [00:03:04.000] Scheduled: /src/project/tsconfig.json +Info 132 [00:03:05.000] Scheduled: *ensureProjectForOpenFiles* +After running timeout callbacks + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Before running timeout callbacks + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 133 [00:03:06.000] Running: /src/project/tsconfig.json +Info 134 [00:03:07.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 135 [00:03:08.000] Reusing resolution of module 'pkg0' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +Info 136 [00:03:09.000] ======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Info 137 [00:03:10.000] Module resolution kind is not specified, using 'Classic'. +Info 138 [00:03:11.000] File '/src/project/pkg1.ts' does not exist. +Info 139 [00:03:12.000] File '/src/project/pkg1.tsx' does not exist. +Info 140 [00:03:13.000] File '/src/project/pkg1.d.ts' exist - use it as a name resolution result. +Info 141 [00:03:14.000] ======== Module name 'pkg1' was successfully resolved to '/src/project/pkg1.d.ts'. ======== +Info 142 [00:03:15.000] FileWatcher:: Added:: WatchInfo: /src/project/pkg1.d.ts 500 undefined WatchType: Closed Script info +Info 143 [00:03:16.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Info 144 [00:03:17.000] Reusing resolution of type reference directive 'pkg3' from '/src/project/fileWithTypeRefs.ts' of old program, it was not resolved. +Info 145 [00:03:18.000] Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +Info 146 [00:03:19.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Info 147 [00:03:20.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 148 [00:03:21.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 4 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info 149 [00:03:22.000] Project '/src/project/tsconfig.json' (Configured) +Info 150 [00:03:23.000] Files (9) + /a/lib/lib.d.ts + /src/project/pkg0.d.ts + /src/project/pkg1.d.ts + /src/project/fileWithImports.ts + /src/project/node_modules/pkg2/index.d.ts + /src/project/fileWithTypeRefs.ts + /src/project/randomFileForImport.ts + /src/project/randomFileForTypeRef.ts + /src/project/node_modules/@types/pkg4/index.d.ts + + + ../../a/lib/lib.d.ts + Default library for target 'es5' + pkg0.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' + Imported via "pkg0" from file 'randomFileForImport.ts' + pkg1.d.ts + Imported via "pkg1" from file 'fileWithImports.ts' + fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' + fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + +Info 151 [00:03:24.000] ----------------------------------------------- +Info 152 [00:03:25.000] Running: *ensureProjectForOpenFiles* +Info 153 [00:03:26.000] Before ensureProjectForOpenFiles: +Info 154 [00:03:27.000] Project '/src/project/tsconfig.json' (Configured) +Info 154 [00:03:28.000] Files (9) + +Info 154 [00:03:29.000] ----------------------------------------------- +Info 154 [00:03:30.000] Open files: +Info 154 [00:03:31.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 154 [00:03:32.000] Projects: /src/project/tsconfig.json +Info 154 [00:03:33.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 154 [00:03:34.000] Projects: /src/project/tsconfig.json +Info 154 [00:03:35.000] After ensureProjectForOpenFiles: +Info 155 [00:03:36.000] Project '/src/project/tsconfig.json' (Configured) +Info 155 [00:03:37.000] Files (9) + +Info 155 [00:03:38.000] ----------------------------------------------- +Info 155 [00:03:39.000] Open files: +Info 155 [00:03:40.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 155 [00:03:41.000] Projects: /src/project/tsconfig.json +Info 155 [00:03:42.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 155 [00:03:43.000] Projects: /src/project/tsconfig.json +After running timeout callbacks + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/pkg1.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 155 [00:03:44.000] write file not resolved by typeRef +Info 156 [00:03:48.000] DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3 :: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 157 [00:03:49.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3 :: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 158 [00:03:50.000] DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3 :: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 159 [00:03:51.000] Scheduled: /src/project/tsconfig.jsonFailedLookupInvalidation +Info 160 [00:03:52.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3 :: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 161 [00:03:54.000] DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3/index.d.ts :: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 162 [00:03:55.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3/index.d.ts :: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 163 [00:03:56.000] DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3/index.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 164 [00:03:57.000] Scheduled: /src/project/tsconfig.jsonFailedLookupInvalidation, Cancelled earlier one +Info 165 [00:03:58.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3/index.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Before running timeout callbacks +//// [/src/project/node_modules/pkg3/index.d.ts] +export interface RequireInterface3 {} + + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/pkg1.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 166 [00:03:59.000] Running: /src/project/tsconfig.jsonFailedLookupInvalidation +Info 167 [00:04:00.000] Scheduled: /src/project/tsconfig.json +Info 168 [00:04:01.000] Scheduled: *ensureProjectForOpenFiles* +After running timeout callbacks + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/pkg1.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Before running timeout callbacks + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/pkg1.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 169 [00:04:02.000] Running: /src/project/tsconfig.json +Info 170 [00:04:03.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 171 [00:04:04.000] Reusing resolution of module 'pkg0' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +Info 172 [00:04:05.000] Reusing resolution of module 'pkg1' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/pkg1.d.ts'. +Info 173 [00:04:06.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Info 174 [00:04:07.000] ======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Info 175 [00:04:08.000] Resolving with primary search path '/src/project/node_modules/@types'. +Info 176 [00:04:09.000] Looking up in 'node_modules' folder, initial location '/src/project'. +Info 177 [00:04:10.000] File '/src/project/node_modules/pkg3/package.json' does not exist. +Info 178 [00:04:11.000] File '/src/project/node_modules/pkg3.d.ts' does not exist. +Info 179 [00:04:12.000] File '/src/project/node_modules/pkg3/index.d.ts' exist - use it as a name resolution result. +Info 180 [00:04:13.000] Resolving real path for '/src/project/node_modules/pkg3/index.d.ts', result '/src/project/node_modules/pkg3/index.d.ts'. +Info 181 [00:04:14.000] ======== Type reference directive 'pkg3' was successfully resolved to '/src/project/node_modules/pkg3/index.d.ts', primary: false. ======== +Info 182 [00:04:15.000] Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +Info 183 [00:04:16.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Info 184 [00:04:17.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 185 [00:04:18.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 5 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info 186 [00:04:19.000] Project '/src/project/tsconfig.json' (Configured) +Info 187 [00:04:20.000] Files (10) + /a/lib/lib.d.ts + /src/project/pkg0.d.ts + /src/project/pkg1.d.ts + /src/project/fileWithImports.ts + /src/project/node_modules/pkg2/index.d.ts + /src/project/node_modules/pkg3/index.d.ts + /src/project/fileWithTypeRefs.ts + /src/project/randomFileForImport.ts + /src/project/randomFileForTypeRef.ts + /src/project/node_modules/@types/pkg4/index.d.ts + + + ../../a/lib/lib.d.ts + Default library for target 'es5' + pkg0.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' + Imported via "pkg0" from file 'randomFileForImport.ts' + pkg1.d.ts + Imported via "pkg1" from file 'fileWithImports.ts' + fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' + node_modules/pkg3/index.d.ts + Type library referenced via 'pkg3' from file 'fileWithTypeRefs.ts' + fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + +Info 188 [00:04:21.000] ----------------------------------------------- +Info 189 [00:04:22.000] Running: *ensureProjectForOpenFiles* +Info 190 [00:04:23.000] Before ensureProjectForOpenFiles: +Info 191 [00:04:24.000] Project '/src/project/tsconfig.json' (Configured) +Info 191 [00:04:25.000] Files (10) + +Info 191 [00:04:26.000] ----------------------------------------------- +Info 191 [00:04:27.000] Open files: +Info 191 [00:04:28.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 191 [00:04:29.000] Projects: /src/project/tsconfig.json +Info 191 [00:04:30.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 191 [00:04:31.000] Projects: /src/project/tsconfig.json +Info 191 [00:04:32.000] After ensureProjectForOpenFiles: +Info 192 [00:04:33.000] Project '/src/project/tsconfig.json' (Configured) +Info 192 [00:04:34.000] Files (10) + +Info 192 [00:04:35.000] ----------------------------------------------- +Info 192 [00:04:36.000] Open files: +Info 192 [00:04:37.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 192 [00:04:38.000] Projects: /src/project/tsconfig.json +Info 192 [00:04:39.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 192 [00:04:40.000] Projects: /src/project/tsconfig.json +After running timeout callbacks + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/pkg1.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 192 [00:04:41.000] delete file with imports +Info 193 [00:04:43.000] FileWatcher:: Triggered with /src/project/fileWithImports.ts 2:: WatchInfo: /src/project/fileWithImports.ts 500 undefined WatchType: Closed Script info +Info 194 [00:04:44.000] FileWatcher:: Close:: WatchInfo: /src/project/fileWithImports.ts 500 undefined WatchType: Closed Script info +Info 195 [00:04:45.000] Scheduled: /src/project/tsconfig.json +Info 196 [00:04:46.000] Scheduled: *ensureProjectForOpenFiles* +Info 197 [00:04:47.000] Elapsed:: *ms FileWatcher:: Triggered with /src/project/fileWithImports.ts 2:: WatchInfo: /src/project/fileWithImports.ts 500 undefined WatchType: Closed Script info +Info 198 [00:04:48.000] DirectoryWatcher:: Triggered with /src/project/fileWithImports.ts :: WatchInfo: /src/project 0 undefined Config: /src/project/tsconfig.json WatchType: Wild card directory +Info 199 [00:04:49.000] Scheduled: /src/project/tsconfig.json, Cancelled earlier one +Info 200 [00:04:50.000] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one +Info 201 [00:04:51.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithImports.ts :: WatchInfo: /src/project 0 undefined Config: /src/project/tsconfig.json WatchType: Wild card directory +Info 202 [00:04:52.000] DirectoryWatcher:: Triggered with /src/project/fileWithImports.ts :: WatchInfo: /src/project 0 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 203 [00:04:53.000] Scheduled: /src/project/tsconfig.jsonFailedLookupInvalidation +Info 204 [00:04:54.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithImports.ts :: WatchInfo: /src/project 0 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Before running timeout callbacks +//// [/src/project/fileWithImports.ts] deleted + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/pkg1.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 205 [00:04:55.000] Running: /src/project/tsconfig.json +Info 206 [00:04:56.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 207 [00:04:57.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Info 208 [00:04:58.000] Reusing resolution of type reference directive 'pkg3' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg3/index.d.ts'. +Info 209 [00:04:59.000] Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +Info 210 [00:05:00.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Info 211 [00:05:01.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 212 [00:05:02.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 6 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 213 [00:05:03.000] Project '/src/project/tsconfig.json' (Configured) +Info 214 [00:05:04.000] Files (8) + /a/lib/lib.d.ts + /src/project/node_modules/pkg2/index.d.ts + /src/project/node_modules/pkg3/index.d.ts + /src/project/fileWithTypeRefs.ts + /src/project/pkg0.d.ts + /src/project/randomFileForImport.ts + /src/project/randomFileForTypeRef.ts + /src/project/node_modules/@types/pkg4/index.d.ts + + + ../../a/lib/lib.d.ts + Default library for target 'es5' + node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' + node_modules/pkg3/index.d.ts + Type library referenced via 'pkg3' from file 'fileWithTypeRefs.ts' + fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + pkg0.d.ts + Imported via "pkg0" from file 'randomFileForImport.ts' + randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + +Info 215 [00:05:05.000] ----------------------------------------------- +Info 216 [00:05:06.000] Running: *ensureProjectForOpenFiles* +Info 217 [00:05:07.000] Before ensureProjectForOpenFiles: +Info 218 [00:05:08.000] Project '/src/project/tsconfig.json' (Configured) +Info 218 [00:05:09.000] Files (8) + +Info 218 [00:05:10.000] ----------------------------------------------- +Info 218 [00:05:11.000] Open files: +Info 218 [00:05:12.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 218 [00:05:13.000] Projects: /src/project/tsconfig.json +Info 218 [00:05:14.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 218 [00:05:15.000] Projects: /src/project/tsconfig.json +Info 218 [00:05:16.000] After ensureProjectForOpenFiles: +Info 219 [00:05:17.000] Project '/src/project/tsconfig.json' (Configured) +Info 219 [00:05:18.000] Files (8) + +Info 219 [00:05:19.000] ----------------------------------------------- +Info 219 [00:05:20.000] Open files: +Info 219 [00:05:21.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 219 [00:05:22.000] Projects: /src/project/tsconfig.json +Info 219 [00:05:23.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 219 [00:05:24.000] Projects: /src/project/tsconfig.json +After running timeout callbacks + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/pkg1.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 219 [00:05:25.000] delete file with typeRefs +Info 220 [00:05:27.000] FileWatcher:: Triggered with /src/project/fileWithTypeRefs.ts 2:: WatchInfo: /src/project/fileWithTypeRefs.ts 500 undefined WatchType: Closed Script info +Info 221 [00:05:28.000] FileWatcher:: Close:: WatchInfo: /src/project/fileWithTypeRefs.ts 500 undefined WatchType: Closed Script info +Info 222 [00:05:29.000] Scheduled: /src/project/tsconfig.json +Info 223 [00:05:30.000] Scheduled: *ensureProjectForOpenFiles* +Info 224 [00:05:31.000] Elapsed:: *ms FileWatcher:: Triggered with /src/project/fileWithTypeRefs.ts 2:: WatchInfo: /src/project/fileWithTypeRefs.ts 500 undefined WatchType: Closed Script info +Info 225 [00:05:32.000] DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.ts :: WatchInfo: /src/project 0 undefined Config: /src/project/tsconfig.json WatchType: Wild card directory +Info 226 [00:05:33.000] Scheduled: /src/project/tsconfig.json, Cancelled earlier one +Info 227 [00:05:34.000] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one +Info 228 [00:05:35.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.ts :: WatchInfo: /src/project 0 undefined Config: /src/project/tsconfig.json WatchType: Wild card directory +Info 229 [00:05:36.000] DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.ts :: WatchInfo: /src/project 0 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 230 [00:05:37.000] Scheduled: /src/project/tsconfig.jsonFailedLookupInvalidation +Info 231 [00:05:38.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.ts :: WatchInfo: /src/project 0 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Before running timeout callbacks +//// [/src/project/fileWithTypeRefs.ts] deleted + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/pkg1.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 232 [00:05:39.000] Running: /src/project/tsconfig.json +Info 233 [00:05:40.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 234 [00:05:41.000] Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +Info 235 [00:05:42.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Info 236 [00:05:43.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 237 [00:05:44.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 7 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 238 [00:05:45.000] Project '/src/project/tsconfig.json' (Configured) +Info 239 [00:05:46.000] Files (6) + /a/lib/lib.d.ts + /src/project/pkg0.d.ts + /src/project/randomFileForImport.ts + /src/project/node_modules/pkg2/index.d.ts + /src/project/randomFileForTypeRef.ts + /src/project/node_modules/@types/pkg4/index.d.ts + + + ../../a/lib/lib.d.ts + Default library for target 'es5' + pkg0.d.ts + Imported via "pkg0" from file 'randomFileForImport.ts' + randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'randomFileForTypeRef.ts' + randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + +Info 240 [00:05:47.000] ----------------------------------------------- +Info 241 [00:05:48.000] Running: *ensureProjectForOpenFiles* +Info 242 [00:05:49.000] Before ensureProjectForOpenFiles: +Info 243 [00:05:50.000] Project '/src/project/tsconfig.json' (Configured) +Info 243 [00:05:51.000] Files (6) + +Info 243 [00:05:52.000] ----------------------------------------------- +Info 243 [00:05:53.000] Open files: +Info 243 [00:05:54.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 243 [00:05:55.000] Projects: /src/project/tsconfig.json +Info 243 [00:05:56.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 243 [00:05:57.000] Projects: /src/project/tsconfig.json +Info 243 [00:05:58.000] After ensureProjectForOpenFiles: +Info 244 [00:05:59.000] Project '/src/project/tsconfig.json' (Configured) +Info 244 [00:06:00.000] Files (6) + +Info 244 [00:06:01.000] ----------------------------------------------- +Info 244 [00:06:02.000] Open files: +Info 244 [00:06:03.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 244 [00:06:04.000] Projects: /src/project/tsconfig.json +Info 244 [00:06:05.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 244 [00:06:06.000] Projects: /src/project/tsconfig.json +After running timeout callbacks + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/pkg1.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 244 [00:06:07.000] delete resolved import file +Info 245 [00:06:09.000] FileWatcher:: Triggered with /src/project/pkg0.d.ts 2:: WatchInfo: /src/project/pkg0.d.ts 500 undefined WatchType: Closed Script info +Info 246 [00:06:10.000] FileWatcher:: Close:: WatchInfo: /src/project/pkg0.d.ts 500 undefined WatchType: Closed Script info +Info 247 [00:06:11.000] Scheduled: /src/project/tsconfig.json +Info 248 [00:06:12.000] Scheduled: *ensureProjectForOpenFiles* +Info 249 [00:06:13.000] Elapsed:: *ms FileWatcher:: Triggered with /src/project/pkg0.d.ts 2:: WatchInfo: /src/project/pkg0.d.ts 500 undefined WatchType: Closed Script info +Info 250 [00:06:14.000] DirectoryWatcher:: Triggered with /src/project/pkg0.d.ts :: WatchInfo: /src/project 0 undefined Config: /src/project/tsconfig.json WatchType: Wild card directory +Info 251 [00:06:15.000] Project: /src/project/tsconfig.json Detected excluded file: /src/project/pkg0.d.ts +Info 252 [00:06:16.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/pkg0.d.ts :: WatchInfo: /src/project 0 undefined Config: /src/project/tsconfig.json WatchType: Wild card directory +Info 253 [00:06:17.000] DirectoryWatcher:: Triggered with /src/project/pkg0.d.ts :: WatchInfo: /src/project 0 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 254 [00:06:18.000] Scheduled: /src/project/tsconfig.jsonFailedLookupInvalidation +Info 255 [00:06:19.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/pkg0.d.ts :: WatchInfo: /src/project 0 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Before running timeout callbacks +//// [/src/project/pkg0.d.ts] deleted + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/a/lib/lib.d.ts: + {} +/src/project/pkg1.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 256 [00:06:20.000] Running: /src/project/tsconfig.json +Info 257 [00:06:21.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 258 [00:06:22.000] ======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Info 259 [00:06:23.000] Module resolution kind is not specified, using 'Classic'. +Info 260 [00:06:24.000] File '/src/project/pkg0.ts' does not exist. +Info 261 [00:06:25.000] File '/src/project/pkg0.tsx' does not exist. +Info 262 [00:06:26.000] File '/src/project/pkg0.d.ts' does not exist. +Info 263 [00:06:27.000] File '/src/pkg0.ts' does not exist. +Info 264 [00:06:28.000] File '/src/pkg0.tsx' does not exist. +Info 265 [00:06:29.000] File '/src/pkg0.d.ts' does not exist. +Info 266 [00:06:30.000] File '/pkg0.ts' does not exist. +Info 267 [00:06:31.000] File '/pkg0.tsx' does not exist. +Info 268 [00:06:32.000] File '/pkg0.d.ts' does not exist. +Info 269 [00:06:33.000] File '/src/project/node_modules/@types/pkg0.d.ts' does not exist. +Info 270 [00:06:34.000] Directory '/src/node_modules' does not exist, skipping all lookups in it. +Info 271 [00:06:35.000] Directory '/node_modules' does not exist, skipping all lookups in it. +Info 272 [00:06:36.000] File '/src/project/pkg0.js' does not exist. +Info 273 [00:06:37.000] File '/src/project/pkg0.jsx' does not exist. +Info 274 [00:06:38.000] File '/src/pkg0.js' does not exist. +Info 275 [00:06:39.000] File '/src/pkg0.jsx' does not exist. +Info 276 [00:06:40.000] File '/pkg0.js' does not exist. +Info 277 [00:06:41.000] File '/pkg0.jsx' does not exist. +Info 278 [00:06:42.000] ======== Module name 'pkg0' was not resolved. ======== +Info 279 [00:06:43.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Info 280 [00:06:44.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 281 [00:06:45.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 8 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 282 [00:06:46.000] Project '/src/project/tsconfig.json' (Configured) +Info 283 [00:06:47.000] Files (5) + /a/lib/lib.d.ts + /src/project/randomFileForImport.ts + /src/project/node_modules/pkg2/index.d.ts + /src/project/randomFileForTypeRef.ts + /src/project/node_modules/@types/pkg4/index.d.ts + + + ../../a/lib/lib.d.ts + Default library for target 'es5' + randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'randomFileForTypeRef.ts' + randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + +Info 284 [00:06:48.000] ----------------------------------------------- +Info 285 [00:06:49.000] Running: *ensureProjectForOpenFiles* +Info 286 [00:06:50.000] Before ensureProjectForOpenFiles: +Info 287 [00:06:51.000] Project '/src/project/tsconfig.json' (Configured) +Info 287 [00:06:52.000] Files (5) + +Info 287 [00:06:53.000] ----------------------------------------------- +Info 287 [00:06:54.000] Open files: +Info 287 [00:06:55.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 287 [00:06:56.000] Projects: /src/project/tsconfig.json +Info 287 [00:06:57.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 287 [00:06:58.000] Projects: /src/project/tsconfig.json +Info 287 [00:06:59.000] After ensureProjectForOpenFiles: +Info 288 [00:07:00.000] Project '/src/project/tsconfig.json' (Configured) +Info 288 [00:07:01.000] Files (5) + +Info 288 [00:07:02.000] ----------------------------------------------- +Info 288 [00:07:03.000] Open files: +Info 288 [00:07:04.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 288 [00:07:05.000] Projects: /src/project/tsconfig.json +Info 288 [00:07:06.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 288 [00:07:07.000] Projects: /src/project/tsconfig.json +After running timeout callbacks + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/a/lib/lib.d.ts: + {} +/src/project/pkg1.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 288 [00:07:08.000] delete resolved typeRef file +Info 289 [00:07:10.000] DirectoryWatcher:: Triggered with /src/project/node_modules/pkg2/index.d.ts :: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 290 [00:07:11.000] Scheduled: /src/project/tsconfig.json +Info 291 [00:07:12.000] Scheduled: *ensureProjectForOpenFiles* +Info 292 [00:07:13.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg2/index.d.ts :: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 293 [00:07:14.000] DirectoryWatcher:: Triggered with /src/project/node_modules/pkg2/index.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 294 [00:07:15.000] Scheduled: /src/project/tsconfig.jsonFailedLookupInvalidation +Info 295 [00:07:16.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg2/index.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Before running timeout callbacks +//// [/src/project/node_modules/pkg2/index.d.ts] deleted + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/a/lib/lib.d.ts: + {} +/src/project/pkg1.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 296 [00:07:17.000] Running: /src/project/tsconfig.json +Info 297 [00:07:18.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 298 [00:07:19.000] Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was not resolved. +Info 299 [00:07:20.000] ======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts', root directory '/src/project/node_modules/@types'. ======== +Info 300 [00:07:21.000] Resolving with primary search path '/src/project/node_modules/@types'. +Info 301 [00:07:22.000] Looking up in 'node_modules' folder, initial location '/src/project'. +Info 302 [00:07:23.000] File '/src/project/node_modules/pkg2/package.json' does not exist. +Info 303 [00:07:24.000] File '/src/project/node_modules/pkg2.d.ts' does not exist. +Info 304 [00:07:25.000] File '/src/project/node_modules/pkg2/index.d.ts' does not exist. +Info 305 [00:07:26.000] File '/src/project/node_modules/@types/pkg2.d.ts' does not exist. +Info 306 [00:07:27.000] Directory '/src/node_modules' does not exist, skipping all lookups in it. +Info 307 [00:07:28.000] Directory '/node_modules' does not exist, skipping all lookups in it. +Info 308 [00:07:29.000] ======== Type reference directive 'pkg2' was not resolved. ======== +Info 309 [00:07:30.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 310 [00:07:31.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 9 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 311 [00:07:32.000] Project '/src/project/tsconfig.json' (Configured) +Info 312 [00:07:33.000] Files (4) + /a/lib/lib.d.ts + /src/project/randomFileForImport.ts + /src/project/randomFileForTypeRef.ts + /src/project/node_modules/@types/pkg4/index.d.ts + + + ../../a/lib/lib.d.ts + Default library for target 'es5' + randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + +Info 313 [00:07:34.000] ----------------------------------------------- +Info 314 [00:07:35.000] Running: *ensureProjectForOpenFiles* +Info 315 [00:07:36.000] Before ensureProjectForOpenFiles: +Info 316 [00:07:37.000] Project '/src/project/tsconfig.json' (Configured) +Info 316 [00:07:38.000] Files (4) + +Info 316 [00:07:39.000] ----------------------------------------------- +Info 316 [00:07:40.000] Open files: +Info 316 [00:07:41.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 316 [00:07:42.000] Projects: /src/project/tsconfig.json +Info 316 [00:07:43.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 316 [00:07:44.000] Projects: /src/project/tsconfig.json +Info 316 [00:07:45.000] After ensureProjectForOpenFiles: +Info 317 [00:07:46.000] Project '/src/project/tsconfig.json' (Configured) +Info 317 [00:07:47.000] Files (4) + +Info 317 [00:07:48.000] ----------------------------------------------- +Info 317 [00:07:49.000] Open files: +Info 317 [00:07:50.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 317 [00:07:51.000] Projects: /src/project/tsconfig.json +Info 317 [00:07:52.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 317 [00:07:53.000] Projects: /src/project/tsconfig.json +After running timeout callbacks + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/a/lib/lib.d.ts: + {} +/src/project/pkg1.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} diff --git a/tests/baselines/reference/tsserver/cacheResolutions/bundle-emit.js b/tests/baselines/reference/tsserver/cacheResolutions/bundle-emit.js new file mode 100644 index 00000000000..eacf5d49a95 --- /dev/null +++ b/tests/baselines/reference/tsserver/cacheResolutions/bundle-emit.js @@ -0,0 +1,1293 @@ +Info 0 [00:00:37.000] Provided types map file "/a/lib/typesMap.json" doesn't exist +Info 1 [00:00:38.000] request: + { + "command": "open", + "arguments": { + "file": "/src/project/randomFileForImport.ts" + }, + "seq": 1, + "type": "request" + } +Before request +//// [/src/project/tsconfig.json] +{"compilerOptions":{"module":"amd","composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js"},"include":["*.ts"],"exclude":["*.d.ts"]} + +//// [/src/project/fileWithImports.ts] +import type { ImportInterface0 } from "pkg0"; +import type { RequireInterface1 } from "pkg1"; + + +//// [/src/project/randomFileForImport.ts] +export const x = 10; + +//// [/src/project/pkg0.d.ts] +export interface ImportInterface0 {} + +//// [/src/project/fileWithTypeRefs.ts] +/// +/// +interface LocalInterface extends ImportInterface2, RequireInterface3 {} +export {} + + +//// [/src/project/randomFileForTypeRef.ts] +export const x = 10; + +//// [/src/project/node_modules/pkg2/index.d.ts] +export {}; +declare global { + interface ImportInterface2 {} +} + + +//// [/src/project/node_modules/@types/pkg4/index.d.ts] +export const x = 10; + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + + +PolledWatches:: + +FsWatches:: + +FsWatchesRecursive:: + +Info 2 [00:00:39.000] Search path: /src/project +Info 3 [00:00:40.000] For info: /src/project/randomFileForImport.ts :: Config file name: /src/project/tsconfig.json +Info 4 [00:00:41.000] Creating configuration project /src/project/tsconfig.json +Info 5 [00:00:42.000] FileWatcher:: Added:: WatchInfo: /src/project/tsconfig.json 2000 undefined Project: /src/project/tsconfig.json WatchType: Config file +Info 6 [00:00:43.000] Config: /src/project/tsconfig.json : { + "rootNames": [ + "/src/project/fileWithImports.ts", + "/src/project/fileWithTypeRefs.ts", + "/src/project/randomFileForImport.ts", + "/src/project/randomFileForTypeRef.ts" + ], + "options": { + "module": 2, + "composite": true, + "cacheResolutions": true, + "traceResolution": true, + "out": "./out.js", + "configFilePath": "/src/project/tsconfig.json" + } +} +Info 7 [00:00:44.000] DirectoryWatcher:: Added:: WatchInfo: /src/project 0 undefined Config: /src/project/tsconfig.json WatchType: Wild card directory +Info 8 [00:00:45.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project 0 undefined Config: /src/project/tsconfig.json WatchType: Wild card directory +Info 9 [00:00:46.000] FileWatcher:: Added:: WatchInfo: /src/project/fileWithImports.ts 500 undefined WatchType: Closed Script info +Info 10 [00:00:47.000] FileWatcher:: Added:: WatchInfo: /src/project/fileWithTypeRefs.ts 500 undefined WatchType: Closed Script info +Info 11 [00:00:48.000] FileWatcher:: Added:: WatchInfo: /src/project/randomFileForTypeRef.ts 500 undefined WatchType: Closed Script info +Info 12 [00:00:49.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 13 [00:00:50.000] ======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Info 14 [00:00:51.000] Module resolution kind is not specified, using 'Classic'. +Info 15 [00:00:52.000] File '/src/project/pkg0.ts' does not exist. +Info 16 [00:00:53.000] File '/src/project/pkg0.tsx' does not exist. +Info 17 [00:00:54.000] File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +Info 18 [00:00:55.000] ======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +Info 19 [00:00:56.000] ======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Info 20 [00:00:57.000] Module resolution kind is not specified, using 'Classic'. +Info 21 [00:00:58.000] File '/src/project/pkg1.ts' does not exist. +Info 22 [00:00:59.000] File '/src/project/pkg1.tsx' does not exist. +Info 23 [00:01:00.000] File '/src/project/pkg1.d.ts' does not exist. +Info 24 [00:01:01.000] File '/src/pkg1.ts' does not exist. +Info 25 [00:01:02.000] File '/src/pkg1.tsx' does not exist. +Info 26 [00:01:03.000] File '/src/pkg1.d.ts' does not exist. +Info 27 [00:01:04.000] File '/pkg1.ts' does not exist. +Info 28 [00:01:05.000] File '/pkg1.tsx' does not exist. +Info 29 [00:01:06.000] File '/pkg1.d.ts' does not exist. +Info 30 [00:01:07.000] File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Info 31 [00:01:08.000] Directory '/src/node_modules' does not exist, skipping all lookups in it. +Info 32 [00:01:09.000] Directory '/node_modules' does not exist, skipping all lookups in it. +Info 33 [00:01:10.000] File '/src/project/pkg1.js' does not exist. +Info 34 [00:01:11.000] File '/src/project/pkg1.jsx' does not exist. +Info 35 [00:01:12.000] File '/src/pkg1.js' does not exist. +Info 36 [00:01:13.000] File '/src/pkg1.jsx' does not exist. +Info 37 [00:01:14.000] File '/pkg1.js' does not exist. +Info 38 [00:01:15.000] File '/pkg1.jsx' does not exist. +Info 39 [00:01:16.000] ======== Module name 'pkg1' was not resolved. ======== +Info 40 [00:01:17.000] FileWatcher:: Added:: WatchInfo: /src/project/pkg0.d.ts 500 undefined WatchType: Closed Script info +Info 41 [00:01:18.000] ======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Info 42 [00:01:19.000] Resolving with primary search path '/src/project/node_modules/@types'. +Info 43 [00:01:20.000] Looking up in 'node_modules' folder, initial location '/src/project'. +Info 44 [00:01:21.000] File '/src/project/node_modules/pkg2/package.json' does not exist. +Info 45 [00:01:22.000] File '/src/project/node_modules/pkg2.d.ts' does not exist. +Info 46 [00:01:23.000] File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Info 47 [00:01:24.000] Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +Info 48 [00:01:25.000] ======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +Info 49 [00:01:26.000] ======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Info 50 [00:01:27.000] Resolving with primary search path '/src/project/node_modules/@types'. +Info 51 [00:01:28.000] Looking up in 'node_modules' folder, initial location '/src/project'. +Info 52 [00:01:29.000] File '/src/project/node_modules/pkg3.d.ts' does not exist. +Info 53 [00:01:30.000] File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Info 54 [00:01:31.000] Directory '/src/node_modules' does not exist, skipping all lookups in it. +Info 55 [00:01:32.000] Directory '/node_modules' does not exist, skipping all lookups in it. +Info 56 [00:01:33.000] ======== Type reference directive 'pkg3' was not resolved. ======== +Info 57 [00:01:34.000] DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 58 [00:01:35.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 59 [00:01:36.000] ======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Info 60 [00:01:37.000] Resolving with primary search path '/src/project/node_modules/@types'. +Info 61 [00:01:38.000] File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +Info 62 [00:01:39.000] File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Info 63 [00:01:40.000] Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 64 [00:01:41.000] ======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +Info 65 [00:01:42.000] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined WatchType: Closed Script info +Info 66 [00:01:43.000] DirectoryWatcher:: Added:: WatchInfo: /src/project 0 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 67 [00:01:44.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project 0 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 68 [00:01:45.000] DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 69 [00:01:46.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 70 [00:01:47.000] DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules/@types 1 undefined Project: /src/project/tsconfig.json WatchType: Type roots +Info 71 [00:01:48.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules/@types 1 undefined Project: /src/project/tsconfig.json WatchType: Type roots +Info 72 [00:01:49.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 73 [00:01:50.000] Project '/src/project/tsconfig.json' (Configured) +Info 74 [00:01:51.000] Files (8) + /a/lib/lib.d.ts + /src/project/pkg0.d.ts + /src/project/fileWithImports.ts + /src/project/node_modules/pkg2/index.d.ts + /src/project/fileWithTypeRefs.ts + /src/project/randomFileForImport.ts + /src/project/randomFileForTypeRef.ts + /src/project/node_modules/@types/pkg4/index.d.ts + + + ../../a/lib/lib.d.ts + Default library for target 'es5' + pkg0.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' + fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' + fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + +Info 75 [00:01:52.000] ----------------------------------------------- +Info 76 [00:01:53.000] Search path: /src/project +Info 77 [00:01:54.000] For info: /src/project/tsconfig.json :: No config files found. +Info 78 [00:01:55.000] Project '/src/project/tsconfig.json' (Configured) +Info 78 [00:01:56.000] Files (8) + +Info 78 [00:01:57.000] ----------------------------------------------- +Info 78 [00:01:58.000] Open files: +Info 78 [00:01:59.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 78 [00:02:00.000] Projects: /src/project/tsconfig.json +After request + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 78 [00:02:01.000] response: + { + "responseRequired": false + } +Info 79 [00:02:02.000] request: + { + "command": "open", + "arguments": { + "file": "/src/project/randomFileForTypeRef.ts" + }, + "seq": 2, + "type": "request" + } +Before request + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 80 [00:02:03.000] FileWatcher:: Close:: WatchInfo: /src/project/randomFileForTypeRef.ts 500 undefined WatchType: Closed Script info +Info 81 [00:02:04.000] Search path: /src/project +Info 82 [00:02:05.000] For info: /src/project/randomFileForTypeRef.ts :: Config file name: /src/project/tsconfig.json +Info 83 [00:02:06.000] Search path: /src/project +Info 84 [00:02:07.000] For info: /src/project/tsconfig.json :: No config files found. +Info 85 [00:02:08.000] Project '/src/project/tsconfig.json' (Configured) +Info 85 [00:02:09.000] Files (8) + +Info 85 [00:02:10.000] ----------------------------------------------- +Info 85 [00:02:11.000] Open files: +Info 85 [00:02:12.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 85 [00:02:13.000] Projects: /src/project/tsconfig.json +Info 85 [00:02:14.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 85 [00:02:15.000] Projects: /src/project/tsconfig.json +After request + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 85 [00:02:16.000] response: + { + "responseRequired": false + } +Info 86 [00:02:17.000] modify randomFileForImport by adding import +Info 87 [00:02:18.000] request: + { + "command": "change", + "arguments": { + "file": "/src/project/randomFileForImport.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "import type { ImportInterface0 } from \"pkg0\";\n" + }, + "seq": 3, + "type": "request" + } +Before request + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +After request + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 88 [00:02:19.000] response: + { + "responseRequired": false + } +Info 89 [00:02:20.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 90 [00:02:21.000] Reusing resolution of module 'pkg0' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +Info 91 [00:02:22.000] Reusing resolution of module 'pkg1' from '/src/project/fileWithImports.ts' of old program, it was not resolved. +Info 92 [00:02:23.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Info 93 [00:02:24.000] Reusing resolution of type reference directive 'pkg3' from '/src/project/fileWithTypeRefs.ts' of old program, it was not resolved. +Info 94 [00:02:25.000] ======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Info 95 [00:02:26.000] Module resolution kind is not specified, using 'Classic'. +Info 96 [00:02:27.000] File '/src/project/pkg0.ts' does not exist. +Info 97 [00:02:28.000] File '/src/project/pkg0.tsx' does not exist. +Info 98 [00:02:29.000] File '/src/project/pkg0.d.ts' exist - use it as a name resolution result. +Info 99 [00:02:30.000] ======== Module name 'pkg0' was successfully resolved to '/src/project/pkg0.d.ts'. ======== +Info 100 [00:02:31.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 101 [00:02:32.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 2 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info 102 [00:02:33.000] Different program with same set of files +Info 103 [00:02:34.000] modify randomFileForTypeRef by adding typeRef +Info 104 [00:02:35.000] request: + { + "command": "change", + "arguments": { + "file": "/src/project/randomFileForTypeRef.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "/// \n" + }, + "seq": 4, + "type": "request" + } +Before request + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +After request + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 105 [00:02:36.000] response: + { + "responseRequired": false + } +Info 106 [00:02:37.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 107 [00:02:38.000] Reusing resolution of module 'pkg0' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +Info 108 [00:02:39.000] Reusing resolution of module 'pkg1' from '/src/project/fileWithImports.ts' of old program, it was not resolved. +Info 109 [00:02:40.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Info 110 [00:02:41.000] Reusing resolution of type reference directive 'pkg3' from '/src/project/fileWithTypeRefs.ts' of old program, it was not resolved. +Info 111 [00:02:42.000] Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +Info 112 [00:02:43.000] ======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts', root directory '/src/project/node_modules/@types'. ======== +Info 113 [00:02:44.000] Resolving with primary search path '/src/project/node_modules/@types'. +Info 114 [00:02:45.000] Looking up in 'node_modules' folder, initial location '/src/project'. +Info 115 [00:02:46.000] File '/src/project/node_modules/pkg2/package.json' does not exist according to earlier cached lookups. +Info 116 [00:02:47.000] File '/src/project/node_modules/pkg2.d.ts' does not exist. +Info 117 [00:02:48.000] File '/src/project/node_modules/pkg2/index.d.ts' exist - use it as a name resolution result. +Info 118 [00:02:49.000] Resolving real path for '/src/project/node_modules/pkg2/index.d.ts', result '/src/project/node_modules/pkg2/index.d.ts'. +Info 119 [00:02:50.000] ======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts', primary: false. ======== +Info 120 [00:02:51.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 121 [00:02:52.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 3 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info 122 [00:02:53.000] Different program with same set of files +Info 123 [00:02:54.000] write file not resolved by import +Info 124 [00:02:57.000] DirectoryWatcher:: Triggered with /src/project/pkg1.d.ts :: WatchInfo: /src/project 0 undefined Config: /src/project/tsconfig.json WatchType: Wild card directory +Info 125 [00:02:58.000] Project: /src/project/tsconfig.json Detected excluded file: /src/project/pkg1.d.ts +Info 126 [00:02:59.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/pkg1.d.ts :: WatchInfo: /src/project 0 undefined Config: /src/project/tsconfig.json WatchType: Wild card directory +Info 127 [00:03:00.000] DirectoryWatcher:: Triggered with /src/project/pkg1.d.ts :: WatchInfo: /src/project 0 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 128 [00:03:01.000] Scheduled: /src/project/tsconfig.jsonFailedLookupInvalidation +Info 129 [00:03:02.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/pkg1.d.ts :: WatchInfo: /src/project 0 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Before running timeout callbacks +//// [/src/project/pkg1.d.ts] +export interface RequireInterface1 {} + + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 130 [00:03:03.000] Running: /src/project/tsconfig.jsonFailedLookupInvalidation +Info 131 [00:03:04.000] Scheduled: /src/project/tsconfig.json +Info 132 [00:03:05.000] Scheduled: *ensureProjectForOpenFiles* +After running timeout callbacks + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Before running timeout callbacks + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 133 [00:03:06.000] Running: /src/project/tsconfig.json +Info 134 [00:03:07.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 135 [00:03:08.000] Reusing resolution of module 'pkg0' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +Info 136 [00:03:09.000] ======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Info 137 [00:03:10.000] Module resolution kind is not specified, using 'Classic'. +Info 138 [00:03:11.000] File '/src/project/pkg1.ts' does not exist. +Info 139 [00:03:12.000] File '/src/project/pkg1.tsx' does not exist. +Info 140 [00:03:13.000] File '/src/project/pkg1.d.ts' exist - use it as a name resolution result. +Info 141 [00:03:14.000] ======== Module name 'pkg1' was successfully resolved to '/src/project/pkg1.d.ts'. ======== +Info 142 [00:03:15.000] FileWatcher:: Added:: WatchInfo: /src/project/pkg1.d.ts 500 undefined WatchType: Closed Script info +Info 143 [00:03:16.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Info 144 [00:03:17.000] Reusing resolution of type reference directive 'pkg3' from '/src/project/fileWithTypeRefs.ts' of old program, it was not resolved. +Info 145 [00:03:18.000] Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +Info 146 [00:03:19.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Info 147 [00:03:20.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 148 [00:03:21.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 4 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info 149 [00:03:22.000] Project '/src/project/tsconfig.json' (Configured) +Info 150 [00:03:23.000] Files (9) + /a/lib/lib.d.ts + /src/project/pkg0.d.ts + /src/project/pkg1.d.ts + /src/project/fileWithImports.ts + /src/project/node_modules/pkg2/index.d.ts + /src/project/fileWithTypeRefs.ts + /src/project/randomFileForImport.ts + /src/project/randomFileForTypeRef.ts + /src/project/node_modules/@types/pkg4/index.d.ts + + + ../../a/lib/lib.d.ts + Default library for target 'es5' + pkg0.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' + Imported via "pkg0" from file 'randomFileForImport.ts' + pkg1.d.ts + Imported via "pkg1" from file 'fileWithImports.ts' + fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' + fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + +Info 151 [00:03:24.000] ----------------------------------------------- +Info 152 [00:03:25.000] Running: *ensureProjectForOpenFiles* +Info 153 [00:03:26.000] Before ensureProjectForOpenFiles: +Info 154 [00:03:27.000] Project '/src/project/tsconfig.json' (Configured) +Info 154 [00:03:28.000] Files (9) + +Info 154 [00:03:29.000] ----------------------------------------------- +Info 154 [00:03:30.000] Open files: +Info 154 [00:03:31.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 154 [00:03:32.000] Projects: /src/project/tsconfig.json +Info 154 [00:03:33.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 154 [00:03:34.000] Projects: /src/project/tsconfig.json +Info 154 [00:03:35.000] After ensureProjectForOpenFiles: +Info 155 [00:03:36.000] Project '/src/project/tsconfig.json' (Configured) +Info 155 [00:03:37.000] Files (9) + +Info 155 [00:03:38.000] ----------------------------------------------- +Info 155 [00:03:39.000] Open files: +Info 155 [00:03:40.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 155 [00:03:41.000] Projects: /src/project/tsconfig.json +Info 155 [00:03:42.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 155 [00:03:43.000] Projects: /src/project/tsconfig.json +After running timeout callbacks + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/pkg1.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 155 [00:03:44.000] write file not resolved by typeRef +Info 156 [00:03:48.000] DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3 :: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 157 [00:03:49.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3 :: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 158 [00:03:50.000] DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3 :: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 159 [00:03:51.000] Scheduled: /src/project/tsconfig.jsonFailedLookupInvalidation +Info 160 [00:03:52.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3 :: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 161 [00:03:54.000] DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3/index.d.ts :: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 162 [00:03:55.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3/index.d.ts :: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 163 [00:03:56.000] DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3/index.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 164 [00:03:57.000] Scheduled: /src/project/tsconfig.jsonFailedLookupInvalidation, Cancelled earlier one +Info 165 [00:03:58.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3/index.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Before running timeout callbacks +//// [/src/project/node_modules/pkg3/index.d.ts] +export interface RequireInterface3 {} + + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/pkg1.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 166 [00:03:59.000] Running: /src/project/tsconfig.jsonFailedLookupInvalidation +Info 167 [00:04:00.000] Scheduled: /src/project/tsconfig.json +Info 168 [00:04:01.000] Scheduled: *ensureProjectForOpenFiles* +After running timeout callbacks + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/pkg1.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Before running timeout callbacks + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/pkg1.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 169 [00:04:02.000] Running: /src/project/tsconfig.json +Info 170 [00:04:03.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 171 [00:04:04.000] Reusing resolution of module 'pkg0' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +Info 172 [00:04:05.000] Reusing resolution of module 'pkg1' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/pkg1.d.ts'. +Info 173 [00:04:06.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Info 174 [00:04:07.000] ======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Info 175 [00:04:08.000] Resolving with primary search path '/src/project/node_modules/@types'. +Info 176 [00:04:09.000] Looking up in 'node_modules' folder, initial location '/src/project'. +Info 177 [00:04:10.000] File '/src/project/node_modules/pkg3/package.json' does not exist. +Info 178 [00:04:11.000] File '/src/project/node_modules/pkg3.d.ts' does not exist. +Info 179 [00:04:12.000] File '/src/project/node_modules/pkg3/index.d.ts' exist - use it as a name resolution result. +Info 180 [00:04:13.000] Resolving real path for '/src/project/node_modules/pkg3/index.d.ts', result '/src/project/node_modules/pkg3/index.d.ts'. +Info 181 [00:04:14.000] ======== Type reference directive 'pkg3' was successfully resolved to '/src/project/node_modules/pkg3/index.d.ts', primary: false. ======== +Info 182 [00:04:15.000] Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +Info 183 [00:04:16.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Info 184 [00:04:17.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 185 [00:04:18.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 5 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info 186 [00:04:19.000] Project '/src/project/tsconfig.json' (Configured) +Info 187 [00:04:20.000] Files (10) + /a/lib/lib.d.ts + /src/project/pkg0.d.ts + /src/project/pkg1.d.ts + /src/project/fileWithImports.ts + /src/project/node_modules/pkg2/index.d.ts + /src/project/node_modules/pkg3/index.d.ts + /src/project/fileWithTypeRefs.ts + /src/project/randomFileForImport.ts + /src/project/randomFileForTypeRef.ts + /src/project/node_modules/@types/pkg4/index.d.ts + + + ../../a/lib/lib.d.ts + Default library for target 'es5' + pkg0.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' + Imported via "pkg0" from file 'randomFileForImport.ts' + pkg1.d.ts + Imported via "pkg1" from file 'fileWithImports.ts' + fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' + node_modules/pkg3/index.d.ts + Type library referenced via 'pkg3' from file 'fileWithTypeRefs.ts' + fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + +Info 188 [00:04:21.000] ----------------------------------------------- +Info 189 [00:04:22.000] Running: *ensureProjectForOpenFiles* +Info 190 [00:04:23.000] Before ensureProjectForOpenFiles: +Info 191 [00:04:24.000] Project '/src/project/tsconfig.json' (Configured) +Info 191 [00:04:25.000] Files (10) + +Info 191 [00:04:26.000] ----------------------------------------------- +Info 191 [00:04:27.000] Open files: +Info 191 [00:04:28.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 191 [00:04:29.000] Projects: /src/project/tsconfig.json +Info 191 [00:04:30.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 191 [00:04:31.000] Projects: /src/project/tsconfig.json +Info 191 [00:04:32.000] After ensureProjectForOpenFiles: +Info 192 [00:04:33.000] Project '/src/project/tsconfig.json' (Configured) +Info 192 [00:04:34.000] Files (10) + +Info 192 [00:04:35.000] ----------------------------------------------- +Info 192 [00:04:36.000] Open files: +Info 192 [00:04:37.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 192 [00:04:38.000] Projects: /src/project/tsconfig.json +Info 192 [00:04:39.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 192 [00:04:40.000] Projects: /src/project/tsconfig.json +After running timeout callbacks + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/pkg1.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 192 [00:04:41.000] delete file with imports +Info 193 [00:04:43.000] FileWatcher:: Triggered with /src/project/fileWithImports.ts 2:: WatchInfo: /src/project/fileWithImports.ts 500 undefined WatchType: Closed Script info +Info 194 [00:04:44.000] FileWatcher:: Close:: WatchInfo: /src/project/fileWithImports.ts 500 undefined WatchType: Closed Script info +Info 195 [00:04:45.000] Scheduled: /src/project/tsconfig.json +Info 196 [00:04:46.000] Scheduled: *ensureProjectForOpenFiles* +Info 197 [00:04:47.000] Elapsed:: *ms FileWatcher:: Triggered with /src/project/fileWithImports.ts 2:: WatchInfo: /src/project/fileWithImports.ts 500 undefined WatchType: Closed Script info +Info 198 [00:04:48.000] DirectoryWatcher:: Triggered with /src/project/fileWithImports.ts :: WatchInfo: /src/project 0 undefined Config: /src/project/tsconfig.json WatchType: Wild card directory +Info 199 [00:04:49.000] Scheduled: /src/project/tsconfig.json, Cancelled earlier one +Info 200 [00:04:50.000] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one +Info 201 [00:04:51.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithImports.ts :: WatchInfo: /src/project 0 undefined Config: /src/project/tsconfig.json WatchType: Wild card directory +Info 202 [00:04:52.000] DirectoryWatcher:: Triggered with /src/project/fileWithImports.ts :: WatchInfo: /src/project 0 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 203 [00:04:53.000] Scheduled: /src/project/tsconfig.jsonFailedLookupInvalidation +Info 204 [00:04:54.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithImports.ts :: WatchInfo: /src/project 0 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Before running timeout callbacks +//// [/src/project/fileWithImports.ts] deleted + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/pkg1.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 205 [00:04:55.000] Running: /src/project/tsconfig.json +Info 206 [00:04:56.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 207 [00:04:57.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Info 208 [00:04:58.000] Reusing resolution of type reference directive 'pkg3' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg3/index.d.ts'. +Info 209 [00:04:59.000] Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +Info 210 [00:05:00.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Info 211 [00:05:01.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 212 [00:05:02.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 6 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 213 [00:05:03.000] Project '/src/project/tsconfig.json' (Configured) +Info 214 [00:05:04.000] Files (8) + /a/lib/lib.d.ts + /src/project/node_modules/pkg2/index.d.ts + /src/project/node_modules/pkg3/index.d.ts + /src/project/fileWithTypeRefs.ts + /src/project/pkg0.d.ts + /src/project/randomFileForImport.ts + /src/project/randomFileForTypeRef.ts + /src/project/node_modules/@types/pkg4/index.d.ts + + + ../../a/lib/lib.d.ts + Default library for target 'es5' + node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' + node_modules/pkg3/index.d.ts + Type library referenced via 'pkg3' from file 'fileWithTypeRefs.ts' + fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + pkg0.d.ts + Imported via "pkg0" from file 'randomFileForImport.ts' + randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + +Info 215 [00:05:05.000] ----------------------------------------------- +Info 216 [00:05:06.000] Running: *ensureProjectForOpenFiles* +Info 217 [00:05:07.000] Before ensureProjectForOpenFiles: +Info 218 [00:05:08.000] Project '/src/project/tsconfig.json' (Configured) +Info 218 [00:05:09.000] Files (8) + +Info 218 [00:05:10.000] ----------------------------------------------- +Info 218 [00:05:11.000] Open files: +Info 218 [00:05:12.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 218 [00:05:13.000] Projects: /src/project/tsconfig.json +Info 218 [00:05:14.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 218 [00:05:15.000] Projects: /src/project/tsconfig.json +Info 218 [00:05:16.000] After ensureProjectForOpenFiles: +Info 219 [00:05:17.000] Project '/src/project/tsconfig.json' (Configured) +Info 219 [00:05:18.000] Files (8) + +Info 219 [00:05:19.000] ----------------------------------------------- +Info 219 [00:05:20.000] Open files: +Info 219 [00:05:21.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 219 [00:05:22.000] Projects: /src/project/tsconfig.json +Info 219 [00:05:23.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 219 [00:05:24.000] Projects: /src/project/tsconfig.json +After running timeout callbacks + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/pkg1.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 219 [00:05:25.000] delete file with typeRefs +Info 220 [00:05:27.000] FileWatcher:: Triggered with /src/project/fileWithTypeRefs.ts 2:: WatchInfo: /src/project/fileWithTypeRefs.ts 500 undefined WatchType: Closed Script info +Info 221 [00:05:28.000] FileWatcher:: Close:: WatchInfo: /src/project/fileWithTypeRefs.ts 500 undefined WatchType: Closed Script info +Info 222 [00:05:29.000] Scheduled: /src/project/tsconfig.json +Info 223 [00:05:30.000] Scheduled: *ensureProjectForOpenFiles* +Info 224 [00:05:31.000] Elapsed:: *ms FileWatcher:: Triggered with /src/project/fileWithTypeRefs.ts 2:: WatchInfo: /src/project/fileWithTypeRefs.ts 500 undefined WatchType: Closed Script info +Info 225 [00:05:32.000] DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.ts :: WatchInfo: /src/project 0 undefined Config: /src/project/tsconfig.json WatchType: Wild card directory +Info 226 [00:05:33.000] Scheduled: /src/project/tsconfig.json, Cancelled earlier one +Info 227 [00:05:34.000] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one +Info 228 [00:05:35.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.ts :: WatchInfo: /src/project 0 undefined Config: /src/project/tsconfig.json WatchType: Wild card directory +Info 229 [00:05:36.000] DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.ts :: WatchInfo: /src/project 0 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 230 [00:05:37.000] Scheduled: /src/project/tsconfig.jsonFailedLookupInvalidation +Info 231 [00:05:38.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.ts :: WatchInfo: /src/project 0 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Before running timeout callbacks +//// [/src/project/fileWithTypeRefs.ts] deleted + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/pkg1.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 232 [00:05:39.000] Running: /src/project/tsconfig.json +Info 233 [00:05:40.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 234 [00:05:41.000] Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. +Info 235 [00:05:42.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Info 236 [00:05:43.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 237 [00:05:44.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 7 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 238 [00:05:45.000] Project '/src/project/tsconfig.json' (Configured) +Info 239 [00:05:46.000] Files (6) + /a/lib/lib.d.ts + /src/project/pkg0.d.ts + /src/project/randomFileForImport.ts + /src/project/node_modules/pkg2/index.d.ts + /src/project/randomFileForTypeRef.ts + /src/project/node_modules/@types/pkg4/index.d.ts + + + ../../a/lib/lib.d.ts + Default library for target 'es5' + pkg0.d.ts + Imported via "pkg0" from file 'randomFileForImport.ts' + randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'randomFileForTypeRef.ts' + randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + +Info 240 [00:05:47.000] ----------------------------------------------- +Info 241 [00:05:48.000] Running: *ensureProjectForOpenFiles* +Info 242 [00:05:49.000] Before ensureProjectForOpenFiles: +Info 243 [00:05:50.000] Project '/src/project/tsconfig.json' (Configured) +Info 243 [00:05:51.000] Files (6) + +Info 243 [00:05:52.000] ----------------------------------------------- +Info 243 [00:05:53.000] Open files: +Info 243 [00:05:54.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 243 [00:05:55.000] Projects: /src/project/tsconfig.json +Info 243 [00:05:56.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 243 [00:05:57.000] Projects: /src/project/tsconfig.json +Info 243 [00:05:58.000] After ensureProjectForOpenFiles: +Info 244 [00:05:59.000] Project '/src/project/tsconfig.json' (Configured) +Info 244 [00:06:00.000] Files (6) + +Info 244 [00:06:01.000] ----------------------------------------------- +Info 244 [00:06:02.000] Open files: +Info 244 [00:06:03.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 244 [00:06:04.000] Projects: /src/project/tsconfig.json +Info 244 [00:06:05.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 244 [00:06:06.000] Projects: /src/project/tsconfig.json +After running timeout callbacks + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/pkg0.d.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/pkg1.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 244 [00:06:07.000] delete resolved import file +Info 245 [00:06:09.000] FileWatcher:: Triggered with /src/project/pkg0.d.ts 2:: WatchInfo: /src/project/pkg0.d.ts 500 undefined WatchType: Closed Script info +Info 246 [00:06:10.000] FileWatcher:: Close:: WatchInfo: /src/project/pkg0.d.ts 500 undefined WatchType: Closed Script info +Info 247 [00:06:11.000] Scheduled: /src/project/tsconfig.json +Info 248 [00:06:12.000] Scheduled: *ensureProjectForOpenFiles* +Info 249 [00:06:13.000] Elapsed:: *ms FileWatcher:: Triggered with /src/project/pkg0.d.ts 2:: WatchInfo: /src/project/pkg0.d.ts 500 undefined WatchType: Closed Script info +Info 250 [00:06:14.000] DirectoryWatcher:: Triggered with /src/project/pkg0.d.ts :: WatchInfo: /src/project 0 undefined Config: /src/project/tsconfig.json WatchType: Wild card directory +Info 251 [00:06:15.000] Project: /src/project/tsconfig.json Detected excluded file: /src/project/pkg0.d.ts +Info 252 [00:06:16.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/pkg0.d.ts :: WatchInfo: /src/project 0 undefined Config: /src/project/tsconfig.json WatchType: Wild card directory +Info 253 [00:06:17.000] DirectoryWatcher:: Triggered with /src/project/pkg0.d.ts :: WatchInfo: /src/project 0 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 254 [00:06:18.000] Scheduled: /src/project/tsconfig.jsonFailedLookupInvalidation +Info 255 [00:06:19.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/pkg0.d.ts :: WatchInfo: /src/project 0 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Before running timeout callbacks +//// [/src/project/pkg0.d.ts] deleted + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/a/lib/lib.d.ts: + {} +/src/project/pkg1.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 256 [00:06:20.000] Running: /src/project/tsconfig.json +Info 257 [00:06:21.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 258 [00:06:22.000] ======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Info 259 [00:06:23.000] Module resolution kind is not specified, using 'Classic'. +Info 260 [00:06:24.000] File '/src/project/pkg0.ts' does not exist. +Info 261 [00:06:25.000] File '/src/project/pkg0.tsx' does not exist. +Info 262 [00:06:26.000] File '/src/project/pkg0.d.ts' does not exist. +Info 263 [00:06:27.000] File '/src/pkg0.ts' does not exist. +Info 264 [00:06:28.000] File '/src/pkg0.tsx' does not exist. +Info 265 [00:06:29.000] File '/src/pkg0.d.ts' does not exist. +Info 266 [00:06:30.000] File '/pkg0.ts' does not exist. +Info 267 [00:06:31.000] File '/pkg0.tsx' does not exist. +Info 268 [00:06:32.000] File '/pkg0.d.ts' does not exist. +Info 269 [00:06:33.000] File '/src/project/node_modules/@types/pkg0.d.ts' does not exist. +Info 270 [00:06:34.000] Directory '/src/node_modules' does not exist, skipping all lookups in it. +Info 271 [00:06:35.000] Directory '/node_modules' does not exist, skipping all lookups in it. +Info 272 [00:06:36.000] File '/src/project/pkg0.js' does not exist. +Info 273 [00:06:37.000] File '/src/project/pkg0.jsx' does not exist. +Info 274 [00:06:38.000] File '/src/pkg0.js' does not exist. +Info 275 [00:06:39.000] File '/src/pkg0.jsx' does not exist. +Info 276 [00:06:40.000] File '/pkg0.js' does not exist. +Info 277 [00:06:41.000] File '/pkg0.jsx' does not exist. +Info 278 [00:06:42.000] ======== Module name 'pkg0' was not resolved. ======== +Info 279 [00:06:43.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. +Info 280 [00:06:44.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 281 [00:06:45.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 8 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 282 [00:06:46.000] Project '/src/project/tsconfig.json' (Configured) +Info 283 [00:06:47.000] Files (5) + /a/lib/lib.d.ts + /src/project/randomFileForImport.ts + /src/project/node_modules/pkg2/index.d.ts + /src/project/randomFileForTypeRef.ts + /src/project/node_modules/@types/pkg4/index.d.ts + + + ../../a/lib/lib.d.ts + Default library for target 'es5' + randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + node_modules/pkg2/index.d.ts + Type library referenced via 'pkg2' from file 'randomFileForTypeRef.ts' + randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + +Info 284 [00:06:48.000] ----------------------------------------------- +Info 285 [00:06:49.000] Running: *ensureProjectForOpenFiles* +Info 286 [00:06:50.000] Before ensureProjectForOpenFiles: +Info 287 [00:06:51.000] Project '/src/project/tsconfig.json' (Configured) +Info 287 [00:06:52.000] Files (5) + +Info 287 [00:06:53.000] ----------------------------------------------- +Info 287 [00:06:54.000] Open files: +Info 287 [00:06:55.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 287 [00:06:56.000] Projects: /src/project/tsconfig.json +Info 287 [00:06:57.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 287 [00:06:58.000] Projects: /src/project/tsconfig.json +Info 287 [00:06:59.000] After ensureProjectForOpenFiles: +Info 288 [00:07:00.000] Project '/src/project/tsconfig.json' (Configured) +Info 288 [00:07:01.000] Files (5) + +Info 288 [00:07:02.000] ----------------------------------------------- +Info 288 [00:07:03.000] Open files: +Info 288 [00:07:04.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 288 [00:07:05.000] Projects: /src/project/tsconfig.json +Info 288 [00:07:06.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 288 [00:07:07.000] Projects: /src/project/tsconfig.json +After running timeout callbacks + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/a/lib/lib.d.ts: + {} +/src/project/pkg1.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 288 [00:07:08.000] delete resolved typeRef file +Info 289 [00:07:10.000] DirectoryWatcher:: Triggered with /src/project/node_modules/pkg2/index.d.ts :: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 290 [00:07:11.000] Scheduled: /src/project/tsconfig.json +Info 291 [00:07:12.000] Scheduled: *ensureProjectForOpenFiles* +Info 292 [00:07:13.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg2/index.d.ts :: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 293 [00:07:14.000] DirectoryWatcher:: Triggered with /src/project/node_modules/pkg2/index.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 294 [00:07:15.000] Scheduled: /src/project/tsconfig.jsonFailedLookupInvalidation +Info 295 [00:07:16.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg2/index.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Before running timeout callbacks +//// [/src/project/node_modules/pkg2/index.d.ts] deleted + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/a/lib/lib.d.ts: + {} +/src/project/pkg1.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 296 [00:07:17.000] Running: /src/project/tsconfig.json +Info 297 [00:07:18.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 298 [00:07:19.000] Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was not resolved. +Info 299 [00:07:20.000] ======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts', root directory '/src/project/node_modules/@types'. ======== +Info 300 [00:07:21.000] Resolving with primary search path '/src/project/node_modules/@types'. +Info 301 [00:07:22.000] Looking up in 'node_modules' folder, initial location '/src/project'. +Info 302 [00:07:23.000] File '/src/project/node_modules/pkg2/package.json' does not exist. +Info 303 [00:07:24.000] File '/src/project/node_modules/pkg2.d.ts' does not exist. +Info 304 [00:07:25.000] File '/src/project/node_modules/pkg2/index.d.ts' does not exist. +Info 305 [00:07:26.000] File '/src/project/node_modules/@types/pkg2.d.ts' does not exist. +Info 306 [00:07:27.000] Directory '/src/node_modules' does not exist, skipping all lookups in it. +Info 307 [00:07:28.000] Directory '/node_modules' does not exist, skipping all lookups in it. +Info 308 [00:07:29.000] ======== Type reference directive 'pkg2' was not resolved. ======== +Info 309 [00:07:30.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 310 [00:07:31.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 9 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 311 [00:07:32.000] Project '/src/project/tsconfig.json' (Configured) +Info 312 [00:07:33.000] Files (4) + /a/lib/lib.d.ts + /src/project/randomFileForImport.ts + /src/project/randomFileForTypeRef.ts + /src/project/node_modules/@types/pkg4/index.d.ts + + + ../../a/lib/lib.d.ts + Default library for target 'es5' + randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + +Info 313 [00:07:34.000] ----------------------------------------------- +Info 314 [00:07:35.000] Running: *ensureProjectForOpenFiles* +Info 315 [00:07:36.000] Before ensureProjectForOpenFiles: +Info 316 [00:07:37.000] Project '/src/project/tsconfig.json' (Configured) +Info 316 [00:07:38.000] Files (4) + +Info 316 [00:07:39.000] ----------------------------------------------- +Info 316 [00:07:40.000] Open files: +Info 316 [00:07:41.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 316 [00:07:42.000] Projects: /src/project/tsconfig.json +Info 316 [00:07:43.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 316 [00:07:44.000] Projects: /src/project/tsconfig.json +Info 316 [00:07:45.000] After ensureProjectForOpenFiles: +Info 317 [00:07:46.000] Project '/src/project/tsconfig.json' (Configured) +Info 317 [00:07:47.000] Files (4) + +Info 317 [00:07:48.000] ----------------------------------------------- +Info 317 [00:07:49.000] Open files: +Info 317 [00:07:50.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 317 [00:07:51.000] Projects: /src/project/tsconfig.json +Info 317 [00:07:52.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 317 [00:07:53.000] Projects: /src/project/tsconfig.json +After running timeout callbacks + +PolledWatches:: + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/a/lib/lib.d.ts: + {} +/src/project/pkg1.d.ts: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} diff --git a/tests/baselines/reference/tsserver/cacheResolutions/dts-has-fewer-resolutions-than-ts-not-built.js b/tests/baselines/reference/tsserver/cacheResolutions/dts-has-fewer-resolutions-than-ts-not-built.js new file mode 100644 index 00000000000..0ba25bee2cd --- /dev/null +++ b/tests/baselines/reference/tsserver/cacheResolutions/dts-has-fewer-resolutions-than-ts-not-built.js @@ -0,0 +1,247 @@ +Info 0 [00:00:39.000] Provided types map file "/a/lib/typesMap.json" doesn't exist +Info 1 [00:00:40.000] request: + { + "command": "open", + "arguments": { + "file": "/user/username/projects/sample1/tests/index.ts" + }, + "seq": 1, + "type": "request" + } +Before request +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + +//// [/user/username/projects/sample1/core/tsconfig.json] +{"compilerOptions":{"composite":true,"cacheResolutions":true,"traceResolution":true}} + +//// [/user/username/projects/sample1/core/index.ts] +export function bar() { return 10; } + +//// [/user/username/projects/sample1/core/myClass.ts] +export class myClass { } + +//// [/user/username/projects/sample1/core/anotherClass.ts] +export class anotherClass { } + +//// [/user/username/projects/sample1/logic/tsconfig.json] +{"compilerOptions":{"composite":true,"cacheResolutions":true,"traceResolution":true},"references":[{"path":"../core"}]} + +//// [/user/username/projects/sample1/logic/index.ts] +import { myClass } from "../core/myClass"; +import { bar } from "../core"; +import { anotherClass } from "../core/anotherClass"; +export function returnMyClass() { + bar(); + return new myClass(); +} +export function returnAnotherClass() { + return new anotherClass(); +} + + +//// [/user/username/projects/sample1/tests/tsconfig.json] +{"compilerOptions":{"composite":true,"cacheResolutions":true,"traceResolution":true},"references":[{"path":"../logic"}]} + +//// [/user/username/projects/sample1/tests/index.ts] +import { returnMyClass } from "../logic"; +returnMyClass(); + + + +PolledWatches:: + +FsWatches:: + +FsWatchesRecursive:: + +Info 2 [00:00:41.000] Search path: /user/username/projects/sample1/tests +Info 3 [00:00:42.000] For info: /user/username/projects/sample1/tests/index.ts :: Config file name: /user/username/projects/sample1/tests/tsconfig.json +Info 4 [00:00:43.000] Creating configuration project /user/username/projects/sample1/tests/tsconfig.json +Info 5 [00:00:44.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/sample1/tests/tsconfig.json 2000 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Config file +Info 6 [00:00:45.000] Config: /user/username/projects/sample1/tests/tsconfig.json : { + "rootNames": [ + "/user/username/projects/sample1/tests/index.ts" + ], + "options": { + "composite": true, + "cacheResolutions": true, + "traceResolution": true, + "configFilePath": "/user/username/projects/sample1/tests/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/user/username/projects/sample1/logic", + "originalPath": "../logic" + } + ] +} +Info 7 [00:00:46.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/tests 1 undefined Config: /user/username/projects/sample1/tests/tsconfig.json WatchType: Wild card directory +Info 8 [00:00:47.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/tests 1 undefined Config: /user/username/projects/sample1/tests/tsconfig.json WatchType: Wild card directory +Info 9 [00:00:48.000] Starting updateGraphWorker: Project: /user/username/projects/sample1/tests/tsconfig.json +Info 10 [00:00:49.000] Config: /user/username/projects/sample1/logic/tsconfig.json : { + "rootNames": [ + "/user/username/projects/sample1/logic/index.ts" + ], + "options": { + "composite": true, + "cacheResolutions": true, + "traceResolution": true, + "configFilePath": "/user/username/projects/sample1/logic/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/user/username/projects/sample1/core", + "originalPath": "../core" + } + ] +} +Info 11 [00:00:50.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/sample1/logic/tsconfig.json 2000 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Config file +Info 12 [00:00:51.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/logic 1 undefined Config: /user/username/projects/sample1/logic/tsconfig.json WatchType: Wild card directory +Info 13 [00:00:52.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/logic 1 undefined Config: /user/username/projects/sample1/logic/tsconfig.json WatchType: Wild card directory +Info 14 [00:00:53.000] Config: /user/username/projects/sample1/core/tsconfig.json : { + "rootNames": [ + "/user/username/projects/sample1/core/anotherClass.ts", + "/user/username/projects/sample1/core/index.ts", + "/user/username/projects/sample1/core/myClass.ts" + ], + "options": { + "composite": true, + "cacheResolutions": true, + "traceResolution": true, + "configFilePath": "/user/username/projects/sample1/core/tsconfig.json" + } +} +Info 15 [00:00:54.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/sample1/core/tsconfig.json 2000 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Config file +Info 16 [00:00:55.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/core 1 undefined Config: /user/username/projects/sample1/core/tsconfig.json WatchType: Wild card directory +Info 17 [00:00:56.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/core 1 undefined Config: /user/username/projects/sample1/core/tsconfig.json WatchType: Wild card directory +Info 18 [00:00:57.000] ======== Resolving module '../logic' from '/user/username/projects/sample1/tests/index.ts'. ======== +Info 19 [00:00:58.000] Module resolution kind is not specified, using 'NodeJs'. +Info 20 [00:00:59.000] Loading module as file / folder, candidate module location '/user/username/projects/sample1/logic', target file types: TypeScript, Declaration. +Info 21 [00:01:00.000] File '/user/username/projects/sample1/logic.ts' does not exist. +Info 22 [00:01:01.000] File '/user/username/projects/sample1/logic.tsx' does not exist. +Info 23 [00:01:02.000] File '/user/username/projects/sample1/logic.d.ts' does not exist. +Info 24 [00:01:03.000] File '/user/username/projects/sample1/logic/package.json' does not exist. +Info 25 [00:01:04.000] File '/user/username/projects/sample1/logic/index.ts' exist - use it as a name resolution result. +Info 26 [00:01:05.000] ======== Module name '../logic' was successfully resolved to '/user/username/projects/sample1/logic/index.ts'. ======== +Info 27 [00:01:06.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1 0 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Failed Lookup Locations +Info 28 [00:01:07.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1 0 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Failed Lookup Locations +Info 29 [00:01:08.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/logic 1 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Failed Lookup Locations +Info 30 [00:01:09.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/logic 1 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Failed Lookup Locations +Info 31 [00:01:10.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/sample1/logic/index.ts 500 undefined WatchType: Closed Script info +Info 32 [00:01:11.000] ======== Resolving module '../core/myClass' from '/user/username/projects/sample1/logic/index.ts'. ======== +Info 33 [00:01:12.000] Using compiler options of project reference redirect '/user/username/projects/sample1/logic/tsconfig.json'. +Info 34 [00:01:13.000] Module resolution kind is not specified, using 'NodeJs'. +Info 35 [00:01:14.000] Loading module as file / folder, candidate module location '/user/username/projects/sample1/core/myClass', target file types: TypeScript, Declaration. +Info 36 [00:01:15.000] File '/user/username/projects/sample1/core/myClass.ts' exist - use it as a name resolution result. +Info 37 [00:01:16.000] ======== Module name '../core/myClass' was successfully resolved to '/user/username/projects/sample1/core/myClass.ts'. ======== +Info 38 [00:01:17.000] ======== Resolving module '../core' from '/user/username/projects/sample1/logic/index.ts'. ======== +Info 39 [00:01:18.000] Using compiler options of project reference redirect '/user/username/projects/sample1/logic/tsconfig.json'. +Info 40 [00:01:19.000] Module resolution kind is not specified, using 'NodeJs'. +Info 41 [00:01:20.000] Loading module as file / folder, candidate module location '/user/username/projects/sample1/core', target file types: TypeScript, Declaration. +Info 42 [00:01:21.000] File '/user/username/projects/sample1/core.ts' does not exist. +Info 43 [00:01:22.000] File '/user/username/projects/sample1/core.tsx' does not exist. +Info 44 [00:01:23.000] File '/user/username/projects/sample1/core.d.ts' does not exist. +Info 45 [00:01:24.000] File '/user/username/projects/sample1/core/package.json' does not exist. +Info 46 [00:01:25.000] File '/user/username/projects/sample1/core/index.ts' exist - use it as a name resolution result. +Info 47 [00:01:26.000] ======== Module name '../core' was successfully resolved to '/user/username/projects/sample1/core/index.ts'. ======== +Info 48 [00:01:27.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/core 1 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Failed Lookup Locations +Info 49 [00:01:28.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/core 1 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Failed Lookup Locations +Info 50 [00:01:29.000] ======== Resolving module '../core/anotherClass' from '/user/username/projects/sample1/logic/index.ts'. ======== +Info 51 [00:01:30.000] Using compiler options of project reference redirect '/user/username/projects/sample1/logic/tsconfig.json'. +Info 52 [00:01:31.000] Module resolution kind is not specified, using 'NodeJs'. +Info 53 [00:01:32.000] Loading module as file / folder, candidate module location '/user/username/projects/sample1/core/anotherClass', target file types: TypeScript, Declaration. +Info 54 [00:01:33.000] File '/user/username/projects/sample1/core/anotherClass.ts' exist - use it as a name resolution result. +Info 55 [00:01:34.000] ======== Module name '../core/anotherClass' was successfully resolved to '/user/username/projects/sample1/core/anotherClass.ts'. ======== +Info 56 [00:01:35.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/sample1/core/myClass.ts 500 undefined WatchType: Closed Script info +Info 57 [00:01:36.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/sample1/core/index.ts 500 undefined WatchType: Closed Script info +Info 58 [00:01:37.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/sample1/core/anotherClass.ts 500 undefined WatchType: Closed Script info +Info 59 [00:01:38.000] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined WatchType: Closed Script info +Info 60 [00:01:39.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/tests/node_modules/@types 1 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Type roots +Info 61 [00:01:40.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/tests/node_modules/@types 1 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Type roots +Info 62 [00:01:41.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/node_modules/@types 1 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Type roots +Info 63 [00:01:42.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/node_modules/@types 1 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Type roots +Info 64 [00:01:43.000] Finishing updateGraphWorker: Project: /user/username/projects/sample1/tests/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 65 [00:01:44.000] Project '/user/username/projects/sample1/tests/tsconfig.json' (Configured) +Info 66 [00:01:45.000] Files (6) + /a/lib/lib.d.ts + /user/username/projects/sample1/core/myClass.ts + /user/username/projects/sample1/core/index.ts + /user/username/projects/sample1/core/anotherClass.ts + /user/username/projects/sample1/logic/index.ts + /user/username/projects/sample1/tests/index.ts + + + ../../../../../a/lib/lib.d.ts + Default library for target 'es5' + ../core/myClass.ts + Imported via "../core/myClass" from file '../logic/index.ts' + ../core/index.ts + Imported via "../core" from file '../logic/index.ts' + ../core/anotherClass.ts + Imported via "../core/anotherClass" from file '../logic/index.ts' + ../logic/index.ts + Imported via "../logic" from file 'index.ts' + index.ts + Matched by default include pattern '**/*' + +Info 67 [00:01:46.000] ----------------------------------------------- +Info 68 [00:01:47.000] Search path: /user/username/projects/sample1/tests +Info 69 [00:01:48.000] For info: /user/username/projects/sample1/tests/tsconfig.json :: No config files found. +Info 70 [00:01:49.000] Project '/user/username/projects/sample1/tests/tsconfig.json' (Configured) +Info 70 [00:01:50.000] Files (6) + +Info 70 [00:01:51.000] ----------------------------------------------- +Info 70 [00:01:52.000] Open files: +Info 70 [00:01:53.000] FileName: /user/username/projects/sample1/tests/index.ts ProjectRootPath: undefined +Info 70 [00:01:54.000] Projects: /user/username/projects/sample1/tests/tsconfig.json +After request + +PolledWatches:: +/user/username/projects/sample1/tests/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/sample1/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/user/username/projects/sample1/tests/tsconfig.json: + {} +/user/username/projects/sample1/logic/tsconfig.json: + {} +/user/username/projects/sample1/core/tsconfig.json: + {} +/user/username/projects/sample1: + {} +/user/username/projects/sample1/logic/index.ts: + {} +/user/username/projects/sample1/core/myclass.ts: + {} +/user/username/projects/sample1/core/index.ts: + {} +/user/username/projects/sample1/core/anotherclass.ts: + {} +/a/lib/lib.d.ts: + {} + +FsWatchesRecursive:: +/user/username/projects/sample1/tests: + {} +/user/username/projects/sample1/logic: + {} +/user/username/projects/sample1/core: + {} + +Info 70 [00:01:55.000] response: + { + "responseRequired": false + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/cacheResolutions/dts-has-fewer-resolutions-than-ts.js b/tests/baselines/reference/tsserver/cacheResolutions/dts-has-fewer-resolutions-than-ts.js new file mode 100644 index 00000000000..a3e3ed1852f --- /dev/null +++ b/tests/baselines/reference/tsserver/cacheResolutions/dts-has-fewer-resolutions-than-ts.js @@ -0,0 +1,564 @@ +Info 0 [00:01:14.000] Provided types map file "/a/lib/typesMap.json" doesn't exist +Info 1 [00:01:15.000] request: + { + "command": "open", + "arguments": { + "file": "/user/username/projects/sample1/tests/index.ts" + }, + "seq": 1, + "type": "request" + } +Before request +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + +//// [/user/username/projects/sample1/core/tsconfig.json] +{"compilerOptions":{"composite":true,"cacheResolutions":true,"traceResolution":true}} + +//// [/user/username/projects/sample1/core/index.ts] +export function bar() { return 10; } + +//// [/user/username/projects/sample1/core/myClass.ts] +export class myClass { } + +//// [/user/username/projects/sample1/core/anotherClass.ts] +export class anotherClass { } + +//// [/user/username/projects/sample1/logic/tsconfig.json] +{"compilerOptions":{"composite":true,"cacheResolutions":true,"traceResolution":true},"references":[{"path":"../core"}]} + +//// [/user/username/projects/sample1/logic/index.ts] +import { myClass } from "../core/myClass"; +import { bar } from "../core"; +import { anotherClass } from "../core/anotherClass"; +export function returnMyClass() { + bar(); + return new myClass(); +} +export function returnAnotherClass() { + return new anotherClass(); +} + + +//// [/user/username/projects/sample1/tests/tsconfig.json] +{"compilerOptions":{"composite":true,"cacheResolutions":true,"traceResolution":true},"references":[{"path":"../logic"}]} + +//// [/user/username/projects/sample1/tests/index.ts] +import { returnMyClass } from "../logic"; +returnMyClass(); + + +//// [/user/username/projects/sample1/core/anotherClass.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.anotherClass = void 0; +var anotherClass = /** @class */ (function () { + function anotherClass() { + } + return anotherClass; +}()); +exports.anotherClass = anotherClass; + + +//// [/user/username/projects/sample1/core/anotherClass.d.ts] +export declare class anotherClass { +} + + +//// [/user/username/projects/sample1/core/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.bar = void 0; +function bar() { return 10; } +exports.bar = bar; + + +//// [/user/username/projects/sample1/core/index.d.ts] +export declare function bar(): number; + + +//// [/user/username/projects/sample1/core/myClass.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.myClass = void 0; +var myClass = /** @class */ (function () { + function myClass() { + } + return myClass; +}()); +exports.myClass = myClass; + + +//// [/user/username/projects/sample1/core/myClass.d.ts] +export declare class myClass { +} + + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anotherclass.ts","./index.ts","./myclass.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-6664885476-export class anotherClass { }","signature":"-6928009824-export declare class anotherClass {\n}\n"},{"version":"4120767815-export function bar() { return 10; }","signature":"-4193260373-export declare function bar(): number;\n"},{"version":"-11785903855-export class myClass { }","signature":"-7432826827-export declare class myClass {\n}\n"}],"options":{"cacheResolutions":true,"composite":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4],"latestChangedDtsFile":"./myClass.d.ts"},"version":"FakeTSVersion"} + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "./anotherclass.ts", + "./index.ts", + "./myclass.ts" + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./anotherclass.ts": { + "original": { + "version": "-6664885476-export class anotherClass { }", + "signature": "-6928009824-export declare class anotherClass {\n}\n" + }, + "version": "-6664885476-export class anotherClass { }", + "signature": "-6928009824-export declare class anotherClass {\n}\n" + }, + "./index.ts": { + "original": { + "version": "4120767815-export function bar() { return 10; }", + "signature": "-4193260373-export declare function bar(): number;\n" + }, + "version": "4120767815-export function bar() { return 10; }", + "signature": "-4193260373-export declare function bar(): number;\n" + }, + "./myclass.ts": { + "original": { + "version": "-11785903855-export class myClass { }", + "signature": "-7432826827-export declare class myClass {\n}\n" + }, + "version": "-11785903855-export class myClass { }", + "signature": "-7432826827-export declare class myClass {\n}\n" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "./anotherclass.ts", + "./index.ts", + "./myclass.ts" + ], + "latestChangedDtsFile": "./myClass.d.ts" + }, + "version": "FakeTSVersion", + "size": 1087 +} + +//// [/user/username/projects/sample1/logic/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.returnAnotherClass = exports.returnMyClass = void 0; +var myClass_1 = require("../core/myClass"); +var core_1 = require("../core"); +var anotherClass_1 = require("../core/anotherClass"); +function returnMyClass() { + (0, core_1.bar)(); + return new myClass_1.myClass(); +} +exports.returnMyClass = returnMyClass; +function returnAnotherClass() { + return new anotherClass_1.anotherClass(); +} +exports.returnAnotherClass = returnAnotherClass; + + +//// [/user/username/projects/sample1/logic/index.d.ts] +import { myClass } from "../core/myClass"; +import { anotherClass } from "../core/anotherClass"; +export declare function returnMyClass(): myClass; +export declare function returnAnotherClass(): anotherClass; + + +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/myclass.d.ts","../core/index.d.ts","../core/anotherclass.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-7432826827-export declare class myClass {\n}\n","-4193260373-export declare function bar(): number;\n","-6928009824-export declare class anotherClass {\n}\n",{"version":"-9720705499-import { myClass } from \"../core/myClass\";\nimport { bar } from \"../core\";\nimport { anotherClass } from \"../core/anotherClass\";\nexport function returnMyClass() {\n bar();\n return new myClass();\n}\nexport function returnAnotherClass() {\n return new anotherClass();\n}\n","signature":"-26318514585-import { myClass } from \"../core/myClass\";\nimport { anotherClass } from \"../core/anotherClass\";\nexport declare function returnMyClass(): myClass;\nexport declare function returnAnotherClass(): anotherClass;\n"}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2,3,4],[2,4]],"referencedMap":[[5,1]],"exportedModulesMap":[[5,2]],"semanticDiagnosticsPerFile":[1,4,3,2,5],"latestChangedDtsFile":"./index.d.ts"},"version":"FakeTSVersion"} + +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../core/myclass.d.ts", + "../core/index.d.ts", + "../core/anotherclass.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/myclass.d.ts", + "../core/index.d.ts", + "../core/anotherclass.d.ts" + ], + [ + "../core/myclass.d.ts", + "../core/anotherclass.d.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../core/myclass.d.ts": { + "version": "-7432826827-export declare class myClass {\n}\n", + "signature": "-7432826827-export declare class myClass {\n}\n" + }, + "../core/index.d.ts": { + "version": "-4193260373-export declare function bar(): number;\n", + "signature": "-4193260373-export declare function bar(): number;\n" + }, + "../core/anotherclass.d.ts": { + "version": "-6928009824-export declare class anotherClass {\n}\n", + "signature": "-6928009824-export declare class anotherClass {\n}\n" + }, + "./index.ts": { + "original": { + "version": "-9720705499-import { myClass } from \"../core/myClass\";\nimport { bar } from \"../core\";\nimport { anotherClass } from \"../core/anotherClass\";\nexport function returnMyClass() {\n bar();\n return new myClass();\n}\nexport function returnAnotherClass() {\n return new anotherClass();\n}\n", + "signature": "-26318514585-import { myClass } from \"../core/myClass\";\nimport { anotherClass } from \"../core/anotherClass\";\nexport declare function returnMyClass(): myClass;\nexport declare function returnAnotherClass(): anotherClass;\n" + }, + "version": "-9720705499-import { myClass } from \"../core/myClass\";\nimport { bar } from \"../core\";\nimport { anotherClass } from \"../core/anotherClass\";\nexport function returnMyClass() {\n bar();\n return new myClass();\n}\nexport function returnAnotherClass() {\n return new anotherClass();\n}\n", + "signature": "-26318514585-import { myClass } from \"../core/myClass\";\nimport { anotherClass } from \"../core/anotherClass\";\nexport declare function returnMyClass(): myClass;\nexport declare function returnAnotherClass(): anotherClass;\n" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./index.ts": [ + "../core/myclass.d.ts", + "../core/index.d.ts", + "../core/anotherclass.d.ts" + ] + }, + "exportedModulesMap": { + "./index.ts": [ + "../core/myclass.d.ts", + "../core/anotherclass.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../core/anotherclass.d.ts", + "../core/index.d.ts", + "../core/myclass.d.ts", + "./index.ts" + ], + "latestChangedDtsFile": "./index.d.ts" + }, + "version": "FakeTSVersion", + "size": 1515 +} + +//// [/user/username/projects/sample1/tests/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var logic_1 = require("../logic"); +(0, logic_1.returnMyClass)(); + + +//// [/user/username/projects/sample1/tests/index.d.ts] +export {}; + + +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/myclass.d.ts","../core/anotherclass.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-7432826827-export declare class myClass {\n}\n","-6928009824-export declare class anotherClass {\n}\n","-26318514585-import { myClass } from \"../core/myClass\";\nimport { anotherClass } from \"../core/anotherClass\";\nexport declare function returnMyClass(): myClass;\nexport declare function returnAnotherClass(): anotherClass;\n",{"version":"-1418876836-import { returnMyClass } from \"../logic\";\nreturnMyClass();\n","signature":"-3531856636-export {};\n"}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2,3],[4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5],"latestChangedDtsFile":"./index.d.ts"},"version":"FakeTSVersion"} + +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../core/myclass.d.ts", + "../core/anotherclass.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/myclass.d.ts", + "../core/anotherclass.d.ts" + ], + [ + "../logic/index.d.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../core/myclass.d.ts": { + "version": "-7432826827-export declare class myClass {\n}\n", + "signature": "-7432826827-export declare class myClass {\n}\n" + }, + "../core/anotherclass.d.ts": { + "version": "-6928009824-export declare class anotherClass {\n}\n", + "signature": "-6928009824-export declare class anotherClass {\n}\n" + }, + "../logic/index.d.ts": { + "version": "-26318514585-import { myClass } from \"../core/myClass\";\nimport { anotherClass } from \"../core/anotherClass\";\nexport declare function returnMyClass(): myClass;\nexport declare function returnAnotherClass(): anotherClass;\n", + "signature": "-26318514585-import { myClass } from \"../core/myClass\";\nimport { anotherClass } from \"../core/anotherClass\";\nexport declare function returnMyClass(): myClass;\nexport declare function returnAnotherClass(): anotherClass;\n" + }, + "./index.ts": { + "original": { + "version": "-1418876836-import { returnMyClass } from \"../logic\";\nreturnMyClass();\n", + "signature": "-3531856636-export {};\n" + }, + "version": "-1418876836-import { returnMyClass } from \"../logic\";\nreturnMyClass();\n", + "signature": "-3531856636-export {};\n" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/myclass.d.ts", + "../core/anotherclass.d.ts" + ], + "./index.ts": [ + "../logic/index.d.ts" + ] + }, + "exportedModulesMap": { + "../logic/index.d.ts": [ + "../core/myclass.d.ts", + "../core/anotherclass.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../core/anotherclass.d.ts", + "../core/myclass.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "latestChangedDtsFile": "./index.d.ts" + }, + "version": "FakeTSVersion", + "size": 1265 +} + + +PolledWatches:: + +FsWatches:: + +FsWatchesRecursive:: + +Info 2 [00:01:16.000] Search path: /user/username/projects/sample1/tests +Info 3 [00:01:17.000] For info: /user/username/projects/sample1/tests/index.ts :: Config file name: /user/username/projects/sample1/tests/tsconfig.json +Info 4 [00:01:18.000] Creating configuration project /user/username/projects/sample1/tests/tsconfig.json +Info 5 [00:01:19.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/sample1/tests/tsconfig.json 2000 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Config file +Info 6 [00:01:20.000] Config: /user/username/projects/sample1/tests/tsconfig.json : { + "rootNames": [ + "/user/username/projects/sample1/tests/index.ts" + ], + "options": { + "composite": true, + "cacheResolutions": true, + "traceResolution": true, + "configFilePath": "/user/username/projects/sample1/tests/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/user/username/projects/sample1/logic", + "originalPath": "../logic" + } + ] +} +Info 7 [00:01:21.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/tests 1 undefined Config: /user/username/projects/sample1/tests/tsconfig.json WatchType: Wild card directory +Info 8 [00:01:22.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/tests 1 undefined Config: /user/username/projects/sample1/tests/tsconfig.json WatchType: Wild card directory +Info 9 [00:01:23.000] Starting updateGraphWorker: Project: /user/username/projects/sample1/tests/tsconfig.json +Info 10 [00:01:24.000] Config: /user/username/projects/sample1/logic/tsconfig.json : { + "rootNames": [ + "/user/username/projects/sample1/logic/index.ts" + ], + "options": { + "composite": true, + "cacheResolutions": true, + "traceResolution": true, + "configFilePath": "/user/username/projects/sample1/logic/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/user/username/projects/sample1/core", + "originalPath": "../core" + } + ] +} +Info 11 [00:01:25.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/sample1/logic/tsconfig.json 2000 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Config file +Info 12 [00:01:26.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/logic 1 undefined Config: /user/username/projects/sample1/logic/tsconfig.json WatchType: Wild card directory +Info 13 [00:01:27.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/logic 1 undefined Config: /user/username/projects/sample1/logic/tsconfig.json WatchType: Wild card directory +Info 14 [00:01:28.000] Config: /user/username/projects/sample1/core/tsconfig.json : { + "rootNames": [ + "/user/username/projects/sample1/core/anotherClass.ts", + "/user/username/projects/sample1/core/index.ts", + "/user/username/projects/sample1/core/myClass.ts" + ], + "options": { + "composite": true, + "cacheResolutions": true, + "traceResolution": true, + "configFilePath": "/user/username/projects/sample1/core/tsconfig.json" + } +} +Info 15 [00:01:29.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/sample1/core/tsconfig.json 2000 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Config file +Info 16 [00:01:30.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/core 1 undefined Config: /user/username/projects/sample1/core/tsconfig.json WatchType: Wild card directory +Info 17 [00:01:31.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/core 1 undefined Config: /user/username/projects/sample1/core/tsconfig.json WatchType: Wild card directory +Info 18 [00:01:32.000] ======== Resolving module '../logic' from '/user/username/projects/sample1/tests/index.ts'. ======== +Info 19 [00:01:33.000] Module resolution kind is not specified, using 'NodeJs'. +Info 20 [00:01:34.000] Loading module as file / folder, candidate module location '/user/username/projects/sample1/logic', target file types: TypeScript, Declaration. +Info 21 [00:01:35.000] File '/user/username/projects/sample1/logic.ts' does not exist. +Info 22 [00:01:36.000] File '/user/username/projects/sample1/logic.tsx' does not exist. +Info 23 [00:01:37.000] File '/user/username/projects/sample1/logic.d.ts' does not exist. +Info 24 [00:01:38.000] File '/user/username/projects/sample1/logic/package.json' does not exist. +Info 25 [00:01:39.000] File '/user/username/projects/sample1/logic/index.ts' exist - use it as a name resolution result. +Info 26 [00:01:40.000] ======== Module name '../logic' was successfully resolved to '/user/username/projects/sample1/logic/index.ts'. ======== +Info 27 [00:01:41.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1 0 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Failed Lookup Locations +Info 28 [00:01:42.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1 0 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Failed Lookup Locations +Info 29 [00:01:43.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/logic 1 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Failed Lookup Locations +Info 30 [00:01:44.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/logic 1 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Failed Lookup Locations +Info 31 [00:01:45.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/sample1/logic/index.ts 500 undefined WatchType: Closed Script info +Info 32 [00:01:46.000] ======== Resolving module '../core/myClass' from '/user/username/projects/sample1/logic/index.ts'. ======== +Info 33 [00:01:47.000] Using compiler options of project reference redirect '/user/username/projects/sample1/logic/tsconfig.json'. +Info 34 [00:01:48.000] Module resolution kind is not specified, using 'NodeJs'. +Info 35 [00:01:49.000] Loading module as file / folder, candidate module location '/user/username/projects/sample1/core/myClass', target file types: TypeScript, Declaration. +Info 36 [00:01:50.000] File '/user/username/projects/sample1/core/myClass.ts' exist - use it as a name resolution result. +Info 37 [00:01:51.000] ======== Module name '../core/myClass' was successfully resolved to '/user/username/projects/sample1/core/myClass.ts'. ======== +Info 38 [00:01:52.000] ======== Resolving module '../core' from '/user/username/projects/sample1/logic/index.ts'. ======== +Info 39 [00:01:53.000] Using compiler options of project reference redirect '/user/username/projects/sample1/logic/tsconfig.json'. +Info 40 [00:01:54.000] Module resolution kind is not specified, using 'NodeJs'. +Info 41 [00:01:55.000] Loading module as file / folder, candidate module location '/user/username/projects/sample1/core', target file types: TypeScript, Declaration. +Info 42 [00:01:56.000] File '/user/username/projects/sample1/core.ts' does not exist. +Info 43 [00:01:57.000] File '/user/username/projects/sample1/core.tsx' does not exist. +Info 44 [00:01:58.000] File '/user/username/projects/sample1/core.d.ts' does not exist. +Info 45 [00:01:59.000] File '/user/username/projects/sample1/core/package.json' does not exist. +Info 46 [00:02:00.000] File '/user/username/projects/sample1/core/index.ts' exist - use it as a name resolution result. +Info 47 [00:02:01.000] ======== Module name '../core' was successfully resolved to '/user/username/projects/sample1/core/index.ts'. ======== +Info 48 [00:02:02.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/core 1 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Failed Lookup Locations +Info 49 [00:02:03.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/core 1 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Failed Lookup Locations +Info 50 [00:02:04.000] ======== Resolving module '../core/anotherClass' from '/user/username/projects/sample1/logic/index.ts'. ======== +Info 51 [00:02:05.000] Using compiler options of project reference redirect '/user/username/projects/sample1/logic/tsconfig.json'. +Info 52 [00:02:06.000] Module resolution kind is not specified, using 'NodeJs'. +Info 53 [00:02:07.000] Loading module as file / folder, candidate module location '/user/username/projects/sample1/core/anotherClass', target file types: TypeScript, Declaration. +Info 54 [00:02:08.000] File '/user/username/projects/sample1/core/anotherClass.ts' exist - use it as a name resolution result. +Info 55 [00:02:09.000] ======== Module name '../core/anotherClass' was successfully resolved to '/user/username/projects/sample1/core/anotherClass.ts'. ======== +Info 56 [00:02:10.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/sample1/core/myClass.ts 500 undefined WatchType: Closed Script info +Info 57 [00:02:11.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/sample1/core/index.ts 500 undefined WatchType: Closed Script info +Info 58 [00:02:12.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/sample1/core/anotherClass.ts 500 undefined WatchType: Closed Script info +Info 59 [00:02:13.000] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined WatchType: Closed Script info +Info 60 [00:02:14.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/tests/node_modules/@types 1 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Type roots +Info 61 [00:02:15.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/tests/node_modules/@types 1 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Type roots +Info 62 [00:02:16.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/node_modules/@types 1 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Type roots +Info 63 [00:02:17.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/node_modules/@types 1 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Type roots +Info 64 [00:02:18.000] Finishing updateGraphWorker: Project: /user/username/projects/sample1/tests/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 65 [00:02:19.000] Project '/user/username/projects/sample1/tests/tsconfig.json' (Configured) +Info 66 [00:02:20.000] Files (6) + /a/lib/lib.d.ts + /user/username/projects/sample1/core/myClass.ts + /user/username/projects/sample1/core/index.ts + /user/username/projects/sample1/core/anotherClass.ts + /user/username/projects/sample1/logic/index.ts + /user/username/projects/sample1/tests/index.ts + + + ../../../../../a/lib/lib.d.ts + Default library for target 'es5' + ../core/myClass.ts + Imported via "../core/myClass" from file '../logic/index.ts' + ../core/index.ts + Imported via "../core" from file '../logic/index.ts' + ../core/anotherClass.ts + Imported via "../core/anotherClass" from file '../logic/index.ts' + ../logic/index.ts + Imported via "../logic" from file 'index.ts' + index.ts + Matched by default include pattern '**/*' + +Info 67 [00:02:21.000] ----------------------------------------------- +Info 68 [00:02:22.000] Search path: /user/username/projects/sample1/tests +Info 69 [00:02:23.000] For info: /user/username/projects/sample1/tests/tsconfig.json :: No config files found. +Info 70 [00:02:24.000] Project '/user/username/projects/sample1/tests/tsconfig.json' (Configured) +Info 70 [00:02:25.000] Files (6) + +Info 70 [00:02:26.000] ----------------------------------------------- +Info 70 [00:02:27.000] Open files: +Info 70 [00:02:28.000] FileName: /user/username/projects/sample1/tests/index.ts ProjectRootPath: undefined +Info 70 [00:02:29.000] Projects: /user/username/projects/sample1/tests/tsconfig.json +After request + +PolledWatches:: +/user/username/projects/sample1/tests/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/sample1/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/user/username/projects/sample1/tests/tsconfig.json: + {} +/user/username/projects/sample1/logic/tsconfig.json: + {} +/user/username/projects/sample1/core/tsconfig.json: + {} +/user/username/projects/sample1: + {} +/user/username/projects/sample1/logic/index.ts: + {} +/user/username/projects/sample1/core/myclass.ts: + {} +/user/username/projects/sample1/core/index.ts: + {} +/user/username/projects/sample1/core/anotherclass.ts: + {} +/a/lib/lib.d.ts: + {} + +FsWatchesRecursive:: +/user/username/projects/sample1/tests: + {} +/user/username/projects/sample1/logic: + {} +/user/username/projects/sample1/core: + {} + +Info 70 [00:02:30.000] response: + { + "responseRequired": false + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/cacheResolutions/multi-file-not-built.js b/tests/baselines/reference/tsserver/cacheResolutions/multi-file-not-built.js new file mode 100644 index 00000000000..ba53926d2db --- /dev/null +++ b/tests/baselines/reference/tsserver/cacheResolutions/multi-file-not-built.js @@ -0,0 +1,1947 @@ +Info 0 [00:01:00.000] Provided types map file "/a/lib/typesMap.json" doesn't exist +Info 1 [00:01:01.000] request: + { + "command": "open", + "arguments": { + "file": "/src/project/randomFileForImport.ts" + }, + "seq": 1, + "type": "request" + } +Before request +//// [/src/project/tsconfig.json] +{"compilerOptions":{"moduleResolution":"node16","composite":true,"cacheResolutions":true,"traceResolution":true},"include":["*.ts"],"exclude":["*.d.ts"]} + +//// [/src/project/fileWithImports.ts] +import type { ImportInterface0 } from "pkg0" assert { "resolution-mode": "import" }; +import type { RequireInterface1 } from "pkg1" assert { "resolution-mode": "require" }; + + +//// [/src/project/randomFileForImport.ts] +export const x = 10; + +//// [/src/project/node_modules/pkg0/package.json] +{"name":"pkg0","version":"0.0.1","exports":{"import":"./import.js","require":"./require.js"}} + +//// [/src/project/node_modules/pkg0/import.d.ts] +export interface ImportInterface0 {} + +//// [/src/project/node_modules/pkg0/require.d.ts] +export interface RequireInterface0 {} + +//// [/src/project/node_modules/pkg1/package.json] +{"name":"pkg1","version":"0.0.1","exports":{"import":"./import.js","require":"./require.js"}} + +//// [/src/project/node_modules/pkg1/import.d.ts] +export interface ImportInterface1 {} + +//// [/src/project/fileWithTypeRefs.ts] +/// +/// +interface LocalInterface extends ImportInterface2, RequireInterface3 {} +export {} + + +//// [/src/project/randomFileForTypeRef.ts] +export const x = 10; + +//// [/src/project/node_modules/pkg2/package.json] +{"name":"pkg2","version":"0.0.1","exports":{"import":"./import.js","require":"./require.js"}} + +//// [/src/project/node_modules/pkg2/import.d.ts] +export {}; +declare global { + interface ImportInterface2 {} +} + + +//// [/src/project/node_modules/pkg2/require.d.ts] +export {}; +declare global { + interface RequireInterface2 {} +} + + +//// [/src/project/node_modules/pkg3/package.json] +{"name":"pkg3","version":"0.0.1","exports":{"import":"./import.js","require":"./require.js"}} + +//// [/src/project/node_modules/pkg3/import.d.ts] +export {}; +declare global { + interface ImportInterface3 {} +} + + +//// [/src/project/node_modules/@types/pkg4/index.d.ts] +export const x = 10; + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + + +PolledWatches:: + +FsWatches:: + +FsWatchesRecursive:: + +Info 2 [00:01:02.000] Search path: /src/project +Info 3 [00:01:03.000] For info: /src/project/randomFileForImport.ts :: Config file name: /src/project/tsconfig.json +Info 4 [00:01:04.000] Creating configuration project /src/project/tsconfig.json +Info 5 [00:01:05.000] FileWatcher:: Added:: WatchInfo: /src/project/tsconfig.json 2000 undefined Project: /src/project/tsconfig.json WatchType: Config file +Info 6 [00:01:06.000] Config: /src/project/tsconfig.json : { + "rootNames": [ + "/src/project/fileWithImports.ts", + "/src/project/fileWithTypeRefs.ts", + "/src/project/randomFileForImport.ts", + "/src/project/randomFileForTypeRef.ts" + ], + "options": { + "moduleResolution": 3, + "composite": true, + "cacheResolutions": true, + "traceResolution": true, + "configFilePath": "/src/project/tsconfig.json" + } +} +Info 7 [00:01:07.000] DirectoryWatcher:: Added:: WatchInfo: /src/project 0 undefined Config: /src/project/tsconfig.json WatchType: Wild card directory +Info 8 [00:01:08.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project 0 undefined Config: /src/project/tsconfig.json WatchType: Wild card directory +Info 9 [00:01:09.000] FileWatcher:: Added:: WatchInfo: /src/project/fileWithImports.ts 500 undefined WatchType: Closed Script info +Info 10 [00:01:10.000] FileWatcher:: Added:: WatchInfo: /src/project/fileWithTypeRefs.ts 500 undefined WatchType: Closed Script info +Info 11 [00:01:11.000] FileWatcher:: Added:: WatchInfo: /src/project/randomFileForTypeRef.ts 500 undefined WatchType: Closed Script info +Info 12 [00:01:12.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 13 [00:01:13.000] File '/src/project/package.json' does not exist. +Info 14 [00:01:14.000] File '/src/package.json' does not exist. +Info 15 [00:01:15.000] File '/package.json' does not exist. +Info 16 [00:01:16.000] ======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Info 17 [00:01:17.000] Explicitly specified module resolution kind: 'Node16'. +Info 18 [00:01:18.000] Resolving in ESM mode with conditions 'node', 'import', 'types'. +Info 19 [00:01:19.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 20 [00:01:20.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 21 [00:01:21.000] File '/package.json' does not exist according to earlier cached lookups. +Info 22 [00:01:22.000] Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Info 23 [00:01:23.000] Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Info 24 [00:01:24.000] Matched 'exports' condition 'import'. +Info 25 [00:01:25.000] Using 'exports' subpath '.' with target './import.js'. +Info 26 [00:01:26.000] File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +Info 27 [00:01:27.000] File '/src/project/node_modules/pkg0/import.ts' does not exist. +Info 28 [00:01:28.000] File '/src/project/node_modules/pkg0/import.tsx' does not exist. +Info 29 [00:01:29.000] File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Info 30 [00:01:30.000] Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +Info 31 [00:01:31.000] ======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +Info 32 [00:01:32.000] ======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Info 33 [00:01:33.000] Explicitly specified module resolution kind: 'Node16'. +Info 34 [00:01:34.000] Resolving in CJS mode with conditions 'node', 'require', 'types'. +Info 35 [00:01:35.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 36 [00:01:36.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 37 [00:01:37.000] File '/package.json' does not exist according to earlier cached lookups. +Info 38 [00:01:38.000] Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Info 39 [00:01:39.000] Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Info 40 [00:01:40.000] Saw non-matching condition 'import'. +Info 41 [00:01:41.000] Matched 'exports' condition 'require'. +Info 42 [00:01:42.000] Using 'exports' subpath '.' with target './require.js'. +Info 43 [00:01:43.000] File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +Info 44 [00:01:44.000] File '/src/project/node_modules/pkg1/require.ts' does not exist. +Info 45 [00:01:45.000] File '/src/project/node_modules/pkg1/require.tsx' does not exist. +Info 46 [00:01:46.000] File '/src/project/node_modules/pkg1/require.d.ts' does not exist. +Info 47 [00:01:47.000] File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Info 48 [00:01:48.000] Directory '/src/node_modules' does not exist, skipping all lookups in it. +Info 49 [00:01:49.000] Directory '/node_modules' does not exist, skipping all lookups in it. +Info 50 [00:01:50.000] File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +Info 51 [00:01:51.000] Saw non-matching condition 'import'. +Info 52 [00:01:52.000] Matched 'exports' condition 'require'. +Info 53 [00:01:53.000] Using 'exports' subpath '.' with target './require.js'. +Info 54 [00:01:54.000] File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +Info 55 [00:01:55.000] File '/src/project/node_modules/pkg1/require.js' does not exist. +Info 56 [00:01:56.000] File '/src/project/node_modules/pkg1/require.jsx' does not exist. +Info 57 [00:01:57.000] Directory '/src/node_modules' does not exist, skipping all lookups in it. +Info 58 [00:01:58.000] Directory '/node_modules' does not exist, skipping all lookups in it. +Info 59 [00:01:59.000] ======== Module name 'pkg1' was not resolved. ======== +Info 60 [00:02:00.000] File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Info 61 [00:02:01.000] DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 62 [00:02:02.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 63 [00:02:03.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 64 [00:02:04.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 65 [00:02:05.000] File '/package.json' does not exist according to earlier cached lookups. +Info 66 [00:02:06.000] ======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Info 67 [00:02:07.000] Resolving with primary search path '/src/project/node_modules/@types'. +Info 68 [00:02:08.000] Looking up in 'node_modules' folder, initial location '/src/project'. +Info 69 [00:02:09.000] Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Info 70 [00:02:10.000] Matched 'exports' condition 'import'. +Info 71 [00:02:11.000] Using 'exports' subpath '.' with target './import.js'. +Info 72 [00:02:12.000] File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +Info 73 [00:02:13.000] File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Info 74 [00:02:14.000] Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +Info 75 [00:02:15.000] ======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +Info 76 [00:02:16.000] ======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Info 77 [00:02:17.000] Resolving with primary search path '/src/project/node_modules/@types'. +Info 78 [00:02:18.000] Looking up in 'node_modules' folder, initial location '/src/project'. +Info 79 [00:02:19.000] Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Info 80 [00:02:20.000] Saw non-matching condition 'import'. +Info 81 [00:02:21.000] Matched 'exports' condition 'require'. +Info 82 [00:02:22.000] Using 'exports' subpath '.' with target './require.js'. +Info 83 [00:02:23.000] File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +Info 84 [00:02:24.000] File '/src/project/node_modules/pkg3/require.d.ts' does not exist. +Info 85 [00:02:25.000] File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Info 86 [00:02:26.000] Directory '/src/node_modules' does not exist, skipping all lookups in it. +Info 87 [00:02:27.000] Directory '/node_modules' does not exist, skipping all lookups in it. +Info 88 [00:02:28.000] ======== Type reference directive 'pkg3' was not resolved. ======== +Info 89 [00:02:29.000] File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Info 90 [00:02:30.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 91 [00:02:31.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 92 [00:02:32.000] File '/package.json' does not exist according to earlier cached lookups. +Info 93 [00:02:33.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 94 [00:02:34.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 95 [00:02:35.000] File '/package.json' does not exist according to earlier cached lookups. +Info 96 [00:02:36.000] ======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Info 97 [00:02:37.000] Resolving with primary search path '/src/project/node_modules/@types'. +Info 98 [00:02:38.000] File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +Info 99 [00:02:39.000] File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Info 100 [00:02:40.000] Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 101 [00:02:41.000] ======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +Info 102 [00:02:42.000] File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +Info 103 [00:02:43.000] File '/src/project/node_modules/@types/package.json' does not exist. +Info 104 [00:02:44.000] File '/src/project/node_modules/package.json' does not exist. +Info 105 [00:02:45.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 106 [00:02:46.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 107 [00:02:47.000] File '/package.json' does not exist according to earlier cached lookups. +Info 108 [00:02:48.000] File '/a/lib/package.json' does not exist. +Info 109 [00:02:49.000] File '/a/package.json' does not exist. +Info 110 [00:02:50.000] File '/package.json' does not exist according to earlier cached lookups. +Info 111 [00:02:51.000] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined WatchType: Closed Script info +Info 112 [00:02:52.000] DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 113 [00:02:53.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 114 [00:02:54.000] DirectoryWatcher:: Added:: WatchInfo: /src/project 0 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 115 [00:02:55.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project 0 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 116 [00:02:56.000] FileWatcher:: Added:: WatchInfo: /src/project/node_modules/pkg0/package.json 2000 undefined Project: /src/project/tsconfig.json WatchType: File location affecting resolution +Info 117 [00:02:57.000] FileWatcher:: Added:: WatchInfo: /src/project/node_modules/pkg1/package.json 2000 undefined Project: /src/project/tsconfig.json WatchType: File location affecting resolution +Info 118 [00:02:58.000] FileWatcher:: Added:: WatchInfo: /src/project/node_modules/pkg2/package.json 2000 undefined Project: /src/project/tsconfig.json WatchType: File location affecting resolution +Info 119 [00:02:59.000] FileWatcher:: Added:: WatchInfo: /src/project/node_modules/pkg3/package.json 2000 undefined Project: /src/project/tsconfig.json WatchType: File location affecting resolution +Info 120 [00:03:00.000] FileWatcher:: Added:: WatchInfo: /src/project/node_modules/@types/pkg4/package.json 2000 undefined Project: /src/project/tsconfig.json WatchType: File location affecting resolution +Info 121 [00:03:01.000] FileWatcher:: Added:: WatchInfo: /src/project/node_modules/@types/package.json 2000 undefined Project: /src/project/tsconfig.json WatchType: File location affecting resolution +Info 122 [00:03:02.000] FileWatcher:: Added:: WatchInfo: /src/project/node_modules/package.json 2000 undefined Project: /src/project/tsconfig.json WatchType: File location affecting resolution +Info 123 [00:03:03.000] DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules/@types 1 undefined Project: /src/project/tsconfig.json WatchType: Type roots +Info 124 [00:03:04.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules/@types 1 undefined Project: /src/project/tsconfig.json WatchType: Type roots +Info 125 [00:03:05.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 126 [00:03:06.000] Project '/src/project/tsconfig.json' (Configured) +Info 127 [00:03:07.000] Files (8) + /a/lib/lib.d.ts + /src/project/node_modules/pkg0/import.d.ts + /src/project/fileWithImports.ts + /src/project/node_modules/pkg2/import.d.ts + /src/project/fileWithTypeRefs.ts + /src/project/randomFileForImport.ts + /src/project/randomFileForTypeRef.ts + /src/project/node_modules/@types/pkg4/index.d.ts + + + ../../a/lib/lib.d.ts + Default library for target 'es5' + node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" + fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" + fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found + +Info 128 [00:03:08.000] ----------------------------------------------- +Info 129 [00:03:09.000] Search path: /src/project +Info 130 [00:03:10.000] For info: /src/project/tsconfig.json :: No config files found. +Info 131 [00:03:11.000] Project '/src/project/tsconfig.json' (Configured) +Info 131 [00:03:12.000] Files (8) + +Info 131 [00:03:13.000] ----------------------------------------------- +Info 131 [00:03:14.000] Open files: +Info 131 [00:03:15.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 131 [00:03:16.000] Projects: /src/project/tsconfig.json +After request + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 131 [00:03:17.000] response: + { + "responseRequired": false + } +Info 132 [00:03:18.000] request: + { + "command": "open", + "arguments": { + "file": "/src/project/randomFileForTypeRef.ts" + }, + "seq": 2, + "type": "request" + } +Before request + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 133 [00:03:19.000] FileWatcher:: Close:: WatchInfo: /src/project/randomFileForTypeRef.ts 500 undefined WatchType: Closed Script info +Info 134 [00:03:20.000] Search path: /src/project +Info 135 [00:03:21.000] For info: /src/project/randomFileForTypeRef.ts :: Config file name: /src/project/tsconfig.json +Info 136 [00:03:22.000] Search path: /src/project +Info 137 [00:03:23.000] For info: /src/project/tsconfig.json :: No config files found. +Info 138 [00:03:24.000] Project '/src/project/tsconfig.json' (Configured) +Info 138 [00:03:25.000] Files (8) + +Info 138 [00:03:26.000] ----------------------------------------------- +Info 138 [00:03:27.000] Open files: +Info 138 [00:03:28.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 138 [00:03:29.000] Projects: /src/project/tsconfig.json +Info 138 [00:03:30.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 138 [00:03:31.000] Projects: /src/project/tsconfig.json +After request + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 138 [00:03:32.000] response: + { + "responseRequired": false + } +Info 139 [00:03:33.000] modify randomFileForImport by adding import +Info 140 [00:03:34.000] request: + { + "command": "change", + "arguments": { + "file": "/src/project/randomFileForImport.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\n" + }, + "seq": 3, + "type": "request" + } +Before request + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +After request + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 141 [00:03:35.000] response: + { + "responseRequired": false + } +Info 142 [00:03:36.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 143 [00:03:37.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 144 [00:03:38.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 145 [00:03:39.000] File '/package.json' does not exist according to earlier cached lookups. +Info 146 [00:03:40.000] File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Info 147 [00:03:41.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 148 [00:03:42.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 149 [00:03:43.000] File '/package.json' does not exist according to earlier cached lookups. +Info 150 [00:03:44.000] File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Info 151 [00:03:45.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 152 [00:03:46.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 153 [00:03:47.000] File '/package.json' does not exist according to earlier cached lookups. +Info 154 [00:03:48.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 155 [00:03:49.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 156 [00:03:50.000] File '/package.json' does not exist according to earlier cached lookups. +Info 157 [00:03:51.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 158 [00:03:52.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 159 [00:03:53.000] File '/package.json' does not exist according to earlier cached lookups. +Info 160 [00:03:54.000] File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +Info 161 [00:03:55.000] File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +Info 162 [00:03:56.000] File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +Info 163 [00:03:57.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 164 [00:03:58.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 165 [00:03:59.000] File '/package.json' does not exist according to earlier cached lookups. +Info 166 [00:04:00.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 167 [00:04:01.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 168 [00:04:02.000] File '/package.json' does not exist according to earlier cached lookups. +Info 169 [00:04:03.000] Reusing resolution of module 'pkg0' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +Info 170 [00:04:04.000] Reusing resolution of module 'pkg1' from '/src/project/fileWithImports.ts' of old program, it was not resolved. +Info 171 [00:04:05.000] File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Info 172 [00:04:06.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 173 [00:04:07.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 174 [00:04:08.000] File '/package.json' does not exist according to earlier cached lookups. +Info 175 [00:04:09.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Info 176 [00:04:10.000] Reusing resolution of type reference directive 'pkg3' from '/src/project/fileWithTypeRefs.ts' of old program, it was not resolved. +Info 177 [00:04:11.000] File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Info 178 [00:04:12.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 179 [00:04:13.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 180 [00:04:14.000] File '/package.json' does not exist according to earlier cached lookups. +Info 181 [00:04:15.000] ======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Info 182 [00:04:16.000] Explicitly specified module resolution kind: 'Node16'. +Info 183 [00:04:17.000] Resolving in ESM mode with conditions 'node', 'import', 'types'. +Info 184 [00:04:18.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 185 [00:04:19.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 186 [00:04:20.000] File '/package.json' does not exist according to earlier cached lookups. +Info 187 [00:04:21.000] Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Info 188 [00:04:22.000] File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Info 189 [00:04:23.000] Matched 'exports' condition 'import'. +Info 190 [00:04:24.000] Using 'exports' subpath '.' with target './import.js'. +Info 191 [00:04:25.000] File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +Info 192 [00:04:26.000] File '/src/project/node_modules/pkg0/import.ts' does not exist. +Info 193 [00:04:27.000] File '/src/project/node_modules/pkg0/import.tsx' does not exist. +Info 194 [00:04:28.000] File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Info 195 [00:04:29.000] Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +Info 196 [00:04:30.000] ======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +Info 197 [00:04:31.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 198 [00:04:32.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 199 [00:04:33.000] File '/package.json' does not exist according to earlier cached lookups. +Info 200 [00:04:34.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 201 [00:04:35.000] File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +Info 202 [00:04:36.000] File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +Info 203 [00:04:37.000] File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +Info 204 [00:04:38.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 205 [00:04:39.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 206 [00:04:40.000] File '/package.json' does not exist according to earlier cached lookups. +Info 207 [00:04:41.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 208 [00:04:42.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 209 [00:04:43.000] File '/package.json' does not exist according to earlier cached lookups. +Info 210 [00:04:44.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 2 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info 211 [00:04:45.000] Different program with same set of files +Info 212 [00:04:46.000] modify randomFileForTypeRef by adding typeRef +Info 213 [00:04:47.000] request: + { + "command": "change", + "arguments": { + "file": "/src/project/randomFileForTypeRef.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "/// \n" + }, + "seq": 4, + "type": "request" + } +Before request + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +After request + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 214 [00:04:48.000] response: + { + "responseRequired": false + } +Info 215 [00:04:49.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 216 [00:04:50.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 217 [00:04:51.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 218 [00:04:52.000] File '/package.json' does not exist according to earlier cached lookups. +Info 219 [00:04:53.000] File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Info 220 [00:04:54.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 221 [00:04:55.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 222 [00:04:56.000] File '/package.json' does not exist according to earlier cached lookups. +Info 223 [00:04:57.000] File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Info 224 [00:04:58.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 225 [00:04:59.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 226 [00:05:00.000] File '/package.json' does not exist according to earlier cached lookups. +Info 227 [00:05:01.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 228 [00:05:02.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 229 [00:05:03.000] File '/package.json' does not exist according to earlier cached lookups. +Info 230 [00:05:04.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 231 [00:05:05.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 232 [00:05:06.000] File '/package.json' does not exist according to earlier cached lookups. +Info 233 [00:05:07.000] File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +Info 234 [00:05:08.000] File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +Info 235 [00:05:09.000] File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +Info 236 [00:05:10.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 237 [00:05:11.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 238 [00:05:12.000] File '/package.json' does not exist according to earlier cached lookups. +Info 239 [00:05:13.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 240 [00:05:14.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 241 [00:05:15.000] File '/package.json' does not exist according to earlier cached lookups. +Info 242 [00:05:16.000] Reusing resolution of module 'pkg0' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +Info 243 [00:05:17.000] Reusing resolution of module 'pkg1' from '/src/project/fileWithImports.ts' of old program, it was not resolved. +Info 244 [00:05:18.000] File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Info 245 [00:05:19.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 246 [00:05:20.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 247 [00:05:21.000] File '/package.json' does not exist according to earlier cached lookups. +Info 248 [00:05:22.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Info 249 [00:05:23.000] Reusing resolution of type reference directive 'pkg3' from '/src/project/fileWithTypeRefs.ts' of old program, it was not resolved. +Info 250 [00:05:24.000] File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Info 251 [00:05:25.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 252 [00:05:26.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 253 [00:05:27.000] File '/package.json' does not exist according to earlier cached lookups. +Info 254 [00:05:28.000] Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +Info 255 [00:05:29.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 256 [00:05:30.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 257 [00:05:31.000] File '/package.json' does not exist according to earlier cached lookups. +Info 258 [00:05:32.000] ======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts', root directory '/src/project/node_modules/@types'. ======== +Info 259 [00:05:33.000] Resolving with primary search path '/src/project/node_modules/@types'. +Info 260 [00:05:34.000] Looking up in 'node_modules' folder, initial location '/src/project'. +Info 261 [00:05:35.000] File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Info 262 [00:05:36.000] Matched 'exports' condition 'import'. +Info 263 [00:05:37.000] Using 'exports' subpath '.' with target './import.js'. +Info 264 [00:05:38.000] File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +Info 265 [00:05:39.000] File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Info 266 [00:05:40.000] Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +Info 267 [00:05:41.000] ======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +Info 268 [00:05:42.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 269 [00:05:43.000] File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +Info 270 [00:05:44.000] File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +Info 271 [00:05:45.000] File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +Info 272 [00:05:46.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 273 [00:05:47.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 274 [00:05:48.000] File '/package.json' does not exist according to earlier cached lookups. +Info 275 [00:05:49.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 276 [00:05:50.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 277 [00:05:51.000] File '/package.json' does not exist according to earlier cached lookups. +Info 278 [00:05:52.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 3 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info 279 [00:05:53.000] Different program with same set of files +Info 280 [00:05:54.000] write file not resolved by import +Info 281 [00:05:57.000] DirectoryWatcher:: Triggered with /src/project/node_modules/pkg1/require.d.ts :: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 282 [00:05:58.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg1/require.d.ts :: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 283 [00:05:59.000] DirectoryWatcher:: Triggered with /src/project/node_modules/pkg1/require.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 284 [00:06:00.000] Scheduled: /src/project/tsconfig.jsonFailedLookupInvalidation +Info 285 [00:06:01.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg1/require.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Before running timeout callbacks +//// [/src/project/node_modules/pkg1/require.d.ts] +export interface RequireInterface1 {} + + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 286 [00:06:02.000] Running: /src/project/tsconfig.jsonFailedLookupInvalidation +Info 287 [00:06:03.000] Scheduled: /src/project/tsconfig.json +Info 288 [00:06:04.000] Scheduled: *ensureProjectForOpenFiles* +After running timeout callbacks + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Before running timeout callbacks + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 289 [00:06:05.000] Running: /src/project/tsconfig.json +Info 290 [00:06:06.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 291 [00:06:07.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 292 [00:06:08.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 293 [00:06:09.000] File '/package.json' does not exist according to earlier cached lookups. +Info 294 [00:06:10.000] File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Info 295 [00:06:11.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 296 [00:06:12.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 297 [00:06:13.000] File '/package.json' does not exist according to earlier cached lookups. +Info 298 [00:06:14.000] File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Info 299 [00:06:15.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 300 [00:06:16.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 301 [00:06:17.000] File '/package.json' does not exist according to earlier cached lookups. +Info 302 [00:06:18.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 303 [00:06:19.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 304 [00:06:20.000] File '/package.json' does not exist according to earlier cached lookups. +Info 305 [00:06:21.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 306 [00:06:22.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 307 [00:06:23.000] File '/package.json' does not exist according to earlier cached lookups. +Info 308 [00:06:24.000] File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +Info 309 [00:06:25.000] File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +Info 310 [00:06:26.000] File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +Info 311 [00:06:27.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 312 [00:06:28.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 313 [00:06:29.000] File '/package.json' does not exist according to earlier cached lookups. +Info 314 [00:06:30.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 315 [00:06:31.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 316 [00:06:32.000] File '/package.json' does not exist according to earlier cached lookups. +Info 317 [00:06:33.000] Reusing resolution of module 'pkg0' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +Info 318 [00:06:34.000] ======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Info 319 [00:06:35.000] Explicitly specified module resolution kind: 'Node16'. +Info 320 [00:06:36.000] Resolving in CJS mode with conditions 'node', 'require', 'types'. +Info 321 [00:06:37.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 322 [00:06:38.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 323 [00:06:39.000] File '/package.json' does not exist according to earlier cached lookups. +Info 324 [00:06:40.000] Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Info 325 [00:06:41.000] Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Info 326 [00:06:42.000] Saw non-matching condition 'import'. +Info 327 [00:06:43.000] Matched 'exports' condition 'require'. +Info 328 [00:06:44.000] Using 'exports' subpath '.' with target './require.js'. +Info 329 [00:06:45.000] File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +Info 330 [00:06:46.000] File '/src/project/node_modules/pkg1/require.ts' does not exist. +Info 331 [00:06:47.000] File '/src/project/node_modules/pkg1/require.tsx' does not exist. +Info 332 [00:06:48.000] File '/src/project/node_modules/pkg1/require.d.ts' exist - use it as a name resolution result. +Info 333 [00:06:49.000] Resolving real path for '/src/project/node_modules/pkg1/require.d.ts', result '/src/project/node_modules/pkg1/require.d.ts'. +Info 334 [00:06:50.000] ======== Module name 'pkg1' was successfully resolved to '/src/project/node_modules/pkg1/require.d.ts' with Package ID 'pkg1/require.d.ts@0.0.1'. ======== +Info 335 [00:06:51.000] File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Info 336 [00:06:52.000] File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +Info 337 [00:06:53.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 338 [00:06:54.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 339 [00:06:55.000] File '/package.json' does not exist according to earlier cached lookups. +Info 340 [00:06:56.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Info 341 [00:06:57.000] Reusing resolution of type reference directive 'pkg3' from '/src/project/fileWithTypeRefs.ts' of old program, it was not resolved. +Info 342 [00:06:58.000] File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Info 343 [00:06:59.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 344 [00:07:00.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 345 [00:07:01.000] File '/package.json' does not exist according to earlier cached lookups. +Info 346 [00:07:02.000] Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +Info 347 [00:07:03.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 348 [00:07:04.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 349 [00:07:05.000] File '/package.json' does not exist according to earlier cached lookups. +Info 350 [00:07:06.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Info 351 [00:07:07.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 352 [00:07:08.000] File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +Info 353 [00:07:09.000] File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +Info 354 [00:07:10.000] File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +Info 355 [00:07:11.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 356 [00:07:12.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 357 [00:07:13.000] File '/package.json' does not exist according to earlier cached lookups. +Info 358 [00:07:14.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 359 [00:07:15.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 360 [00:07:16.000] File '/package.json' does not exist according to earlier cached lookups. +Info 361 [00:07:17.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 4 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info 362 [00:07:18.000] Project '/src/project/tsconfig.json' (Configured) +Info 363 [00:07:19.000] Files (9) + /a/lib/lib.d.ts + /src/project/node_modules/pkg0/import.d.ts + /src/project/node_modules/pkg1/require.d.ts + /src/project/fileWithImports.ts + /src/project/node_modules/pkg2/import.d.ts + /src/project/fileWithTypeRefs.ts + /src/project/randomFileForImport.ts + /src/project/randomFileForTypeRef.ts + /src/project/node_modules/@types/pkg4/index.d.ts + + + ../../a/lib/lib.d.ts + Default library for target 'es5' + node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + Imported via "pkg0" from file 'randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" + node_modules/pkg1/require.d.ts + Imported via "pkg1" from file 'fileWithImports.ts' with packageId 'pkg1/require.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg1/package.json' does not have field "type" + fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" + fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found + +Info 364 [00:07:20.000] ----------------------------------------------- +Info 365 [00:07:21.000] Running: *ensureProjectForOpenFiles* +Info 366 [00:07:22.000] Before ensureProjectForOpenFiles: +Info 367 [00:07:23.000] Project '/src/project/tsconfig.json' (Configured) +Info 367 [00:07:24.000] Files (9) + +Info 367 [00:07:25.000] ----------------------------------------------- +Info 367 [00:07:26.000] Open files: +Info 367 [00:07:27.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 367 [00:07:28.000] Projects: /src/project/tsconfig.json +Info 367 [00:07:29.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 367 [00:07:30.000] Projects: /src/project/tsconfig.json +Info 367 [00:07:31.000] After ensureProjectForOpenFiles: +Info 368 [00:07:32.000] Project '/src/project/tsconfig.json' (Configured) +Info 368 [00:07:33.000] Files (9) + +Info 368 [00:07:34.000] ----------------------------------------------- +Info 368 [00:07:35.000] Open files: +Info 368 [00:07:36.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 368 [00:07:37.000] Projects: /src/project/tsconfig.json +Info 368 [00:07:38.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 368 [00:07:39.000] Projects: /src/project/tsconfig.json +After running timeout callbacks + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 368 [00:07:40.000] write file not resolved by typeRef +Info 369 [00:07:43.000] DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3/require.d.ts :: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 370 [00:07:44.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3/require.d.ts :: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 371 [00:07:45.000] DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3/require.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 372 [00:07:46.000] Scheduled: /src/project/tsconfig.jsonFailedLookupInvalidation +Info 373 [00:07:47.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3/require.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Before running timeout callbacks +//// [/src/project/node_modules/pkg3/require.d.ts] +export interface RequireInterface3 {} + + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 374 [00:07:48.000] Running: /src/project/tsconfig.jsonFailedLookupInvalidation +Info 375 [00:07:49.000] Scheduled: /src/project/tsconfig.json +Info 376 [00:07:50.000] Scheduled: *ensureProjectForOpenFiles* +After running timeout callbacks + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Before running timeout callbacks + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 377 [00:07:51.000] Running: /src/project/tsconfig.json +Info 378 [00:07:52.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 379 [00:07:53.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 380 [00:07:54.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 381 [00:07:55.000] File '/package.json' does not exist according to earlier cached lookups. +Info 382 [00:07:56.000] File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Info 383 [00:07:57.000] File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +Info 384 [00:07:58.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 385 [00:07:59.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 386 [00:08:00.000] File '/package.json' does not exist according to earlier cached lookups. +Info 387 [00:08:01.000] File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Info 388 [00:08:02.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 389 [00:08:03.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 390 [00:08:04.000] File '/package.json' does not exist according to earlier cached lookups. +Info 391 [00:08:05.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 392 [00:08:06.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 393 [00:08:07.000] File '/package.json' does not exist according to earlier cached lookups. +Info 394 [00:08:08.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 395 [00:08:09.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 396 [00:08:10.000] File '/package.json' does not exist according to earlier cached lookups. +Info 397 [00:08:11.000] File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +Info 398 [00:08:12.000] File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +Info 399 [00:08:13.000] File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +Info 400 [00:08:14.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 401 [00:08:15.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 402 [00:08:16.000] File '/package.json' does not exist according to earlier cached lookups. +Info 403 [00:08:17.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 404 [00:08:18.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 405 [00:08:19.000] File '/package.json' does not exist according to earlier cached lookups. +Info 406 [00:08:20.000] Reusing resolution of module 'pkg0' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +Info 407 [00:08:21.000] Reusing resolution of module 'pkg1' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg1/require.d.ts' with Package ID 'pkg1/require.d.ts@0.0.1'. +Info 408 [00:08:22.000] File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Info 409 [00:08:23.000] File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +Info 410 [00:08:24.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 411 [00:08:25.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 412 [00:08:26.000] File '/package.json' does not exist according to earlier cached lookups. +Info 413 [00:08:27.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Info 414 [00:08:28.000] ======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Info 415 [00:08:29.000] Resolving with primary search path '/src/project/node_modules/@types'. +Info 416 [00:08:30.000] Looking up in 'node_modules' folder, initial location '/src/project'. +Info 417 [00:08:31.000] Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Info 418 [00:08:32.000] Saw non-matching condition 'import'. +Info 419 [00:08:33.000] Matched 'exports' condition 'require'. +Info 420 [00:08:34.000] Using 'exports' subpath '.' with target './require.js'. +Info 421 [00:08:35.000] File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +Info 422 [00:08:36.000] File '/src/project/node_modules/pkg3/require.d.ts' exist - use it as a name resolution result. +Info 423 [00:08:37.000] Resolving real path for '/src/project/node_modules/pkg3/require.d.ts', result '/src/project/node_modules/pkg3/require.d.ts'. +Info 424 [00:08:38.000] ======== Type reference directive 'pkg3' was successfully resolved to '/src/project/node_modules/pkg3/require.d.ts' with Package ID 'pkg3/require.d.ts@0.0.1', primary: false. ======== +Info 425 [00:08:39.000] File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Info 426 [00:08:40.000] File '/src/project/node_modules/pkg3/package.json' exists according to earlier cached lookups. +Info 427 [00:08:41.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 428 [00:08:42.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 429 [00:08:43.000] File '/package.json' does not exist according to earlier cached lookups. +Info 430 [00:08:44.000] Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +Info 431 [00:08:45.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 432 [00:08:46.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 433 [00:08:47.000] File '/package.json' does not exist according to earlier cached lookups. +Info 434 [00:08:48.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Info 435 [00:08:49.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 436 [00:08:50.000] File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +Info 437 [00:08:51.000] File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +Info 438 [00:08:52.000] File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +Info 439 [00:08:53.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 440 [00:08:54.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 441 [00:08:55.000] File '/package.json' does not exist according to earlier cached lookups. +Info 442 [00:08:56.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 443 [00:08:57.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 444 [00:08:58.000] File '/package.json' does not exist according to earlier cached lookups. +Info 445 [00:08:59.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 5 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info 446 [00:09:00.000] Project '/src/project/tsconfig.json' (Configured) +Info 447 [00:09:01.000] Files (10) + /a/lib/lib.d.ts + /src/project/node_modules/pkg0/import.d.ts + /src/project/node_modules/pkg1/require.d.ts + /src/project/fileWithImports.ts + /src/project/node_modules/pkg2/import.d.ts + /src/project/node_modules/pkg3/require.d.ts + /src/project/fileWithTypeRefs.ts + /src/project/randomFileForImport.ts + /src/project/randomFileForTypeRef.ts + /src/project/node_modules/@types/pkg4/index.d.ts + + + ../../a/lib/lib.d.ts + Default library for target 'es5' + node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + Imported via "pkg0" from file 'randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" + node_modules/pkg1/require.d.ts + Imported via "pkg1" from file 'fileWithImports.ts' with packageId 'pkg1/require.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg1/package.json' does not have field "type" + fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" + node_modules/pkg3/require.d.ts + Type library referenced via 'pkg3' from file 'fileWithTypeRefs.ts' with packageId 'pkg3/require.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg3/package.json' does not have field "type" + fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found + +Info 448 [00:09:02.000] ----------------------------------------------- +Info 449 [00:09:03.000] Running: *ensureProjectForOpenFiles* +Info 450 [00:09:04.000] Before ensureProjectForOpenFiles: +Info 451 [00:09:05.000] Project '/src/project/tsconfig.json' (Configured) +Info 451 [00:09:06.000] Files (10) + +Info 451 [00:09:07.000] ----------------------------------------------- +Info 451 [00:09:08.000] Open files: +Info 451 [00:09:09.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 451 [00:09:10.000] Projects: /src/project/tsconfig.json +Info 451 [00:09:11.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 451 [00:09:12.000] Projects: /src/project/tsconfig.json +Info 451 [00:09:13.000] After ensureProjectForOpenFiles: +Info 452 [00:09:14.000] Project '/src/project/tsconfig.json' (Configured) +Info 452 [00:09:15.000] Files (10) + +Info 452 [00:09:16.000] ----------------------------------------------- +Info 452 [00:09:17.000] Open files: +Info 452 [00:09:18.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 452 [00:09:19.000] Projects: /src/project/tsconfig.json +Info 452 [00:09:20.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 452 [00:09:21.000] Projects: /src/project/tsconfig.json +After running timeout callbacks + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 452 [00:09:22.000] delete file with imports +Info 453 [00:09:24.000] FileWatcher:: Triggered with /src/project/fileWithImports.ts 2:: WatchInfo: /src/project/fileWithImports.ts 500 undefined WatchType: Closed Script info +Info 454 [00:09:25.000] FileWatcher:: Close:: WatchInfo: /src/project/fileWithImports.ts 500 undefined WatchType: Closed Script info +Info 455 [00:09:26.000] Scheduled: /src/project/tsconfig.json +Info 456 [00:09:27.000] Scheduled: *ensureProjectForOpenFiles* +Info 457 [00:09:28.000] Elapsed:: *ms FileWatcher:: Triggered with /src/project/fileWithImports.ts 2:: WatchInfo: /src/project/fileWithImports.ts 500 undefined WatchType: Closed Script info +Info 458 [00:09:29.000] DirectoryWatcher:: Triggered with /src/project/fileWithImports.ts :: WatchInfo: /src/project 0 undefined Config: /src/project/tsconfig.json WatchType: Wild card directory +Info 459 [00:09:30.000] Scheduled: /src/project/tsconfig.json, Cancelled earlier one +Info 460 [00:09:31.000] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one +Info 461 [00:09:32.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithImports.ts :: WatchInfo: /src/project 0 undefined Config: /src/project/tsconfig.json WatchType: Wild card directory +Info 462 [00:09:33.000] DirectoryWatcher:: Triggered with /src/project/fileWithImports.ts :: WatchInfo: /src/project 0 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 463 [00:09:34.000] Scheduled: /src/project/tsconfig.jsonFailedLookupInvalidation +Info 464 [00:09:35.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithImports.ts :: WatchInfo: /src/project 0 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Before running timeout callbacks +//// [/src/project/fileWithImports.ts] deleted + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithtyperefs.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 465 [00:09:36.000] Running: /src/project/tsconfig.json +Info 466 [00:09:37.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 467 [00:09:38.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 468 [00:09:39.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 469 [00:09:40.000] File '/package.json' does not exist according to earlier cached lookups. +Info 470 [00:09:41.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Info 471 [00:09:42.000] Reusing resolution of type reference directive 'pkg3' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg3/require.d.ts' with Package ID 'pkg3/require.d.ts@0.0.1'. +Info 472 [00:09:43.000] File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Info 473 [00:09:44.000] File '/src/project/node_modules/pkg3/package.json' exists according to earlier cached lookups. +Info 474 [00:09:45.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 475 [00:09:46.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 476 [00:09:47.000] File '/package.json' does not exist according to earlier cached lookups. +Info 477 [00:09:48.000] Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +Info 478 [00:09:49.000] File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Info 479 [00:09:50.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 480 [00:09:51.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 481 [00:09:52.000] File '/package.json' does not exist according to earlier cached lookups. +Info 482 [00:09:53.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Info 483 [00:09:54.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 484 [00:09:55.000] File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +Info 485 [00:09:56.000] File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +Info 486 [00:09:57.000] File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +Info 487 [00:09:58.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 488 [00:09:59.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 489 [00:10:00.000] File '/package.json' does not exist according to earlier cached lookups. +Info 490 [00:10:01.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 491 [00:10:02.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 492 [00:10:03.000] File '/package.json' does not exist according to earlier cached lookups. +Info 493 [00:10:04.000] FileWatcher:: Close:: WatchInfo: /src/project/node_modules/pkg1/package.json 2000 undefined Project: /src/project/tsconfig.json WatchType: File location affecting resolution +Info 494 [00:10:05.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 6 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 495 [00:10:06.000] Project '/src/project/tsconfig.json' (Configured) +Info 496 [00:10:07.000] Files (8) + /a/lib/lib.d.ts + /src/project/node_modules/pkg2/import.d.ts + /src/project/node_modules/pkg3/require.d.ts + /src/project/fileWithTypeRefs.ts + /src/project/node_modules/pkg0/import.d.ts + /src/project/randomFileForImport.ts + /src/project/randomFileForTypeRef.ts + /src/project/node_modules/@types/pkg4/index.d.ts + + + ../../a/lib/lib.d.ts + Default library for target 'es5' + node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" + node_modules/pkg3/require.d.ts + Type library referenced via 'pkg3' from file 'fileWithTypeRefs.ts' with packageId 'pkg3/require.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg3/package.json' does not have field "type" + fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" + randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found + +Info 497 [00:10:08.000] ----------------------------------------------- +Info 498 [00:10:09.000] Running: *ensureProjectForOpenFiles* +Info 499 [00:10:10.000] Before ensureProjectForOpenFiles: +Info 500 [00:10:11.000] Project '/src/project/tsconfig.json' (Configured) +Info 500 [00:10:12.000] Files (8) + +Info 500 [00:10:13.000] ----------------------------------------------- +Info 500 [00:10:14.000] Open files: +Info 500 [00:10:15.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 500 [00:10:16.000] Projects: /src/project/tsconfig.json +Info 500 [00:10:17.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 500 [00:10:18.000] Projects: /src/project/tsconfig.json +Info 500 [00:10:19.000] After ensureProjectForOpenFiles: +Info 501 [00:10:20.000] Project '/src/project/tsconfig.json' (Configured) +Info 501 [00:10:21.000] Files (8) + +Info 501 [00:10:22.000] ----------------------------------------------- +Info 501 [00:10:23.000] Open files: +Info 501 [00:10:24.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 501 [00:10:25.000] Projects: /src/project/tsconfig.json +Info 501 [00:10:26.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 501 [00:10:27.000] Projects: /src/project/tsconfig.json +After running timeout callbacks + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithtyperefs.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 501 [00:10:28.000] delete file with typeRefs +Info 502 [00:10:30.000] FileWatcher:: Triggered with /src/project/fileWithTypeRefs.ts 2:: WatchInfo: /src/project/fileWithTypeRefs.ts 500 undefined WatchType: Closed Script info +Info 503 [00:10:31.000] FileWatcher:: Close:: WatchInfo: /src/project/fileWithTypeRefs.ts 500 undefined WatchType: Closed Script info +Info 504 [00:10:32.000] Scheduled: /src/project/tsconfig.json +Info 505 [00:10:33.000] Scheduled: *ensureProjectForOpenFiles* +Info 506 [00:10:34.000] Elapsed:: *ms FileWatcher:: Triggered with /src/project/fileWithTypeRefs.ts 2:: WatchInfo: /src/project/fileWithTypeRefs.ts 500 undefined WatchType: Closed Script info +Info 507 [00:10:35.000] DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.ts :: WatchInfo: /src/project 0 undefined Config: /src/project/tsconfig.json WatchType: Wild card directory +Info 508 [00:10:36.000] Scheduled: /src/project/tsconfig.json, Cancelled earlier one +Info 509 [00:10:37.000] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one +Info 510 [00:10:38.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.ts :: WatchInfo: /src/project 0 undefined Config: /src/project/tsconfig.json WatchType: Wild card directory +Info 511 [00:10:39.000] DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.ts :: WatchInfo: /src/project 0 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 512 [00:10:40.000] Scheduled: /src/project/tsconfig.jsonFailedLookupInvalidation +Info 513 [00:10:41.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.ts :: WatchInfo: /src/project 0 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Before running timeout callbacks +//// [/src/project/fileWithTypeRefs.ts] deleted + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 514 [00:10:42.000] Running: /src/project/tsconfig.json +Info 515 [00:10:43.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 516 [00:10:44.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 517 [00:10:45.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 518 [00:10:46.000] File '/package.json' does not exist according to earlier cached lookups. +Info 519 [00:10:47.000] Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +Info 520 [00:10:48.000] File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Info 521 [00:10:49.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 522 [00:10:50.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 523 [00:10:51.000] File '/package.json' does not exist according to earlier cached lookups. +Info 524 [00:10:52.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Info 525 [00:10:53.000] File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Info 526 [00:10:54.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 527 [00:10:55.000] File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +Info 528 [00:10:56.000] File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +Info 529 [00:10:57.000] File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +Info 530 [00:10:58.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 531 [00:10:59.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 532 [00:11:00.000] File '/package.json' does not exist according to earlier cached lookups. +Info 533 [00:11:01.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 534 [00:11:02.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 535 [00:11:03.000] File '/package.json' does not exist according to earlier cached lookups. +Info 536 [00:11:04.000] FileWatcher:: Close:: WatchInfo: /src/project/node_modules/pkg3/package.json 2000 undefined Project: /src/project/tsconfig.json WatchType: File location affecting resolution +Info 537 [00:11:05.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 7 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 538 [00:11:06.000] Project '/src/project/tsconfig.json' (Configured) +Info 539 [00:11:07.000] Files (6) + /a/lib/lib.d.ts + /src/project/node_modules/pkg0/import.d.ts + /src/project/randomFileForImport.ts + /src/project/node_modules/pkg2/import.d.ts + /src/project/randomFileForTypeRef.ts + /src/project/node_modules/@types/pkg4/index.d.ts + + + ../../a/lib/lib.d.ts + Default library for target 'es5' + node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" + randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'randomFileForTypeRef.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" + randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found + +Info 540 [00:11:08.000] ----------------------------------------------- +Info 541 [00:11:09.000] Running: *ensureProjectForOpenFiles* +Info 542 [00:11:10.000] Before ensureProjectForOpenFiles: +Info 543 [00:11:11.000] Project '/src/project/tsconfig.json' (Configured) +Info 543 [00:11:12.000] Files (6) + +Info 543 [00:11:13.000] ----------------------------------------------- +Info 543 [00:11:14.000] Open files: +Info 543 [00:11:15.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 543 [00:11:16.000] Projects: /src/project/tsconfig.json +Info 543 [00:11:17.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 543 [00:11:18.000] Projects: /src/project/tsconfig.json +Info 543 [00:11:19.000] After ensureProjectForOpenFiles: +Info 544 [00:11:20.000] Project '/src/project/tsconfig.json' (Configured) +Info 544 [00:11:21.000] Files (6) + +Info 544 [00:11:22.000] ----------------------------------------------- +Info 544 [00:11:23.000] Open files: +Info 544 [00:11:24.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 544 [00:11:25.000] Projects: /src/project/tsconfig.json +Info 544 [00:11:26.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 544 [00:11:27.000] Projects: /src/project/tsconfig.json +After running timeout callbacks + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 544 [00:11:28.000] delete resolved import file +Info 545 [00:11:30.000] DirectoryWatcher:: Triggered with /src/project/node_modules/pkg0/import.d.ts :: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 546 [00:11:31.000] Scheduled: /src/project/tsconfig.json +Info 547 [00:11:32.000] Scheduled: *ensureProjectForOpenFiles* +Info 548 [00:11:33.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg0/import.d.ts :: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 549 [00:11:34.000] DirectoryWatcher:: Triggered with /src/project/node_modules/pkg0/import.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 550 [00:11:35.000] Scheduled: /src/project/tsconfig.jsonFailedLookupInvalidation +Info 551 [00:11:36.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg0/import.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Before running timeout callbacks +//// [/src/project/node_modules/pkg0/import.d.ts] deleted + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 552 [00:11:37.000] Running: /src/project/tsconfig.json +Info 553 [00:11:38.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 554 [00:11:39.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 555 [00:11:40.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 556 [00:11:41.000] File '/package.json' does not exist according to earlier cached lookups. +Info 557 [00:11:42.000] Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Info 558 [00:11:43.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 559 [00:11:44.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 560 [00:11:45.000] File '/package.json' does not exist according to earlier cached lookups. +Info 561 [00:11:46.000] ======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Info 562 [00:11:47.000] Explicitly specified module resolution kind: 'Node16'. +Info 563 [00:11:48.000] Resolving in ESM mode with conditions 'node', 'import', 'types'. +Info 564 [00:11:49.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 565 [00:11:50.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 566 [00:11:51.000] File '/package.json' does not exist according to earlier cached lookups. +Info 567 [00:11:52.000] Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Info 568 [00:11:53.000] File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Info 569 [00:11:54.000] Matched 'exports' condition 'import'. +Info 570 [00:11:55.000] Using 'exports' subpath '.' with target './import.js'. +Info 571 [00:11:56.000] File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +Info 572 [00:11:57.000] File '/src/project/node_modules/pkg0/import.ts' does not exist. +Info 573 [00:11:58.000] File '/src/project/node_modules/pkg0/import.tsx' does not exist. +Info 574 [00:11:59.000] File '/src/project/node_modules/pkg0/import.d.ts' does not exist. +Info 575 [00:12:00.000] Saw non-matching condition 'require'. +Info 576 [00:12:01.000] Directory '/src/node_modules' does not exist, skipping all lookups in it. +Info 577 [00:12:02.000] Directory '/node_modules' does not exist, skipping all lookups in it. +Info 578 [00:12:03.000] File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Info 579 [00:12:04.000] Matched 'exports' condition 'import'. +Info 580 [00:12:05.000] Using 'exports' subpath '.' with target './import.js'. +Info 581 [00:12:06.000] File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +Info 582 [00:12:07.000] File '/src/project/node_modules/pkg0/import.js' does not exist. +Info 583 [00:12:08.000] File '/src/project/node_modules/pkg0/import.jsx' does not exist. +Info 584 [00:12:09.000] Saw non-matching condition 'require'. +Info 585 [00:12:10.000] Directory '/src/node_modules' does not exist, skipping all lookups in it. +Info 586 [00:12:11.000] Directory '/node_modules' does not exist, skipping all lookups in it. +Info 587 [00:12:12.000] ======== Module name 'pkg0' was not resolved. ======== +Info 588 [00:12:13.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 589 [00:12:14.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 590 [00:12:15.000] File '/package.json' does not exist according to earlier cached lookups. +Info 591 [00:12:16.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Info 592 [00:12:17.000] File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Info 593 [00:12:18.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 594 [00:12:19.000] File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +Info 595 [00:12:20.000] File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +Info 596 [00:12:21.000] File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +Info 597 [00:12:22.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 598 [00:12:23.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 599 [00:12:24.000] File '/package.json' does not exist according to earlier cached lookups. +Info 600 [00:12:25.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 601 [00:12:26.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 602 [00:12:27.000] File '/package.json' does not exist according to earlier cached lookups. +Info 603 [00:12:28.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 8 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 604 [00:12:29.000] Project '/src/project/tsconfig.json' (Configured) +Info 605 [00:12:30.000] Files (5) + /a/lib/lib.d.ts + /src/project/randomFileForImport.ts + /src/project/node_modules/pkg2/import.d.ts + /src/project/randomFileForTypeRef.ts + /src/project/node_modules/@types/pkg4/index.d.ts + + + ../../a/lib/lib.d.ts + Default library for target 'es5' + randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'randomFileForTypeRef.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" + randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found + +Info 606 [00:12:31.000] ----------------------------------------------- +Info 607 [00:12:32.000] Running: *ensureProjectForOpenFiles* +Info 608 [00:12:33.000] Before ensureProjectForOpenFiles: +Info 609 [00:12:34.000] Project '/src/project/tsconfig.json' (Configured) +Info 609 [00:12:35.000] Files (5) + +Info 609 [00:12:36.000] ----------------------------------------------- +Info 609 [00:12:37.000] Open files: +Info 609 [00:12:38.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 609 [00:12:39.000] Projects: /src/project/tsconfig.json +Info 609 [00:12:40.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 609 [00:12:41.000] Projects: /src/project/tsconfig.json +Info 609 [00:12:42.000] After ensureProjectForOpenFiles: +Info 610 [00:12:43.000] Project '/src/project/tsconfig.json' (Configured) +Info 610 [00:12:44.000] Files (5) + +Info 610 [00:12:45.000] ----------------------------------------------- +Info 610 [00:12:46.000] Open files: +Info 610 [00:12:47.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 610 [00:12:48.000] Projects: /src/project/tsconfig.json +Info 610 [00:12:49.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 610 [00:12:50.000] Projects: /src/project/tsconfig.json +After running timeout callbacks + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 610 [00:12:51.000] delete resolved typeRef file +Info 611 [00:12:53.000] DirectoryWatcher:: Triggered with /src/project/node_modules/pkg2/import.d.ts :: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 612 [00:12:54.000] Scheduled: /src/project/tsconfig.json +Info 613 [00:12:55.000] Scheduled: *ensureProjectForOpenFiles* +Info 614 [00:12:56.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg2/import.d.ts :: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 615 [00:12:57.000] DirectoryWatcher:: Triggered with /src/project/node_modules/pkg2/import.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 616 [00:12:58.000] Scheduled: /src/project/tsconfig.jsonFailedLookupInvalidation +Info 617 [00:12:59.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg2/import.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Before running timeout callbacks +//// [/src/project/node_modules/pkg2/import.d.ts] deleted + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 618 [00:13:00.000] Running: /src/project/tsconfig.json +Info 619 [00:13:01.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 620 [00:13:02.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 621 [00:13:03.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 622 [00:13:04.000] File '/package.json' does not exist according to earlier cached lookups. +Info 623 [00:13:05.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 624 [00:13:06.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 625 [00:13:07.000] File '/package.json' does not exist according to earlier cached lookups. +Info 626 [00:13:08.000] Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Info 627 [00:13:09.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 628 [00:13:10.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 629 [00:13:11.000] File '/package.json' does not exist according to earlier cached lookups. +Info 630 [00:13:12.000] Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was not resolved. +Info 631 [00:13:13.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 632 [00:13:14.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 633 [00:13:15.000] File '/package.json' does not exist according to earlier cached lookups. +Info 634 [00:13:16.000] ======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts', root directory '/src/project/node_modules/@types'. ======== +Info 635 [00:13:17.000] Resolving with primary search path '/src/project/node_modules/@types'. +Info 636 [00:13:18.000] Looking up in 'node_modules' folder, initial location '/src/project'. +Info 637 [00:13:19.000] File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Info 638 [00:13:20.000] Matched 'exports' condition 'import'. +Info 639 [00:13:21.000] Using 'exports' subpath '.' with target './import.js'. +Info 640 [00:13:22.000] File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +Info 641 [00:13:23.000] File '/src/project/node_modules/pkg2/import.d.ts' does not exist. +Info 642 [00:13:24.000] Saw non-matching condition 'require'. +Info 643 [00:13:25.000] Directory '/src/node_modules' does not exist, skipping all lookups in it. +Info 644 [00:13:26.000] Directory '/node_modules' does not exist, skipping all lookups in it. +Info 645 [00:13:27.000] ======== Type reference directive 'pkg2' was not resolved. ======== +Info 646 [00:13:28.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 647 [00:13:29.000] File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +Info 648 [00:13:30.000] File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +Info 649 [00:13:31.000] File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +Info 650 [00:13:32.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 651 [00:13:33.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 652 [00:13:34.000] File '/package.json' does not exist according to earlier cached lookups. +Info 653 [00:13:35.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 654 [00:13:36.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 655 [00:13:37.000] File '/package.json' does not exist according to earlier cached lookups. +Info 656 [00:13:38.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 9 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 657 [00:13:39.000] Project '/src/project/tsconfig.json' (Configured) +Info 658 [00:13:40.000] Files (4) + /a/lib/lib.d.ts + /src/project/randomFileForImport.ts + /src/project/randomFileForTypeRef.ts + /src/project/node_modules/@types/pkg4/index.d.ts + + + ../../a/lib/lib.d.ts + Default library for target 'es5' + randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found + +Info 659 [00:13:41.000] ----------------------------------------------- +Info 660 [00:13:42.000] Running: *ensureProjectForOpenFiles* +Info 661 [00:13:43.000] Before ensureProjectForOpenFiles: +Info 662 [00:13:44.000] Project '/src/project/tsconfig.json' (Configured) +Info 662 [00:13:45.000] Files (4) + +Info 662 [00:13:46.000] ----------------------------------------------- +Info 662 [00:13:47.000] Open files: +Info 662 [00:13:48.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 662 [00:13:49.000] Projects: /src/project/tsconfig.json +Info 662 [00:13:50.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 662 [00:13:51.000] Projects: /src/project/tsconfig.json +Info 662 [00:13:52.000] After ensureProjectForOpenFiles: +Info 663 [00:13:53.000] Project '/src/project/tsconfig.json' (Configured) +Info 663 [00:13:54.000] Files (4) + +Info 663 [00:13:55.000] ----------------------------------------------- +Info 663 [00:13:56.000] Open files: +Info 663 [00:13:57.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 663 [00:13:58.000] Projects: /src/project/tsconfig.json +Info 663 [00:13:59.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 663 [00:14:00.000] Projects: /src/project/tsconfig.json +After running timeout callbacks + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} diff --git a/tests/baselines/reference/tsserver/cacheResolutions/multi-file.js b/tests/baselines/reference/tsserver/cacheResolutions/multi-file.js new file mode 100644 index 00000000000..ea71f289244 --- /dev/null +++ b/tests/baselines/reference/tsserver/cacheResolutions/multi-file.js @@ -0,0 +1,2132 @@ +Info 0 [00:01:05.000] Provided types map file "/a/lib/typesMap.json" doesn't exist +Info 1 [00:01:06.000] request: + { + "command": "open", + "arguments": { + "file": "/src/project/randomFileForImport.ts" + }, + "seq": 1, + "type": "request" + } +Before request +//// [/src/project/tsconfig.json] +{"compilerOptions":{"moduleResolution":"node16","composite":true,"cacheResolutions":true,"traceResolution":true},"include":["*.ts"],"exclude":["*.d.ts"]} + +//// [/src/project/fileWithImports.ts] +import type { ImportInterface0 } from "pkg0" assert { "resolution-mode": "import" }; +import type { RequireInterface1 } from "pkg1" assert { "resolution-mode": "require" }; + + +//// [/src/project/randomFileForImport.ts] +export const x = 10; + +//// [/src/project/node_modules/pkg0/package.json] +{"name":"pkg0","version":"0.0.1","exports":{"import":"./import.js","require":"./require.js"}} + +//// [/src/project/node_modules/pkg0/import.d.ts] +export interface ImportInterface0 {} + +//// [/src/project/node_modules/pkg0/require.d.ts] +export interface RequireInterface0 {} + +//// [/src/project/node_modules/pkg1/package.json] +{"name":"pkg1","version":"0.0.1","exports":{"import":"./import.js","require":"./require.js"}} + +//// [/src/project/node_modules/pkg1/import.d.ts] +export interface ImportInterface1 {} + +//// [/src/project/fileWithTypeRefs.ts] +/// +/// +interface LocalInterface extends ImportInterface2, RequireInterface3 {} +export {} + + +//// [/src/project/randomFileForTypeRef.ts] +export const x = 10; + +//// [/src/project/node_modules/pkg2/package.json] +{"name":"pkg2","version":"0.0.1","exports":{"import":"./import.js","require":"./require.js"}} + +//// [/src/project/node_modules/pkg2/import.d.ts] +export {}; +declare global { + interface ImportInterface2 {} +} + + +//// [/src/project/node_modules/pkg2/require.d.ts] +export {}; +declare global { + interface RequireInterface2 {} +} + + +//// [/src/project/node_modules/pkg3/package.json] +{"name":"pkg3","version":"0.0.1","exports":{"import":"./import.js","require":"./require.js"}} + +//// [/src/project/node_modules/pkg3/import.d.ts] +export {}; +declare global { + interface ImportInterface3 {} +} + + +//// [/src/project/node_modules/@types/pkg4/index.d.ts] +export const x = 10; + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../a/lib/lib.d.ts","./node_modules/pkg0/import.d.ts","./filewithimports.ts","./node_modules/pkg2/import.d.ts","./filewithtyperefs.ts","./randomfileforimport.ts","./randomfilefortyperef.ts","./node_modules/@types/pkg4/index.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true,"impliedFormat":1},{"version":"769951468-export interface ImportInterface0 {}","impliedFormat":1},{"version":"4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n","impliedFormat":1},{"version":"1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n","affectsGlobalScope":true,"impliedFormat":1},{"version":"-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1},{"version":"-10726455937-export const x = 10;","impliedFormat":1}],"options":{"cacheResolutions":true,"composite":true},"fileIdsList":[[2],[4]],"referencedMap":[[3,1],[5,2]],"exportedModulesMap":[[3,1],[5,2]],"semanticDiagnosticsPerFile":[1,[3,[{"file":"./filewithimports.ts","start":124,"length":6,"messageText":"Cannot find module 'pkg1' or its corresponding type declarations.","category":1,"code":2307}]],[5,[{"file":"./filewithtyperefs.ts","start":162,"length":17,"messageText":"Cannot find name 'RequireInterface3'.","category":1,"code":2304}]],8,2,4,6,7],"affectedFilesPendingEmit":[3,5,6,7],"emitSignatures":[3,5,6,7]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../a/lib/lib.d.ts", + "./node_modules/pkg0/import.d.ts", + "./filewithimports.ts", + "./node_modules/pkg2/import.d.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts", + "./node_modules/@types/pkg4/index.d.ts" + ], + "fileNamesList": [ + [ + "./node_modules/pkg0/import.d.ts" + ], + [ + "./node_modules/pkg2/import.d.ts" + ] + ], + "fileInfos": { + "../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./node_modules/pkg0/import.d.ts": { + "original": { + "version": "769951468-export interface ImportInterface0 {}", + "impliedFormat": 1 + }, + "version": "769951468-export interface ImportInterface0 {}", + "signature": "769951468-export interface ImportInterface0 {}", + "impliedFormat": "commonjs" + }, + "./filewithimports.ts": { + "original": { + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "impliedFormat": 1 + }, + "version": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "signature": "4079531109-import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\nimport type { RequireInterface1 } from \"pkg1\" assert { \"resolution-mode\": \"require\" };\n", + "impliedFormat": "commonjs" + }, + "./node_modules/pkg2/import.d.ts": { + "original": { + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "signature": "1714206242-export {};\ndeclare global {\n interface ImportInterface2 {}\n}\n", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" + }, + "./filewithtyperefs.ts": { + "original": { + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "impliedFormat": 1 + }, + "version": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "signature": "-20622778057-/// \n/// \ninterface LocalInterface extends ImportInterface2, RequireInterface3 {}\nexport {}\n", + "impliedFormat": "commonjs" + }, + "./randomfileforimport.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + }, + "./randomfilefortyperef.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + }, + "./node_modules/@types/pkg4/index.d.ts": { + "original": { + "version": "-10726455937-export const x = 10;", + "impliedFormat": 1 + }, + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;", + "impliedFormat": "commonjs" + } + }, + "options": { + "cacheResolutions": true, + "composite": true + }, + "referencedMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "exportedModulesMap": { + "./filewithimports.ts": [ + "./node_modules/pkg0/import.d.ts" + ], + "./filewithtyperefs.ts": [ + "./node_modules/pkg2/import.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../a/lib/lib.d.ts", + [ + "./filewithimports.ts", + [ + { + "file": "./filewithimports.ts", + "start": 124, + "length": 6, + "messageText": "Cannot find module 'pkg1' or its corresponding type declarations.", + "category": 1, + "code": 2307 + } + ] + ], + [ + "./filewithtyperefs.ts", + [ + { + "file": "./filewithtyperefs.ts", + "start": 162, + "length": 17, + "messageText": "Cannot find name 'RequireInterface3'.", + "category": 1, + "code": 2304 + } + ] + ], + "./node_modules/@types/pkg4/index.d.ts", + "./node_modules/pkg0/import.d.ts", + "./node_modules/pkg2/import.d.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ], + "affectedFilesPendingEmit": [ + [ + "./filewithimports.ts", + "Js | Dts" + ], + [ + "./filewithtyperefs.ts", + "Js | Dts" + ], + [ + "./randomfileforimport.ts", + "Js | Dts" + ], + [ + "./randomfilefortyperef.ts", + "Js | Dts" + ] + ], + "emitSignatures": [ + "./filewithimports.ts", + "./filewithtyperefs.ts", + "./randomfileforimport.ts", + "./randomfilefortyperef.ts" + ] + }, + "version": "FakeTSVersion", + "size": 2172 +} + + +PolledWatches:: + +FsWatches:: + +FsWatchesRecursive:: + +Info 2 [00:01:07.000] Search path: /src/project +Info 3 [00:01:08.000] For info: /src/project/randomFileForImport.ts :: Config file name: /src/project/tsconfig.json +Info 4 [00:01:09.000] Creating configuration project /src/project/tsconfig.json +Info 5 [00:01:10.000] FileWatcher:: Added:: WatchInfo: /src/project/tsconfig.json 2000 undefined Project: /src/project/tsconfig.json WatchType: Config file +Info 6 [00:01:11.000] Config: /src/project/tsconfig.json : { + "rootNames": [ + "/src/project/fileWithImports.ts", + "/src/project/fileWithTypeRefs.ts", + "/src/project/randomFileForImport.ts", + "/src/project/randomFileForTypeRef.ts" + ], + "options": { + "moduleResolution": 3, + "composite": true, + "cacheResolutions": true, + "traceResolution": true, + "configFilePath": "/src/project/tsconfig.json" + } +} +Info 7 [00:01:12.000] DirectoryWatcher:: Added:: WatchInfo: /src/project 0 undefined Config: /src/project/tsconfig.json WatchType: Wild card directory +Info 8 [00:01:13.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project 0 undefined Config: /src/project/tsconfig.json WatchType: Wild card directory +Info 9 [00:01:14.000] FileWatcher:: Added:: WatchInfo: /src/project/fileWithImports.ts 500 undefined WatchType: Closed Script info +Info 10 [00:01:15.000] FileWatcher:: Added:: WatchInfo: /src/project/fileWithTypeRefs.ts 500 undefined WatchType: Closed Script info +Info 11 [00:01:16.000] FileWatcher:: Added:: WatchInfo: /src/project/randomFileForTypeRef.ts 500 undefined WatchType: Closed Script info +Info 12 [00:01:17.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 13 [00:01:18.000] File '/src/project/package.json' does not exist. +Info 14 [00:01:19.000] File '/src/package.json' does not exist. +Info 15 [00:01:20.000] File '/package.json' does not exist. +Info 16 [00:01:21.000] ======== Resolving module 'pkg0' from '/src/project/fileWithImports.ts'. ======== +Info 17 [00:01:22.000] Explicitly specified module resolution kind: 'Node16'. +Info 18 [00:01:23.000] Resolving in ESM mode with conditions 'node', 'import', 'types'. +Info 19 [00:01:24.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 20 [00:01:25.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 21 [00:01:26.000] File '/package.json' does not exist according to earlier cached lookups. +Info 22 [00:01:27.000] Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Info 23 [00:01:28.000] Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Info 24 [00:01:29.000] Matched 'exports' condition 'import'. +Info 25 [00:01:30.000] Using 'exports' subpath '.' with target './import.js'. +Info 26 [00:01:31.000] File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +Info 27 [00:01:32.000] File '/src/project/node_modules/pkg0/import.ts' does not exist. +Info 28 [00:01:33.000] File '/src/project/node_modules/pkg0/import.tsx' does not exist. +Info 29 [00:01:34.000] File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Info 30 [00:01:35.000] Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +Info 31 [00:01:36.000] ======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +Info 32 [00:01:37.000] ======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Info 33 [00:01:38.000] Explicitly specified module resolution kind: 'Node16'. +Info 34 [00:01:39.000] Resolving in CJS mode with conditions 'node', 'require', 'types'. +Info 35 [00:01:40.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 36 [00:01:41.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 37 [00:01:42.000] File '/package.json' does not exist according to earlier cached lookups. +Info 38 [00:01:43.000] Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Info 39 [00:01:44.000] Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Info 40 [00:01:45.000] Saw non-matching condition 'import'. +Info 41 [00:01:46.000] Matched 'exports' condition 'require'. +Info 42 [00:01:47.000] Using 'exports' subpath '.' with target './require.js'. +Info 43 [00:01:48.000] File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +Info 44 [00:01:49.000] File '/src/project/node_modules/pkg1/require.ts' does not exist. +Info 45 [00:01:50.000] File '/src/project/node_modules/pkg1/require.tsx' does not exist. +Info 46 [00:01:51.000] File '/src/project/node_modules/pkg1/require.d.ts' does not exist. +Info 47 [00:01:52.000] File '/src/project/node_modules/@types/pkg1.d.ts' does not exist. +Info 48 [00:01:53.000] Directory '/src/node_modules' does not exist, skipping all lookups in it. +Info 49 [00:01:54.000] Directory '/node_modules' does not exist, skipping all lookups in it. +Info 50 [00:01:55.000] File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +Info 51 [00:01:56.000] Saw non-matching condition 'import'. +Info 52 [00:01:57.000] Matched 'exports' condition 'require'. +Info 53 [00:01:58.000] Using 'exports' subpath '.' with target './require.js'. +Info 54 [00:01:59.000] File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +Info 55 [00:02:00.000] File '/src/project/node_modules/pkg1/require.js' does not exist. +Info 56 [00:02:01.000] File '/src/project/node_modules/pkg1/require.jsx' does not exist. +Info 57 [00:02:02.000] Directory '/src/node_modules' does not exist, skipping all lookups in it. +Info 58 [00:02:03.000] Directory '/node_modules' does not exist, skipping all lookups in it. +Info 59 [00:02:04.000] ======== Module name 'pkg1' was not resolved. ======== +Info 60 [00:02:05.000] File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Info 61 [00:02:06.000] DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 62 [00:02:07.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 63 [00:02:08.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 64 [00:02:09.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 65 [00:02:10.000] File '/package.json' does not exist according to earlier cached lookups. +Info 66 [00:02:11.000] ======== Resolving type reference directive 'pkg2', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Info 67 [00:02:12.000] Resolving with primary search path '/src/project/node_modules/@types'. +Info 68 [00:02:13.000] Looking up in 'node_modules' folder, initial location '/src/project'. +Info 69 [00:02:14.000] Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Info 70 [00:02:15.000] Matched 'exports' condition 'import'. +Info 71 [00:02:16.000] Using 'exports' subpath '.' with target './import.js'. +Info 72 [00:02:17.000] File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +Info 73 [00:02:18.000] File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Info 74 [00:02:19.000] Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +Info 75 [00:02:20.000] ======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +Info 76 [00:02:21.000] ======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Info 77 [00:02:22.000] Resolving with primary search path '/src/project/node_modules/@types'. +Info 78 [00:02:23.000] Looking up in 'node_modules' folder, initial location '/src/project'. +Info 79 [00:02:24.000] Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Info 80 [00:02:25.000] Saw non-matching condition 'import'. +Info 81 [00:02:26.000] Matched 'exports' condition 'require'. +Info 82 [00:02:27.000] Using 'exports' subpath '.' with target './require.js'. +Info 83 [00:02:28.000] File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +Info 84 [00:02:29.000] File '/src/project/node_modules/pkg3/require.d.ts' does not exist. +Info 85 [00:02:30.000] File '/src/project/node_modules/@types/pkg3.d.ts' does not exist. +Info 86 [00:02:31.000] Directory '/src/node_modules' does not exist, skipping all lookups in it. +Info 87 [00:02:32.000] Directory '/node_modules' does not exist, skipping all lookups in it. +Info 88 [00:02:33.000] ======== Type reference directive 'pkg3' was not resolved. ======== +Info 89 [00:02:34.000] File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Info 90 [00:02:35.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 91 [00:02:36.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 92 [00:02:37.000] File '/package.json' does not exist according to earlier cached lookups. +Info 93 [00:02:38.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 94 [00:02:39.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 95 [00:02:40.000] File '/package.json' does not exist according to earlier cached lookups. +Info 96 [00:02:41.000] ======== Resolving type reference directive 'pkg4', containing file '/src/project/__inferred type names__.ts', root directory '/src/project/node_modules/@types'. ======== +Info 97 [00:02:42.000] Resolving with primary search path '/src/project/node_modules/@types'. +Info 98 [00:02:43.000] File '/src/project/node_modules/@types/pkg4/package.json' does not exist. +Info 99 [00:02:44.000] File '/src/project/node_modules/@types/pkg4/index.d.ts' exist - use it as a name resolution result. +Info 100 [00:02:45.000] Resolving real path for '/src/project/node_modules/@types/pkg4/index.d.ts', result '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 101 [00:02:46.000] ======== Type reference directive 'pkg4' was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts', primary: true. ======== +Info 102 [00:02:47.000] File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +Info 103 [00:02:48.000] File '/src/project/node_modules/@types/package.json' does not exist. +Info 104 [00:02:49.000] File '/src/project/node_modules/package.json' does not exist. +Info 105 [00:02:50.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 106 [00:02:51.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 107 [00:02:52.000] File '/package.json' does not exist according to earlier cached lookups. +Info 108 [00:02:53.000] File '/a/lib/package.json' does not exist. +Info 109 [00:02:54.000] File '/a/package.json' does not exist. +Info 110 [00:02:55.000] File '/package.json' does not exist according to earlier cached lookups. +Info 111 [00:02:56.000] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined WatchType: Closed Script info +Info 112 [00:02:57.000] DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 113 [00:02:58.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 114 [00:02:59.000] DirectoryWatcher:: Added:: WatchInfo: /src/project 0 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 115 [00:03:00.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project 0 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 116 [00:03:01.000] FileWatcher:: Added:: WatchInfo: /src/project/node_modules/pkg0/package.json 2000 undefined Project: /src/project/tsconfig.json WatchType: File location affecting resolution +Info 117 [00:03:02.000] FileWatcher:: Added:: WatchInfo: /src/project/node_modules/pkg1/package.json 2000 undefined Project: /src/project/tsconfig.json WatchType: File location affecting resolution +Info 118 [00:03:03.000] FileWatcher:: Added:: WatchInfo: /src/project/node_modules/pkg2/package.json 2000 undefined Project: /src/project/tsconfig.json WatchType: File location affecting resolution +Info 119 [00:03:04.000] FileWatcher:: Added:: WatchInfo: /src/project/node_modules/pkg3/package.json 2000 undefined Project: /src/project/tsconfig.json WatchType: File location affecting resolution +Info 120 [00:03:05.000] FileWatcher:: Added:: WatchInfo: /src/project/node_modules/@types/pkg4/package.json 2000 undefined Project: /src/project/tsconfig.json WatchType: File location affecting resolution +Info 121 [00:03:06.000] FileWatcher:: Added:: WatchInfo: /src/project/node_modules/@types/package.json 2000 undefined Project: /src/project/tsconfig.json WatchType: File location affecting resolution +Info 122 [00:03:07.000] FileWatcher:: Added:: WatchInfo: /src/project/node_modules/package.json 2000 undefined Project: /src/project/tsconfig.json WatchType: File location affecting resolution +Info 123 [00:03:08.000] DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules/@types 1 undefined Project: /src/project/tsconfig.json WatchType: Type roots +Info 124 [00:03:09.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src/project/node_modules/@types 1 undefined Project: /src/project/tsconfig.json WatchType: Type roots +Info 125 [00:03:10.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 126 [00:03:11.000] Project '/src/project/tsconfig.json' (Configured) +Info 127 [00:03:12.000] Files (8) + /a/lib/lib.d.ts + /src/project/node_modules/pkg0/import.d.ts + /src/project/fileWithImports.ts + /src/project/node_modules/pkg2/import.d.ts + /src/project/fileWithTypeRefs.ts + /src/project/randomFileForImport.ts + /src/project/randomFileForTypeRef.ts + /src/project/node_modules/@types/pkg4/index.d.ts + + + ../../a/lib/lib.d.ts + Default library for target 'es5' + node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" + fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" + fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found + +Info 128 [00:03:13.000] ----------------------------------------------- +Info 129 [00:03:14.000] Search path: /src/project +Info 130 [00:03:15.000] For info: /src/project/tsconfig.json :: No config files found. +Info 131 [00:03:16.000] Project '/src/project/tsconfig.json' (Configured) +Info 131 [00:03:17.000] Files (8) + +Info 131 [00:03:18.000] ----------------------------------------------- +Info 131 [00:03:19.000] Open files: +Info 131 [00:03:20.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 131 [00:03:21.000] Projects: /src/project/tsconfig.json +After request + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 131 [00:03:22.000] response: + { + "responseRequired": false + } +Info 132 [00:03:23.000] request: + { + "command": "open", + "arguments": { + "file": "/src/project/randomFileForTypeRef.ts" + }, + "seq": 2, + "type": "request" + } +Before request + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/src/project/randomfilefortyperef.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 133 [00:03:24.000] FileWatcher:: Close:: WatchInfo: /src/project/randomFileForTypeRef.ts 500 undefined WatchType: Closed Script info +Info 134 [00:03:25.000] Search path: /src/project +Info 135 [00:03:26.000] For info: /src/project/randomFileForTypeRef.ts :: Config file name: /src/project/tsconfig.json +Info 136 [00:03:27.000] Search path: /src/project +Info 137 [00:03:28.000] For info: /src/project/tsconfig.json :: No config files found. +Info 138 [00:03:29.000] Project '/src/project/tsconfig.json' (Configured) +Info 138 [00:03:30.000] Files (8) + +Info 138 [00:03:31.000] ----------------------------------------------- +Info 138 [00:03:32.000] Open files: +Info 138 [00:03:33.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 138 [00:03:34.000] Projects: /src/project/tsconfig.json +Info 138 [00:03:35.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 138 [00:03:36.000] Projects: /src/project/tsconfig.json +After request + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 138 [00:03:37.000] response: + { + "responseRequired": false + } +Info 139 [00:03:38.000] modify randomFileForImport by adding import +Info 140 [00:03:39.000] request: + { + "command": "change", + "arguments": { + "file": "/src/project/randomFileForImport.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "import type { ImportInterface0 } from \"pkg0\" assert { \"resolution-mode\": \"import\" };\n" + }, + "seq": 3, + "type": "request" + } +Before request + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +After request + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 141 [00:03:40.000] response: + { + "responseRequired": false + } +Info 142 [00:03:41.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 143 [00:03:42.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 144 [00:03:43.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 145 [00:03:44.000] File '/package.json' does not exist according to earlier cached lookups. +Info 146 [00:03:45.000] File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Info 147 [00:03:46.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 148 [00:03:47.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 149 [00:03:48.000] File '/package.json' does not exist according to earlier cached lookups. +Info 150 [00:03:49.000] File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Info 151 [00:03:50.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 152 [00:03:51.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 153 [00:03:52.000] File '/package.json' does not exist according to earlier cached lookups. +Info 154 [00:03:53.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 155 [00:03:54.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 156 [00:03:55.000] File '/package.json' does not exist according to earlier cached lookups. +Info 157 [00:03:56.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 158 [00:03:57.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 159 [00:03:58.000] File '/package.json' does not exist according to earlier cached lookups. +Info 160 [00:03:59.000] File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +Info 161 [00:04:00.000] File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +Info 162 [00:04:01.000] File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +Info 163 [00:04:02.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 164 [00:04:03.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 165 [00:04:04.000] File '/package.json' does not exist according to earlier cached lookups. +Info 166 [00:04:05.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 167 [00:04:06.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 168 [00:04:07.000] File '/package.json' does not exist according to earlier cached lookups. +Info 169 [00:04:08.000] Reusing resolution of module 'pkg0' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +Info 170 [00:04:09.000] Reusing resolution of module 'pkg1' from '/src/project/fileWithImports.ts' of old program, it was not resolved. +Info 171 [00:04:10.000] File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Info 172 [00:04:11.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 173 [00:04:12.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 174 [00:04:13.000] File '/package.json' does not exist according to earlier cached lookups. +Info 175 [00:04:14.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Info 176 [00:04:15.000] Reusing resolution of type reference directive 'pkg3' from '/src/project/fileWithTypeRefs.ts' of old program, it was not resolved. +Info 177 [00:04:16.000] File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Info 178 [00:04:17.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 179 [00:04:18.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 180 [00:04:19.000] File '/package.json' does not exist according to earlier cached lookups. +Info 181 [00:04:20.000] ======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Info 182 [00:04:21.000] Explicitly specified module resolution kind: 'Node16'. +Info 183 [00:04:22.000] Resolving in ESM mode with conditions 'node', 'import', 'types'. +Info 184 [00:04:23.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 185 [00:04:24.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 186 [00:04:25.000] File '/package.json' does not exist according to earlier cached lookups. +Info 187 [00:04:26.000] Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Info 188 [00:04:27.000] File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Info 189 [00:04:28.000] Matched 'exports' condition 'import'. +Info 190 [00:04:29.000] Using 'exports' subpath '.' with target './import.js'. +Info 191 [00:04:30.000] File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +Info 192 [00:04:31.000] File '/src/project/node_modules/pkg0/import.ts' does not exist. +Info 193 [00:04:32.000] File '/src/project/node_modules/pkg0/import.tsx' does not exist. +Info 194 [00:04:33.000] File '/src/project/node_modules/pkg0/import.d.ts' exist - use it as a name resolution result. +Info 195 [00:04:34.000] Resolving real path for '/src/project/node_modules/pkg0/import.d.ts', result '/src/project/node_modules/pkg0/import.d.ts'. +Info 196 [00:04:35.000] ======== Module name 'pkg0' was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. ======== +Info 197 [00:04:36.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 198 [00:04:37.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 199 [00:04:38.000] File '/package.json' does not exist according to earlier cached lookups. +Info 200 [00:04:39.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 201 [00:04:40.000] File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +Info 202 [00:04:41.000] File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +Info 203 [00:04:42.000] File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +Info 204 [00:04:43.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 205 [00:04:44.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 206 [00:04:45.000] File '/package.json' does not exist according to earlier cached lookups. +Info 207 [00:04:46.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 208 [00:04:47.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 209 [00:04:48.000] File '/package.json' does not exist according to earlier cached lookups. +Info 210 [00:04:49.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 2 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info 211 [00:04:50.000] Different program with same set of files +Info 212 [00:04:51.000] modify randomFileForTypeRef by adding typeRef +Info 213 [00:04:52.000] request: + { + "command": "change", + "arguments": { + "file": "/src/project/randomFileForTypeRef.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "/// \n" + }, + "seq": 4, + "type": "request" + } +Before request + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +After request + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 214 [00:04:53.000] response: + { + "responseRequired": false + } +Info 215 [00:04:54.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 216 [00:04:55.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 217 [00:04:56.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 218 [00:04:57.000] File '/package.json' does not exist according to earlier cached lookups. +Info 219 [00:04:58.000] File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Info 220 [00:04:59.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 221 [00:05:00.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 222 [00:05:01.000] File '/package.json' does not exist according to earlier cached lookups. +Info 223 [00:05:02.000] File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Info 224 [00:05:03.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 225 [00:05:04.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 226 [00:05:05.000] File '/package.json' does not exist according to earlier cached lookups. +Info 227 [00:05:06.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 228 [00:05:07.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 229 [00:05:08.000] File '/package.json' does not exist according to earlier cached lookups. +Info 230 [00:05:09.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 231 [00:05:10.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 232 [00:05:11.000] File '/package.json' does not exist according to earlier cached lookups. +Info 233 [00:05:12.000] File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +Info 234 [00:05:13.000] File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +Info 235 [00:05:14.000] File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +Info 236 [00:05:15.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 237 [00:05:16.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 238 [00:05:17.000] File '/package.json' does not exist according to earlier cached lookups. +Info 239 [00:05:18.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 240 [00:05:19.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 241 [00:05:20.000] File '/package.json' does not exist according to earlier cached lookups. +Info 242 [00:05:21.000] Reusing resolution of module 'pkg0' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +Info 243 [00:05:22.000] Reusing resolution of module 'pkg1' from '/src/project/fileWithImports.ts' of old program, it was not resolved. +Info 244 [00:05:23.000] File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Info 245 [00:05:24.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 246 [00:05:25.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 247 [00:05:26.000] File '/package.json' does not exist according to earlier cached lookups. +Info 248 [00:05:27.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Info 249 [00:05:28.000] Reusing resolution of type reference directive 'pkg3' from '/src/project/fileWithTypeRefs.ts' of old program, it was not resolved. +Info 250 [00:05:29.000] File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Info 251 [00:05:30.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 252 [00:05:31.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 253 [00:05:32.000] File '/package.json' does not exist according to earlier cached lookups. +Info 254 [00:05:33.000] Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +Info 255 [00:05:34.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 256 [00:05:35.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 257 [00:05:36.000] File '/package.json' does not exist according to earlier cached lookups. +Info 258 [00:05:37.000] ======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts', root directory '/src/project/node_modules/@types'. ======== +Info 259 [00:05:38.000] Resolving with primary search path '/src/project/node_modules/@types'. +Info 260 [00:05:39.000] Looking up in 'node_modules' folder, initial location '/src/project'. +Info 261 [00:05:40.000] File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Info 262 [00:05:41.000] Matched 'exports' condition 'import'. +Info 263 [00:05:42.000] Using 'exports' subpath '.' with target './import.js'. +Info 264 [00:05:43.000] File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +Info 265 [00:05:44.000] File '/src/project/node_modules/pkg2/import.d.ts' exist - use it as a name resolution result. +Info 266 [00:05:45.000] Resolving real path for '/src/project/node_modules/pkg2/import.d.ts', result '/src/project/node_modules/pkg2/import.d.ts'. +Info 267 [00:05:46.000] ======== Type reference directive 'pkg2' was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1', primary: false. ======== +Info 268 [00:05:47.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 269 [00:05:48.000] File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +Info 270 [00:05:49.000] File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +Info 271 [00:05:50.000] File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +Info 272 [00:05:51.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 273 [00:05:52.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 274 [00:05:53.000] File '/package.json' does not exist according to earlier cached lookups. +Info 275 [00:05:54.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 276 [00:05:55.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 277 [00:05:56.000] File '/package.json' does not exist according to earlier cached lookups. +Info 278 [00:05:57.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 3 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info 279 [00:05:58.000] Different program with same set of files +Info 280 [00:05:59.000] write file not resolved by import +Info 281 [00:06:02.000] DirectoryWatcher:: Triggered with /src/project/node_modules/pkg1/require.d.ts :: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 282 [00:06:03.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg1/require.d.ts :: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 283 [00:06:04.000] DirectoryWatcher:: Triggered with /src/project/node_modules/pkg1/require.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 284 [00:06:05.000] Scheduled: /src/project/tsconfig.jsonFailedLookupInvalidation +Info 285 [00:06:06.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg1/require.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Before running timeout callbacks +//// [/src/project/node_modules/pkg1/require.d.ts] +export interface RequireInterface1 {} + + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 286 [00:06:07.000] Running: /src/project/tsconfig.jsonFailedLookupInvalidation +Info 287 [00:06:08.000] Scheduled: /src/project/tsconfig.json +Info 288 [00:06:09.000] Scheduled: *ensureProjectForOpenFiles* +After running timeout callbacks + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Before running timeout callbacks + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 289 [00:06:10.000] Running: /src/project/tsconfig.json +Info 290 [00:06:11.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 291 [00:06:12.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 292 [00:06:13.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 293 [00:06:14.000] File '/package.json' does not exist according to earlier cached lookups. +Info 294 [00:06:15.000] File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Info 295 [00:06:16.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 296 [00:06:17.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 297 [00:06:18.000] File '/package.json' does not exist according to earlier cached lookups. +Info 298 [00:06:19.000] File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Info 299 [00:06:20.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 300 [00:06:21.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 301 [00:06:22.000] File '/package.json' does not exist according to earlier cached lookups. +Info 302 [00:06:23.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 303 [00:06:24.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 304 [00:06:25.000] File '/package.json' does not exist according to earlier cached lookups. +Info 305 [00:06:26.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 306 [00:06:27.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 307 [00:06:28.000] File '/package.json' does not exist according to earlier cached lookups. +Info 308 [00:06:29.000] File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +Info 309 [00:06:30.000] File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +Info 310 [00:06:31.000] File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +Info 311 [00:06:32.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 312 [00:06:33.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 313 [00:06:34.000] File '/package.json' does not exist according to earlier cached lookups. +Info 314 [00:06:35.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 315 [00:06:36.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 316 [00:06:37.000] File '/package.json' does not exist according to earlier cached lookups. +Info 317 [00:06:38.000] Reusing resolution of module 'pkg0' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +Info 318 [00:06:39.000] ======== Resolving module 'pkg1' from '/src/project/fileWithImports.ts'. ======== +Info 319 [00:06:40.000] Explicitly specified module resolution kind: 'Node16'. +Info 320 [00:06:41.000] Resolving in CJS mode with conditions 'node', 'require', 'types'. +Info 321 [00:06:42.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 322 [00:06:43.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 323 [00:06:44.000] File '/package.json' does not exist according to earlier cached lookups. +Info 324 [00:06:45.000] Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Info 325 [00:06:46.000] Found 'package.json' at '/src/project/node_modules/pkg1/package.json'. +Info 326 [00:06:47.000] Saw non-matching condition 'import'. +Info 327 [00:06:48.000] Matched 'exports' condition 'require'. +Info 328 [00:06:49.000] Using 'exports' subpath '.' with target './require.js'. +Info 329 [00:06:50.000] File name '/src/project/node_modules/pkg1/require.js' has a '.js' extension - stripping it. +Info 330 [00:06:51.000] File '/src/project/node_modules/pkg1/require.ts' does not exist. +Info 331 [00:06:52.000] File '/src/project/node_modules/pkg1/require.tsx' does not exist. +Info 332 [00:06:53.000] File '/src/project/node_modules/pkg1/require.d.ts' exist - use it as a name resolution result. +Info 333 [00:06:54.000] Resolving real path for '/src/project/node_modules/pkg1/require.d.ts', result '/src/project/node_modules/pkg1/require.d.ts'. +Info 334 [00:06:55.000] ======== Module name 'pkg1' was successfully resolved to '/src/project/node_modules/pkg1/require.d.ts' with Package ID 'pkg1/require.d.ts@0.0.1'. ======== +Info 335 [00:06:56.000] File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Info 336 [00:06:57.000] File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +Info 337 [00:06:58.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 338 [00:06:59.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 339 [00:07:00.000] File '/package.json' does not exist according to earlier cached lookups. +Info 340 [00:07:01.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Info 341 [00:07:02.000] Reusing resolution of type reference directive 'pkg3' from '/src/project/fileWithTypeRefs.ts' of old program, it was not resolved. +Info 342 [00:07:03.000] File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Info 343 [00:07:04.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 344 [00:07:05.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 345 [00:07:06.000] File '/package.json' does not exist according to earlier cached lookups. +Info 346 [00:07:07.000] Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +Info 347 [00:07:08.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 348 [00:07:09.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 349 [00:07:10.000] File '/package.json' does not exist according to earlier cached lookups. +Info 350 [00:07:11.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Info 351 [00:07:12.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 352 [00:07:13.000] File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +Info 353 [00:07:14.000] File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +Info 354 [00:07:15.000] File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +Info 355 [00:07:16.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 356 [00:07:17.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 357 [00:07:18.000] File '/package.json' does not exist according to earlier cached lookups. +Info 358 [00:07:19.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 359 [00:07:20.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 360 [00:07:21.000] File '/package.json' does not exist according to earlier cached lookups. +Info 361 [00:07:22.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 4 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info 362 [00:07:23.000] Project '/src/project/tsconfig.json' (Configured) +Info 363 [00:07:24.000] Files (9) + /a/lib/lib.d.ts + /src/project/node_modules/pkg0/import.d.ts + /src/project/node_modules/pkg1/require.d.ts + /src/project/fileWithImports.ts + /src/project/node_modules/pkg2/import.d.ts + /src/project/fileWithTypeRefs.ts + /src/project/randomFileForImport.ts + /src/project/randomFileForTypeRef.ts + /src/project/node_modules/@types/pkg4/index.d.ts + + + ../../a/lib/lib.d.ts + Default library for target 'es5' + node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + Imported via "pkg0" from file 'randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" + node_modules/pkg1/require.d.ts + Imported via "pkg1" from file 'fileWithImports.ts' with packageId 'pkg1/require.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg1/package.json' does not have field "type" + fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" + fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found + +Info 364 [00:07:25.000] ----------------------------------------------- +Info 365 [00:07:26.000] Running: *ensureProjectForOpenFiles* +Info 366 [00:07:27.000] Before ensureProjectForOpenFiles: +Info 367 [00:07:28.000] Project '/src/project/tsconfig.json' (Configured) +Info 367 [00:07:29.000] Files (9) + +Info 367 [00:07:30.000] ----------------------------------------------- +Info 367 [00:07:31.000] Open files: +Info 367 [00:07:32.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 367 [00:07:33.000] Projects: /src/project/tsconfig.json +Info 367 [00:07:34.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 367 [00:07:35.000] Projects: /src/project/tsconfig.json +Info 367 [00:07:36.000] After ensureProjectForOpenFiles: +Info 368 [00:07:37.000] Project '/src/project/tsconfig.json' (Configured) +Info 368 [00:07:38.000] Files (9) + +Info 368 [00:07:39.000] ----------------------------------------------- +Info 368 [00:07:40.000] Open files: +Info 368 [00:07:41.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 368 [00:07:42.000] Projects: /src/project/tsconfig.json +Info 368 [00:07:43.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 368 [00:07:44.000] Projects: /src/project/tsconfig.json +After running timeout callbacks + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 368 [00:07:45.000] write file not resolved by typeRef +Info 369 [00:07:48.000] DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3/require.d.ts :: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 370 [00:07:49.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3/require.d.ts :: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 371 [00:07:50.000] DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3/require.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 372 [00:07:51.000] Scheduled: /src/project/tsconfig.jsonFailedLookupInvalidation +Info 373 [00:07:52.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg3/require.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Before running timeout callbacks +//// [/src/project/node_modules/pkg3/require.d.ts] +export interface RequireInterface3 {} + + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 374 [00:07:53.000] Running: /src/project/tsconfig.jsonFailedLookupInvalidation +Info 375 [00:07:54.000] Scheduled: /src/project/tsconfig.json +Info 376 [00:07:55.000] Scheduled: *ensureProjectForOpenFiles* +After running timeout callbacks + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Before running timeout callbacks + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 377 [00:07:56.000] Running: /src/project/tsconfig.json +Info 378 [00:07:57.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 379 [00:07:58.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 380 [00:07:59.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 381 [00:08:00.000] File '/package.json' does not exist according to earlier cached lookups. +Info 382 [00:08:01.000] File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Info 383 [00:08:02.000] File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +Info 384 [00:08:03.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 385 [00:08:04.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 386 [00:08:05.000] File '/package.json' does not exist according to earlier cached lookups. +Info 387 [00:08:06.000] File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Info 388 [00:08:07.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 389 [00:08:08.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 390 [00:08:09.000] File '/package.json' does not exist according to earlier cached lookups. +Info 391 [00:08:10.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 392 [00:08:11.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 393 [00:08:12.000] File '/package.json' does not exist according to earlier cached lookups. +Info 394 [00:08:13.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 395 [00:08:14.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 396 [00:08:15.000] File '/package.json' does not exist according to earlier cached lookups. +Info 397 [00:08:16.000] File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +Info 398 [00:08:17.000] File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +Info 399 [00:08:18.000] File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +Info 400 [00:08:19.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 401 [00:08:20.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 402 [00:08:21.000] File '/package.json' does not exist according to earlier cached lookups. +Info 403 [00:08:22.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 404 [00:08:23.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 405 [00:08:24.000] File '/package.json' does not exist according to earlier cached lookups. +Info 406 [00:08:25.000] Reusing resolution of module 'pkg0' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +Info 407 [00:08:26.000] Reusing resolution of module 'pkg1' from '/src/project/fileWithImports.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg1/require.d.ts' with Package ID 'pkg1/require.d.ts@0.0.1'. +Info 408 [00:08:27.000] File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Info 409 [00:08:28.000] File '/src/project/node_modules/pkg1/package.json' exists according to earlier cached lookups. +Info 410 [00:08:29.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 411 [00:08:30.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 412 [00:08:31.000] File '/package.json' does not exist according to earlier cached lookups. +Info 413 [00:08:32.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Info 414 [00:08:33.000] ======== Resolving type reference directive 'pkg3', containing file '/src/project/fileWithTypeRefs.ts', root directory '/src/project/node_modules/@types'. ======== +Info 415 [00:08:34.000] Resolving with primary search path '/src/project/node_modules/@types'. +Info 416 [00:08:35.000] Looking up in 'node_modules' folder, initial location '/src/project'. +Info 417 [00:08:36.000] Found 'package.json' at '/src/project/node_modules/pkg3/package.json'. +Info 418 [00:08:37.000] Saw non-matching condition 'import'. +Info 419 [00:08:38.000] Matched 'exports' condition 'require'. +Info 420 [00:08:39.000] Using 'exports' subpath '.' with target './require.js'. +Info 421 [00:08:40.000] File name '/src/project/node_modules/pkg3/require.js' has a '.js' extension - stripping it. +Info 422 [00:08:41.000] File '/src/project/node_modules/pkg3/require.d.ts' exist - use it as a name resolution result. +Info 423 [00:08:42.000] Resolving real path for '/src/project/node_modules/pkg3/require.d.ts', result '/src/project/node_modules/pkg3/require.d.ts'. +Info 424 [00:08:43.000] ======== Type reference directive 'pkg3' was successfully resolved to '/src/project/node_modules/pkg3/require.d.ts' with Package ID 'pkg3/require.d.ts@0.0.1', primary: false. ======== +Info 425 [00:08:44.000] File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Info 426 [00:08:45.000] File '/src/project/node_modules/pkg3/package.json' exists according to earlier cached lookups. +Info 427 [00:08:46.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 428 [00:08:47.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 429 [00:08:48.000] File '/package.json' does not exist according to earlier cached lookups. +Info 430 [00:08:49.000] Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +Info 431 [00:08:50.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 432 [00:08:51.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 433 [00:08:52.000] File '/package.json' does not exist according to earlier cached lookups. +Info 434 [00:08:53.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Info 435 [00:08:54.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 436 [00:08:55.000] File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +Info 437 [00:08:56.000] File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +Info 438 [00:08:57.000] File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +Info 439 [00:08:58.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 440 [00:08:59.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 441 [00:09:00.000] File '/package.json' does not exist according to earlier cached lookups. +Info 442 [00:09:01.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 443 [00:09:02.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 444 [00:09:03.000] File '/package.json' does not exist according to earlier cached lookups. +Info 445 [00:09:04.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 5 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info 446 [00:09:05.000] Project '/src/project/tsconfig.json' (Configured) +Info 447 [00:09:06.000] Files (10) + /a/lib/lib.d.ts + /src/project/node_modules/pkg0/import.d.ts + /src/project/node_modules/pkg1/require.d.ts + /src/project/fileWithImports.ts + /src/project/node_modules/pkg2/import.d.ts + /src/project/node_modules/pkg3/require.d.ts + /src/project/fileWithTypeRefs.ts + /src/project/randomFileForImport.ts + /src/project/randomFileForTypeRef.ts + /src/project/node_modules/@types/pkg4/index.d.ts + + + ../../a/lib/lib.d.ts + Default library for target 'es5' + node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'fileWithImports.ts' with packageId 'pkg0/import.d.ts@0.0.1' + Imported via "pkg0" from file 'randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" + node_modules/pkg1/require.d.ts + Imported via "pkg1" from file 'fileWithImports.ts' with packageId 'pkg1/require.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg1/package.json' does not have field "type" + fileWithImports.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" + node_modules/pkg3/require.d.ts + Type library referenced via 'pkg3' from file 'fileWithTypeRefs.ts' with packageId 'pkg3/require.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg3/package.json' does not have field "type" + fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found + +Info 448 [00:09:07.000] ----------------------------------------------- +Info 449 [00:09:08.000] Running: *ensureProjectForOpenFiles* +Info 450 [00:09:09.000] Before ensureProjectForOpenFiles: +Info 451 [00:09:10.000] Project '/src/project/tsconfig.json' (Configured) +Info 451 [00:09:11.000] Files (10) + +Info 451 [00:09:12.000] ----------------------------------------------- +Info 451 [00:09:13.000] Open files: +Info 451 [00:09:14.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 451 [00:09:15.000] Projects: /src/project/tsconfig.json +Info 451 [00:09:16.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 451 [00:09:17.000] Projects: /src/project/tsconfig.json +Info 451 [00:09:18.000] After ensureProjectForOpenFiles: +Info 452 [00:09:19.000] Project '/src/project/tsconfig.json' (Configured) +Info 452 [00:09:20.000] Files (10) + +Info 452 [00:09:21.000] ----------------------------------------------- +Info 452 [00:09:22.000] Open files: +Info 452 [00:09:23.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 452 [00:09:24.000] Projects: /src/project/tsconfig.json +Info 452 [00:09:25.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 452 [00:09:26.000] Projects: /src/project/tsconfig.json +After running timeout callbacks + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithimports.ts: + {} +/src/project/filewithtyperefs.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 452 [00:09:27.000] delete file with imports +Info 453 [00:09:29.000] FileWatcher:: Triggered with /src/project/fileWithImports.ts 2:: WatchInfo: /src/project/fileWithImports.ts 500 undefined WatchType: Closed Script info +Info 454 [00:09:30.000] FileWatcher:: Close:: WatchInfo: /src/project/fileWithImports.ts 500 undefined WatchType: Closed Script info +Info 455 [00:09:31.000] Scheduled: /src/project/tsconfig.json +Info 456 [00:09:32.000] Scheduled: *ensureProjectForOpenFiles* +Info 457 [00:09:33.000] Elapsed:: *ms FileWatcher:: Triggered with /src/project/fileWithImports.ts 2:: WatchInfo: /src/project/fileWithImports.ts 500 undefined WatchType: Closed Script info +Info 458 [00:09:34.000] DirectoryWatcher:: Triggered with /src/project/fileWithImports.ts :: WatchInfo: /src/project 0 undefined Config: /src/project/tsconfig.json WatchType: Wild card directory +Info 459 [00:09:35.000] Scheduled: /src/project/tsconfig.json, Cancelled earlier one +Info 460 [00:09:36.000] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one +Info 461 [00:09:37.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithImports.ts :: WatchInfo: /src/project 0 undefined Config: /src/project/tsconfig.json WatchType: Wild card directory +Info 462 [00:09:38.000] DirectoryWatcher:: Triggered with /src/project/fileWithImports.ts :: WatchInfo: /src/project 0 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 463 [00:09:39.000] Scheduled: /src/project/tsconfig.jsonFailedLookupInvalidation +Info 464 [00:09:40.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithImports.ts :: WatchInfo: /src/project 0 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Before running timeout callbacks +//// [/src/project/fileWithImports.ts] deleted + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithtyperefs.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg1/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 465 [00:09:41.000] Running: /src/project/tsconfig.json +Info 466 [00:09:42.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 467 [00:09:43.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 468 [00:09:44.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 469 [00:09:45.000] File '/package.json' does not exist according to earlier cached lookups. +Info 470 [00:09:46.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Info 471 [00:09:47.000] Reusing resolution of type reference directive 'pkg3' from '/src/project/fileWithTypeRefs.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg3/require.d.ts' with Package ID 'pkg3/require.d.ts@0.0.1'. +Info 472 [00:09:48.000] File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Info 473 [00:09:49.000] File '/src/project/node_modules/pkg3/package.json' exists according to earlier cached lookups. +Info 474 [00:09:50.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 475 [00:09:51.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 476 [00:09:52.000] File '/package.json' does not exist according to earlier cached lookups. +Info 477 [00:09:53.000] Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +Info 478 [00:09:54.000] File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Info 479 [00:09:55.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 480 [00:09:56.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 481 [00:09:57.000] File '/package.json' does not exist according to earlier cached lookups. +Info 482 [00:09:58.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Info 483 [00:09:59.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 484 [00:10:00.000] File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +Info 485 [00:10:01.000] File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +Info 486 [00:10:02.000] File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +Info 487 [00:10:03.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 488 [00:10:04.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 489 [00:10:05.000] File '/package.json' does not exist according to earlier cached lookups. +Info 490 [00:10:06.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 491 [00:10:07.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 492 [00:10:08.000] File '/package.json' does not exist according to earlier cached lookups. +Info 493 [00:10:09.000] FileWatcher:: Close:: WatchInfo: /src/project/node_modules/pkg1/package.json 2000 undefined Project: /src/project/tsconfig.json WatchType: File location affecting resolution +Info 494 [00:10:10.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 6 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 495 [00:10:11.000] Project '/src/project/tsconfig.json' (Configured) +Info 496 [00:10:12.000] Files (8) + /a/lib/lib.d.ts + /src/project/node_modules/pkg2/import.d.ts + /src/project/node_modules/pkg3/require.d.ts + /src/project/fileWithTypeRefs.ts + /src/project/node_modules/pkg0/import.d.ts + /src/project/randomFileForImport.ts + /src/project/randomFileForTypeRef.ts + /src/project/node_modules/@types/pkg4/index.d.ts + + + ../../a/lib/lib.d.ts + Default library for target 'es5' + node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'fileWithTypeRefs.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" + node_modules/pkg3/require.d.ts + Type library referenced via 'pkg3' from file 'fileWithTypeRefs.ts' with packageId 'pkg3/require.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg3/package.json' does not have field "type" + fileWithTypeRefs.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" + randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found + +Info 497 [00:10:13.000] ----------------------------------------------- +Info 498 [00:10:14.000] Running: *ensureProjectForOpenFiles* +Info 499 [00:10:15.000] Before ensureProjectForOpenFiles: +Info 500 [00:10:16.000] Project '/src/project/tsconfig.json' (Configured) +Info 500 [00:10:17.000] Files (8) + +Info 500 [00:10:18.000] ----------------------------------------------- +Info 500 [00:10:19.000] Open files: +Info 500 [00:10:20.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 500 [00:10:21.000] Projects: /src/project/tsconfig.json +Info 500 [00:10:22.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 500 [00:10:23.000] Projects: /src/project/tsconfig.json +Info 500 [00:10:24.000] After ensureProjectForOpenFiles: +Info 501 [00:10:25.000] Project '/src/project/tsconfig.json' (Configured) +Info 501 [00:10:26.000] Files (8) + +Info 501 [00:10:27.000] ----------------------------------------------- +Info 501 [00:10:28.000] Open files: +Info 501 [00:10:29.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 501 [00:10:30.000] Projects: /src/project/tsconfig.json +Info 501 [00:10:31.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 501 [00:10:32.000] Projects: /src/project/tsconfig.json +After running timeout callbacks + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/src/project/filewithtyperefs.ts: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 501 [00:10:33.000] delete file with typeRefs +Info 502 [00:10:35.000] FileWatcher:: Triggered with /src/project/fileWithTypeRefs.ts 2:: WatchInfo: /src/project/fileWithTypeRefs.ts 500 undefined WatchType: Closed Script info +Info 503 [00:10:36.000] FileWatcher:: Close:: WatchInfo: /src/project/fileWithTypeRefs.ts 500 undefined WatchType: Closed Script info +Info 504 [00:10:37.000] Scheduled: /src/project/tsconfig.json +Info 505 [00:10:38.000] Scheduled: *ensureProjectForOpenFiles* +Info 506 [00:10:39.000] Elapsed:: *ms FileWatcher:: Triggered with /src/project/fileWithTypeRefs.ts 2:: WatchInfo: /src/project/fileWithTypeRefs.ts 500 undefined WatchType: Closed Script info +Info 507 [00:10:40.000] DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.ts :: WatchInfo: /src/project 0 undefined Config: /src/project/tsconfig.json WatchType: Wild card directory +Info 508 [00:10:41.000] Scheduled: /src/project/tsconfig.json, Cancelled earlier one +Info 509 [00:10:42.000] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one +Info 510 [00:10:43.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.ts :: WatchInfo: /src/project 0 undefined Config: /src/project/tsconfig.json WatchType: Wild card directory +Info 511 [00:10:44.000] DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.ts :: WatchInfo: /src/project 0 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 512 [00:10:45.000] Scheduled: /src/project/tsconfig.jsonFailedLookupInvalidation +Info 513 [00:10:46.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/fileWithTypeRefs.ts :: WatchInfo: /src/project 0 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Before running timeout callbacks +//// [/src/project/fileWithTypeRefs.ts] deleted + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} +/src/project/node_modules/pkg3/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 514 [00:10:47.000] Running: /src/project/tsconfig.json +Info 515 [00:10:48.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 516 [00:10:49.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 517 [00:10:50.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 518 [00:10:51.000] File '/package.json' does not exist according to earlier cached lookups. +Info 519 [00:10:52.000] Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg0/import.d.ts' with Package ID 'pkg0/import.d.ts@0.0.1'. +Info 520 [00:10:53.000] File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Info 521 [00:10:54.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 522 [00:10:55.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 523 [00:10:56.000] File '/package.json' does not exist according to earlier cached lookups. +Info 524 [00:10:57.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Info 525 [00:10:58.000] File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Info 526 [00:10:59.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 527 [00:11:00.000] File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +Info 528 [00:11:01.000] File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +Info 529 [00:11:02.000] File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +Info 530 [00:11:03.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 531 [00:11:04.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 532 [00:11:05.000] File '/package.json' does not exist according to earlier cached lookups. +Info 533 [00:11:06.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 534 [00:11:07.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 535 [00:11:08.000] File '/package.json' does not exist according to earlier cached lookups. +Info 536 [00:11:09.000] FileWatcher:: Close:: WatchInfo: /src/project/node_modules/pkg3/package.json 2000 undefined Project: /src/project/tsconfig.json WatchType: File location affecting resolution +Info 537 [00:11:10.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 7 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 538 [00:11:11.000] Project '/src/project/tsconfig.json' (Configured) +Info 539 [00:11:12.000] Files (6) + /a/lib/lib.d.ts + /src/project/node_modules/pkg0/import.d.ts + /src/project/randomFileForImport.ts + /src/project/node_modules/pkg2/import.d.ts + /src/project/randomFileForTypeRef.ts + /src/project/node_modules/@types/pkg4/index.d.ts + + + ../../a/lib/lib.d.ts + Default library for target 'es5' + node_modules/pkg0/import.d.ts + Imported via "pkg0" from file 'randomFileForImport.ts' with packageId 'pkg0/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg0/package.json' does not have field "type" + randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'randomFileForTypeRef.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" + randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found + +Info 540 [00:11:13.000] ----------------------------------------------- +Info 541 [00:11:14.000] Running: *ensureProjectForOpenFiles* +Info 542 [00:11:15.000] Before ensureProjectForOpenFiles: +Info 543 [00:11:16.000] Project '/src/project/tsconfig.json' (Configured) +Info 543 [00:11:17.000] Files (6) + +Info 543 [00:11:18.000] ----------------------------------------------- +Info 543 [00:11:19.000] Open files: +Info 543 [00:11:20.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 543 [00:11:21.000] Projects: /src/project/tsconfig.json +Info 543 [00:11:22.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 543 [00:11:23.000] Projects: /src/project/tsconfig.json +Info 543 [00:11:24.000] After ensureProjectForOpenFiles: +Info 544 [00:11:25.000] Project '/src/project/tsconfig.json' (Configured) +Info 544 [00:11:26.000] Files (6) + +Info 544 [00:11:27.000] ----------------------------------------------- +Info 544 [00:11:28.000] Open files: +Info 544 [00:11:29.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 544 [00:11:30.000] Projects: /src/project/tsconfig.json +Info 544 [00:11:31.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 544 [00:11:32.000] Projects: /src/project/tsconfig.json +After running timeout callbacks + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 544 [00:11:33.000] delete resolved import file +Info 545 [00:11:35.000] DirectoryWatcher:: Triggered with /src/project/node_modules/pkg0/import.d.ts :: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 546 [00:11:36.000] Scheduled: /src/project/tsconfig.json +Info 547 [00:11:37.000] Scheduled: *ensureProjectForOpenFiles* +Info 548 [00:11:38.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg0/import.d.ts :: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 549 [00:11:39.000] DirectoryWatcher:: Triggered with /src/project/node_modules/pkg0/import.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 550 [00:11:40.000] Scheduled: /src/project/tsconfig.jsonFailedLookupInvalidation +Info 551 [00:11:41.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg0/import.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Before running timeout callbacks +//// [/src/project/node_modules/pkg0/import.d.ts] deleted + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 552 [00:11:42.000] Running: /src/project/tsconfig.json +Info 553 [00:11:43.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 554 [00:11:44.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 555 [00:11:45.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 556 [00:11:46.000] File '/package.json' does not exist according to earlier cached lookups. +Info 557 [00:11:47.000] Found 'package.json' at '/src/project/node_modules/pkg0/package.json'. +Info 558 [00:11:48.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 559 [00:11:49.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 560 [00:11:50.000] File '/package.json' does not exist according to earlier cached lookups. +Info 561 [00:11:51.000] ======== Resolving module 'pkg0' from '/src/project/randomFileForImport.ts'. ======== +Info 562 [00:11:52.000] Explicitly specified module resolution kind: 'Node16'. +Info 563 [00:11:53.000] Resolving in ESM mode with conditions 'node', 'import', 'types'. +Info 564 [00:11:54.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 565 [00:11:55.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 566 [00:11:56.000] File '/package.json' does not exist according to earlier cached lookups. +Info 567 [00:11:57.000] Loading module 'pkg0' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Info 568 [00:11:58.000] File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Info 569 [00:11:59.000] Matched 'exports' condition 'import'. +Info 570 [00:12:00.000] Using 'exports' subpath '.' with target './import.js'. +Info 571 [00:12:01.000] File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +Info 572 [00:12:02.000] File '/src/project/node_modules/pkg0/import.ts' does not exist. +Info 573 [00:12:03.000] File '/src/project/node_modules/pkg0/import.tsx' does not exist. +Info 574 [00:12:04.000] File '/src/project/node_modules/pkg0/import.d.ts' does not exist. +Info 575 [00:12:05.000] Saw non-matching condition 'require'. +Info 576 [00:12:06.000] Directory '/src/node_modules' does not exist, skipping all lookups in it. +Info 577 [00:12:07.000] Directory '/node_modules' does not exist, skipping all lookups in it. +Info 578 [00:12:08.000] File '/src/project/node_modules/pkg0/package.json' exists according to earlier cached lookups. +Info 579 [00:12:09.000] Matched 'exports' condition 'import'. +Info 580 [00:12:10.000] Using 'exports' subpath '.' with target './import.js'. +Info 581 [00:12:11.000] File name '/src/project/node_modules/pkg0/import.js' has a '.js' extension - stripping it. +Info 582 [00:12:12.000] File '/src/project/node_modules/pkg0/import.js' does not exist. +Info 583 [00:12:13.000] File '/src/project/node_modules/pkg0/import.jsx' does not exist. +Info 584 [00:12:14.000] Saw non-matching condition 'require'. +Info 585 [00:12:15.000] Directory '/src/node_modules' does not exist, skipping all lookups in it. +Info 586 [00:12:16.000] Directory '/node_modules' does not exist, skipping all lookups in it. +Info 587 [00:12:17.000] ======== Module name 'pkg0' was not resolved. ======== +Info 588 [00:12:18.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 589 [00:12:19.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 590 [00:12:20.000] File '/package.json' does not exist according to earlier cached lookups. +Info 591 [00:12:21.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/import.d.ts' with Package ID 'pkg2/import.d.ts@0.0.1'. +Info 592 [00:12:22.000] File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Info 593 [00:12:23.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 594 [00:12:24.000] File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +Info 595 [00:12:25.000] File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +Info 596 [00:12:26.000] File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +Info 597 [00:12:27.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 598 [00:12:28.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 599 [00:12:29.000] File '/package.json' does not exist according to earlier cached lookups. +Info 600 [00:12:30.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 601 [00:12:31.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 602 [00:12:32.000] File '/package.json' does not exist according to earlier cached lookups. +Info 603 [00:12:33.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 8 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 604 [00:12:34.000] Project '/src/project/tsconfig.json' (Configured) +Info 605 [00:12:35.000] Files (5) + /a/lib/lib.d.ts + /src/project/randomFileForImport.ts + /src/project/node_modules/pkg2/import.d.ts + /src/project/randomFileForTypeRef.ts + /src/project/node_modules/@types/pkg4/index.d.ts + + + ../../a/lib/lib.d.ts + Default library for target 'es5' + randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + node_modules/pkg2/import.d.ts + Type library referenced via 'pkg2' from file 'randomFileForTypeRef.ts' with packageId 'pkg2/import.d.ts@0.0.1' + File is CommonJS module because 'node_modules/pkg2/package.json' does not have field "type" + randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found + +Info 606 [00:12:36.000] ----------------------------------------------- +Info 607 [00:12:37.000] Running: *ensureProjectForOpenFiles* +Info 608 [00:12:38.000] Before ensureProjectForOpenFiles: +Info 609 [00:12:39.000] Project '/src/project/tsconfig.json' (Configured) +Info 609 [00:12:40.000] Files (5) + +Info 609 [00:12:41.000] ----------------------------------------------- +Info 609 [00:12:42.000] Open files: +Info 609 [00:12:43.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 609 [00:12:44.000] Projects: /src/project/tsconfig.json +Info 609 [00:12:45.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 609 [00:12:46.000] Projects: /src/project/tsconfig.json +Info 609 [00:12:47.000] After ensureProjectForOpenFiles: +Info 610 [00:12:48.000] Project '/src/project/tsconfig.json' (Configured) +Info 610 [00:12:49.000] Files (5) + +Info 610 [00:12:50.000] ----------------------------------------------- +Info 610 [00:12:51.000] Open files: +Info 610 [00:12:52.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 610 [00:12:53.000] Projects: /src/project/tsconfig.json +Info 610 [00:12:54.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 610 [00:12:55.000] Projects: /src/project/tsconfig.json +After running timeout callbacks + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 610 [00:12:56.000] delete resolved typeRef file +Info 611 [00:12:58.000] DirectoryWatcher:: Triggered with /src/project/node_modules/pkg2/import.d.ts :: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 612 [00:12:59.000] Scheduled: /src/project/tsconfig.json +Info 613 [00:13:00.000] Scheduled: *ensureProjectForOpenFiles* +Info 614 [00:13:01.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg2/import.d.ts :: WatchInfo: /src/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info 615 [00:13:02.000] DirectoryWatcher:: Triggered with /src/project/node_modules/pkg2/import.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Info 616 [00:13:03.000] Scheduled: /src/project/tsconfig.jsonFailedLookupInvalidation +Info 617 [00:13:04.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /src/project/node_modules/pkg2/import.d.ts :: WatchInfo: /src/project/node_modules 1 undefined Project: /src/project/tsconfig.json WatchType: Failed Lookup Locations +Before running timeout callbacks +//// [/src/project/node_modules/pkg2/import.d.ts] deleted + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} + +Info 618 [00:13:05.000] Running: /src/project/tsconfig.json +Info 619 [00:13:06.000] Starting updateGraphWorker: Project: /src/project/tsconfig.json +Info 620 [00:13:07.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 621 [00:13:08.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 622 [00:13:09.000] File '/package.json' does not exist according to earlier cached lookups. +Info 623 [00:13:10.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 624 [00:13:11.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 625 [00:13:12.000] File '/package.json' does not exist according to earlier cached lookups. +Info 626 [00:13:13.000] Found 'package.json' at '/src/project/node_modules/pkg2/package.json'. +Info 627 [00:13:14.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 628 [00:13:15.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 629 [00:13:16.000] File '/package.json' does not exist according to earlier cached lookups. +Info 630 [00:13:17.000] Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was not resolved. +Info 631 [00:13:18.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 632 [00:13:19.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 633 [00:13:20.000] File '/package.json' does not exist according to earlier cached lookups. +Info 634 [00:13:21.000] ======== Resolving type reference directive 'pkg2', containing file '/src/project/randomFileForTypeRef.ts', root directory '/src/project/node_modules/@types'. ======== +Info 635 [00:13:22.000] Resolving with primary search path '/src/project/node_modules/@types'. +Info 636 [00:13:23.000] Looking up in 'node_modules' folder, initial location '/src/project'. +Info 637 [00:13:24.000] File '/src/project/node_modules/pkg2/package.json' exists according to earlier cached lookups. +Info 638 [00:13:25.000] Matched 'exports' condition 'import'. +Info 639 [00:13:26.000] Using 'exports' subpath '.' with target './import.js'. +Info 640 [00:13:27.000] File name '/src/project/node_modules/pkg2/import.js' has a '.js' extension - stripping it. +Info 641 [00:13:28.000] File '/src/project/node_modules/pkg2/import.d.ts' does not exist. +Info 642 [00:13:29.000] Saw non-matching condition 'require'. +Info 643 [00:13:30.000] Directory '/src/node_modules' does not exist, skipping all lookups in it. +Info 644 [00:13:31.000] Directory '/node_modules' does not exist, skipping all lookups in it. +Info 645 [00:13:32.000] ======== Type reference directive 'pkg2' was not resolved. ======== +Info 646 [00:13:33.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. +Info 647 [00:13:34.000] File '/src/project/node_modules/@types/pkg4/package.json' does not exist according to earlier cached lookups. +Info 648 [00:13:35.000] File '/src/project/node_modules/@types/package.json' does not exist according to earlier cached lookups. +Info 649 [00:13:36.000] File '/src/project/node_modules/package.json' does not exist according to earlier cached lookups. +Info 650 [00:13:37.000] File '/src/project/package.json' does not exist according to earlier cached lookups. +Info 651 [00:13:38.000] File '/src/package.json' does not exist according to earlier cached lookups. +Info 652 [00:13:39.000] File '/package.json' does not exist according to earlier cached lookups. +Info 653 [00:13:40.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 654 [00:13:41.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 655 [00:13:42.000] File '/package.json' does not exist according to earlier cached lookups. +Info 656 [00:13:43.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 9 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 657 [00:13:44.000] Project '/src/project/tsconfig.json' (Configured) +Info 658 [00:13:45.000] Files (4) + /a/lib/lib.d.ts + /src/project/randomFileForImport.ts + /src/project/randomFileForTypeRef.ts + /src/project/node_modules/@types/pkg4/index.d.ts + + + ../../a/lib/lib.d.ts + Default library for target 'es5' + randomFileForImport.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + randomFileForTypeRef.ts + Matched by include pattern '*.ts' in 'tsconfig.json' + File is CommonJS module because 'package.json' was not found + node_modules/@types/pkg4/index.d.ts + Entry point for implicit type library 'pkg4' + File is CommonJS module because 'package.json' was not found + +Info 659 [00:13:46.000] ----------------------------------------------- +Info 660 [00:13:47.000] Running: *ensureProjectForOpenFiles* +Info 661 [00:13:48.000] Before ensureProjectForOpenFiles: +Info 662 [00:13:49.000] Project '/src/project/tsconfig.json' (Configured) +Info 662 [00:13:50.000] Files (4) + +Info 662 [00:13:51.000] ----------------------------------------------- +Info 662 [00:13:52.000] Open files: +Info 662 [00:13:53.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 662 [00:13:54.000] Projects: /src/project/tsconfig.json +Info 662 [00:13:55.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 662 [00:13:56.000] Projects: /src/project/tsconfig.json +Info 662 [00:13:57.000] After ensureProjectForOpenFiles: +Info 663 [00:13:58.000] Project '/src/project/tsconfig.json' (Configured) +Info 663 [00:13:59.000] Files (4) + +Info 663 [00:14:00.000] ----------------------------------------------- +Info 663 [00:14:01.000] Open files: +Info 663 [00:14:02.000] FileName: /src/project/randomFileForImport.ts ProjectRootPath: undefined +Info 663 [00:14:03.000] Projects: /src/project/tsconfig.json +Info 663 [00:14:04.000] FileName: /src/project/randomFileForTypeRef.ts ProjectRootPath: undefined +Info 663 [00:14:05.000] Projects: /src/project/tsconfig.json +After running timeout callbacks + +PolledWatches:: +/src/project/node_modules/@types/pkg4/package.json: + {"pollingInterval":2000} +/src/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/src/project/node_modules/package.json: + {"pollingInterval":2000} + +FsWatches:: +/src/project/tsconfig.json: + {} +/src/project: + {} +/a/lib/lib.d.ts: + {} +/src/project/node_modules/pkg0/package.json: + {} +/src/project/node_modules/pkg2/package.json: + {} + +FsWatchesRecursive:: +/src/project/node_modules: + {} +/src/project/node_modules/@types: + {} diff --git a/tests/baselines/reference/tsserver/cacheResolutions/sample-project-not-built.js b/tests/baselines/reference/tsserver/cacheResolutions/sample-project-not-built.js new file mode 100644 index 00000000000..9d9c9acac2d --- /dev/null +++ b/tests/baselines/reference/tsserver/cacheResolutions/sample-project-not-built.js @@ -0,0 +1,292 @@ +Info 0 [00:00:39.000] Provided types map file "/a/lib/typesMap.json" doesn't exist +Info 1 [00:00:40.000] request: + { + "command": "open", + "arguments": { + "file": "/user/username/projects/sample1/tests/index.ts" + }, + "seq": 1, + "type": "request" + } +Before request +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + +//// [/user/username/projects/sample1/core/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + "cacheResolutions": true, + "traceResolution": true + } +} + +//// [/user/username/projects/sample1/core/index.ts] +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } + + +//// [/user/username/projects/sample1/core/anotherModule.ts] +export const World = "hello"; + + +//// [/user/username/projects/sample1/core/some_decl.d.ts] +declare const dts: any; + + +//// [/user/username/projects/sample1/logic/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true, + "cacheResolutions": true, + "traceResolution": true + }, + "references": [ + { + "path": "../core" + } + ] +} + +//// [/user/username/projects/sample1/logic/index.ts] +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; + + +//// [/user/username/projects/sample1/tests/tsconfig.json] +{ + "references": [ + { + "path": "../core" + }, + { + "path": "../logic" + } + ], + "files": [ + "index.ts" + ], + "compilerOptions": { + "composite": true, + "declaration": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true, + "cacheResolutions": true, + "traceResolution": true + } +} + +//// [/user/username/projects/sample1/tests/index.ts] +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; + + + +PolledWatches:: + +FsWatches:: + +FsWatchesRecursive:: + +Info 2 [00:00:41.000] Search path: /user/username/projects/sample1/tests +Info 3 [00:00:42.000] For info: /user/username/projects/sample1/tests/index.ts :: Config file name: /user/username/projects/sample1/tests/tsconfig.json +Info 4 [00:00:43.000] Creating configuration project /user/username/projects/sample1/tests/tsconfig.json +Info 5 [00:00:44.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/sample1/tests/tsconfig.json 2000 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Config file +Info 6 [00:00:45.000] Config: /user/username/projects/sample1/tests/tsconfig.json : { + "rootNames": [ + "/user/username/projects/sample1/tests/index.ts" + ], + "options": { + "composite": true, + "declaration": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true, + "cacheResolutions": true, + "traceResolution": true, + "configFilePath": "/user/username/projects/sample1/tests/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/user/username/projects/sample1/core", + "originalPath": "../core" + }, + { + "path": "/user/username/projects/sample1/logic", + "originalPath": "../logic" + } + ] +} +Info 7 [00:00:46.000] Starting updateGraphWorker: Project: /user/username/projects/sample1/tests/tsconfig.json +Info 8 [00:00:47.000] Config: /user/username/projects/sample1/core/tsconfig.json : { + "rootNames": [ + "/user/username/projects/sample1/core/anotherModule.ts", + "/user/username/projects/sample1/core/index.ts", + "/user/username/projects/sample1/core/some_decl.d.ts" + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + "cacheResolutions": true, + "traceResolution": true, + "configFilePath": "/user/username/projects/sample1/core/tsconfig.json" + } +} +Info 9 [00:00:48.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/sample1/core/tsconfig.json 2000 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Config file +Info 10 [00:00:49.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/core 1 undefined Config: /user/username/projects/sample1/core/tsconfig.json WatchType: Wild card directory +Info 11 [00:00:50.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/core 1 undefined Config: /user/username/projects/sample1/core/tsconfig.json WatchType: Wild card directory +Info 12 [00:00:51.000] Config: /user/username/projects/sample1/logic/tsconfig.json : { + "rootNames": [ + "/user/username/projects/sample1/logic/index.ts" + ], + "options": { + "composite": true, + "declaration": true, + "sourceMap": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true, + "cacheResolutions": true, + "traceResolution": true, + "configFilePath": "/user/username/projects/sample1/logic/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/user/username/projects/sample1/core", + "originalPath": "../core" + } + ] +} +Info 13 [00:00:52.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/sample1/logic/tsconfig.json 2000 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Config file +Info 14 [00:00:53.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/logic 1 undefined Config: /user/username/projects/sample1/logic/tsconfig.json WatchType: Wild card directory +Info 15 [00:00:54.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/logic 1 undefined Config: /user/username/projects/sample1/logic/tsconfig.json WatchType: Wild card directory +Info 16 [00:00:55.000] ======== Resolving module '../core/index' from '/user/username/projects/sample1/tests/index.ts'. ======== +Info 17 [00:00:56.000] Module resolution kind is not specified, using 'NodeJs'. +Info 18 [00:00:57.000] Loading module as file / folder, candidate module location '/user/username/projects/sample1/core/index', target file types: TypeScript, Declaration. +Info 19 [00:00:58.000] File '/user/username/projects/sample1/core/index.ts' exist - use it as a name resolution result. +Info 20 [00:00:59.000] ======== Module name '../core/index' was successfully resolved to '/user/username/projects/sample1/core/index.ts'. ======== +Info 21 [00:01:00.000] ======== Resolving module '../logic/index' from '/user/username/projects/sample1/tests/index.ts'. ======== +Info 22 [00:01:01.000] Module resolution kind is not specified, using 'NodeJs'. +Info 23 [00:01:02.000] Loading module as file / folder, candidate module location '/user/username/projects/sample1/logic/index', target file types: TypeScript, Declaration. +Info 24 [00:01:03.000] File '/user/username/projects/sample1/logic/index.ts' exist - use it as a name resolution result. +Info 25 [00:01:04.000] ======== Module name '../logic/index' was successfully resolved to '/user/username/projects/sample1/logic/index.ts'. ======== +Info 26 [00:01:05.000] ======== Resolving module '../core/anotherModule' from '/user/username/projects/sample1/tests/index.ts'. ======== +Info 27 [00:01:06.000] Module resolution kind is not specified, using 'NodeJs'. +Info 28 [00:01:07.000] Loading module as file / folder, candidate module location '/user/username/projects/sample1/core/anotherModule', target file types: TypeScript, Declaration. +Info 29 [00:01:08.000] File '/user/username/projects/sample1/core/anotherModule.ts' exist - use it as a name resolution result. +Info 30 [00:01:09.000] ======== Module name '../core/anotherModule' was successfully resolved to '/user/username/projects/sample1/core/anotherModule.ts'. ======== +Info 31 [00:01:10.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/sample1/core/index.ts 500 undefined WatchType: Closed Script info +Info 32 [00:01:11.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/sample1/logic/index.ts 500 undefined WatchType: Closed Script info +Info 33 [00:01:12.000] ======== Resolving module '../core/index' from '/user/username/projects/sample1/logic/index.ts'. ======== +Info 34 [00:01:13.000] Using compiler options of project reference redirect '/user/username/projects/sample1/logic/tsconfig.json'. +Info 35 [00:01:14.000] Module resolution kind is not specified, using 'NodeJs'. +Info 36 [00:01:15.000] Loading module as file / folder, candidate module location '/user/username/projects/sample1/core/index', target file types: TypeScript, Declaration. +Info 37 [00:01:16.000] File '/user/username/projects/sample1/core/index.ts' exist - use it as a name resolution result. +Info 38 [00:01:17.000] ======== Module name '../core/index' was successfully resolved to '/user/username/projects/sample1/core/index.ts'. ======== +Info 39 [00:01:18.000] ======== Resolving module '../core/anotherModule' from '/user/username/projects/sample1/logic/index.ts'. ======== +Info 40 [00:01:19.000] Using compiler options of project reference redirect '/user/username/projects/sample1/logic/tsconfig.json'. +Info 41 [00:01:20.000] Module resolution kind is not specified, using 'NodeJs'. +Info 42 [00:01:21.000] Loading module as file / folder, candidate module location '/user/username/projects/sample1/core/anotherModule', target file types: TypeScript, Declaration. +Info 43 [00:01:22.000] File '/user/username/projects/sample1/core/anotherModule.ts' exist - use it as a name resolution result. +Info 44 [00:01:23.000] ======== Module name '../core/anotherModule' was successfully resolved to '/user/username/projects/sample1/core/anotherModule.ts'. ======== +Info 45 [00:01:24.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/sample1/core/anotherModule.ts 500 undefined WatchType: Closed Script info +Info 46 [00:01:25.000] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined WatchType: Closed Script info +Info 47 [00:01:26.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/tests/node_modules/@types 1 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Type roots +Info 48 [00:01:27.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/tests/node_modules/@types 1 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Type roots +Info 49 [00:01:28.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/node_modules/@types 1 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Type roots +Info 50 [00:01:29.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/node_modules/@types 1 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Type roots +Info 51 [00:01:30.000] Finishing updateGraphWorker: Project: /user/username/projects/sample1/tests/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 52 [00:01:31.000] Project '/user/username/projects/sample1/tests/tsconfig.json' (Configured) +Info 53 [00:01:32.000] Files (5) + /a/lib/lib.d.ts + /user/username/projects/sample1/core/index.ts + /user/username/projects/sample1/core/anotherModule.ts + /user/username/projects/sample1/logic/index.ts + /user/username/projects/sample1/tests/index.ts + + + ../../../../../a/lib/lib.d.ts + Default library for target 'es5' + ../core/index.ts + Imported via '../core/index' from file 'index.ts' + Imported via '../core/index' from file '../logic/index.ts' + ../core/anotherModule.ts + Imported via '../core/anotherModule' from file '../logic/index.ts' + Imported via '../core/anotherModule' from file 'index.ts' + ../logic/index.ts + Imported via '../logic/index' from file 'index.ts' + index.ts + Part of 'files' list in tsconfig.json + +Info 54 [00:01:33.000] ----------------------------------------------- +Info 55 [00:01:34.000] Search path: /user/username/projects/sample1/tests +Info 56 [00:01:35.000] For info: /user/username/projects/sample1/tests/tsconfig.json :: No config files found. +Info 57 [00:01:36.000] Project '/user/username/projects/sample1/tests/tsconfig.json' (Configured) +Info 57 [00:01:37.000] Files (5) + +Info 57 [00:01:38.000] ----------------------------------------------- +Info 57 [00:01:39.000] Open files: +Info 57 [00:01:40.000] FileName: /user/username/projects/sample1/tests/index.ts ProjectRootPath: undefined +Info 57 [00:01:41.000] Projects: /user/username/projects/sample1/tests/tsconfig.json +After request + +PolledWatches:: +/user/username/projects/sample1/tests/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/sample1/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/user/username/projects/sample1/tests/tsconfig.json: + {} +/user/username/projects/sample1/core/tsconfig.json: + {} +/user/username/projects/sample1/logic/tsconfig.json: + {} +/user/username/projects/sample1/core/index.ts: + {} +/user/username/projects/sample1/logic/index.ts: + {} +/user/username/projects/sample1/core/anothermodule.ts: + {} +/a/lib/lib.d.ts: + {} + +FsWatchesRecursive:: +/user/username/projects/sample1/core: + {} +/user/username/projects/sample1/logic: + {} + +Info 57 [00:01:42.000] response: + { + "responseRequired": false + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/cacheResolutions/sample-project.js b/tests/baselines/reference/tsserver/cacheResolutions/sample-project.js new file mode 100644 index 00000000000..0034336f426 --- /dev/null +++ b/tests/baselines/reference/tsserver/cacheResolutions/sample-project.js @@ -0,0 +1,603 @@ +Info 0 [00:01:16.000] Provided types map file "/a/lib/typesMap.json" doesn't exist +Info 1 [00:01:17.000] request: + { + "command": "open", + "arguments": { + "file": "/user/username/projects/sample1/tests/index.ts" + }, + "seq": 1, + "type": "request" + } +Before request +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + +//// [/user/username/projects/sample1/core/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + "cacheResolutions": true, + "traceResolution": true + } +} + +//// [/user/username/projects/sample1/core/index.ts] +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } + + +//// [/user/username/projects/sample1/core/anotherModule.ts] +export const World = "hello"; + + +//// [/user/username/projects/sample1/core/some_decl.d.ts] +declare const dts: any; + + +//// [/user/username/projects/sample1/logic/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true, + "cacheResolutions": true, + "traceResolution": true + }, + "references": [ + { + "path": "../core" + } + ] +} + +//// [/user/username/projects/sample1/logic/index.ts] +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; + + +//// [/user/username/projects/sample1/tests/tsconfig.json] +{ + "references": [ + { + "path": "../core" + }, + { + "path": "../logic" + } + ], + "files": [ + "index.ts" + ], + "compilerOptions": { + "composite": true, + "declaration": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true, + "cacheResolutions": true, + "traceResolution": true + } +} + +//// [/user/username/projects/sample1/tests/index.ts] +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; + + +//// [/user/username/projects/sample1/core/anotherModule.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.World = void 0; +exports.World = "hello"; + + +//// [/user/username/projects/sample1/core/anotherModule.d.ts.map] +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} + +//// [/user/username/projects/sample1/core/anotherModule.d.ts] +export declare const World = "hello"; +//# sourceMappingURL=anotherModule.d.ts.map + +//// [/user/username/projects/sample1/core/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.multiply = exports.leftPad = exports.someString = void 0; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +exports.leftPad = leftPad; +function multiply(a, b) { return a * b; } +exports.multiply = multiply; + + +//// [/user/username/projects/sample1/core/index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,EAAE,MAAsB,CAAC;AAChD,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAC/D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB"} + +//// [/user/username/projects/sample1/core/index.d.ts] +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; +//# sourceMappingURL=index.d.ts.map + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-2676574883-export const World = \"hello\";\r\n","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"},{"version":"-9253692965-declare const dts: any;\r\n","affectsGlobalScope":true}],"options":{"cacheResolutions":true,"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2,3,4],"latestChangedDtsFile":"./index.d.ts"},"version":"FakeTSVersion"} + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./anothermodule.ts": { + "original": { + "version": "-2676574883-export const World = \"hello\";\r\n", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "version": "-2676574883-export const World = \"hello\";\r\n", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "./index.ts": { + "original": { + "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "./some_decl.d.ts": { + "original": { + "version": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + }, + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n", + "affectsGlobalScope": true + } + }, + "options": { + "cacheResolutions": true, + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "latestChangedDtsFile": "./index.d.ts" + }, + "version": "FakeTSVersion", + "size": 1417 +} + +//// [/user/username/projects/sample1/logic/index.js.map] +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AAFD,0CAEC;AACD,2CAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} + +//// [/user/username/projects/sample1/logic/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = exports.getSecondsInDay = void 0; +var c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +exports.getSecondsInDay = getSecondsInDay; +var mod = require("../core/anotherModule"); +exports.m = mod; +//# sourceMappingURL=index.js.map + +//// [/user/username/projects/sample1/logic/index.d.ts] +export declare function getSecondsInDay(): number; +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + + +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","-9234818176-export declare const World = \"hello\";\n",{"version":"-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"cacheResolutions":true,"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"fileIdsList":[[2,3],[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,2]],"semanticDiagnosticsPerFile":[1,3,2,4],"latestChangedDtsFile":"./index.d.ts"},"version":"FakeTSVersion"} + +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ], + [ + "../core/anothermodule.d.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "../core/anothermodule.d.ts": { + "version": "-9234818176-export declare const World = \"hello\";\n", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "./index.ts": { + "original": { + "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + }, + "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + } + }, + "options": { + "cacheResolutions": true, + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ] + }, + "exportedModulesMap": { + "./index.ts": [ + "../core/anothermodule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../core/anothermodule.d.ts", + "../core/index.d.ts", + "./index.ts" + ], + "latestChangedDtsFile": "./index.d.ts" + }, + "version": "FakeTSVersion", + "size": 1456 +} + +//// [/user/username/projects/sample1/tests/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +var c = require("../core/index"); +var logic = require("../logic/index"); +c.leftPad("", 10); +logic.getSecondsInDay(); +var mod = require("../core/anotherModule"); +exports.m = mod; + + +//// [/user/username/projects/sample1/tests/index.d.ts] +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + + +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","-9234818176-export declare const World = \"hello\";\n","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n","signature":"2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"options":{"cacheResolutions":true,"composite":true,"declaration":true,"skipDefaultLibCheck":true},"fileIdsList":[[3],[2,3,4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,1]],"semanticDiagnosticsPerFile":[1,3,2,4,5],"latestChangedDtsFile":"./index.d.ts"},"version":"FakeTSVersion"} + +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileNamesList": [ + [ + "../core/anothermodule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "../core/anothermodule.d.ts": { + "version": "-9234818176-export declare const World = \"hello\";\n", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "../logic/index.d.ts": { + "version": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + }, + "./index.ts": { + "original": { + "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + }, + "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + } + }, + "options": { + "cacheResolutions": true, + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anothermodule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + }, + "exportedModulesMap": { + "../logic/index.d.ts": [ + "../core/anothermodule.d.ts" + ], + "./index.ts": [ + "../core/anothermodule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../core/anothermodule.d.ts", + "../core/index.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "latestChangedDtsFile": "./index.d.ts" + }, + "version": "FakeTSVersion", + "size": 1601 +} + + +PolledWatches:: + +FsWatches:: + +FsWatchesRecursive:: + +Info 2 [00:01:18.000] Search path: /user/username/projects/sample1/tests +Info 3 [00:01:19.000] For info: /user/username/projects/sample1/tests/index.ts :: Config file name: /user/username/projects/sample1/tests/tsconfig.json +Info 4 [00:01:20.000] Creating configuration project /user/username/projects/sample1/tests/tsconfig.json +Info 5 [00:01:21.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/sample1/tests/tsconfig.json 2000 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Config file +Info 6 [00:01:22.000] Config: /user/username/projects/sample1/tests/tsconfig.json : { + "rootNames": [ + "/user/username/projects/sample1/tests/index.ts" + ], + "options": { + "composite": true, + "declaration": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true, + "cacheResolutions": true, + "traceResolution": true, + "configFilePath": "/user/username/projects/sample1/tests/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/user/username/projects/sample1/core", + "originalPath": "../core" + }, + { + "path": "/user/username/projects/sample1/logic", + "originalPath": "../logic" + } + ] +} +Info 7 [00:01:23.000] Starting updateGraphWorker: Project: /user/username/projects/sample1/tests/tsconfig.json +Info 8 [00:01:24.000] Config: /user/username/projects/sample1/core/tsconfig.json : { + "rootNames": [ + "/user/username/projects/sample1/core/anotherModule.ts", + "/user/username/projects/sample1/core/index.ts", + "/user/username/projects/sample1/core/some_decl.d.ts" + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + "cacheResolutions": true, + "traceResolution": true, + "configFilePath": "/user/username/projects/sample1/core/tsconfig.json" + } +} +Info 9 [00:01:25.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/sample1/core/tsconfig.json 2000 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Config file +Info 10 [00:01:26.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/core 1 undefined Config: /user/username/projects/sample1/core/tsconfig.json WatchType: Wild card directory +Info 11 [00:01:27.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/core 1 undefined Config: /user/username/projects/sample1/core/tsconfig.json WatchType: Wild card directory +Info 12 [00:01:28.000] Config: /user/username/projects/sample1/logic/tsconfig.json : { + "rootNames": [ + "/user/username/projects/sample1/logic/index.ts" + ], + "options": { + "composite": true, + "declaration": true, + "sourceMap": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true, + "cacheResolutions": true, + "traceResolution": true, + "configFilePath": "/user/username/projects/sample1/logic/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/user/username/projects/sample1/core", + "originalPath": "../core" + } + ] +} +Info 13 [00:01:29.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/sample1/logic/tsconfig.json 2000 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Config file +Info 14 [00:01:30.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/logic 1 undefined Config: /user/username/projects/sample1/logic/tsconfig.json WatchType: Wild card directory +Info 15 [00:01:31.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/logic 1 undefined Config: /user/username/projects/sample1/logic/tsconfig.json WatchType: Wild card directory +Info 16 [00:01:32.000] ======== Resolving module '../core/index' from '/user/username/projects/sample1/tests/index.ts'. ======== +Info 17 [00:01:33.000] Module resolution kind is not specified, using 'NodeJs'. +Info 18 [00:01:34.000] Loading module as file / folder, candidate module location '/user/username/projects/sample1/core/index', target file types: TypeScript, Declaration. +Info 19 [00:01:35.000] File '/user/username/projects/sample1/core/index.ts' exist - use it as a name resolution result. +Info 20 [00:01:36.000] ======== Module name '../core/index' was successfully resolved to '/user/username/projects/sample1/core/index.ts'. ======== +Info 21 [00:01:37.000] ======== Resolving module '../logic/index' from '/user/username/projects/sample1/tests/index.ts'. ======== +Info 22 [00:01:38.000] Module resolution kind is not specified, using 'NodeJs'. +Info 23 [00:01:39.000] Loading module as file / folder, candidate module location '/user/username/projects/sample1/logic/index', target file types: TypeScript, Declaration. +Info 24 [00:01:40.000] File '/user/username/projects/sample1/logic/index.ts' exist - use it as a name resolution result. +Info 25 [00:01:41.000] ======== Module name '../logic/index' was successfully resolved to '/user/username/projects/sample1/logic/index.ts'. ======== +Info 26 [00:01:42.000] ======== Resolving module '../core/anotherModule' from '/user/username/projects/sample1/tests/index.ts'. ======== +Info 27 [00:01:43.000] Module resolution kind is not specified, using 'NodeJs'. +Info 28 [00:01:44.000] Loading module as file / folder, candidate module location '/user/username/projects/sample1/core/anotherModule', target file types: TypeScript, Declaration. +Info 29 [00:01:45.000] File '/user/username/projects/sample1/core/anotherModule.ts' exist - use it as a name resolution result. +Info 30 [00:01:46.000] ======== Module name '../core/anotherModule' was successfully resolved to '/user/username/projects/sample1/core/anotherModule.ts'. ======== +Info 31 [00:01:47.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/sample1/core/index.ts 500 undefined WatchType: Closed Script info +Info 32 [00:01:48.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/sample1/logic/index.ts 500 undefined WatchType: Closed Script info +Info 33 [00:01:49.000] ======== Resolving module '../core/index' from '/user/username/projects/sample1/logic/index.ts'. ======== +Info 34 [00:01:50.000] Using compiler options of project reference redirect '/user/username/projects/sample1/logic/tsconfig.json'. +Info 35 [00:01:51.000] Module resolution kind is not specified, using 'NodeJs'. +Info 36 [00:01:52.000] Loading module as file / folder, candidate module location '/user/username/projects/sample1/core/index', target file types: TypeScript, Declaration. +Info 37 [00:01:53.000] File '/user/username/projects/sample1/core/index.ts' exist - use it as a name resolution result. +Info 38 [00:01:54.000] ======== Module name '../core/index' was successfully resolved to '/user/username/projects/sample1/core/index.ts'. ======== +Info 39 [00:01:55.000] ======== Resolving module '../core/anotherModule' from '/user/username/projects/sample1/logic/index.ts'. ======== +Info 40 [00:01:56.000] Using compiler options of project reference redirect '/user/username/projects/sample1/logic/tsconfig.json'. +Info 41 [00:01:57.000] Module resolution kind is not specified, using 'NodeJs'. +Info 42 [00:01:58.000] Loading module as file / folder, candidate module location '/user/username/projects/sample1/core/anotherModule', target file types: TypeScript, Declaration. +Info 43 [00:01:59.000] File '/user/username/projects/sample1/core/anotherModule.ts' exist - use it as a name resolution result. +Info 44 [00:02:00.000] ======== Module name '../core/anotherModule' was successfully resolved to '/user/username/projects/sample1/core/anotherModule.ts'. ======== +Info 45 [00:02:01.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/sample1/core/anotherModule.ts 500 undefined WatchType: Closed Script info +Info 46 [00:02:02.000] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined WatchType: Closed Script info +Info 47 [00:02:03.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/tests/node_modules/@types 1 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Type roots +Info 48 [00:02:04.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/tests/node_modules/@types 1 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Type roots +Info 49 [00:02:05.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/node_modules/@types 1 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Type roots +Info 50 [00:02:06.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/sample1/node_modules/@types 1 undefined Project: /user/username/projects/sample1/tests/tsconfig.json WatchType: Type roots +Info 51 [00:02:07.000] Finishing updateGraphWorker: Project: /user/username/projects/sample1/tests/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 52 [00:02:08.000] Project '/user/username/projects/sample1/tests/tsconfig.json' (Configured) +Info 53 [00:02:09.000] Files (5) + /a/lib/lib.d.ts + /user/username/projects/sample1/core/index.ts + /user/username/projects/sample1/core/anotherModule.ts + /user/username/projects/sample1/logic/index.ts + /user/username/projects/sample1/tests/index.ts + + + ../../../../../a/lib/lib.d.ts + Default library for target 'es5' + ../core/index.ts + Imported via '../core/index' from file 'index.ts' + Imported via '../core/index' from file '../logic/index.ts' + ../core/anotherModule.ts + Imported via '../core/anotherModule' from file '../logic/index.ts' + Imported via '../core/anotherModule' from file 'index.ts' + ../logic/index.ts + Imported via '../logic/index' from file 'index.ts' + index.ts + Part of 'files' list in tsconfig.json + +Info 54 [00:02:10.000] ----------------------------------------------- +Info 55 [00:02:11.000] Search path: /user/username/projects/sample1/tests +Info 56 [00:02:12.000] For info: /user/username/projects/sample1/tests/tsconfig.json :: No config files found. +Info 57 [00:02:13.000] Project '/user/username/projects/sample1/tests/tsconfig.json' (Configured) +Info 57 [00:02:14.000] Files (5) + +Info 57 [00:02:15.000] ----------------------------------------------- +Info 57 [00:02:16.000] Open files: +Info 57 [00:02:17.000] FileName: /user/username/projects/sample1/tests/index.ts ProjectRootPath: undefined +Info 57 [00:02:18.000] Projects: /user/username/projects/sample1/tests/tsconfig.json +After request + +PolledWatches:: +/user/username/projects/sample1/tests/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/sample1/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/user/username/projects/sample1/tests/tsconfig.json: + {} +/user/username/projects/sample1/core/tsconfig.json: + {} +/user/username/projects/sample1/logic/tsconfig.json: + {} +/user/username/projects/sample1/core/index.ts: + {} +/user/username/projects/sample1/logic/index.ts: + {} +/user/username/projects/sample1/core/anothermodule.ts: + {} +/a/lib/lib.d.ts: + {} + +FsWatchesRecursive:: +/user/username/projects/sample1/core: + {} +/user/username/projects/sample1/logic: + {} + +Info 57 [00:02:19.000] response: + { + "responseRequired": false + } \ No newline at end of file