From 660bf60cca534e1cf58d0fb052d234ac040d2d77 Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Mon, 26 Jun 2023 11:45:35 -0700 Subject: [PATCH 1/9] Make module, not moduleResolution, the trigger for setting impliedNodeFormat --- src/compiler/checker.ts | 3 ++- src/compiler/parser.ts | 2 +- src/compiler/program.ts | 8 ++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index ee86ae50306c7..1702380305510 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -4883,6 +4883,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { (isLiteralImportTypeNode(location) ? location : undefined)?.argument.literal; const mode = contextSpecifier && isStringLiteralLike(contextSpecifier) ? getModeForUsageLocation(currentSourceFile, contextSpecifier) : currentSourceFile.impliedNodeFormat; const moduleResolutionKind = getEmitModuleResolutionKind(compilerOptions); + const moduleKind = getEmitModuleKind(compilerOptions); const resolvedModule = getResolvedModule(currentSourceFile, moduleReference, mode); const resolutionDiagnostic = resolvedModule && getResolutionDiagnostic(compilerOptions, resolvedModule, currentSourceFile); const sourceFile = resolvedModule @@ -4914,7 +4915,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (resolvedModule.isExternalLibraryImport && !resolutionExtensionIsTSOrJson(resolvedModule.extension)) { errorOnImplicitAnyModule(/*isError*/ false, errorNode, currentSourceFile, mode, resolvedModule, moduleReference); } - if (moduleResolutionKind === ModuleResolutionKind.Node16 || moduleResolutionKind === ModuleResolutionKind.NodeNext) { + if (ModuleKind.Node16 <= moduleKind && moduleKind <= ModuleKind.NodeNext) { const isSyncImport = (currentSourceFile.impliedNodeFormat === ModuleKind.CommonJS && !findAncestor(location, isImportCall)) || !!findAncestor(location, isImportEqualsDeclaration); const overrideClauseHost = findAncestor(location, l => isImportTypeNode(l) || isExportDeclaration(l) || isImportDeclaration(l)) as ImportTypeNode | ImportDeclaration | ExportDeclaration | undefined; const overrideClause = overrideClauseHost && isImportTypeNode(overrideClauseHost) ? overrideClauseHost.assertions?.assertClause : overrideClauseHost?.assertClause; diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 436fb04ef2bcf..c2bf3bb69c657 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -1310,7 +1310,7 @@ export interface CreateSourceFileOptions { /** * Controls the format the file is detected as - this can be derived from only the path * and files on disk, but needs to be done with a module resolution cache in scope to be performant. - * This is usually `undefined` for compilations that do not have `moduleResolution` values of `node16` or `nodenext`. + * This is usually `undefined` for compilations that do not have `module` values of `node16` or `nodenext`. */ impliedNodeFormat?: ResolutionMode; /** diff --git a/src/compiler/program.ts b/src/compiler/program.ts index a61e46e356529..29ead379c8b95 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -883,7 +883,7 @@ export function isExclusivelyTypeOnlyImportOrExport(decl: ImportDeclaration | Ex * Calculates the final resolution mode for a given module reference node. This is generally the explicitly provided resolution mode, if * one exists, or the mode of the containing source file. (Excepting import=require, which is always commonjs, and dynamic import, which is always esm). * Notably, this function always returns `undefined` if the containing file has an `undefined` `impliedNodeFormat` - this field is only set when - * `moduleResolution` is `node16`+. + * `module` is `node16`+. * @param file The file the import or import-like reference is contained within * @param usage The module reference string * @returns The final resolution mode of the import @@ -1315,9 +1315,9 @@ export function getImpliedNodeFormatForFileWorker( host: ModuleResolutionHost, options: CompilerOptions, ) { - switch (getEmitModuleResolutionKind(options)) { - case ModuleResolutionKind.Node16: - case ModuleResolutionKind.NodeNext: + switch (getEmitModuleKind(options)) { + case ModuleKind.Node16: + case ModuleKind.NodeNext: return fileExtensionIsOneOf(fileName, [Extension.Dmts, Extension.Mts, Extension.Mjs]) ? ModuleKind.ESNext : fileExtensionIsOneOf(fileName, [Extension.Dcts, Extension.Cts, Extension.Cjs]) ? ModuleKind.CommonJS : fileExtensionIsOneOf(fileName, [Extension.Dts, Extension.Ts, Extension.Tsx, Extension.Js, Extension.Jsx]) ? lookupFromPackageJson() : From 77a931b63d5d8fc53fd9c0bc3e5461a48041dead Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Mon, 26 Jun 2023 12:50:09 -0700 Subject: [PATCH 2/9] Update baselines --- .../unittests/helpers/node10Result.ts | 4 +- .../forceConsistentCasingInFileNames.ts | 2 + .../unittests/tscWatch/moduleResolution.ts | 8 +- .../reference/api/tsserverlibrary.d.ts | 4 +- tests/baselines/reference/api/typescript.d.ts | 4 +- ...lback(moduleresolution=bundler).errors.txt | 2 + ...lback(moduleresolution=bundler).trace.json | 20 +- ...llback(moduleresolution=node16).errors.txt | 31 -- ...back(moduleresolution=nodenext).errors.txt | 31 -- .../moduleExportNonStructured.errors.txt | 36 -- ...irect(moduleresolution=bundler).errors.txt | 2 + ...irect(moduleresolution=bundler).trace.json | 23 +- ...direct(moduleresolution=node16).errors.txt | 28 -- ...rect(moduleresolution=nodenext).errors.txt | 28 -- .../nodeNextModuleResolution1.errors.txt | 2 - .../reference/nodeNextModuleResolution1.js | 3 +- .../nodeNextModuleResolution2.errors.txt | 18 - .../reference/nodeNextModuleResolution2.js | 3 +- ...stic1(moduleresolution=bundler).errors.txt | 2 + ...stic1(moduleresolution=bundler).trace.json | 22 +- ...ostic1(moduleresolution=node16).errors.txt | 2 - .../tsc/moduleResolution/node10Result.js | 450 ++++++++++++++--- .../with-nodeNext-resolution.js | 13 +- .../diagnostics-from-cache.js | 28 +- ...esolutions-from-file-are-partially-used.js | 62 ++- .../tscWatch/moduleResolution/node10Result.js | 469 ++++++++++++++---- .../type-reference-resolutions-reuse.js | 60 ++- .../tsserver/moduleResolution/node10Result.js | 14 +- .../compiler/moduleExportNonStructured.ts | 2 +- .../compiler/nodeNextModuleResolution1.ts | 1 + .../compiler/nodeNextModuleResolution2.ts | 1 + .../conditionalExportsResolutionFallback.ts | 1 + .../nestedPackageJsonRedirect.ts | 1 + .../resolvesWithoutExportsDiagnostic1.ts | 1 + .../moveToNewFile_importFileExtensions.ts | 1 + 35 files changed, 951 insertions(+), 428 deletions(-) delete mode 100644 tests/baselines/reference/conditionalExportsResolutionFallback(moduleresolution=node16).errors.txt delete mode 100644 tests/baselines/reference/conditionalExportsResolutionFallback(moduleresolution=nodenext).errors.txt delete mode 100644 tests/baselines/reference/moduleExportNonStructured.errors.txt delete mode 100644 tests/baselines/reference/nestedPackageJsonRedirect(moduleresolution=node16).errors.txt delete mode 100644 tests/baselines/reference/nestedPackageJsonRedirect(moduleresolution=nodenext).errors.txt delete mode 100644 tests/baselines/reference/nodeNextModuleResolution2.errors.txt diff --git a/src/testRunner/unittests/helpers/node10Result.ts b/src/testRunner/unittests/helpers/node10Result.ts index 5961d211f3f94..132a3b26c1c05 100644 --- a/src/testRunner/unittests/helpers/node10Result.ts +++ b/src/testRunner/unittests/helpers/node10Result.ts @@ -72,6 +72,8 @@ export function getFsContentsForNode10Result(): FsContents { `, "/home/src/projects/project/tsconfig.json": JSON.stringify({ compilerOptions: { + target: "es5", + module: "node16", moduleResolution: "node16", traceResolution: true, incremental: true, @@ -82,4 +84,4 @@ export function getFsContentsForNode10Result(): FsContents { }), [libFile.path]: libFile.content, }; -} \ No newline at end of file +} diff --git a/src/testRunner/unittests/tscWatch/forceConsistentCasingInFileNames.ts b/src/testRunner/unittests/tscWatch/forceConsistentCasingInFileNames.ts index da9db45871b84..9eb0a025deb5a 100644 --- a/src/testRunner/unittests/tscWatch/forceConsistentCasingInFileNames.ts +++ b/src/testRunner/unittests/tscWatch/forceConsistentCasingInFileNames.ts @@ -295,6 +295,8 @@ a;b; }), "/Users/name/projects/web/tsconfig.json": JSON.stringify({ compilerOptions: { + target: "es5", + module: "nodenext", moduleResolution: "nodenext", forceConsistentCasingInFileNames: true, traceResolution: true, diff --git a/src/testRunner/unittests/tscWatch/moduleResolution.ts b/src/testRunner/unittests/tscWatch/moduleResolution.ts index 2512116a46ab1..6c38a0b14d245 100644 --- a/src/testRunner/unittests/tscWatch/moduleResolution.ts +++ b/src/testRunner/unittests/tscWatch/moduleResolution.ts @@ -89,6 +89,8 @@ describe("unittests:: tsc-watch:: moduleResolution", () => { path: `/user/username/projects/myproject/tsconfig.json`, content: JSON.stringify({ compilerOptions: { + target: "es5", + module: "nodenext", moduleResolution: "nodenext", outDir: "./dist", declaration: true, @@ -282,7 +284,7 @@ describe("unittests:: tsc-watch:: moduleResolution", () => { { path: `/user/username/projects/myproject/tsconfig.json`, content: JSON.stringify({ - compilerOptions: { moduleResolution: "node16" }, + compilerOptions: { module: "node16", moduleResolution: "node16" }, }) }, { @@ -352,7 +354,7 @@ describe("unittests:: tsc-watch:: moduleResolution", () => { { path: `/user/username/projects/myproject/tsconfig.json`, content: JSON.stringify({ - compilerOptions: { moduleResolution: "node16" }, + compilerOptions: { module: "node16", moduleResolution: "node16" }, }) }, { @@ -538,4 +540,4 @@ describe("unittests:: tsc-watch:: moduleResolution", () => { }, ] }); -}); \ No newline at end of file +}); diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index eff2717fe15a8..b5a333ac28e3b 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -9191,7 +9191,7 @@ declare namespace ts { /** * Controls the format the file is detected as - this can be derived from only the path * and files on disk, but needs to be done with a module resolution cache in scope to be performant. - * This is usually `undefined` for compilations that do not have `moduleResolution` values of `node16` or `nodenext`. + * This is usually `undefined` for compilations that do not have `module` values of `node16` or `nodenext`. */ impliedNodeFormat?: ResolutionMode; /** @@ -9504,7 +9504,7 @@ declare namespace ts { * Calculates the final resolution mode for a given module reference node. This is generally the explicitly provided resolution mode, if * one exists, or the mode of the containing source file. (Excepting import=require, which is always commonjs, and dynamic import, which is always esm). * Notably, this function always returns `undefined` if the containing file has an `undefined` `impliedNodeFormat` - this field is only set when - * `moduleResolution` is `node16`+. + * `module` is `node16`+. * @param file The file the import or import-like reference is contained within * @param usage The module reference string * @returns The final resolution mode of the import diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 3f78e1ae29a4d..15d11d57631eb 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -5138,7 +5138,7 @@ declare namespace ts { /** * Controls the format the file is detected as - this can be derived from only the path * and files on disk, but needs to be done with a module resolution cache in scope to be performant. - * This is usually `undefined` for compilations that do not have `moduleResolution` values of `node16` or `nodenext`. + * This is usually `undefined` for compilations that do not have `module` values of `node16` or `nodenext`. */ impliedNodeFormat?: ResolutionMode; /** @@ -5451,7 +5451,7 @@ declare namespace ts { * Calculates the final resolution mode for a given module reference node. This is generally the explicitly provided resolution mode, if * one exists, or the mode of the containing source file. (Excepting import=require, which is always commonjs, and dynamic import, which is always esm). * Notably, this function always returns `undefined` if the containing file has an `undefined` `impliedNodeFormat` - this field is only set when - * `moduleResolution` is `node16`+. + * `module` is `node16`+. * @param file The file the import or import-like reference is contained within * @param usage The module reference string * @returns The final resolution mode of the import diff --git a/tests/baselines/reference/conditionalExportsResolutionFallback(moduleresolution=bundler).errors.txt b/tests/baselines/reference/conditionalExportsResolutionFallback(moduleresolution=bundler).errors.txt index 71d5b10190e58..9168133fccc6c 100644 --- a/tests/baselines/reference/conditionalExportsResolutionFallback(moduleresolution=bundler).errors.txt +++ b/tests/baselines/reference/conditionalExportsResolutionFallback(moduleresolution=bundler).errors.txt @@ -1,7 +1,9 @@ error TS5095: Option 'bundler' can only be used when 'module' is set to 'es2015' or later. +error TS5109: Option 'moduleResolution' must be set to 'NodeNext' (or left unspecified) when option 'module' is set to 'NodeNext'. !!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'es2015' or later. +!!! error TS5109: Option 'moduleResolution' must be set to 'NodeNext' (or left unspecified) when option 'module' is set to 'NodeNext'. ==== /node_modules/dep/package.json (0 errors) ==== // This documents bug https://github.com/microsoft/TypeScript/issues/50762. diff --git a/tests/baselines/reference/conditionalExportsResolutionFallback(moduleresolution=bundler).trace.json b/tests/baselines/reference/conditionalExportsResolutionFallback(moduleresolution=bundler).trace.json index 6d14798319a36..7b710c26e3c5f 100644 --- a/tests/baselines/reference/conditionalExportsResolutionFallback(moduleresolution=bundler).trace.json +++ b/tests/baselines/reference/conditionalExportsResolutionFallback(moduleresolution=bundler).trace.json @@ -1,11 +1,13 @@ [ + "File '/node_modules/dep/dist/package.json' does not exist.", + "Found 'package.json' at '/node_modules/dep/package.json'.", "======== Resolving module 'dep' from '/index.mts'. ========", "Explicitly specified module resolution kind: 'Bundler'.", "Resolving in CJS mode with conditions 'import', 'types'.", "File '/package.json' does not exist.", "Loading module 'dep' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration, JSON.", "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", - "Found 'package.json' at '/node_modules/dep/package.json'.", + "File '/node_modules/dep/package.json' exists according to earlier cached lookups.", "Entering conditional exports.", "Matched 'exports' condition 'import'.", "Using 'exports' subpath '.' with target './dist/index.mjs'.", @@ -21,6 +23,8 @@ "Exiting conditional exports.", "Resolving real path for '/node_modules/dep/dist/index.d.ts', result '/node_modules/dep/dist/index.d.ts'.", "======== Module name 'dep' was successfully resolved to '/node_modules/dep/dist/index.d.ts' with Package ID 'dep/dist/index.d.ts@1.0.0'. ========", + "File '/.ts/package.json' does not exist.", + "File '/package.json' does not exist according to earlier cached lookups.", "======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, Declaration.", @@ -33,6 +37,8 @@ "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-es5' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", "======== Resolving module '@typescript/lib-decorators' from '/.src/__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.", @@ -45,6 +51,8 @@ "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", "======== Resolving module '@typescript/lib-decorators/legacy' from '/.src/__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: TypeScript, Declaration.", @@ -57,6 +65,8 @@ "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators/legacy' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.", @@ -69,6 +79,8 @@ "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-dom' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", "======== Resolving module '@typescript/lib-webworker/importscripts' from '/.src/__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: TypeScript, Declaration.", @@ -81,6 +93,8 @@ "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-webworker/importscripts' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", "======== Resolving module '@typescript/lib-scripthost' from '/.src/__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: TypeScript, Declaration.", @@ -92,5 +106,7 @@ "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: JavaScript.", "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", - "======== Module name '@typescript/lib-scripthost' was not resolved. ========" + "======== Module name '@typescript/lib-scripthost' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups." ] \ No newline at end of file diff --git a/tests/baselines/reference/conditionalExportsResolutionFallback(moduleresolution=node16).errors.txt b/tests/baselines/reference/conditionalExportsResolutionFallback(moduleresolution=node16).errors.txt deleted file mode 100644 index 8baa069a5920c..0000000000000 --- a/tests/baselines/reference/conditionalExportsResolutionFallback(moduleresolution=node16).errors.txt +++ /dev/null @@ -1,31 +0,0 @@ -error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. - - -!!! error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. -==== /node_modules/dep/package.json (0 errors) ==== - // This documents bug https://github.com/microsoft/TypeScript/issues/50762. - - { - "name": "dep", - "version": "1.0.0", - "exports": { - ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/index.d.ts", - } - } - } - -==== /node_modules/dep/dist/index.d.ts (0 errors) ==== - export {}; - -==== /node_modules/dep/dist/index.mjs (0 errors) ==== - export {}; - -==== /index.mts (0 errors) ==== - import {} from "dep"; - // Should be an untyped resolution to dep/dist/index.mjs, - // but the first search is only for TS files, and when - // there's no dist/index.d.mts, it continues looking for - // matching conditions and resolves via `types`. \ No newline at end of file diff --git a/tests/baselines/reference/conditionalExportsResolutionFallback(moduleresolution=nodenext).errors.txt b/tests/baselines/reference/conditionalExportsResolutionFallback(moduleresolution=nodenext).errors.txt deleted file mode 100644 index c128b9f0ec8ab..0000000000000 --- a/tests/baselines/reference/conditionalExportsResolutionFallback(moduleresolution=nodenext).errors.txt +++ /dev/null @@ -1,31 +0,0 @@ -error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. - - -!!! error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. -==== /node_modules/dep/package.json (0 errors) ==== - // This documents bug https://github.com/microsoft/TypeScript/issues/50762. - - { - "name": "dep", - "version": "1.0.0", - "exports": { - ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/index.d.ts", - } - } - } - -==== /node_modules/dep/dist/index.d.ts (0 errors) ==== - export {}; - -==== /node_modules/dep/dist/index.mjs (0 errors) ==== - export {}; - -==== /index.mts (0 errors) ==== - import {} from "dep"; - // Should be an untyped resolution to dep/dist/index.mjs, - // but the first search is only for TS files, and when - // there's no dist/index.d.mts, it continues looking for - // matching conditions and resolves via `types`. \ No newline at end of file diff --git a/tests/baselines/reference/moduleExportNonStructured.errors.txt b/tests/baselines/reference/moduleExportNonStructured.errors.txt deleted file mode 100644 index 958728c943deb..0000000000000 --- a/tests/baselines/reference/moduleExportNonStructured.errors.txt +++ /dev/null @@ -1,36 +0,0 @@ -error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. - - -!!! error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. -==== package.json (0 errors) ==== - { - "name": "test", - "version": "1.0.0", - "description": "", - "type": "module", - "module": "index.mjs" - } - -==== index.mts (0 errors) ==== - import * as exportAny from "./exportAny.cjs"; - import * as exportUnknown from "./exportUnknown.cjs"; - import * as exportSymbol from "./exportSymbol.cjs"; - - import type * as exportAnyType from "./exportAny.cjs"; - import type * as exportUnknownType from "./exportUnknown.cjs"; - import type * as exportSymbolType from "./exportSymbol.cjs"; - -==== exportAny.d.cts (0 errors) ==== - declare const __: any; - export = __; - - -==== exportUnknown.d.cts (0 errors) ==== - declare const __: unknown; - export = __; - - -==== exportSymbol.d.cts (0 errors) ==== - declare const __: symbol; - export = __; - \ No newline at end of file diff --git a/tests/baselines/reference/nestedPackageJsonRedirect(moduleresolution=bundler).errors.txt b/tests/baselines/reference/nestedPackageJsonRedirect(moduleresolution=bundler).errors.txt index c867a2883059b..deacfeb131b9f 100644 --- a/tests/baselines/reference/nestedPackageJsonRedirect(moduleresolution=bundler).errors.txt +++ b/tests/baselines/reference/nestedPackageJsonRedirect(moduleresolution=bundler).errors.txt @@ -1,7 +1,9 @@ error TS5095: Option 'bundler' can only be used when 'module' is set to 'es2015' or later. +error TS5109: Option 'moduleResolution' must be set to 'NodeNext' (or left unspecified) when option 'module' is set to 'NodeNext'. !!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'es2015' or later. +!!! error TS5109: Option 'moduleResolution' must be set to 'NodeNext' (or left unspecified) when option 'module' is set to 'NodeNext'. ==== /node_modules/@restart/hooks/package.json (0 errors) ==== { "name": "@restart/hooks", diff --git a/tests/baselines/reference/nestedPackageJsonRedirect(moduleresolution=bundler).trace.json b/tests/baselines/reference/nestedPackageJsonRedirect(moduleresolution=bundler).trace.json index a6d17c4961116..ce5ba5363fe18 100644 --- a/tests/baselines/reference/nestedPackageJsonRedirect(moduleresolution=bundler).trace.json +++ b/tests/baselines/reference/nestedPackageJsonRedirect(moduleresolution=bundler).trace.json @@ -1,12 +1,15 @@ [ + "File '/node_modules/@restart/hooks/esm/package.json' does not exist.", + "Found 'package.json' at '/node_modules/@restart/hooks/package.json'.", + "File '/package.json' does not exist.", "======== Resolving module '@restart/hooks/useMergedRefs' from '/main.ts'. ========", "Explicitly specified module resolution kind: 'Bundler'.", "Resolving in CJS mode with conditions 'import', 'types'.", - "File '/package.json' does not exist.", + "File '/package.json' does not exist according to earlier cached lookups.", "Loading module '@restart/hooks/useMergedRefs' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration, JSON.", "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", "Found 'package.json' at '/node_modules/@restart/hooks/useMergedRefs/package.json'.", - "Found 'package.json' at '/node_modules/@restart/hooks/package.json'.", + "File '/node_modules/@restart/hooks/package.json' exists according to earlier cached lookups.", "File '/node_modules/@restart/hooks/useMergedRefs.ts' does not exist.", "File '/node_modules/@restart/hooks/useMergedRefs.tsx' does not exist.", "File '/node_modules/@restart/hooks/useMergedRefs.d.ts' does not exist.", @@ -16,6 +19,8 @@ "File '/node_modules/@restart/hooks/esm/useMergedRefs.d.ts' exists - use it as a name resolution result.", "Resolving real path for '/node_modules/@restart/hooks/esm/useMergedRefs.d.ts', result '/node_modules/@restart/hooks/esm/useMergedRefs.d.ts'.", "======== Module name '@restart/hooks/useMergedRefs' was successfully resolved to '/node_modules/@restart/hooks/esm/useMergedRefs.d.ts'. ========", + "File '/.ts/package.json' does not exist.", + "File '/package.json' does not exist according to earlier cached lookups.", "======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, Declaration.", @@ -28,6 +33,8 @@ "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-es5' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", "======== Resolving module '@typescript/lib-decorators' from '/.src/__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.", @@ -40,6 +47,8 @@ "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", "======== Resolving module '@typescript/lib-decorators/legacy' from '/.src/__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: TypeScript, Declaration.", @@ -52,6 +61,8 @@ "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators/legacy' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.", @@ -64,6 +75,8 @@ "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-dom' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", "======== Resolving module '@typescript/lib-webworker/importscripts' from '/.src/__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: TypeScript, Declaration.", @@ -76,6 +89,8 @@ "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-webworker/importscripts' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", "======== Resolving module '@typescript/lib-scripthost' from '/.src/__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: TypeScript, Declaration.", @@ -87,5 +102,7 @@ "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: JavaScript.", "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", - "======== Module name '@typescript/lib-scripthost' was not resolved. ========" + "======== Module name '@typescript/lib-scripthost' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups." ] \ No newline at end of file diff --git a/tests/baselines/reference/nestedPackageJsonRedirect(moduleresolution=node16).errors.txt b/tests/baselines/reference/nestedPackageJsonRedirect(moduleresolution=node16).errors.txt deleted file mode 100644 index 8aacbdd1b7439..0000000000000 --- a/tests/baselines/reference/nestedPackageJsonRedirect(moduleresolution=node16).errors.txt +++ /dev/null @@ -1,28 +0,0 @@ -error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. - - -!!! error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. -==== /node_modules/@restart/hooks/package.json (0 errors) ==== - { - "name": "@restart/hooks", - "version": "0.3.25", - "main": "cjs/index.js", - "types": "cjs/index.d.ts", - "module": "esm/index.js" - } - -==== /node_modules/@restart/hooks/useMergedRefs/package.json (0 errors) ==== - { - "name": "@restart/hooks/useMergedRefs", - "private": true, - "main": "../cjs/useMergedRefs.js", - "module": "../esm/useMergedRefs.js", - "types": "../esm/useMergedRefs.d.ts" - } - -==== /node_modules/@restart/hooks/esm/useMergedRefs.d.ts (0 errors) ==== - export {}; - -==== /main.ts (0 errors) ==== - import {} from "@restart/hooks/useMergedRefs"; - \ No newline at end of file diff --git a/tests/baselines/reference/nestedPackageJsonRedirect(moduleresolution=nodenext).errors.txt b/tests/baselines/reference/nestedPackageJsonRedirect(moduleresolution=nodenext).errors.txt deleted file mode 100644 index 3b67cb241a583..0000000000000 --- a/tests/baselines/reference/nestedPackageJsonRedirect(moduleresolution=nodenext).errors.txt +++ /dev/null @@ -1,28 +0,0 @@ -error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. - - -!!! error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. -==== /node_modules/@restart/hooks/package.json (0 errors) ==== - { - "name": "@restart/hooks", - "version": "0.3.25", - "main": "cjs/index.js", - "types": "cjs/index.d.ts", - "module": "esm/index.js" - } - -==== /node_modules/@restart/hooks/useMergedRefs/package.json (0 errors) ==== - { - "name": "@restart/hooks/useMergedRefs", - "private": true, - "main": "../cjs/useMergedRefs.js", - "module": "../esm/useMergedRefs.js", - "types": "../esm/useMergedRefs.d.ts" - } - -==== /node_modules/@restart/hooks/esm/useMergedRefs.d.ts (0 errors) ==== - export {}; - -==== /main.ts (0 errors) ==== - import {} from "@restart/hooks/useMergedRefs"; - \ No newline at end of file diff --git a/tests/baselines/reference/nodeNextModuleResolution1.errors.txt b/tests/baselines/reference/nodeNextModuleResolution1.errors.txt index 6293f22afb8e8..00bab93c4a854 100644 --- a/tests/baselines/reference/nodeNextModuleResolution1.errors.txt +++ b/tests/baselines/reference/nodeNextModuleResolution1.errors.txt @@ -1,8 +1,6 @@ -error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. /a/b/c/d/e/app.ts(1,17): error TS2307: Cannot find module 'foo' or its corresponding type declarations. -!!! error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. ==== /a/node_modules/foo.d.ts (0 errors) ==== export declare let x: number diff --git a/tests/baselines/reference/nodeNextModuleResolution1.js b/tests/baselines/reference/nodeNextModuleResolution1.js index d76bd3acd7fb6..a006d7840c307 100644 --- a/tests/baselines/reference/nodeNextModuleResolution1.js +++ b/tests/baselines/reference/nodeNextModuleResolution1.js @@ -15,5 +15,4 @@ import {x} from "foo"; //// [app.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +export {}; diff --git a/tests/baselines/reference/nodeNextModuleResolution2.errors.txt b/tests/baselines/reference/nodeNextModuleResolution2.errors.txt deleted file mode 100644 index 0f97e5e2de642..0000000000000 --- a/tests/baselines/reference/nodeNextModuleResolution2.errors.txt +++ /dev/null @@ -1,18 +0,0 @@ -error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. - - -!!! error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. -==== /a/node_modules/foo/index.d.ts (0 errors) ==== - export declare let x: number -==== /a/node_modules/foo/package.json (0 errors) ==== - { - "name": "foo", - "type": "module", - "exports": { - ".": "./index.d.ts" - } - } - -==== /a/b/c/d/e/app.mts (0 errors) ==== - import {x} from "foo"; - \ No newline at end of file diff --git a/tests/baselines/reference/nodeNextModuleResolution2.js b/tests/baselines/reference/nodeNextModuleResolution2.js index 19475675a566b..e57c0f2575603 100644 --- a/tests/baselines/reference/nodeNextModuleResolution2.js +++ b/tests/baselines/reference/nodeNextModuleResolution2.js @@ -16,5 +16,4 @@ import {x} from "foo"; //// [app.mjs] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +export {}; diff --git a/tests/baselines/reference/resolvesWithoutExportsDiagnostic1(moduleresolution=bundler).errors.txt b/tests/baselines/reference/resolvesWithoutExportsDiagnostic1(moduleresolution=bundler).errors.txt index 0668d695d63e3..4c01090dad8e1 100644 --- a/tests/baselines/reference/resolvesWithoutExportsDiagnostic1(moduleresolution=bundler).errors.txt +++ b/tests/baselines/reference/resolvesWithoutExportsDiagnostic1(moduleresolution=bundler).errors.txt @@ -1,4 +1,5 @@ error TS5095: Option 'bundler' can only be used when 'module' is set to 'es2015' or later. +error TS5109: Option 'moduleResolution' must be set to 'Node16' (or left unspecified) when option 'module' is set to 'Node16'. error TS6504: File '/node_modules/bar/index.js' is a JavaScript file. Did you mean to enable the 'allowJs' option? The file is in the program because: Root file specified for compilation @@ -18,6 +19,7 @@ error TS6504: File '/node_modules/foo/index.mjs' is a JavaScript file. Did you m !!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'es2015' or later. +!!! error TS5109: Option 'moduleResolution' must be set to 'Node16' (or left unspecified) when option 'module' is set to 'Node16'. !!! error TS6504: File '/node_modules/bar/index.js' is a JavaScript file. Did you mean to enable the 'allowJs' option? !!! error TS6504: The file is in the program because: !!! error TS6504: Root file specified for compilation diff --git a/tests/baselines/reference/resolvesWithoutExportsDiagnostic1(moduleresolution=bundler).trace.json b/tests/baselines/reference/resolvesWithoutExportsDiagnostic1(moduleresolution=bundler).trace.json index 1ee77d07b8fd0..6b605e7ac2545 100644 --- a/tests/baselines/reference/resolvesWithoutExportsDiagnostic1(moduleresolution=bundler).trace.json +++ b/tests/baselines/reference/resolvesWithoutExportsDiagnostic1(moduleresolution=bundler).trace.json @@ -1,11 +1,13 @@ [ + "Found 'package.json' at '/node_modules/foo/package.json'.", + "Found 'package.json' at '/node_modules/@types/bar/package.json'.", "======== Resolving module 'foo' from '/index.mts'. ========", "Explicitly specified module resolution kind: 'Bundler'.", "Resolving in CJS mode with conditions 'import', 'types'.", "File '/package.json' does not exist.", "Loading module 'foo' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration, JSON.", "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", - "Found 'package.json' at '/node_modules/foo/package.json'.", + "File '/node_modules/foo/package.json' exists according to earlier cached lookups.", "Entering conditional exports.", "Matched 'exports' condition 'import'.", "Using 'exports' subpath '.' with target './index.mjs'.", @@ -55,7 +57,7 @@ "Failed to resolve under condition 'import'.", "Saw non-matching condition 'require'.", "Exiting conditional exports.", - "Found 'package.json' at '/node_modules/@types/bar/package.json'.", + "File '/node_modules/@types/bar/package.json' exists according to earlier cached lookups.", "Entering conditional exports.", "Saw non-matching condition 'require'.", "Exiting conditional exports.", @@ -111,6 +113,8 @@ "File '/node_modules/@types/bar/index.d.ts' exists - use it as a name resolution result.", "Resolving real path for '/node_modules/@types/bar/index.d.ts', result '/node_modules/@types/bar/index.d.ts'.", "======== Type reference directive 'bar' was successfully resolved to '/node_modules/@types/bar/index.d.ts' with Package ID '@types/bar/index.d.ts@1.0.0', primary: true. ========", + "File '/.ts/package.json' does not exist.", + "File '/package.json' does not exist according to earlier cached lookups.", "======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, Declaration.", @@ -123,6 +127,8 @@ "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-es5' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", "======== Resolving module '@typescript/lib-decorators' from '/.src/__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.", @@ -135,6 +141,8 @@ "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", "======== Resolving module '@typescript/lib-decorators/legacy' from '/.src/__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: TypeScript, Declaration.", @@ -146,6 +154,8 @@ "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators/legacy' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.", @@ -158,6 +168,8 @@ "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-dom' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", "======== Resolving module '@typescript/lib-webworker/importscripts' from '/.src/__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: TypeScript, Declaration.", @@ -169,6 +181,8 @@ "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-webworker/importscripts' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", "======== Resolving module '@typescript/lib-scripthost' from '/.src/__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: TypeScript, Declaration.", @@ -180,5 +194,7 @@ "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: JavaScript.", "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", - "======== Module name '@typescript/lib-scripthost' was not resolved. ========" + "======== Module name '@typescript/lib-scripthost' was not resolved. ========", + "File '/.ts/package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups." ] \ No newline at end of file diff --git a/tests/baselines/reference/resolvesWithoutExportsDiagnostic1(moduleresolution=node16).errors.txt b/tests/baselines/reference/resolvesWithoutExportsDiagnostic1(moduleresolution=node16).errors.txt index 7fa0a30235cf2..fe904ca69530b 100644 --- a/tests/baselines/reference/resolvesWithoutExportsDiagnostic1(moduleresolution=node16).errors.txt +++ b/tests/baselines/reference/resolvesWithoutExportsDiagnostic1(moduleresolution=node16).errors.txt @@ -1,4 +1,3 @@ -error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. error TS6504: File '/node_modules/bar/index.js' is a JavaScript file. Did you mean to enable the 'allowJs' option? The file is in the program because: Root file specified for compilation @@ -17,7 +16,6 @@ error TS6504: File '/node_modules/foo/index.mjs' is a JavaScript file. Did you m There are types at '/node_modules/@types/bar/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar' library may need to update its package.json or typings. -!!! error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. !!! error TS6504: File '/node_modules/bar/index.js' is a JavaScript file. Did you mean to enable the 'allowJs' option? !!! error TS6504: The file is in the program because: !!! error TS6504: Root file specified for compilation diff --git a/tests/baselines/reference/tsc/moduleResolution/node10Result.js b/tests/baselines/reference/tsc/moduleResolution/node10Result.js index 5536e41466a25..dc9b4ea37f7b9 100644 --- a/tests/baselines/reference/tsc/moduleResolution/node10Result.js +++ b/tests/baselines/reference/tsc/moduleResolution/node10Result.js @@ -137,7 +137,7 @@ export const foo2 = 1; } //// [/home/src/projects/project/tsconfig.json] -{"compilerOptions":{"moduleResolution":"node16","traceResolution":true,"incremental":true,"strict":true,"types":[]},"files":["index.mts"]} +{"compilerOptions":{"target":"es5","module":"node16","moduleResolution":"node16","traceResolution":true,"incremental":true,"strict":true,"types":[]},"files":["index.mts"]} //// [/lib/lib.d.ts] /// @@ -326,14 +326,24 @@ File '/home/src/projects/project/node_modules/foo2/package.json' exists accordin File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +home/src/projects/project/index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/foo/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo' library may need to update its package.json or typings. +1 import { foo } from "foo"; +   ~~~~~ -Found 1 error. +home/src/projects/project/index.mts:2:21 - error TS7016: Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/@types/bar/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar' library may need to update its package.json or typings. + +2 import { bar } from "bar"; +   ~~~~~ + + +Found 2 errors in the same file, starting at: home/src/projects/project/index.mts:1 exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: /lib/lib.d.ts @@ -341,7 +351,11 @@ Program files:: /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/home/src/projects/project/node_modules/foo2/index.d.ts +/home/src/projects/project/node_modules/@types/bar2/index.d.ts +/home/src/projects/project/index.mts Shape signatures in builder refreshed for:: /lib/lib.d.ts (used version) @@ -351,12 +365,11 @@ Shape signatures in builder refreshed for:: //// [/home/src/projects/project/index.mjs] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +export {}; //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../lib/lib.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"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":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","impliedFormat":99}],"root":[4],"options":{"strict":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../lib/lib.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"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":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","impliedFormat":99}],"root":[4],"options":{"module":100,"strict":true,"target":1},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[[4,[{"file":"./index.mts","start":20,"length":5,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"foo","mode":99}}]}},{"file":"./index.mts","start":47,"length":5,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"bar","mode":99}}]}}]],3,2,1]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -420,7 +433,9 @@ Object.defineProperty(exports, "__esModule", { value: true }); ] ], "options": { - "strict": true + "module": 100, + "strict": true, + "target": 1 }, "referencedMap": { "./index.mts": [ @@ -433,10 +448,60 @@ Object.defineProperty(exports, "__esModule", { value: true }); "./node_modules/foo2/index.d.ts", "./node_modules/@types/bar2/index.d.ts" ] - } + }, + "semanticDiagnosticsPerFile": [ + [ + "./index.mts", + [ + { + "file": "./index.mts", + "start": 20, + "length": 5, + "code": 7016, + "category": 1, + "messageText": { + "messageText": "Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type.", + "category": 1, + "code": 7016, + "next": [ + { + "info": { + "moduleReference": "foo", + "mode": 99 + } + } + ] + } + }, + { + "file": "./index.mts", + "start": 47, + "length": 5, + "code": 7016, + "category": 1, + "messageText": { + "messageText": "Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type.", + "category": 1, + "code": 7016, + "next": [ + { + "info": { + "moduleReference": "bar", + "mode": 99 + } + } + ] + } + } + ] + ], + "./node_modules/@types/bar2/index.d.ts", + "./node_modules/foo2/index.d.ts", + "../../../../lib/lib.d.ts" + ] }, "version": "FakeTSVersion", - "size": 1118 + "size": 1823 } @@ -629,14 +694,24 @@ File '/home/src/projects/project/node_modules/foo2/package.json' exists accordin File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +home/src/projects/project/index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/foo/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo' library may need to update its package.json or typings. + +1 import { foo } from "foo"; +   ~~~~~ + +home/src/projects/project/index.mts:2:21 - error TS7016: Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type. + Try `npm i --save-dev @types/bar` if it exists or add a new declaration (.d.ts) file containing `declare module 'bar';` +2 import { bar } from "bar"; +   ~~~~~ -Found 1 error. + +Found 2 errors in the same file, starting at: home/src/projects/project/index.mts:1 exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: /lib/lib.d.ts @@ -644,7 +719,7 @@ Program files:: /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -852,14 +927,24 @@ File '/home/src/projects/project/node_modules/foo2/package.json' exists accordin File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +home/src/projects/project/index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. + Try `npm i --save-dev @types/foo` if it exists or add a new declaration (.d.ts) file containing `declare module 'foo';` + +1 import { foo } from "foo"; +   ~~~~~ + +home/src/projects/project/index.mts:2:21 - error TS7016: Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type. + Try `npm i --save-dev @types/bar` if it exists or add a new declaration (.d.ts) file containing `declare module 'bar';` + +2 import { bar } from "bar"; +   ~~~~~ -Found 1 error. +Found 2 errors in the same file, starting at: home/src/projects/project/index.mts:1 exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: /lib/lib.d.ts @@ -867,7 +952,7 @@ Program files:: /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -1064,14 +1149,24 @@ File '/home/src/projects/project/node_modules/foo2/package.json' exists accordin File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +home/src/projects/project/index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. + Try `npm i --save-dev @types/foo` if it exists or add a new declaration (.d.ts) file containing `declare module 'foo';` +1 import { foo } from "foo"; +   ~~~~~ -Found 1 error. +home/src/projects/project/index.mts:2:21 - error TS7016: Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/@types/bar/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar' library may need to update its package.json or typings. + +2 import { bar } from "bar"; +   ~~~~~ + + +Found 2 errors in the same file, starting at: home/src/projects/project/index.mts:1 exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: /lib/lib.d.ts @@ -1079,7 +1174,7 @@ Program files:: /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -1263,14 +1358,24 @@ File '/home/src/projects/project/node_modules/foo2/package.json' exists accordin File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +home/src/projects/project/index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/foo/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo' library may need to update its package.json or typings. + +1 import { foo } from "foo"; +   ~~~~~ +home/src/projects/project/index.mts:2:21 - error TS7016: Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/@types/bar/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar' library may need to update its package.json or typings. -Found 1 error. +2 import { bar } from "bar"; +   ~~~~~ + + +Found 2 errors in the same file, starting at: home/src/projects/project/index.mts:1 exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: /lib/lib.d.ts @@ -1278,7 +1383,7 @@ Program files:: /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -1434,14 +1539,18 @@ File '/home/src/projects/project/node_modules/foo2/package.json' exists accordin File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +home/src/projects/project/index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/foo/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo' library may need to update its package.json or typings. +1 import { foo } from "foo"; +   ~~~~~ -Found 1 error. + +Found 1 error in home/src/projects/project/index.mts:1 exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: /lib/lib.d.ts @@ -1450,7 +1559,9 @@ Program files:: /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/home/src/projects/project/node_modules/@types/bar/index.d.ts +/home/src/projects/project/index.mts Shape signatures in builder refreshed for:: /home/src/projects/project/node_modules/@types/bar/index.d.ts (used version) @@ -1459,7 +1570,7 @@ Shape signatures in builder refreshed for:: //// [/home/src/projects/project/index.mjs] file written with same contents //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../lib/lib.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"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":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[5],"options":{"strict":true},"fileIdsList":[[2,3,4]],"referencedMap":[[5,1]],"exportedModulesMap":[]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../lib/lib.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"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":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[5],"options":{"module":100,"strict":true,"target":1},"fileIdsList":[[2,3,4]],"referencedMap":[[5,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[[5,[{"file":"./index.mts","start":20,"length":5,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"foo","mode":99}}]}}]],2,4,3,1]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -1535,7 +1646,9 @@ Shape signatures in builder refreshed for:: ] ], "options": { - "strict": true + "module": 100, + "strict": true, + "target": 1 }, "referencedMap": { "./index.mts": [ @@ -1544,10 +1657,41 @@ Shape signatures in builder refreshed for:: "./node_modules/@types/bar2/index.d.ts" ] }, - "exportedModulesMap": {} + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + [ + "./index.mts", + [ + { + "file": "./index.mts", + "start": 20, + "length": 5, + "code": 7016, + "category": 1, + "messageText": { + "messageText": "Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type.", + "category": 1, + "code": 7016, + "next": [ + { + "info": { + "moduleReference": "foo", + "mode": 99 + } + } + ] + } + } + ] + ], + "./node_modules/@types/bar/index.d.ts", + "./node_modules/@types/bar2/index.d.ts", + "./node_modules/foo2/index.d.ts", + "../../../../lib/lib.d.ts" + ] }, "version": "FakeTSVersion", - "size": 1271 + "size": 1659 } @@ -1675,14 +1819,9 @@ File '/home/src/projects/project/node_modules/foo2/package.json' exists accordin File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. - - -Found 1 error. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +exitCode:: ExitStatus.Success Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: /lib/lib.d.ts @@ -1692,7 +1831,9 @@ Program files:: /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/home/src/projects/project/node_modules/foo/index.d.ts +/home/src/projects/project/index.mts Shape signatures in builder refreshed for:: /home/src/projects/project/node_modules/foo/index.d.ts (used version) @@ -1701,7 +1842,7 @@ Shape signatures in builder refreshed for:: //// [/home/src/projects/project/index.mjs] file written with same contents //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../lib/lib.d.ts","./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"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":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[6],"options":{"strict":true},"fileIdsList":[[2,3,4,5]],"referencedMap":[[6,1]],"exportedModulesMap":[]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../lib/lib.d.ts","./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"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":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[6],"options":{"module":100,"strict":true,"target":1},"fileIdsList":[[2,3,4,5]],"referencedMap":[[6,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[6,3,5,2,4,1]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -1788,7 +1929,9 @@ Shape signatures in builder refreshed for:: ] ], "options": { - "strict": true + "module": 100, + "strict": true, + "target": 1 }, "referencedMap": { "./index.mts": [ @@ -1798,10 +1941,18 @@ Shape signatures in builder refreshed for:: "./node_modules/@types/bar2/index.d.ts" ] }, - "exportedModulesMap": {} + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "./index.mts", + "./node_modules/@types/bar/index.d.ts", + "./node_modules/@types/bar2/index.d.ts", + "./node_modules/foo/index.d.ts", + "./node_modules/foo2/index.d.ts", + "../../../../lib/lib.d.ts" + ] }, "version": "FakeTSVersion", - "size": 1383 + "size": 1450 } @@ -1964,14 +2115,18 @@ File '/home/src/projects/project/node_modules/@types/bar/package.json' exists ac File '/home/src/projects/project/node_modules/foo2/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +home/src/projects/project/index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/@types/bar2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar2' library may need to update its package.json or typings. + +4 import { bar2 } from "bar2"; +   ~~~~~~ -Found 1 error. +Found 1 error in home/src/projects/project/index.mts:4 exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: /lib/lib.d.ts @@ -1980,7 +2135,8 @@ Program files:: /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/home/src/projects/project/index.mts Shape signatures in builder refreshed for:: /home/src/projects/project/index.mts (computed .d.ts) @@ -1988,7 +2144,7 @@ Shape signatures in builder refreshed for:: //// [/home/src/projects/project/index.mjs] file written with same contents //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../lib/lib.d.ts","./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./index.mts"],"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":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[5],"options":{"strict":true},"fileIdsList":[[2,3,4]],"referencedMap":[[5,1]],"exportedModulesMap":[]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../lib/lib.d.ts","./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./index.mts"],"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":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[5],"options":{"module":100,"strict":true,"target":1},"fileIdsList":[[2,3,4]],"referencedMap":[[5,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[[5,[{"file":"./index.mts","start":104,"length":6,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"bar2","mode":99}}]}}]],3,2,4,1]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -2064,7 +2220,9 @@ Shape signatures in builder refreshed for:: ] ], "options": { - "strict": true + "module": 100, + "strict": true, + "target": 1 }, "referencedMap": { "./index.mts": [ @@ -2073,10 +2231,41 @@ Shape signatures in builder refreshed for:: "./node_modules/foo2/index.d.ts" ] }, - "exportedModulesMap": {} + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + [ + "./index.mts", + [ + { + "file": "./index.mts", + "start": 104, + "length": 6, + "code": 7016, + "category": 1, + "messageText": { + "messageText": "Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type.", + "category": 1, + "code": 7016, + "next": [ + { + "info": { + "moduleReference": "bar2", + "mode": 99 + } + } + ] + } + } + ] + ], + "./node_modules/@types/bar/index.d.ts", + "./node_modules/foo/index.d.ts", + "./node_modules/foo2/index.d.ts", + "../../../../lib/lib.d.ts" + ] }, "version": "FakeTSVersion", - "size": 1262 + "size": 1654 } @@ -2269,14 +2458,24 @@ File '/home/src/projects/project/node_modules/foo/package.json' exists according File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +home/src/projects/project/index.mts:3:22 - error TS7016: Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/foo2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo2' library may need to update its package.json or typings. + +3 import { foo2 } from "foo2"; +   ~~~~~~ + +home/src/projects/project/index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/@types/bar2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar2' library may need to update its package.json or typings. + +4 import { bar2 } from "bar2"; +   ~~~~~~ -Found 1 error. +Found 2 errors in the same file, starting at: home/src/projects/project/index.mts:3 exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: /lib/lib.d.ts @@ -2284,7 +2483,8 @@ Program files:: /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/home/src/projects/project/index.mts Shape signatures in builder refreshed for:: /home/src/projects/project/index.mts (computed .d.ts) @@ -2292,7 +2492,7 @@ Shape signatures in builder refreshed for:: //// [/home/src/projects/project/index.mjs] file written with same contents //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../lib/lib.d.ts","./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./index.mts"],"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":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[4],"options":{"strict":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../lib/lib.d.ts","./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./index.mts"],"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":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[4],"options":{"module":100,"strict":true,"target":1},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[[4,[{"file":"./index.mts","start":75,"length":6,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"foo2","mode":99}}]}},{"file":"./index.mts","start":104,"length":6,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"bar2","mode":99}}]}}]],3,2,1]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -2357,7 +2557,9 @@ Shape signatures in builder refreshed for:: ] ], "options": { - "strict": true + "module": 100, + "strict": true, + "target": 1 }, "referencedMap": { "./index.mts": [ @@ -2365,10 +2567,60 @@ Shape signatures in builder refreshed for:: "./node_modules/@types/bar/index.d.ts" ] }, - "exportedModulesMap": {} + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + [ + "./index.mts", + [ + { + "file": "./index.mts", + "start": 75, + "length": 6, + "code": 7016, + "category": 1, + "messageText": { + "messageText": "Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type.", + "category": 1, + "code": 7016, + "next": [ + { + "info": { + "moduleReference": "foo2", + "mode": 99 + } + } + ] + } + }, + { + "file": "./index.mts", + "start": 104, + "length": 6, + "code": 7016, + "category": 1, + "messageText": { + "messageText": "Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type.", + "category": 1, + "code": 7016, + "next": [ + { + "info": { + "moduleReference": "bar2", + "mode": 99 + } + } + ] + } + } + ] + ], + "./node_modules/@types/bar/index.d.ts", + "./node_modules/foo/index.d.ts", + "../../../../lib/lib.d.ts" + ] }, "version": "FakeTSVersion", - "size": 1148 + "size": 1860 } @@ -2561,14 +2813,24 @@ File '/home/src/projects/project/node_modules/foo/package.json' exists according File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +home/src/projects/project/index.mts:3:22 - error TS7016: Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/foo2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo2' library may need to update its package.json or typings. +3 import { foo2 } from "foo2"; +   ~~~~~~ -Found 1 error. +home/src/projects/project/index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. + Try `npm i --save-dev @types/bar2` if it exists or add a new declaration (.d.ts) file containing `declare module 'bar2';` + +4 import { bar2 } from "bar2"; +   ~~~~~~ + + +Found 2 errors in the same file, starting at: home/src/projects/project/index.mts:3 exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: /lib/lib.d.ts @@ -2576,7 +2838,7 @@ Program files:: /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -2784,14 +3046,24 @@ File '/home/src/projects/project/node_modules/foo/package.json' exists according File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +home/src/projects/project/index.mts:3:22 - error TS7016: Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type. + Try `npm i --save-dev @types/foo2` if it exists or add a new declaration (.d.ts) file containing `declare module 'foo2';` + +3 import { foo2 } from "foo2"; +   ~~~~~~ +home/src/projects/project/index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. + Try `npm i --save-dev @types/bar2` if it exists or add a new declaration (.d.ts) file containing `declare module 'bar2';` -Found 1 error. +4 import { bar2 } from "bar2"; +   ~~~~~~ + + +Found 2 errors in the same file, starting at: home/src/projects/project/index.mts:3 exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: /lib/lib.d.ts @@ -2799,7 +3071,7 @@ Program files:: /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -2996,14 +3268,24 @@ File '/home/src/projects/project/node_modules/foo/package.json' exists according File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +home/src/projects/project/index.mts:3:22 - error TS7016: Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type. + Try `npm i --save-dev @types/foo2` if it exists or add a new declaration (.d.ts) file containing `declare module 'foo2';` + +3 import { foo2 } from "foo2"; +   ~~~~~~ + +home/src/projects/project/index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/@types/bar2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar2' library may need to update its package.json or typings. +4 import { bar2 } from "bar2"; +   ~~~~~~ -Found 1 error. + +Found 2 errors in the same file, starting at: home/src/projects/project/index.mts:3 exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: /lib/lib.d.ts @@ -3011,7 +3293,7 @@ Program files:: /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -3195,14 +3477,24 @@ File '/home/src/projects/project/node_modules/foo/package.json' exists according File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +home/src/projects/project/index.mts:3:22 - error TS7016: Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/foo2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo2' library may need to update its package.json or typings. + +3 import { foo2 } from "foo2"; +   ~~~~~~ + +home/src/projects/project/index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/@types/bar2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar2' library may need to update its package.json or typings. + +4 import { bar2 } from "bar2"; +   ~~~~~~ -Found 1 error. +Found 2 errors in the same file, starting at: home/src/projects/project/index.mts:3 exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: /lib/lib.d.ts @@ -3210,7 +3502,7 @@ Program files:: /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: diff --git a/tests/baselines/reference/tscWatch/forceConsistentCasingInFileNames/with-nodeNext-resolution.js b/tests/baselines/reference/tscWatch/forceConsistentCasingInFileNames/with-nodeNext-resolution.js index 4f912ea478d4a..5ce4e93b9bbd9 100644 --- a/tests/baselines/reference/tscWatch/forceConsistentCasingInFileNames/with-nodeNext-resolution.js +++ b/tests/baselines/reference/tscWatch/forceConsistentCasingInFileNames/with-nodeNext-resolution.js @@ -13,7 +13,7 @@ export function foo(): void; {"name":"yargs","version":"17.0.12","exports":{".":{"types":{"import":"./index.d.mts","default":"./index.d.ts"}}}} //// [/Users/name/projects/web/tsconfig.json] -{"compilerOptions":{"moduleResolution":"nodenext","forceConsistentCasingInFileNames":true,"traceResolution":true}} +{"compilerOptions":{"target":"es5","module":"nodenext","moduleResolution":"nodenext","forceConsistentCasingInFileNames":true,"traceResolution":true}} //// [/a/lib/lib.d.ts] /// @@ -83,8 +83,6 @@ Resolving real path for '/Users/name/projects/web/node_modules/@types/yargs/inde 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. -error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. - ../../../../a/lib/lib.d.ts Default library for target 'es5' node_modules/@types/yargs/index.d.ts @@ -94,19 +92,22 @@ node_modules/@types/yargs/index.d.ts src/bin.ts Matched by default include pattern '**/*' File is CommonJS module because 'package.json' was not found -[12:00:38 AM] Found 1 error. Watching for file changes. +[12:00:38 AM] Found 0 errors. Watching for file changes. Program root files: ["/Users/name/projects/web/src/bin.ts"] -Program options: {"moduleResolution":99,"forceConsistentCasingInFileNames":true,"traceResolution":true,"watch":true,"explainFiles":true,"configFilePath":"/Users/name/projects/web/tsconfig.json"} +Program options: {"target":1,"module":199,"moduleResolution":99,"forceConsistentCasingInFileNames":true,"traceResolution":true,"watch":true,"explainFiles":true,"configFilePath":"/Users/name/projects/web/tsconfig.json"} Program structureReused: Not Program files:: /a/lib/lib.d.ts /Users/name/projects/web/node_modules/@types/yargs/index.d.ts /Users/name/projects/web/src/bin.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/Users/name/projects/web/node_modules/@types/yargs/index.d.ts +/Users/name/projects/web/src/bin.ts Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) diff --git a/tests/baselines/reference/tscWatch/moduleResolution/diagnostics-from-cache.js b/tests/baselines/reference/tscWatch/moduleResolution/diagnostics-from-cache.js index 33407bef21833..36cca1f87dfe7 100644 --- a/tests/baselines/reference/tscWatch/moduleResolution/diagnostics-from-cache.js +++ b/tests/baselines/reference/tscWatch/moduleResolution/diagnostics-from-cache.js @@ -1,7 +1,7 @@ currentDirectory:: /user/username/projects/myproject useCaseSensitiveFileNames: false Input:: //// [/user/username/projects/myproject/tsconfig.json] -{"compilerOptions":{"moduleResolution":"nodenext","outDir":"./dist","declaration":true,"declarationDir":"./types"}} +{"compilerOptions":{"target":"es5","module":"nodenext","moduleResolution":"nodenext","outDir":"./dist","declaration":true,"declarationDir":"./types"}} //// [/user/username/projects/myproject/package.json] {"name":"@this/package","type":"module","exports":{".":{"default":"./dist/index.js","types":"./types/index.d.ts"}}} @@ -54,14 +54,12 @@ File '/a/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 '/user/username/projects/myproject/package.json'. Supply the `rootDir` compiler option to disambiguate. -error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. - -[12:00:40 AM] Found 2 errors. Watching for file changes. +[12:00:40 AM] Found 1 error. Watching for file changes. Program root files: ["/user/username/projects/myproject/index.ts","/user/username/projects/myproject/index2.ts"] -Program options: {"moduleResolution":99,"outDir":"/user/username/projects/myproject/dist","declaration":true,"declarationDir":"/user/username/projects/myproject/types","watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"target":1,"module":199,"moduleResolution":99,"outDir":"/user/username/projects/myproject/dist","declaration":true,"declarationDir":"/user/username/projects/myproject/types","watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program structureReused: Not Program files:: /a/lib/lib.d.ts @@ -100,13 +98,9 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/user/username/projects/myproject/dist/index.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.thing = void 0; -var me = require("@this/package"); +import * as me from "@this/package"; me.thing(); -function thing() { } -exports.thing = thing; +export function thing() { } //// [/user/username/projects/myproject/types/index.d.ts] @@ -114,11 +108,7 @@ export declare function thing(): void; //// [/user/username/projects/myproject/dist/index2.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.thing = void 0; -function thing() { } -exports.thing = thing; +export function thing() { } //// [/user/username/projects/myproject/types/index2.d.ts] @@ -161,14 +151,12 @@ File '/a/package.json' does not exist according to earlier cached lookups. File '/package.json' does not exist according to earlier cached lookups. error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file '/user/username/projects/myproject/package.json'. Supply the `rootDir` compiler option to disambiguate. -error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. - -[12:00:50 AM] Found 2 errors. Watching for file changes. +[12:00:50 AM] Found 1 error. Watching for file changes. Program root files: ["/user/username/projects/myproject/index.ts","/user/username/projects/myproject/index2.ts"] -Program options: {"moduleResolution":99,"outDir":"/user/username/projects/myproject/dist","declaration":true,"declarationDir":"/user/username/projects/myproject/types","watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"target":1,"module":199,"moduleResolution":99,"outDir":"/user/username/projects/myproject/dist","declaration":true,"declarationDir":"/user/username/projects/myproject/types","watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program structureReused: SafeModules Program files:: /a/lib/lib.d.ts diff --git a/tests/baselines/reference/tscWatch/moduleResolution/module-resolutions-from-file-are-partially-used.js b/tests/baselines/reference/tscWatch/moduleResolution/module-resolutions-from-file-are-partially-used.js index d74aab3dd6dfe..21d1e49bfe3a1 100644 --- a/tests/baselines/reference/tscWatch/moduleResolution/module-resolutions-from-file-are-partially-used.js +++ b/tests/baselines/reference/tscWatch/moduleResolution/module-resolutions-from-file-are-partially-used.js @@ -1,7 +1,7 @@ currentDirectory:: /user/username/projects/myproject useCaseSensitiveFileNames: false Input:: //// [/user/username/projects/myproject/tsconfig.json] -{"compilerOptions":{"moduleResolution":"node16"}} +{"compilerOptions":{"module":"node16","moduleResolution":"node16"}} //// [/user/username/projects/myproject/index.ts] import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" }; @@ -131,17 +131,34 @@ File '/user/username/projects/myproject/node_modules/pkg/package.json' exists ac 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. -error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +error TS2318: Cannot find global type 'Array'. -[12:00:44 AM] Found 1 error. Watching for file changes. +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. + +error TS2318: Cannot find global type 'Number'. + +error TS2318: Cannot find global type 'Object'. + +error TS2318: Cannot find global type 'RegExp'. + +error TS2318: Cannot find global type 'String'. + +error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2022' + +[12:00:44 AM] Found 9 errors. Watching for file changes. Program root files: ["/user/username/projects/myproject/a.ts","/user/username/projects/myproject/index.ts"] -Program options: {"moduleResolution":3,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"module":100,"moduleResolution":3,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program structureReused: Not Program files:: -/a/lib/lib.d.ts /user/username/projects/myproject/a.ts /user/username/projects/myproject/node_modules/pkg/import.d.ts /user/username/projects/myproject/index.ts @@ -149,12 +166,13 @@ Program files:: No cached semantic diagnostics in the builder:: Shape signatures in builder refreshed for:: -/a/lib/lib.d.ts (used version) /user/username/projects/myproject/a.ts (used version) -/user/username/projects/myproject/node_modules/pkg/import.d.ts (used version) /user/username/projects/myproject/index.ts (used version) +/user/username/projects/myproject/node_modules/pkg/import.d.ts (used version) PolledWatches:: +/a/lib/lib.es2022.full.d.ts: *new* + {"pollingInterval":500} /user/username/projects/myproject/node_modules/@types: *new* {"pollingInterval":500} /user/username/projects/myproject/package.json: *new* @@ -167,8 +185,6 @@ PolledWatches:: {"pollingInterval":2000} FsWatches:: -/a/lib/lib.d.ts: *new* - {} /user/username/projects: *new* {} /user/username/projects/myproject: *new* @@ -222,9 +238,6 @@ Output:: >> Screen clear [12:00:47 AM] File change detected. Starting incremental compilation... -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 '/user/username/projects/myproject/package.json' does not exist according to earlier cached lookups. File '/user/username/projects/package.json' does not exist according to earlier cached lookups. File '/user/username/package.json' does not exist according to earlier cached lookups. @@ -275,17 +288,34 @@ Reusing resolution of module 'pkg1' from '/user/username/projects/myproject/inde 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. -error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. + +error TS2318: Cannot find global type 'Number'. + +error TS2318: Cannot find global type 'Object'. + +error TS2318: Cannot find global type 'RegExp'. + +error TS2318: Cannot find global type 'String'. + +error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2022' -[12:00:54 AM] Found 1 error. Watching for file changes. +[12:00:54 AM] Found 9 errors. Watching for file changes. Program root files: ["/user/username/projects/myproject/a.ts","/user/username/projects/myproject/index.ts"] -Program options: {"moduleResolution":3,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"module":100,"moduleResolution":3,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program structureReused: SafeModules Program files:: -/a/lib/lib.d.ts /user/username/projects/myproject/node_modules/pkg/import.d.ts /user/username/projects/myproject/a.ts /user/username/projects/myproject/index.ts diff --git a/tests/baselines/reference/tscWatch/moduleResolution/node10Result.js b/tests/baselines/reference/tscWatch/moduleResolution/node10Result.js index 648ac07f65d86..a6738fd67eac8 100644 --- a/tests/baselines/reference/tscWatch/moduleResolution/node10Result.js +++ b/tests/baselines/reference/tscWatch/moduleResolution/node10Result.js @@ -124,7 +124,7 @@ import { bar2 } from "bar2"; //// [/home/src/projects/project/tsconfig.json] -{"compilerOptions":{"moduleResolution":"node16","traceResolution":true,"incremental":true,"strict":true,"types":[]},"files":["index.mts"]} +{"compilerOptions":{"target":"es5","module":"node16","moduleResolution":"node16","traceResolution":true,"incremental":true,"strict":true,"types":[]},"files":["index.mts"]} //// [/a/lib/lib.d.ts] /// @@ -149,7 +149,7 @@ FileWatcher:: Added:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 u Synchronizing program CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] - options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} + options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} FileWatcher:: Added:: WatchInfo: /home/src/projects/project/index.mts 250 undefined Source file ======== Resolving module 'foo' from '/home/src/projects/project/index.mts'. ======== Explicitly specified module resolution kind: 'Node16'. @@ -343,9 +343,19 @@ Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/index DirectoryWatcher:: Triggered with /home/src/projects/project/tsconfig.tsbuildinfo :: WatchInfo: /home/src/projects/project 0 undefined Failed Lookup Locations Scheduling invalidateFailedLookup, Cancelled earlier one Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/tsconfig.tsbuildinfo :: WatchInfo: /home/src/projects/project 0 undefined Failed Lookup Locations -error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/foo/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo' library may need to update its package.json or typings. -[12:01:18 AM] Found 1 error. Watching for file changes. +1 import { foo } from "foo"; +   ~~~~~ + +index.mts:2:21 - error TS7016: Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/@types/bar/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar' library may need to update its package.json or typings. + +2 import { bar } from "bar"; +   ~~~~~ + +[12:01:18 AM] Found 2 errors. Watching for file changes. DirectoryWatcher:: Triggered with /home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt :: WatchInfo: /home/src/projects/project 0 undefined Failed Lookup Locations Scheduling invalidateFailedLookup, Cancelled earlier one @@ -353,7 +363,7 @@ Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/tscon Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: /a/lib/lib.d.ts @@ -361,7 +371,11 @@ Program files:: /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/home/src/projects/project/node_modules/foo2/index.d.ts +/home/src/projects/project/node_modules/@types/bar2/index.d.ts +/home/src/projects/project/index.mts Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) @@ -408,12 +422,11 @@ FsWatchesRecursive:: exitCode:: ExitStatus.undefined //// [/home/src/projects/project/index.mjs] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +export {}; //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"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":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","impliedFormat":99}],"root":[4],"options":{"strict":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"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":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","impliedFormat":99}],"root":[4],"options":{"module":100,"strict":true,"target":1},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,[4,[{"file":"./index.mts","start":20,"length":5,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"foo","mode":99}}]}},{"file":"./index.mts","start":47,"length":5,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"bar","mode":99}}]}}]],3,2]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -477,7 +490,9 @@ Object.defineProperty(exports, "__esModule", { value: true }); ] ], "options": { - "strict": true + "module": 100, + "strict": true, + "target": 1 }, "referencedMap": { "./index.mts": [ @@ -490,10 +505,60 @@ Object.defineProperty(exports, "__esModule", { value: true }); "./node_modules/foo2/index.d.ts", "./node_modules/@types/bar2/index.d.ts" ] - } + }, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + [ + "./index.mts", + [ + { + "file": "./index.mts", + "start": 20, + "length": 5, + "code": 7016, + "category": 1, + "messageText": { + "messageText": "Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type.", + "category": 1, + "code": 7016, + "next": [ + { + "info": { + "moduleReference": "foo", + "mode": 99 + } + } + ] + } + }, + { + "file": "./index.mts", + "start": 47, + "length": 5, + "code": 7016, + "category": 1, + "messageText": { + "messageText": "Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type.", + "category": 1, + "code": 7016, + "next": [ + { + "info": { + "moduleReference": "bar", + "mode": 99 + } + } + ] + } + } + ] + ], + "./node_modules/@types/bar2/index.d.ts", + "./node_modules/foo2/index.d.ts" + ] }, "version": "FakeTSVersion", - "size": 1040 + "size": 1745 } @@ -519,7 +584,7 @@ Synchronizing program CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] - options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} + options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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. @@ -613,14 +678,24 @@ File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists a 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. -error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/foo/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo' library may need to update its package.json or typings. + +1 import { foo } from "foo"; +   ~~~~~ -[12:01:23 AM] Found 1 error. Watching for file changes. +index.mts:2:21 - error TS7016: Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type. + Try `npm i --save-dev @types/bar` if it exists or add a new declaration (.d.ts) file containing `declare module 'bar';` + +2 import { bar } from "bar"; +   ~~~~~ + +[12:01:23 AM] Found 2 errors. Watching for file changes. Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: /a/lib/lib.d.ts @@ -628,7 +703,7 @@ Program files:: /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -657,7 +732,7 @@ Synchronizing program CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] - options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} + options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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. @@ -732,14 +807,24 @@ File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists a 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. -error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. + Try `npm i --save-dev @types/foo` if it exists or add a new declaration (.d.ts) file containing `declare module 'foo';` + +1 import { foo } from "foo"; +   ~~~~~ + +index.mts:2:21 - error TS7016: Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type. + Try `npm i --save-dev @types/bar` if it exists or add a new declaration (.d.ts) file containing `declare module 'bar';` -[12:01:27 AM] Found 1 error. Watching for file changes. +2 import { bar } from "bar"; +   ~~~~~ + +[12:01:27 AM] Found 2 errors. Watching for file changes. Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: /a/lib/lib.d.ts @@ -747,7 +832,7 @@ Program files:: /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -778,7 +863,7 @@ Synchronizing program CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] - options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} + options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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. @@ -859,14 +944,24 @@ File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists a 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. -error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. + Try `npm i --save-dev @types/foo` if it exists or add a new declaration (.d.ts) file containing `declare module 'foo';` + +1 import { foo } from "foo"; +   ~~~~~ + +index.mts:2:21 - error TS7016: Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/@types/bar/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar' library may need to update its package.json or typings. + +2 import { bar } from "bar"; +   ~~~~~ -[12:01:31 AM] Found 1 error. Watching for file changes. +[12:01:31 AM] Found 2 errors. Watching for file changes. Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: /a/lib/lib.d.ts @@ -874,7 +969,7 @@ Program files:: /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -905,7 +1000,7 @@ Synchronizing program CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] - options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} + options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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. @@ -967,14 +1062,24 @@ File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists a 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. -error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/foo/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo' library may need to update its package.json or typings. -[12:01:36 AM] Found 1 error. Watching for file changes. +1 import { foo } from "foo"; +   ~~~~~ + +index.mts:2:21 - error TS7016: Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/@types/bar/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar' library may need to update its package.json or typings. + +2 import { bar } from "bar"; +   ~~~~~ + +[12:01:36 AM] Found 2 errors. Watching for file changes. Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: /a/lib/lib.d.ts @@ -982,7 +1087,7 @@ Program files:: /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -1023,7 +1128,7 @@ Synchronizing program CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] - options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} + options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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. @@ -1068,14 +1173,18 @@ File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists a 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. -error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/foo/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo' library may need to update its package.json or typings. + +1 import { foo } from "foo"; +   ~~~~~ [12:01:47 AM] Found 1 error. Watching for file changes. Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: /a/lib/lib.d.ts @@ -1084,7 +1193,9 @@ Program files:: /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/home/src/projects/project/node_modules/@types/bar/index.d.ts +/home/src/projects/project/index.mts Shape signatures in builder refreshed for:: /home/src/projects/project/node_modules/@types/bar/index.d.ts (used version) @@ -1132,7 +1243,7 @@ exitCode:: ExitStatus.undefined //// [/home/src/projects/project/index.mjs] file written with same contents //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"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":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[5],"options":{"strict":true},"fileIdsList":[[2,3,4]],"referencedMap":[[5,1]],"exportedModulesMap":[]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"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":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[5],"options":{"module":100,"strict":true,"target":1},"fileIdsList":[[2,3,4]],"referencedMap":[[5,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,[5,[{"file":"./index.mts","start":20,"length":5,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"foo","mode":99}}]}}]],2,4,3]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -1208,7 +1319,9 @@ exitCode:: ExitStatus.undefined ] ], "options": { - "strict": true + "module": 100, + "strict": true, + "target": 1 }, "referencedMap": { "./index.mts": [ @@ -1217,10 +1330,41 @@ exitCode:: ExitStatus.undefined "./node_modules/@types/bar2/index.d.ts" ] }, - "exportedModulesMap": {} + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + [ + "./index.mts", + [ + { + "file": "./index.mts", + "start": 20, + "length": 5, + "code": 7016, + "category": 1, + "messageText": { + "messageText": "Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type.", + "category": 1, + "code": 7016, + "next": [ + { + "info": { + "moduleReference": "foo", + "mode": 99 + } + } + ] + } + } + ] + ], + "./node_modules/@types/bar/index.d.ts", + "./node_modules/@types/bar2/index.d.ts", + "./node_modules/foo2/index.d.ts" + ] }, "version": "FakeTSVersion", - "size": 1193 + "size": 1581 } @@ -1260,7 +1404,7 @@ Synchronizing program CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] - options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} + options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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. @@ -1299,14 +1443,12 @@ File '/a/package.json' does not exist according to earlier cached lookups. File '/package.json' does not exist according to earlier cached lookups. DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Failed Lookup Locations Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Failed Lookup Locations -error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. - -[12:02:02 AM] Found 1 error. Watching for file changes. +[12:02:02 AM] Found 0 errors. Watching for file changes. Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: /a/lib/lib.d.ts @@ -1316,7 +1458,9 @@ Program files:: /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/home/src/projects/project/node_modules/foo/index.d.ts +/home/src/projects/project/index.mts Shape signatures in builder refreshed for:: /home/src/projects/project/node_modules/foo/index.d.ts (used version) @@ -1366,7 +1510,7 @@ exitCode:: ExitStatus.undefined //// [/home/src/projects/project/index.mjs] file written with same contents //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"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":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[6],"options":{"strict":true},"fileIdsList":[[2,3,4,5]],"referencedMap":[[6,1]],"exportedModulesMap":[]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"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":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[6],"options":{"module":100,"strict":true,"target":1},"fileIdsList":[[2,3,4,5]],"referencedMap":[[6,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,6,3,5,2,4]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -1453,7 +1597,9 @@ exitCode:: ExitStatus.undefined ] ], "options": { - "strict": true + "module": 100, + "strict": true, + "target": 1 }, "referencedMap": { "./index.mts": [ @@ -1463,10 +1609,18 @@ exitCode:: ExitStatus.undefined "./node_modules/@types/bar2/index.d.ts" ] }, - "exportedModulesMap": {} + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./index.mts", + "./node_modules/@types/bar/index.d.ts", + "./node_modules/@types/bar2/index.d.ts", + "./node_modules/foo/index.d.ts", + "./node_modules/foo2/index.d.ts" + ] }, "version": "FakeTSVersion", - "size": 1305 + "size": 1372 } @@ -1503,7 +1657,7 @@ Synchronizing program CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] - options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} + options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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. @@ -1591,14 +1745,18 @@ File '/package.json' does not exist according to earlier cached lookups. FileWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types/bar2/index.d.ts 250 undefined Source file DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Failed Lookup Locations Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Failed Lookup Locations -error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/@types/bar2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar2' library may need to update its package.json or typings. + +4 import { bar2 } from "bar2"; +   ~~~~~~ [12:02:16 AM] Found 1 error. Watching for file changes. Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: /a/lib/lib.d.ts @@ -1607,7 +1765,8 @@ Program files:: /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/home/src/projects/project/index.mts Shape signatures in builder refreshed for:: /home/src/projects/project/index.mts (computed .d.ts) @@ -1658,7 +1817,7 @@ exitCode:: ExitStatus.undefined //// [/home/src/projects/project/index.mjs] file written with same contents //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./index.mts"],"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":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[5],"options":{"strict":true},"fileIdsList":[[2,3,4]],"referencedMap":[[5,1]],"exportedModulesMap":[]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./index.mts"],"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":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[5],"options":{"module":100,"strict":true,"target":1},"fileIdsList":[[2,3,4]],"referencedMap":[[5,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,[5,[{"file":"./index.mts","start":104,"length":6,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"bar2","mode":99}}]}}]],3,2,4]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -1734,7 +1893,9 @@ exitCode:: ExitStatus.undefined ] ], "options": { - "strict": true + "module": 100, + "strict": true, + "target": 1 }, "referencedMap": { "./index.mts": [ @@ -1743,10 +1904,41 @@ exitCode:: ExitStatus.undefined "./node_modules/foo2/index.d.ts" ] }, - "exportedModulesMap": {} + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + [ + "./index.mts", + [ + { + "file": "./index.mts", + "start": 104, + "length": 6, + "code": 7016, + "category": 1, + "messageText": { + "messageText": "Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type.", + "category": 1, + "code": 7016, + "next": [ + { + "info": { + "moduleReference": "bar2", + "mode": 99 + } + } + ] + } + } + ] + ], + "./node_modules/@types/bar/index.d.ts", + "./node_modules/foo/index.d.ts", + "./node_modules/foo2/index.d.ts" + ] }, "version": "FakeTSVersion", - "size": 1184 + "size": 1576 } @@ -1785,7 +1977,7 @@ Synchronizing program CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] - options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} + options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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. @@ -1849,14 +2041,24 @@ 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: /home/src/projects/project/node_modules/foo2/index.d.ts 250 undefined Source file -error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +index.mts:3:22 - error TS7016: Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/foo2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo2' library may need to update its package.json or typings. -[12:02:31 AM] Found 1 error. Watching for file changes. +3 import { foo2 } from "foo2"; +   ~~~~~~ + +index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/@types/bar2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar2' library may need to update its package.json or typings. + +4 import { bar2 } from "bar2"; +   ~~~~~~ + +[12:02:31 AM] Found 2 errors. Watching for file changes. Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: /a/lib/lib.d.ts @@ -1864,7 +2066,8 @@ Program files:: /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/home/src/projects/project/index.mts Shape signatures in builder refreshed for:: /home/src/projects/project/index.mts (computed .d.ts) @@ -1913,7 +2116,7 @@ exitCode:: ExitStatus.undefined //// [/home/src/projects/project/index.mjs] file written with same contents //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./index.mts"],"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":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[4],"options":{"strict":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./index.mts"],"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":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[4],"options":{"module":100,"strict":true,"target":1},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,[4,[{"file":"./index.mts","start":75,"length":6,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"foo2","mode":99}}]}},{"file":"./index.mts","start":104,"length":6,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"bar2","mode":99}}]}}]],3,2]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -1978,7 +2181,9 @@ exitCode:: ExitStatus.undefined ] ], "options": { - "strict": true + "module": 100, + "strict": true, + "target": 1 }, "referencedMap": { "./index.mts": [ @@ -1986,10 +2191,60 @@ exitCode:: ExitStatus.undefined "./node_modules/@types/bar/index.d.ts" ] }, - "exportedModulesMap": {} + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + [ + "./index.mts", + [ + { + "file": "./index.mts", + "start": 75, + "length": 6, + "code": 7016, + "category": 1, + "messageText": { + "messageText": "Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type.", + "category": 1, + "code": 7016, + "next": [ + { + "info": { + "moduleReference": "foo2", + "mode": 99 + } + } + ] + } + }, + { + "file": "./index.mts", + "start": 104, + "length": 6, + "code": 7016, + "category": 1, + "messageText": { + "messageText": "Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type.", + "category": 1, + "code": 7016, + "next": [ + { + "info": { + "moduleReference": "bar2", + "mode": 99 + } + } + ] + } + } + ] + ], + "./node_modules/@types/bar/index.d.ts", + "./node_modules/foo/index.d.ts" + ] }, "version": "FakeTSVersion", - "size": 1070 + "size": 1782 } @@ -2015,7 +2270,7 @@ Synchronizing program CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] - options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} + options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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. @@ -2109,14 +2364,24 @@ File '/home/src/projects/project/node_modules/@types/bar/package.json' exists ac 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. -error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +index.mts:3:22 - error TS7016: Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/foo2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo2' library may need to update its package.json or typings. + +3 import { foo2 } from "foo2"; +   ~~~~~~ -[12:02:37 AM] Found 1 error. Watching for file changes. +index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. + Try `npm i --save-dev @types/bar2` if it exists or add a new declaration (.d.ts) file containing `declare module 'bar2';` + +4 import { bar2 } from "bar2"; +   ~~~~~~ + +[12:02:37 AM] Found 2 errors. Watching for file changes. Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: /a/lib/lib.d.ts @@ -2124,7 +2389,7 @@ Program files:: /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -2153,7 +2418,7 @@ Synchronizing program CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] - options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} + options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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. @@ -2228,14 +2493,24 @@ File '/home/src/projects/project/node_modules/@types/bar/package.json' exists ac 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. -error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +index.mts:3:22 - error TS7016: Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type. + Try `npm i --save-dev @types/foo2` if it exists or add a new declaration (.d.ts) file containing `declare module 'foo2';` + +3 import { foo2 } from "foo2"; +   ~~~~~~ + +index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. + Try `npm i --save-dev @types/bar2` if it exists or add a new declaration (.d.ts) file containing `declare module 'bar2';` -[12:02:41 AM] Found 1 error. Watching for file changes. +4 import { bar2 } from "bar2"; +   ~~~~~~ + +[12:02:41 AM] Found 2 errors. Watching for file changes. Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: /a/lib/lib.d.ts @@ -2243,7 +2518,7 @@ Program files:: /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -2274,7 +2549,7 @@ Synchronizing program CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] - options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} + options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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. @@ -2355,14 +2630,24 @@ File '/home/src/projects/project/node_modules/@types/bar/package.json' exists ac 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. -error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +index.mts:3:22 - error TS7016: Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type. + Try `npm i --save-dev @types/foo2` if it exists or add a new declaration (.d.ts) file containing `declare module 'foo2';` + +3 import { foo2 } from "foo2"; +   ~~~~~~ + +index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/@types/bar2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar2' library may need to update its package.json or typings. + +4 import { bar2 } from "bar2"; +   ~~~~~~ -[12:02:45 AM] Found 1 error. Watching for file changes. +[12:02:45 AM] Found 2 errors. Watching for file changes. Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: /a/lib/lib.d.ts @@ -2370,7 +2655,7 @@ Program files:: /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -2401,7 +2686,7 @@ Synchronizing program CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] - options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} + options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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. @@ -2463,14 +2748,24 @@ File '/home/src/projects/project/node_modules/@types/bar/package.json' exists ac 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. -error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +index.mts:3:22 - error TS7016: Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/foo2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo2' library may need to update its package.json or typings. + +3 import { foo2 } from "foo2"; +   ~~~~~~ + +index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/@types/bar2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar2' library may need to update its package.json or typings. + +4 import { bar2 } from "bar2"; +   ~~~~~~ -[12:02:50 AM] Found 1 error. Watching for file changes. +[12:02:50 AM] Found 2 errors. Watching for file changes. Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: /a/lib/lib.d.ts @@ -2478,7 +2773,7 @@ Program files:: /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: diff --git a/tests/baselines/reference/tscWatch/moduleResolution/type-reference-resolutions-reuse.js b/tests/baselines/reference/tscWatch/moduleResolution/type-reference-resolutions-reuse.js index b8fd355498e41..d7d19a11f78e6 100644 --- a/tests/baselines/reference/tscWatch/moduleResolution/type-reference-resolutions-reuse.js +++ b/tests/baselines/reference/tscWatch/moduleResolution/type-reference-resolutions-reuse.js @@ -1,7 +1,7 @@ currentDirectory:: /user/username/projects/myproject useCaseSensitiveFileNames: false Input:: //// [/user/username/projects/myproject/tsconfig.json] -{"compilerOptions":{"moduleResolution":"node16"}} +{"compilerOptions":{"module":"node16","moduleResolution":"node16"}} //// [/user/username/projects/myproject/index.ts] /// @@ -131,17 +131,34 @@ 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. -error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +error TS2318: Cannot find global type 'Array'. -[12:00:50 AM] Found 1 error. Watching for file changes. +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. + +error TS2318: Cannot find global type 'Number'. + +error TS2318: Cannot find global type 'Object'. + +error TS2318: Cannot find global type 'RegExp'. + +error TS2318: Cannot find global type 'String'. + +error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2022' + +[12:00:50 AM] Found 9 errors. Watching for file changes. Program root files: ["/user/username/projects/myproject/a.ts","/user/username/projects/myproject/index.ts"] -Program options: {"moduleResolution":3,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"module":100,"moduleResolution":3,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program structureReused: Not Program files:: -/a/lib/lib.d.ts /user/username/projects/myproject/a.ts /user/username/projects/myproject/node_modules/pkg/import.d.ts /user/username/projects/myproject/index.ts @@ -150,13 +167,14 @@ Program files:: No cached semantic diagnostics in the builder:: Shape signatures in builder refreshed for:: -/a/lib/lib.d.ts (used version) /user/username/projects/myproject/a.ts (used version) /user/username/projects/myproject/node_modules/pkg/import.d.ts (used version) /user/username/projects/myproject/index.ts (used version) /user/username/projects/myproject/node_modules/@types/pkg2/index.d.ts (used version) PolledWatches:: +/a/lib/lib.es2022.full.d.ts: *new* + {"pollingInterval":500} /user/username/projects/myproject/node_modules/@types/package.json: *new* {"pollingInterval":2000} /user/username/projects/myproject/node_modules/@types/pkg2/package.json: *new* @@ -173,8 +191,6 @@ PolledWatches:: {"pollingInterval":2000} FsWatches:: -/a/lib/lib.d.ts: *new* - {} /user/username/projects/myproject/a.ts: *new* {} /user/username/projects/myproject/index.ts: *new* @@ -231,9 +247,6 @@ Output:: >> Screen clear [12:00:53 AM] File change detected. Starting incremental compilation... -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 '/user/username/projects/myproject/package.json' does not exist according to earlier cached lookups. File '/user/username/projects/package.json' does not exist according to earlier cached lookups. File '/user/username/package.json' does not exist according to earlier cached lookups. @@ -296,17 +309,34 @@ 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. -error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. + +error TS2318: Cannot find global type 'Number'. + +error TS2318: Cannot find global type 'Object'. + +error TS2318: Cannot find global type 'RegExp'. + +error TS2318: Cannot find global type 'String'. + +error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2022' -[12:00:57 AM] Found 1 error. Watching for file changes. +[12:00:57 AM] Found 9 errors. Watching for file changes. Program root files: ["/user/username/projects/myproject/a.ts","/user/username/projects/myproject/index.ts"] -Program options: {"moduleResolution":3,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"module":100,"moduleResolution":3,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program structureReused: SafeModules Program files:: -/a/lib/lib.d.ts /user/username/projects/myproject/node_modules/pkg/import.d.ts /user/username/projects/myproject/a.ts /user/username/projects/myproject/index.ts diff --git a/tests/baselines/reference/tsserver/moduleResolution/node10Result.js b/tests/baselines/reference/tsserver/moduleResolution/node10Result.js index 7c0dca9ec6f4c..7d06d88bd4247 100644 --- a/tests/baselines/reference/tsserver/moduleResolution/node10Result.js +++ b/tests/baselines/reference/tsserver/moduleResolution/node10Result.js @@ -125,7 +125,7 @@ import { bar2 } from "bar2"; //// [/home/src/projects/project/tsconfig.json] -{"compilerOptions":{"moduleResolution":"node16","traceResolution":true,"incremental":true,"strict":true,"types":[]},"files":["index.mts"]} +{"compilerOptions":{"target":"es5","module":"node16","moduleResolution":"node16","traceResolution":true,"incremental":true,"strict":true,"types":[]},"files":["index.mts"]} //// [/a/lib/lib.d.ts] /// @@ -169,6 +169,8 @@ Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/tsconfig.json : { "/home/src/projects/project/index.mts" ], "options": { + "target": 1, + "module": 100, "moduleResolution": 3, "traceResolution": true, "incremental": true, @@ -418,6 +420,8 @@ Info seq [hh:mm:ss:mss] event: "deferredSize": 0 }, "compilerOptions": { + "target": "es5", + "module": "node16", "moduleResolution": "node16", "traceResolution": true, "incremental": true, @@ -449,13 +453,7 @@ Info seq [hh:mm:ss:mss] event: "body": { "triggerFile": "/home/src/projects/project/index.mts", "configFile": "/home/src/projects/project/tsconfig.json", - "diagnostics": [ - { - "text": "Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'.", - "code": 5110, - "category": "error" - } - ] + "diagnostics": [] } } Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) diff --git a/tests/cases/compiler/moduleExportNonStructured.ts b/tests/cases/compiler/moduleExportNonStructured.ts index 756f948570a86..05ee764f54c17 100644 --- a/tests/cases/compiler/moduleExportNonStructured.ts +++ b/tests/cases/compiler/moduleExportNonStructured.ts @@ -1,5 +1,5 @@ // @target: ESNext -// @module: ESNext +// @module: NodeNext // @moduleResolution: NodeNext // @strict: true diff --git a/tests/cases/compiler/nodeNextModuleResolution1.ts b/tests/cases/compiler/nodeNextModuleResolution1.ts index c22c4fe3312cf..ce9afc7cdae96 100644 --- a/tests/cases/compiler/nodeNextModuleResolution1.ts +++ b/tests/cases/compiler/nodeNextModuleResolution1.ts @@ -1,3 +1,4 @@ +// @module: nodenext // @moduleResolution: nodenext // @traceResolution: true diff --git a/tests/cases/compiler/nodeNextModuleResolution2.ts b/tests/cases/compiler/nodeNextModuleResolution2.ts index 2bbe7a540715d..7096e8afab178 100644 --- a/tests/cases/compiler/nodeNextModuleResolution2.ts +++ b/tests/cases/compiler/nodeNextModuleResolution2.ts @@ -1,3 +1,4 @@ +// @module: nodenext // @moduleResolution: nodenext // @traceResolution: true diff --git a/tests/cases/conformance/moduleResolution/conditionalExportsResolutionFallback.ts b/tests/cases/conformance/moduleResolution/conditionalExportsResolutionFallback.ts index d9a1d480b8ef3..788106d5da4a4 100644 --- a/tests/cases/conformance/moduleResolution/conditionalExportsResolutionFallback.ts +++ b/tests/cases/conformance/moduleResolution/conditionalExportsResolutionFallback.ts @@ -1,3 +1,4 @@ +// @module: nodenext // @moduleResolution: node16,nodenext,bundler // @traceResolution: true // @allowJs: true diff --git a/tests/cases/conformance/moduleResolution/nestedPackageJsonRedirect.ts b/tests/cases/conformance/moduleResolution/nestedPackageJsonRedirect.ts index 8d5804c1fd010..e0082179b821b 100644 --- a/tests/cases/conformance/moduleResolution/nestedPackageJsonRedirect.ts +++ b/tests/cases/conformance/moduleResolution/nestedPackageJsonRedirect.ts @@ -1,3 +1,4 @@ +// @module: nodenext // @moduleResolution: node16,nodenext,bundler // @noEmit: true // @noTypesAndSymbols: true diff --git a/tests/cases/conformance/moduleResolution/resolvesWithoutExportsDiagnostic1.ts b/tests/cases/conformance/moduleResolution/resolvesWithoutExportsDiagnostic1.ts index d01bb47a75ca8..19ff270f30e2d 100644 --- a/tests/cases/conformance/moduleResolution/resolvesWithoutExportsDiagnostic1.ts +++ b/tests/cases/conformance/moduleResolution/resolvesWithoutExportsDiagnostic1.ts @@ -1,3 +1,4 @@ +// @module: node16 // @moduleResolution: bundler,node16 // @strict: true // @noTypesAndSymbols: true diff --git a/tests/cases/fourslash/moveToNewFile_importFileExtensions.ts b/tests/cases/fourslash/moveToNewFile_importFileExtensions.ts index 852dccb95ca37..6779ebd8a5031 100644 --- a/tests/cases/fourslash/moveToNewFile_importFileExtensions.ts +++ b/tests/cases/fourslash/moveToNewFile_importFileExtensions.ts @@ -3,6 +3,7 @@ // @Filename: /tsconfig.json ////{ //// "compilerOptions": { +//// "module": "Node16", //// "moduleResolution": "Node16", //// } ////} From 081a3811248b5220783808f8502e5a82a312ecd8 Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Mon, 26 Jun 2023 12:55:45 -0700 Subject: [PATCH 3/9] Reset target for less baseline change --- .../unittests/tscWatch/moduleResolution.ts | 4 +- ...esolutions-from-file-are-partially-used.js | 74 +++++++------------ .../type-reference-resolutions-reuse.js | 74 +++++++++---------- 3 files changed, 63 insertions(+), 89 deletions(-) diff --git a/src/testRunner/unittests/tscWatch/moduleResolution.ts b/src/testRunner/unittests/tscWatch/moduleResolution.ts index 6c38a0b14d245..07de6c69fe03f 100644 --- a/src/testRunner/unittests/tscWatch/moduleResolution.ts +++ b/src/testRunner/unittests/tscWatch/moduleResolution.ts @@ -284,7 +284,7 @@ describe("unittests:: tsc-watch:: moduleResolution", () => { { path: `/user/username/projects/myproject/tsconfig.json`, content: JSON.stringify({ - compilerOptions: { module: "node16", moduleResolution: "node16" }, + compilerOptions: { target: "es5", module: "node16", moduleResolution: "node16" }, }) }, { @@ -354,7 +354,7 @@ describe("unittests:: tsc-watch:: moduleResolution", () => { { path: `/user/username/projects/myproject/tsconfig.json`, content: JSON.stringify({ - compilerOptions: { module: "node16", moduleResolution: "node16" }, + compilerOptions: { target: "es5", module: "node16", moduleResolution: "node16" }, }) }, { diff --git a/tests/baselines/reference/tscWatch/moduleResolution/module-resolutions-from-file-are-partially-used.js b/tests/baselines/reference/tscWatch/moduleResolution/module-resolutions-from-file-are-partially-used.js index 21d1e49bfe3a1..5e27cd1e3a4a3 100644 --- a/tests/baselines/reference/tscWatch/moduleResolution/module-resolutions-from-file-are-partially-used.js +++ b/tests/baselines/reference/tscWatch/moduleResolution/module-resolutions-from-file-are-partially-used.js @@ -1,7 +1,7 @@ currentDirectory:: /user/username/projects/myproject useCaseSensitiveFileNames: false Input:: //// [/user/username/projects/myproject/tsconfig.json] -{"compilerOptions":{"module":"node16","moduleResolution":"node16"}} +{"compilerOptions":{"target":"es5","module":"node16","moduleResolution":"node16"}} //// [/user/username/projects/myproject/index.ts] import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" }; @@ -131,48 +131,37 @@ File '/user/username/projects/myproject/node_modules/pkg/package.json' exists ac 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. -error TS2318: Cannot find global type 'Array'. +index.ts:2:39 - error TS2307: Cannot find module 'pkg1' or its corresponding type declarations. -error TS2318: Cannot find global type 'Boolean'. +2 import type { RequireInterface } from "pkg1" assert { "resolution-mode": "require" }; +   ~~~~~~ -error TS2318: Cannot find global type 'Function'. - -error TS2318: Cannot find global type 'IArguments'. - -error TS2318: Cannot find global type 'Number'. - -error TS2318: Cannot find global type 'Object'. - -error TS2318: Cannot find global type 'RegExp'. - -error TS2318: Cannot find global type 'String'. - -error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. - The file is in the program because: - Default library for target 'es2022' - -[12:00:44 AM] Found 9 errors. Watching for file changes. +[12:00:44 AM] Found 1 error. Watching for file changes. Program root files: ["/user/username/projects/myproject/a.ts","/user/username/projects/myproject/index.ts"] -Program options: {"module":100,"moduleResolution":3,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"target":1,"module":100,"moduleResolution":3,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program structureReused: Not Program files:: +/a/lib/lib.d.ts /user/username/projects/myproject/a.ts /user/username/projects/myproject/node_modules/pkg/import.d.ts /user/username/projects/myproject/index.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/myproject/a.ts +/user/username/projects/myproject/node_modules/pkg/import.d.ts +/user/username/projects/myproject/index.ts Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) /user/username/projects/myproject/a.ts (used version) -/user/username/projects/myproject/index.ts (used version) /user/username/projects/myproject/node_modules/pkg/import.d.ts (used version) +/user/username/projects/myproject/index.ts (used version) PolledWatches:: -/a/lib/lib.es2022.full.d.ts: *new* - {"pollingInterval":500} /user/username/projects/myproject/node_modules/@types: *new* {"pollingInterval":500} /user/username/projects/myproject/package.json: *new* @@ -185,6 +174,8 @@ PolledWatches:: {"pollingInterval":2000} FsWatches:: +/a/lib/lib.d.ts: *new* + {} /user/username/projects: *new* {} /user/username/projects/myproject: *new* @@ -238,6 +229,9 @@ Output:: >> Screen clear [12:00:47 AM] File change detected. Starting incremental compilation... +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 '/user/username/projects/myproject/package.json' does not exist according to earlier cached lookups. File '/user/username/projects/package.json' does not exist according to earlier cached lookups. File '/user/username/package.json' does not exist according to earlier cached lookups. @@ -288,39 +282,27 @@ Reusing resolution of module 'pkg1' from '/user/username/projects/myproject/inde 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. -error TS2318: Cannot find global type 'Array'. - -error TS2318: Cannot find global type 'Boolean'. - -error TS2318: Cannot find global type 'Function'. - -error TS2318: Cannot find global type 'IArguments'. +index.ts:2:39 - error TS2307: Cannot find module 'pkg1' or its corresponding type declarations. -error TS2318: Cannot find global type 'Number'. +2 import type { RequireInterface } from "pkg1" assert { "resolution-mode": "require" }; +   ~~~~~~ -error TS2318: Cannot find global type 'Object'. - -error TS2318: Cannot find global type 'RegExp'. - -error TS2318: Cannot find global type 'String'. - -error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. - The file is in the program because: - Default library for target 'es2022' - -[12:00:54 AM] Found 9 errors. Watching for file changes. +[12:00:54 AM] Found 1 error. Watching for file changes. Program root files: ["/user/username/projects/myproject/a.ts","/user/username/projects/myproject/index.ts"] -Program options: {"module":100,"moduleResolution":3,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"target":1,"module":100,"moduleResolution":3,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program structureReused: SafeModules Program files:: +/a/lib/lib.d.ts /user/username/projects/myproject/node_modules/pkg/import.d.ts /user/username/projects/myproject/a.ts /user/username/projects/myproject/index.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/user/username/projects/myproject/a.ts +/user/username/projects/myproject/index.ts Shape signatures in builder refreshed for:: /user/username/projects/myproject/a.ts (computed .d.ts) diff --git a/tests/baselines/reference/tscWatch/moduleResolution/type-reference-resolutions-reuse.js b/tests/baselines/reference/tscWatch/moduleResolution/type-reference-resolutions-reuse.js index d7d19a11f78e6..2af1ce80f9ca2 100644 --- a/tests/baselines/reference/tscWatch/moduleResolution/type-reference-resolutions-reuse.js +++ b/tests/baselines/reference/tscWatch/moduleResolution/type-reference-resolutions-reuse.js @@ -1,7 +1,7 @@ currentDirectory:: /user/username/projects/myproject useCaseSensitiveFileNames: false Input:: //// [/user/username/projects/myproject/tsconfig.json] -{"compilerOptions":{"module":"node16","moduleResolution":"node16"}} +{"compilerOptions":{"target":"es5","module":"node16","moduleResolution":"node16"}} //// [/user/username/projects/myproject/index.ts] /// @@ -131,50 +131,45 @@ 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. -error TS2318: Cannot find global type 'Array'. +index.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg1'. -error TS2318: Cannot find global type 'Boolean'. +2 /// +   ~~~~ -error TS2318: Cannot find global type 'Function'. +index.ts:3:41 - error TS2304: Cannot find name 'RequireInterface'. -error TS2318: Cannot find global type 'IArguments'. +3 export interface LocalInterface extends RequireInterface {} +   ~~~~~~~~~~~~~~~~ -error TS2318: Cannot find global type 'Number'. - -error TS2318: Cannot find global type 'Object'. - -error TS2318: Cannot find global type 'RegExp'. - -error TS2318: Cannot find global type 'String'. - -error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. - The file is in the program because: - Default library for target 'es2022' - -[12:00:50 AM] Found 9 errors. Watching for file changes. +[12:00:50 AM] Found 2 errors. Watching for file changes. Program root files: ["/user/username/projects/myproject/a.ts","/user/username/projects/myproject/index.ts"] -Program options: {"module":100,"moduleResolution":3,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"target":1,"module":100,"moduleResolution":3,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program structureReused: Not Program files:: +/a/lib/lib.d.ts /user/username/projects/myproject/a.ts /user/username/projects/myproject/node_modules/pkg/import.d.ts /user/username/projects/myproject/index.ts /user/username/projects/myproject/node_modules/@types/pkg2/index.d.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/myproject/a.ts +/user/username/projects/myproject/node_modules/pkg/import.d.ts +/user/username/projects/myproject/index.ts +/user/username/projects/myproject/node_modules/@types/pkg2/index.d.ts Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) /user/username/projects/myproject/a.ts (used version) /user/username/projects/myproject/node_modules/pkg/import.d.ts (used version) /user/username/projects/myproject/index.ts (used version) /user/username/projects/myproject/node_modules/@types/pkg2/index.d.ts (used version) PolledWatches:: -/a/lib/lib.es2022.full.d.ts: *new* - {"pollingInterval":500} /user/username/projects/myproject/node_modules/@types/package.json: *new* {"pollingInterval":2000} /user/username/projects/myproject/node_modules/@types/pkg2/package.json: *new* @@ -191,6 +186,8 @@ PolledWatches:: {"pollingInterval":2000} FsWatches:: +/a/lib/lib.d.ts: *new* + {} /user/username/projects/myproject/a.ts: *new* {} /user/username/projects/myproject/index.ts: *new* @@ -247,6 +244,9 @@ Output:: >> Screen clear [12:00:53 AM] File change detected. Starting incremental compilation... +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 '/user/username/projects/myproject/package.json' does not exist according to earlier cached lookups. File '/user/username/projects/package.json' does not exist according to earlier cached lookups. File '/user/username/package.json' does not exist according to earlier cached lookups. @@ -309,40 +309,32 @@ 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. -error TS2318: Cannot find global type 'Array'. - -error TS2318: Cannot find global type 'Boolean'. +index.ts:2:23 - error TS2688: Cannot find type definition file for 'pkg1'. -error TS2318: Cannot find global type 'Function'. +2 /// +   ~~~~ -error TS2318: Cannot find global type 'IArguments'. +index.ts:3:41 - error TS2304: Cannot find name 'RequireInterface'. -error TS2318: Cannot find global type 'Number'. +3 export interface LocalInterface extends RequireInterface {} +   ~~~~~~~~~~~~~~~~ -error TS2318: Cannot find global type 'Object'. - -error TS2318: Cannot find global type 'RegExp'. - -error TS2318: Cannot find global type 'String'. - -error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. - The file is in the program because: - Default library for target 'es2022' - -[12:00:57 AM] Found 9 errors. Watching for file changes. +[12:00:57 AM] Found 2 errors. Watching for file changes. Program root files: ["/user/username/projects/myproject/a.ts","/user/username/projects/myproject/index.ts"] -Program options: {"module":100,"moduleResolution":3,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"target":1,"module":100,"moduleResolution":3,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program structureReused: SafeModules Program files:: +/a/lib/lib.d.ts /user/username/projects/myproject/node_modules/pkg/import.d.ts /user/username/projects/myproject/a.ts /user/username/projects/myproject/index.ts /user/username/projects/myproject/node_modules/@types/pkg2/index.d.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/user/username/projects/myproject/a.ts Shape signatures in builder refreshed for:: /user/username/projects/myproject/a.ts (computed .d.ts) From d3c08b2d224b2c7c2ed52c27e33e3d1219ec0937 Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Mon, 26 Jun 2023 13:54:50 -0700 Subject: [PATCH 4/9] Set lib file content instead of changing target --- .../unittests/helpers/node10Result.ts | 2 +- .../tsc/moduleResolution/node10Result.js | 763 ++++++++---------- .../tscWatch/moduleResolution/node10Result.js | 226 +++--- .../tsserver/moduleResolution/node10Result.js | 71 +- 4 files changed, 509 insertions(+), 553 deletions(-) diff --git a/src/testRunner/unittests/helpers/node10Result.ts b/src/testRunner/unittests/helpers/node10Result.ts index 132a3b26c1c05..280d04ec57a3a 100644 --- a/src/testRunner/unittests/helpers/node10Result.ts +++ b/src/testRunner/unittests/helpers/node10Result.ts @@ -70,9 +70,9 @@ export function getFsContentsForNode10Result(): FsContents { import { foo2 } from "foo2"; import { bar2 } from "bar2"; `, + "/a/lib/lib.es2022.full.d.ts": libFile.content, "/home/src/projects/project/tsconfig.json": JSON.stringify({ compilerOptions: { - target: "es5", module: "node16", moduleResolution: "node16", traceResolution: true, diff --git a/tests/baselines/reference/tsc/moduleResolution/node10Result.js b/tests/baselines/reference/tsc/moduleResolution/node10Result.js index dc9b4ea37f7b9..ae4ccf5df6410 100644 --- a/tests/baselines/reference/tsc/moduleResolution/node10Result.js +++ b/tests/baselines/reference/tsc/moduleResolution/node10Result.js @@ -13,6 +13,19 @@ interface RegExp {} interface String { charAt: any; } interface Array { length: number; [n: number]: T; } +//// [/a/lib/lib.es2022.full.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; } + //// [/home/src/projects/project/index.mts] import { foo } from "foo"; import { bar } from "bar"; @@ -137,7 +150,7 @@ export const foo2 = 1; } //// [/home/src/projects/project/tsconfig.json] -{"compilerOptions":{"target":"es5","module":"node16","moduleResolution":"node16","traceResolution":true,"incremental":true,"strict":true,"types":[]},"files":["index.mts"]} +{"compilerOptions":{"module":"node16","moduleResolution":"node16","traceResolution":true,"incremental":true,"strict":true,"types":[]},"files":["index.mts"]} //// [/lib/lib.d.ts] /// @@ -326,42 +339,48 @@ File '/home/src/projects/project/node_modules/foo2/package.json' exists accordin File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -home/src/projects/project/index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. - There are types at '/home/src/projects/project/node_modules/foo/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo' library may need to update its package.json or typings. +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'CallableFunction'. + +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. + +error TS2318: Cannot find global type 'NewableFunction'. -1 import { foo } from "foo"; -   ~~~~~ +error TS2318: Cannot find global type 'Number'. -home/src/projects/project/index.mts:2:21 - error TS7016: Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type. - There are types at '/home/src/projects/project/node_modules/@types/bar/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar' library may need to update its package.json or typings. +error TS2318: Cannot find global type 'Object'. -2 import { bar } from "bar"; -   ~~~~~ +error TS2318: Cannot find global type 'RegExp'. +error TS2318: Cannot find global type 'String'. -Found 2 errors in the same file, starting at: home/src/projects/project/index.mts:1 +error TS6053: File '/lib/lib.es2022.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2022' + + +Found 11 errors. exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: -/lib/lib.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -Semantic diagnostics in builder refreshed for:: -/lib/lib.d.ts -/home/src/projects/project/node_modules/foo2/index.d.ts -/home/src/projects/project/node_modules/@types/bar2/index.d.ts -/home/src/projects/project/index.mts +No cached semantic diagnostics in the builder:: Shape signatures in builder refreshed for:: -/lib/lib.d.ts (used version) /home/src/projects/project/node_modules/foo2/index.d.ts (used version) -/home/src/projects/project/node_modules/@types/bar2/index.d.ts (used version) /home/src/projects/project/index.mts (used version) +/home/src/projects/project/node_modules/@types/bar2/index.d.ts (used version) //// [/home/src/projects/project/index.mjs] @@ -369,13 +388,12 @@ export {}; //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../lib/lib.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"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":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","impliedFormat":99}],"root":[4],"options":{"module":100,"strict":true,"target":1},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[[4,[{"file":"./index.mts","start":20,"length":5,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"foo","mode":99}}]}},{"file":"./index.mts","start":47,"length":5,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"bar","mode":99}}]}}]],3,2,1]},"version":"FakeTSVersion"} +{"program":{"fileNames":["./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"fileInfos":[{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","impliedFormat":99}],"root":[3],"options":{"module":100,"strict":true},"fileIdsList":[[1,2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { "program": { "fileNames": [ - "../../../../lib/lib.d.ts", "./node_modules/foo2/index.d.ts", "./node_modules/@types/bar2/index.d.ts", "./index.mts" @@ -387,17 +405,6 @@ export {}; ] ], "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/foo2/index.d.ts": { "original": { "version": "-1622383150-export declare const foo2: number;", @@ -428,14 +435,13 @@ export {}; }, "root": [ [ - 4, + 3, "./index.mts" ] ], "options": { "module": 100, - "strict": true, - "target": 1 + "strict": true }, "referencedMap": { "./index.mts": [ @@ -448,60 +454,10 @@ export {}; "./node_modules/foo2/index.d.ts", "./node_modules/@types/bar2/index.d.ts" ] - }, - "semanticDiagnosticsPerFile": [ - [ - "./index.mts", - [ - { - "file": "./index.mts", - "start": 20, - "length": 5, - "code": 7016, - "category": 1, - "messageText": { - "messageText": "Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type.", - "category": 1, - "code": 7016, - "next": [ - { - "info": { - "moduleReference": "foo", - "mode": 99 - } - } - ] - } - }, - { - "file": "./index.mts", - "start": 47, - "length": 5, - "code": 7016, - "category": 1, - "messageText": { - "messageText": "Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type.", - "category": 1, - "code": 7016, - "next": [ - { - "info": { - "moduleReference": "bar", - "mode": 99 - } - } - ] - } - } - ] - ], - "./node_modules/@types/bar2/index.d.ts", - "./node_modules/foo2/index.d.ts", - "../../../../lib/lib.d.ts" - ] + } }, "version": "FakeTSVersion", - "size": 1823 + "size": 607 } @@ -694,32 +650,43 @@ File '/home/src/projects/project/node_modules/foo2/package.json' exists accordin File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -home/src/projects/project/index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. - There are types at '/home/src/projects/project/node_modules/foo/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo' library may need to update its package.json or typings. +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'CallableFunction'. + +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. + +error TS2318: Cannot find global type 'NewableFunction'. -1 import { foo } from "foo"; -   ~~~~~ +error TS2318: Cannot find global type 'Number'. -home/src/projects/project/index.mts:2:21 - error TS7016: Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type. - Try `npm i --save-dev @types/bar` if it exists or add a new declaration (.d.ts) file containing `declare module 'bar';` +error TS2318: Cannot find global type 'Object'. -2 import { bar } from "bar"; -   ~~~~~ +error TS2318: Cannot find global type 'RegExp'. +error TS2318: Cannot find global type 'String'. -Found 2 errors in the same file, starting at: home/src/projects/project/index.mts:1 +error TS6053: File '/lib/lib.es2022.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2022' + + +Found 11 errors. exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: -/lib/lib.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -Semantic diagnostics in builder refreshed for:: +No cached semantic diagnostics in the builder:: No shapes updated in the builder:: @@ -927,32 +894,43 @@ File '/home/src/projects/project/node_modules/foo2/package.json' exists accordin File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -home/src/projects/project/index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. - Try `npm i --save-dev @types/foo` if it exists or add a new declaration (.d.ts) file containing `declare module 'foo';` +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'CallableFunction'. + +error TS2318: Cannot find global type 'Function'. -1 import { foo } from "foo"; -   ~~~~~ +error TS2318: Cannot find global type 'IArguments'. -home/src/projects/project/index.mts:2:21 - error TS7016: Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type. - Try `npm i --save-dev @types/bar` if it exists or add a new declaration (.d.ts) file containing `declare module 'bar';` +error TS2318: Cannot find global type 'NewableFunction'. -2 import { bar } from "bar"; -   ~~~~~ +error TS2318: Cannot find global type 'Number'. +error TS2318: Cannot find global type 'Object'. -Found 2 errors in the same file, starting at: home/src/projects/project/index.mts:1 +error TS2318: Cannot find global type 'RegExp'. + +error TS2318: Cannot find global type 'String'. + +error TS6053: File '/lib/lib.es2022.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2022' + + +Found 11 errors. exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: -/lib/lib.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -Semantic diagnostics in builder refreshed for:: +No cached semantic diagnostics in the builder:: No shapes updated in the builder:: @@ -1149,32 +1127,43 @@ File '/home/src/projects/project/node_modules/foo2/package.json' exists accordin File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -home/src/projects/project/index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. - Try `npm i --save-dev @types/foo` if it exists or add a new declaration (.d.ts) file containing `declare module 'foo';` +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'CallableFunction'. + +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. + +error TS2318: Cannot find global type 'NewableFunction'. + +error TS2318: Cannot find global type 'Number'. + +error TS2318: Cannot find global type 'Object'. -1 import { foo } from "foo"; -   ~~~~~ +error TS2318: Cannot find global type 'RegExp'. -home/src/projects/project/index.mts:2:21 - error TS7016: Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type. - There are types at '/home/src/projects/project/node_modules/@types/bar/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar' library may need to update its package.json or typings. +error TS2318: Cannot find global type 'String'. -2 import { bar } from "bar"; -   ~~~~~ +error TS6053: File '/lib/lib.es2022.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2022' -Found 2 errors in the same file, starting at: home/src/projects/project/index.mts:1 +Found 11 errors. exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: -/lib/lib.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -Semantic diagnostics in builder refreshed for:: +No cached semantic diagnostics in the builder:: No shapes updated in the builder:: @@ -1358,32 +1347,43 @@ File '/home/src/projects/project/node_modules/foo2/package.json' exists accordin File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -home/src/projects/project/index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. - There are types at '/home/src/projects/project/node_modules/foo/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo' library may need to update its package.json or typings. +error TS2318: Cannot find global type 'Array'. -1 import { foo } from "foo"; -   ~~~~~ +error TS2318: Cannot find global type 'Boolean'. -home/src/projects/project/index.mts:2:21 - error TS7016: Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type. - There are types at '/home/src/projects/project/node_modules/@types/bar/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar' library may need to update its package.json or typings. +error TS2318: Cannot find global type 'CallableFunction'. -2 import { bar } from "bar"; -   ~~~~~ +error TS2318: Cannot find global type 'Function'. +error TS2318: Cannot find global type 'IArguments'. -Found 2 errors in the same file, starting at: home/src/projects/project/index.mts:1 +error TS2318: Cannot find global type 'NewableFunction'. + +error TS2318: Cannot find global type 'Number'. + +error TS2318: Cannot find global type 'Object'. + +error TS2318: Cannot find global type 'RegExp'. + +error TS2318: Cannot find global type 'String'. + +error TS6053: File '/lib/lib.es2022.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2022' + + +Found 11 errors. exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: -/lib/lib.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -Semantic diagnostics in builder refreshed for:: +No cached semantic diagnostics in the builder:: No shapes updated in the builder:: @@ -1539,29 +1539,44 @@ File '/home/src/projects/project/node_modules/foo2/package.json' exists accordin File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -home/src/projects/project/index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. - There are types at '/home/src/projects/project/node_modules/foo/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo' library may need to update its package.json or typings. +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'CallableFunction'. + +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. -1 import { foo } from "foo"; -   ~~~~~ +error TS2318: Cannot find global type 'NewableFunction'. +error TS2318: Cannot find global type 'Number'. -Found 1 error in home/src/projects/project/index.mts:1 +error TS2318: Cannot find global type 'Object'. + +error TS2318: Cannot find global type 'RegExp'. + +error TS2318: Cannot find global type 'String'. + +error TS6053: File '/lib/lib.es2022.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2022' + + +Found 11 errors. exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: -/lib/lib.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -Semantic diagnostics in builder refreshed for:: -/home/src/projects/project/node_modules/@types/bar/index.d.ts -/home/src/projects/project/index.mts +No cached semantic diagnostics in the builder:: Shape signatures in builder refreshed for:: /home/src/projects/project/node_modules/@types/bar/index.d.ts (used version) @@ -1570,13 +1585,12 @@ Shape signatures in builder refreshed for:: //// [/home/src/projects/project/index.mjs] file written with same contents //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../lib/lib.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"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":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[5],"options":{"module":100,"strict":true,"target":1},"fileIdsList":[[2,3,4]],"referencedMap":[[5,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[[5,[{"file":"./index.mts","start":20,"length":5,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"foo","mode":99}}]}}]],2,4,3,1]},"version":"FakeTSVersion"} +{"program":{"fileNames":["./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"fileInfos":[{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[4],"options":{"module":100,"strict":true},"fileIdsList":[[1,2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { "program": { "fileNames": [ - "../../../../lib/lib.d.ts", "./node_modules/@types/bar/index.d.ts", "./node_modules/foo2/index.d.ts", "./node_modules/@types/bar2/index.d.ts", @@ -1590,17 +1604,6 @@ Shape signatures in builder refreshed for:: ] ], "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/@types/bar/index.d.ts": { "original": { "version": "-9556021903-export declare const bar: number;", @@ -1641,14 +1644,13 @@ Shape signatures in builder refreshed for:: }, "root": [ [ - 5, + 4, "./index.mts" ] ], "options": { "module": 100, - "strict": true, - "target": 1 + "strict": true }, "referencedMap": { "./index.mts": [ @@ -1657,41 +1659,10 @@ Shape signatures in builder refreshed for:: "./node_modules/@types/bar2/index.d.ts" ] }, - "exportedModulesMap": {}, - "semanticDiagnosticsPerFile": [ - [ - "./index.mts", - [ - { - "file": "./index.mts", - "start": 20, - "length": 5, - "code": 7016, - "category": 1, - "messageText": { - "messageText": "Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type.", - "category": 1, - "code": 7016, - "next": [ - { - "info": { - "moduleReference": "foo", - "mode": 99 - } - } - ] - } - } - ] - ], - "./node_modules/@types/bar/index.d.ts", - "./node_modules/@types/bar2/index.d.ts", - "./node_modules/foo2/index.d.ts", - "../../../../lib/lib.d.ts" - ] + "exportedModulesMap": {} }, "version": "FakeTSVersion", - "size": 1659 + "size": 760 } @@ -1819,21 +1790,45 @@ File '/home/src/projects/project/node_modules/foo2/package.json' exists accordin File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -exitCode:: ExitStatus.Success +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'CallableFunction'. + +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. + +error TS2318: Cannot find global type 'NewableFunction'. + +error TS2318: Cannot find global type 'Number'. + +error TS2318: Cannot find global type 'Object'. + +error TS2318: Cannot find global type 'RegExp'. + +error TS2318: Cannot find global type 'String'. + +error TS6053: File '/lib/lib.es2022.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2022' + + +Found 11 errors. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: -/lib/lib.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -Semantic diagnostics in builder refreshed for:: -/home/src/projects/project/node_modules/foo/index.d.ts -/home/src/projects/project/index.mts +No cached semantic diagnostics in the builder:: Shape signatures in builder refreshed for:: /home/src/projects/project/node_modules/foo/index.d.ts (used version) @@ -1842,13 +1837,12 @@ Shape signatures in builder refreshed for:: //// [/home/src/projects/project/index.mjs] file written with same contents //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../lib/lib.d.ts","./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"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":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[6],"options":{"module":100,"strict":true,"target":1},"fileIdsList":[[2,3,4,5]],"referencedMap":[[6,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[6,3,5,2,4,1]},"version":"FakeTSVersion"} +{"program":{"fileNames":["./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"fileInfos":[{"version":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[5],"options":{"module":100,"strict":true},"fileIdsList":[[1,2,3,4]],"referencedMap":[[5,1]],"exportedModulesMap":[]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { "program": { "fileNames": [ - "../../../../lib/lib.d.ts", "./node_modules/foo/index.d.ts", "./node_modules/@types/bar/index.d.ts", "./node_modules/foo2/index.d.ts", @@ -1864,17 +1858,6 @@ Shape signatures in builder refreshed for:: ] ], "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/foo/index.d.ts": { "original": { "version": "-5214938848-export declare const foo: number;", @@ -1924,14 +1907,13 @@ Shape signatures in builder refreshed for:: }, "root": [ [ - 6, + 5, "./index.mts" ] ], "options": { "module": 100, - "strict": true, - "target": 1 + "strict": true }, "referencedMap": { "./index.mts": [ @@ -1941,18 +1923,10 @@ Shape signatures in builder refreshed for:: "./node_modules/@types/bar2/index.d.ts" ] }, - "exportedModulesMap": {}, - "semanticDiagnosticsPerFile": [ - "./index.mts", - "./node_modules/@types/bar/index.d.ts", - "./node_modules/@types/bar2/index.d.ts", - "./node_modules/foo/index.d.ts", - "./node_modules/foo2/index.d.ts", - "../../../../lib/lib.d.ts" - ] + "exportedModulesMap": {} }, "version": "FakeTSVersion", - "size": 1450 + "size": 872 } @@ -2115,28 +2089,44 @@ File '/home/src/projects/project/node_modules/@types/bar/package.json' exists ac File '/home/src/projects/project/node_modules/foo2/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -home/src/projects/project/index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. - There are types at '/home/src/projects/project/node_modules/@types/bar2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar2' library may need to update its package.json or typings. +error TS2318: Cannot find global type 'Array'. -4 import { bar2 } from "bar2"; -   ~~~~~~ +error TS2318: Cannot find global type 'Boolean'. +error TS2318: Cannot find global type 'CallableFunction'. -Found 1 error in home/src/projects/project/index.mts:4 +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. + +error TS2318: Cannot find global type 'NewableFunction'. + +error TS2318: Cannot find global type 'Number'. + +error TS2318: Cannot find global type 'Object'. + +error TS2318: Cannot find global type 'RegExp'. + +error TS2318: Cannot find global type 'String'. + +error TS6053: File '/lib/lib.es2022.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2022' + + +Found 11 errors. exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: -/lib/lib.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/index.mts -Semantic diagnostics in builder refreshed for:: -/home/src/projects/project/index.mts +No cached semantic diagnostics in the builder:: Shape signatures in builder refreshed for:: /home/src/projects/project/index.mts (computed .d.ts) @@ -2144,13 +2134,12 @@ Shape signatures in builder refreshed for:: //// [/home/src/projects/project/index.mjs] file written with same contents //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../lib/lib.d.ts","./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./index.mts"],"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":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[5],"options":{"module":100,"strict":true,"target":1},"fileIdsList":[[2,3,4]],"referencedMap":[[5,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[[5,[{"file":"./index.mts","start":104,"length":6,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"bar2","mode":99}}]}}]],3,2,4,1]},"version":"FakeTSVersion"} +{"program":{"fileNames":["./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./index.mts"],"fileInfos":[{"version":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[4],"options":{"module":100,"strict":true},"fileIdsList":[[1,2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { "program": { "fileNames": [ - "../../../../lib/lib.d.ts", "./node_modules/foo/index.d.ts", "./node_modules/@types/bar/index.d.ts", "./node_modules/foo2/index.d.ts", @@ -2164,17 +2153,6 @@ Shape signatures in builder refreshed for:: ] ], "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/foo/index.d.ts": { "original": { "version": "-5214938848-export declare const foo: number;", @@ -2215,14 +2193,13 @@ Shape signatures in builder refreshed for:: }, "root": [ [ - 5, + 4, "./index.mts" ] ], "options": { "module": 100, - "strict": true, - "target": 1 + "strict": true }, "referencedMap": { "./index.mts": [ @@ -2231,41 +2208,10 @@ Shape signatures in builder refreshed for:: "./node_modules/foo2/index.d.ts" ] }, - "exportedModulesMap": {}, - "semanticDiagnosticsPerFile": [ - [ - "./index.mts", - [ - { - "file": "./index.mts", - "start": 104, - "length": 6, - "code": 7016, - "category": 1, - "messageText": { - "messageText": "Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type.", - "category": 1, - "code": 7016, - "next": [ - { - "info": { - "moduleReference": "bar2", - "mode": 99 - } - } - ] - } - } - ] - ], - "./node_modules/@types/bar/index.d.ts", - "./node_modules/foo/index.d.ts", - "./node_modules/foo2/index.d.ts", - "../../../../lib/lib.d.ts" - ] + "exportedModulesMap": {} }, "version": "FakeTSVersion", - "size": 1654 + "size": 751 } @@ -2458,33 +2404,43 @@ File '/home/src/projects/project/node_modules/foo/package.json' exists according File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -home/src/projects/project/index.mts:3:22 - error TS7016: Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type. - There are types at '/home/src/projects/project/node_modules/foo2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo2' library may need to update its package.json or typings. +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. -3 import { foo2 } from "foo2"; -   ~~~~~~ +error TS2318: Cannot find global type 'CallableFunction'. -home/src/projects/project/index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. - There are types at '/home/src/projects/project/node_modules/@types/bar2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar2' library may need to update its package.json or typings. +error TS2318: Cannot find global type 'Function'. -4 import { bar2 } from "bar2"; -   ~~~~~~ +error TS2318: Cannot find global type 'IArguments'. +error TS2318: Cannot find global type 'NewableFunction'. -Found 2 errors in the same file, starting at: home/src/projects/project/index.mts:3 +error TS2318: Cannot find global type 'Number'. + +error TS2318: Cannot find global type 'Object'. + +error TS2318: Cannot find global type 'RegExp'. + +error TS2318: Cannot find global type 'String'. + +error TS6053: File '/lib/lib.es2022.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2022' + + +Found 11 errors. exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: -/lib/lib.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts -Semantic diagnostics in builder refreshed for:: -/home/src/projects/project/index.mts +No cached semantic diagnostics in the builder:: Shape signatures in builder refreshed for:: /home/src/projects/project/index.mts (computed .d.ts) @@ -2492,13 +2448,12 @@ Shape signatures in builder refreshed for:: //// [/home/src/projects/project/index.mjs] file written with same contents //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../lib/lib.d.ts","./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./index.mts"],"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":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[4],"options":{"module":100,"strict":true,"target":1},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[[4,[{"file":"./index.mts","start":75,"length":6,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"foo2","mode":99}}]}},{"file":"./index.mts","start":104,"length":6,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"bar2","mode":99}}]}}]],3,2,1]},"version":"FakeTSVersion"} +{"program":{"fileNames":["./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./index.mts"],"fileInfos":[{"version":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[3],"options":{"module":100,"strict":true},"fileIdsList":[[1,2]],"referencedMap":[[3,1]],"exportedModulesMap":[]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { "program": { "fileNames": [ - "../../../../lib/lib.d.ts", "./node_modules/foo/index.d.ts", "./node_modules/@types/bar/index.d.ts", "./index.mts" @@ -2510,17 +2465,6 @@ Shape signatures in builder refreshed for:: ] ], "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/foo/index.d.ts": { "original": { "version": "-5214938848-export declare const foo: number;", @@ -2552,14 +2496,13 @@ Shape signatures in builder refreshed for:: }, "root": [ [ - 4, + 3, "./index.mts" ] ], "options": { "module": 100, - "strict": true, - "target": 1 + "strict": true }, "referencedMap": { "./index.mts": [ @@ -2567,60 +2510,10 @@ Shape signatures in builder refreshed for:: "./node_modules/@types/bar/index.d.ts" ] }, - "exportedModulesMap": {}, - "semanticDiagnosticsPerFile": [ - [ - "./index.mts", - [ - { - "file": "./index.mts", - "start": 75, - "length": 6, - "code": 7016, - "category": 1, - "messageText": { - "messageText": "Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type.", - "category": 1, - "code": 7016, - "next": [ - { - "info": { - "moduleReference": "foo2", - "mode": 99 - } - } - ] - } - }, - { - "file": "./index.mts", - "start": 104, - "length": 6, - "code": 7016, - "category": 1, - "messageText": { - "messageText": "Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type.", - "category": 1, - "code": 7016, - "next": [ - { - "info": { - "moduleReference": "bar2", - "mode": 99 - } - } - ] - } - } - ] - ], - "./node_modules/@types/bar/index.d.ts", - "./node_modules/foo/index.d.ts", - "../../../../lib/lib.d.ts" - ] + "exportedModulesMap": {} }, "version": "FakeTSVersion", - "size": 1860 + "size": 637 } @@ -2813,32 +2706,43 @@ File '/home/src/projects/project/node_modules/foo/package.json' exists according File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -home/src/projects/project/index.mts:3:22 - error TS7016: Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type. - There are types at '/home/src/projects/project/node_modules/foo2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo2' library may need to update its package.json or typings. +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'CallableFunction'. + +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. + +error TS2318: Cannot find global type 'NewableFunction'. + +error TS2318: Cannot find global type 'Number'. -3 import { foo2 } from "foo2"; -   ~~~~~~ +error TS2318: Cannot find global type 'Object'. -home/src/projects/project/index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. - Try `npm i --save-dev @types/bar2` if it exists or add a new declaration (.d.ts) file containing `declare module 'bar2';` +error TS2318: Cannot find global type 'RegExp'. -4 import { bar2 } from "bar2"; -   ~~~~~~ +error TS2318: Cannot find global type 'String'. +error TS6053: File '/lib/lib.es2022.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2022' -Found 2 errors in the same file, starting at: home/src/projects/project/index.mts:3 + +Found 11 errors. exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: -/lib/lib.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts -Semantic diagnostics in builder refreshed for:: +No cached semantic diagnostics in the builder:: No shapes updated in the builder:: @@ -3046,32 +2950,43 @@ File '/home/src/projects/project/node_modules/foo/package.json' exists according File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -home/src/projects/project/index.mts:3:22 - error TS7016: Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type. - Try `npm i --save-dev @types/foo2` if it exists or add a new declaration (.d.ts) file containing `declare module 'foo2';` +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'CallableFunction'. + +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. + +error TS2318: Cannot find global type 'NewableFunction'. -3 import { foo2 } from "foo2"; -   ~~~~~~ +error TS2318: Cannot find global type 'Number'. -home/src/projects/project/index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. - Try `npm i --save-dev @types/bar2` if it exists or add a new declaration (.d.ts) file containing `declare module 'bar2';` +error TS2318: Cannot find global type 'Object'. -4 import { bar2 } from "bar2"; -   ~~~~~~ +error TS2318: Cannot find global type 'RegExp'. +error TS2318: Cannot find global type 'String'. -Found 2 errors in the same file, starting at: home/src/projects/project/index.mts:3 +error TS6053: File '/lib/lib.es2022.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2022' + + +Found 11 errors. exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: -/lib/lib.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts -Semantic diagnostics in builder refreshed for:: +No cached semantic diagnostics in the builder:: No shapes updated in the builder:: @@ -3268,32 +3183,43 @@ File '/home/src/projects/project/node_modules/foo/package.json' exists according File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -home/src/projects/project/index.mts:3:22 - error TS7016: Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type. - Try `npm i --save-dev @types/foo2` if it exists or add a new declaration (.d.ts) file containing `declare module 'foo2';` +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'CallableFunction'. + +error TS2318: Cannot find global type 'Function'. -3 import { foo2 } from "foo2"; -   ~~~~~~ +error TS2318: Cannot find global type 'IArguments'. -home/src/projects/project/index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. - There are types at '/home/src/projects/project/node_modules/@types/bar2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar2' library may need to update its package.json or typings. +error TS2318: Cannot find global type 'NewableFunction'. -4 import { bar2 } from "bar2"; -   ~~~~~~ +error TS2318: Cannot find global type 'Number'. +error TS2318: Cannot find global type 'Object'. -Found 2 errors in the same file, starting at: home/src/projects/project/index.mts:3 +error TS2318: Cannot find global type 'RegExp'. + +error TS2318: Cannot find global type 'String'. + +error TS6053: File '/lib/lib.es2022.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2022' + + +Found 11 errors. exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: -/lib/lib.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts -Semantic diagnostics in builder refreshed for:: +No cached semantic diagnostics in the builder:: No shapes updated in the builder:: @@ -3477,32 +3403,43 @@ File '/home/src/projects/project/node_modules/foo/package.json' exists according File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -home/src/projects/project/index.mts:3:22 - error TS7016: Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type. - There are types at '/home/src/projects/project/node_modules/foo2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo2' library may need to update its package.json or typings. +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'CallableFunction'. + +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. + +error TS2318: Cannot find global type 'NewableFunction'. + +error TS2318: Cannot find global type 'Number'. + +error TS2318: Cannot find global type 'Object'. -3 import { foo2 } from "foo2"; -   ~~~~~~ +error TS2318: Cannot find global type 'RegExp'. -home/src/projects/project/index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. - There are types at '/home/src/projects/project/node_modules/@types/bar2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar2' library may need to update its package.json or typings. +error TS2318: Cannot find global type 'String'. -4 import { bar2 } from "bar2"; -   ~~~~~~ +error TS6053: File '/lib/lib.es2022.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2022' -Found 2 errors in the same file, starting at: home/src/projects/project/index.mts:3 +Found 11 errors. exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: -/lib/lib.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts -Semantic diagnostics in builder refreshed for:: +No cached semantic diagnostics in the builder:: No shapes updated in the builder:: diff --git a/tests/baselines/reference/tscWatch/moduleResolution/node10Result.js b/tests/baselines/reference/tscWatch/moduleResolution/node10Result.js index a6738fd67eac8..9faffcf1977f0 100644 --- a/tests/baselines/reference/tscWatch/moduleResolution/node10Result.js +++ b/tests/baselines/reference/tscWatch/moduleResolution/node10Result.js @@ -123,8 +123,21 @@ import { foo2 } from "foo2"; import { bar2 } from "bar2"; +//// [/a/lib/lib.es2022.full.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; } + //// [/home/src/projects/project/tsconfig.json] -{"compilerOptions":{"target":"es5","module":"node16","moduleResolution":"node16","traceResolution":true,"incremental":true,"strict":true,"types":[]},"files":["index.mts"]} +{"compilerOptions":{"module":"node16","moduleResolution":"node16","traceResolution":true,"incremental":true,"strict":true,"types":[]},"files":["index.mts"]} //// [/a/lib/lib.d.ts] /// @@ -142,14 +155,14 @@ interface Array { length: number; [n: number]: T; } /a/lib/tsc.js -w --extendedDiagnostics Output:: -[12:01:13 AM] Starting compilation in watch mode... +[12:01:15 AM] Starting compilation in watch mode... Current directory: /home/src/projects/project CaseSensitiveFileNames: false FileWatcher:: Added:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined Config file Synchronizing program CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] - options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} + options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} FileWatcher:: Added:: WatchInfo: /home/src/projects/project/index.mts 250 undefined Source file ======== Resolving module 'foo' from '/home/src/projects/project/index.mts'. ======== Explicitly specified module resolution kind: 'Node16'. @@ -322,7 +335,7 @@ FileWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types/ 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 +FileWatcher:: Added:: WatchInfo: /a/lib/lib.es2022.full.d.ts 250 undefined Source file DirectoryWatcher:: Added:: WatchInfo: /home/src/projects 0 undefined Failed Lookup Locations Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects 0 undefined Failed Lookup Locations DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Failed Lookup Locations @@ -355,7 +368,7 @@ Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/tscon 2 import { bar } from "bar";    ~~~~~ -[12:01:18 AM] Found 2 errors. Watching for file changes. +[12:01:20 AM] Found 2 errors. Watching for file changes. DirectoryWatcher:: Triggered with /home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt :: WatchInfo: /home/src/projects/project 0 undefined Failed Lookup Locations Scheduling invalidateFailedLookup, Cancelled earlier one @@ -363,22 +376,22 @@ Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/tscon Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: -/a/lib/lib.d.ts +/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts Semantic diagnostics in builder refreshed for:: -/a/lib/lib.d.ts +/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts Shape signatures in builder refreshed for:: -/a/lib/lib.d.ts (used version) +/a/lib/lib.es2022.full.d.ts (used version) /home/src/projects/project/node_modules/foo2/index.d.ts (used version) /home/src/projects/project/node_modules/@types/bar2/index.d.ts (used version) /home/src/projects/project/index.mts (used version) @@ -388,7 +401,7 @@ PolledWatches:: {"pollingInterval":500} FsWatches:: -/a/lib/lib.d.ts: *new* +/a/lib/lib.es2022.full.d.ts: *new* {} /home/src/projects: *new* {} @@ -426,13 +439,13 @@ export {}; //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"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":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","impliedFormat":99}],"root":[4],"options":{"module":100,"strict":true,"target":1},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,[4,[{"file":"./index.mts","start":20,"length":5,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"foo","mode":99}}]}},{"file":"./index.mts","start":47,"length":5,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"bar","mode":99}}]}}]],3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.es2022.full.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"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":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","impliedFormat":99}],"root":[4],"options":{"module":100,"strict":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,[4,[{"file":"./index.mts","start":20,"length":5,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"foo","mode":99}}]}},{"file":"./index.mts","start":47,"length":5,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"bar","mode":99}}]}}]],3,2]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { "program": { "fileNames": [ - "../../../../a/lib/lib.d.ts", + "../../../../a/lib/lib.es2022.full.d.ts", "./node_modules/foo2/index.d.ts", "./node_modules/@types/bar2/index.d.ts", "./index.mts" @@ -444,7 +457,7 @@ export {}; ] ], "fileInfos": { - "../../../../a/lib/lib.d.ts": { + "../../../../a/lib/lib.es2022.full.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, @@ -491,8 +504,7 @@ export {}; ], "options": { "module": 100, - "strict": true, - "target": 1 + "strict": true }, "referencedMap": { "./index.mts": [ @@ -507,7 +519,7 @@ export {}; ] }, "semanticDiagnosticsPerFile": [ - "../../../../a/lib/lib.d.ts", + "../../../../a/lib/lib.es2022.full.d.ts", [ "./index.mts", [ @@ -558,7 +570,7 @@ export {}; ] }, "version": "FakeTSVersion", - "size": 1745 + "size": 1746 } @@ -580,11 +592,11 @@ Scheduling invalidateFailedLookup, Cancelled earlier one Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/node_modules/@types/bar/index.d.ts :: WatchInfo: /home/src/projects/project/node_modules 1 undefined Failed Lookup Locations Scheduling update Synchronizing program -[12:01:22 AM] File change detected. Starting incremental compilation... +[12:01:24 AM] File change detected. Starting incremental compilation... CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] - options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} + options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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. @@ -690,15 +702,15 @@ File '/package.json' does not exist according to earlier cached lookups. 2 import { bar } from "bar";    ~~~~~ -[12:01:23 AM] Found 2 errors. Watching for file changes. +[12:01:25 AM] Found 2 errors. Watching for file changes. Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: -/a/lib/lib.d.ts +/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts @@ -728,11 +740,11 @@ Scheduling invalidateFailedLookup Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/node_modules/foo/index.d.ts :: WatchInfo: /home/src/projects/project/node_modules 1 undefined Failed Lookup Locations Scheduling update Synchronizing program -[12:01:26 AM] File change detected. Starting incremental compilation... +[12:01:28 AM] File change detected. Starting incremental compilation... CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] - options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} + options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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. @@ -819,15 +831,15 @@ File '/package.json' does not exist according to earlier cached lookups. 2 import { bar } from "bar";    ~~~~~ -[12:01:27 AM] Found 2 errors. Watching for file changes. +[12:01:29 AM] Found 2 errors. Watching for file changes. Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: -/a/lib/lib.d.ts +/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts @@ -859,11 +871,11 @@ Scheduling invalidateFailedLookup Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/node_modules/@types/bar/index.d.ts :: WatchInfo: /home/src/projects/project/node_modules 1 undefined Failed Lookup Locations Scheduling update Synchronizing program -[12:01:30 AM] File change detected. Starting incremental compilation... +[12:01:32 AM] File change detected. Starting incremental compilation... CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] - options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} + options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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. @@ -956,15 +968,15 @@ File '/package.json' does not exist according to earlier cached lookups. 2 import { bar } from "bar";    ~~~~~ -[12:01:31 AM] Found 2 errors. Watching for file changes. +[12:01:33 AM] Found 2 errors. Watching for file changes. Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: -/a/lib/lib.d.ts +/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts @@ -996,11 +1008,11 @@ Scheduling invalidateFailedLookup Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/node_modules/foo/index.d.ts :: WatchInfo: /home/src/projects/project/node_modules 1 undefined Failed Lookup Locations Scheduling update Synchronizing program -[12:01:35 AM] File change detected. Starting incremental compilation... +[12:01:37 AM] File change detected. Starting incremental compilation... CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] - options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} + options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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. @@ -1074,15 +1086,15 @@ File '/package.json' does not exist according to earlier cached lookups. 2 import { bar } from "bar";    ~~~~~ -[12:01:36 AM] Found 2 errors. Watching for file changes. +[12:01:38 AM] Found 2 errors. Watching for file changes. Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: -/a/lib/lib.d.ts +/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts @@ -1124,11 +1136,11 @@ Scheduling invalidateFailedLookup Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/node_modules/@types/bar/package.json 1:: WatchInfo: /home/src/projects/project/node_modules/@types/bar/package.json 2000 undefined File location affecting resolution Scheduling update Synchronizing program -[12:01:40 AM] File change detected. Starting incremental compilation... +[12:01:42 AM] File change detected. Starting incremental compilation... CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] - options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} + options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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. @@ -1179,15 +1191,15 @@ File '/package.json' does not exist according to earlier cached lookups. 1 import { foo } from "foo";    ~~~~~ -[12:01:47 AM] Found 1 error. Watching for file changes. +[12:01:49 AM] Found 1 error. Watching for file changes. Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: -/a/lib/lib.d.ts +/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts @@ -1206,7 +1218,7 @@ PolledWatches:: {"pollingInterval":500} FsWatches:: -/a/lib/lib.d.ts: +/a/lib/lib.es2022.full.d.ts: {} /home/src/projects: {} @@ -1243,13 +1255,13 @@ exitCode:: ExitStatus.undefined //// [/home/src/projects/project/index.mjs] file written with same contents //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"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":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[5],"options":{"module":100,"strict":true,"target":1},"fileIdsList":[[2,3,4]],"referencedMap":[[5,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,[5,[{"file":"./index.mts","start":20,"length":5,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"foo","mode":99}}]}}]],2,4,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.es2022.full.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"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":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[5],"options":{"module":100,"strict":true},"fileIdsList":[[2,3,4]],"referencedMap":[[5,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,[5,[{"file":"./index.mts","start":20,"length":5,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"foo","mode":99}}]}}]],2,4,3]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { "program": { "fileNames": [ - "../../../../a/lib/lib.d.ts", + "../../../../a/lib/lib.es2022.full.d.ts", "./node_modules/@types/bar/index.d.ts", "./node_modules/foo2/index.d.ts", "./node_modules/@types/bar2/index.d.ts", @@ -1263,7 +1275,7 @@ exitCode:: ExitStatus.undefined ] ], "fileInfos": { - "../../../../a/lib/lib.d.ts": { + "../../../../a/lib/lib.es2022.full.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, @@ -1320,8 +1332,7 @@ exitCode:: ExitStatus.undefined ], "options": { "module": 100, - "strict": true, - "target": 1 + "strict": true }, "referencedMap": { "./index.mts": [ @@ -1332,7 +1343,7 @@ exitCode:: ExitStatus.undefined }, "exportedModulesMap": {}, "semanticDiagnosticsPerFile": [ - "../../../../a/lib/lib.d.ts", + "../../../../a/lib/lib.es2022.full.d.ts", [ "./index.mts", [ @@ -1364,7 +1375,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1581 + "size": 1582 } @@ -1400,11 +1411,11 @@ Scheduling invalidateFailedLookup Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/node_modules/foo/package.json 1:: WatchInfo: /home/src/projects/project/node_modules/foo/package.json 2000 undefined File location affecting resolution Scheduling update Synchronizing program -[12:01:55 AM] File change detected. Starting incremental compilation... +[12:01:57 AM] File change detected. Starting incremental compilation... CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] - options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} + options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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. @@ -1443,15 +1454,15 @@ File '/a/package.json' does not exist according to earlier cached lookups. File '/package.json' does not exist according to earlier cached lookups. DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Failed Lookup Locations Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Failed Lookup Locations -[12:02:02 AM] Found 0 errors. Watching for file changes. +[12:02:04 AM] Found 0 errors. Watching for file changes. Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: -/a/lib/lib.d.ts +/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts @@ -1471,7 +1482,7 @@ PolledWatches *deleted*:: {"pollingInterval":500} FsWatches:: -/a/lib/lib.d.ts: +/a/lib/lib.es2022.full.d.ts: {} /home/src/projects: {} @@ -1510,13 +1521,13 @@ exitCode:: ExitStatus.undefined //// [/home/src/projects/project/index.mjs] file written with same contents //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"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":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[6],"options":{"module":100,"strict":true,"target":1},"fileIdsList":[[2,3,4,5]],"referencedMap":[[6,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,6,3,5,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.es2022.full.d.ts","./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"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":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[6],"options":{"module":100,"strict":true},"fileIdsList":[[2,3,4,5]],"referencedMap":[[6,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,6,3,5,2,4]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { "program": { "fileNames": [ - "../../../../a/lib/lib.d.ts", + "../../../../a/lib/lib.es2022.full.d.ts", "./node_modules/foo/index.d.ts", "./node_modules/@types/bar/index.d.ts", "./node_modules/foo2/index.d.ts", @@ -1532,7 +1543,7 @@ exitCode:: ExitStatus.undefined ] ], "fileInfos": { - "../../../../a/lib/lib.d.ts": { + "../../../../a/lib/lib.es2022.full.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, @@ -1598,8 +1609,7 @@ exitCode:: ExitStatus.undefined ], "options": { "module": 100, - "strict": true, - "target": 1 + "strict": true }, "referencedMap": { "./index.mts": [ @@ -1611,7 +1621,7 @@ exitCode:: ExitStatus.undefined }, "exportedModulesMap": {}, "semanticDiagnosticsPerFile": [ - "../../../../a/lib/lib.d.ts", + "../../../../a/lib/lib.es2022.full.d.ts", "./index.mts", "./node_modules/@types/bar/index.d.ts", "./node_modules/@types/bar2/index.d.ts", @@ -1620,7 +1630,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1372 + "size": 1373 } @@ -1653,11 +1663,11 @@ Scheduling invalidateFailedLookup Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/node_modules/@types/bar2/package.json 1:: WatchInfo: /home/src/projects/project/node_modules/@types/bar2/package.json 2000 undefined File location affecting resolution Scheduling update Synchronizing program -[12:02:09 AM] File change detected. Starting incremental compilation... +[12:02:11 AM] File change detected. Starting incremental compilation... CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] - options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} + options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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. @@ -1751,15 +1761,15 @@ Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modu 4 import { bar2 } from "bar2";    ~~~~~~ -[12:02:16 AM] Found 1 error. Watching for file changes. +[12:02:18 AM] Found 1 error. Watching for file changes. Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: -/a/lib/lib.d.ts +/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts @@ -1776,7 +1786,7 @@ PolledWatches:: {"pollingInterval":500} FsWatches:: -/a/lib/lib.d.ts: +/a/lib/lib.es2022.full.d.ts: {} /home/src/projects: {} @@ -1817,13 +1827,13 @@ exitCode:: ExitStatus.undefined //// [/home/src/projects/project/index.mjs] file written with same contents //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./index.mts"],"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":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[5],"options":{"module":100,"strict":true,"target":1},"fileIdsList":[[2,3,4]],"referencedMap":[[5,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,[5,[{"file":"./index.mts","start":104,"length":6,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"bar2","mode":99}}]}}]],3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.es2022.full.d.ts","./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./index.mts"],"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":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[5],"options":{"module":100,"strict":true},"fileIdsList":[[2,3,4]],"referencedMap":[[5,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,[5,[{"file":"./index.mts","start":104,"length":6,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"bar2","mode":99}}]}}]],3,2,4]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { "program": { "fileNames": [ - "../../../../a/lib/lib.d.ts", + "../../../../a/lib/lib.es2022.full.d.ts", "./node_modules/foo/index.d.ts", "./node_modules/@types/bar/index.d.ts", "./node_modules/foo2/index.d.ts", @@ -1837,7 +1847,7 @@ exitCode:: ExitStatus.undefined ] ], "fileInfos": { - "../../../../a/lib/lib.d.ts": { + "../../../../a/lib/lib.es2022.full.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, @@ -1894,8 +1904,7 @@ exitCode:: ExitStatus.undefined ], "options": { "module": 100, - "strict": true, - "target": 1 + "strict": true }, "referencedMap": { "./index.mts": [ @@ -1906,7 +1915,7 @@ exitCode:: ExitStatus.undefined }, "exportedModulesMap": {}, "semanticDiagnosticsPerFile": [ - "../../../../a/lib/lib.d.ts", + "../../../../a/lib/lib.es2022.full.d.ts", [ "./index.mts", [ @@ -1938,7 +1947,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1576 + "size": 1577 } @@ -1973,11 +1982,11 @@ Scheduling invalidateFailedLookup Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/node_modules/foo2/package.json 1:: WatchInfo: /home/src/projects/project/node_modules/foo2/package.json 2000 undefined File location affecting resolution Scheduling update Synchronizing program -[12:02:24 AM] File change detected. Starting incremental compilation... +[12:02:26 AM] File change detected. Starting incremental compilation... CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] - options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} + options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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. @@ -2053,15 +2062,15 @@ FileWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/foo2/in 4 import { bar2 } from "bar2";    ~~~~~~ -[12:02:31 AM] Found 2 errors. Watching for file changes. +[12:02:33 AM] Found 2 errors. Watching for file changes. Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: -/a/lib/lib.d.ts +/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts @@ -2077,7 +2086,7 @@ PolledWatches:: {"pollingInterval":500} FsWatches:: -/a/lib/lib.d.ts: +/a/lib/lib.es2022.full.d.ts: {} /home/src/projects: {} @@ -2116,13 +2125,13 @@ exitCode:: ExitStatus.undefined //// [/home/src/projects/project/index.mjs] file written with same contents //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./index.mts"],"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":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[4],"options":{"module":100,"strict":true,"target":1},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,[4,[{"file":"./index.mts","start":75,"length":6,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"foo2","mode":99}}]}},{"file":"./index.mts","start":104,"length":6,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"bar2","mode":99}}]}}]],3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.es2022.full.d.ts","./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./index.mts"],"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":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[4],"options":{"module":100,"strict":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,[4,[{"file":"./index.mts","start":75,"length":6,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"foo2","mode":99}}]}},{"file":"./index.mts","start":104,"length":6,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"bar2","mode":99}}]}}]],3,2]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { "program": { "fileNames": [ - "../../../../a/lib/lib.d.ts", + "../../../../a/lib/lib.es2022.full.d.ts", "./node_modules/foo/index.d.ts", "./node_modules/@types/bar/index.d.ts", "./index.mts" @@ -2134,7 +2143,7 @@ exitCode:: ExitStatus.undefined ] ], "fileInfos": { - "../../../../a/lib/lib.d.ts": { + "../../../../a/lib/lib.es2022.full.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, @@ -2182,8 +2191,7 @@ exitCode:: ExitStatus.undefined ], "options": { "module": 100, - "strict": true, - "target": 1 + "strict": true }, "referencedMap": { "./index.mts": [ @@ -2193,7 +2201,7 @@ exitCode:: ExitStatus.undefined }, "exportedModulesMap": {}, "semanticDiagnosticsPerFile": [ - "../../../../a/lib/lib.d.ts", + "../../../../a/lib/lib.es2022.full.d.ts", [ "./index.mts", [ @@ -2244,7 +2252,7 @@ exitCode:: ExitStatus.undefined ] }, "version": "FakeTSVersion", - "size": 1782 + "size": 1783 } @@ -2266,11 +2274,11 @@ Scheduling invalidateFailedLookup Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/node_modules/@types/bar2/index.d.ts :: WatchInfo: /home/src/projects/project/node_modules 1 undefined Failed Lookup Locations Scheduling update Synchronizing program -[12:02:36 AM] File change detected. Starting incremental compilation... +[12:02:38 AM] File change detected. Starting incremental compilation... CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] - options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} + options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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. @@ -2376,15 +2384,15 @@ File '/package.json' does not exist according to earlier cached lookups. 4 import { bar2 } from "bar2";    ~~~~~~ -[12:02:37 AM] Found 2 errors. Watching for file changes. +[12:02:39 AM] Found 2 errors. Watching for file changes. Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: -/a/lib/lib.d.ts +/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts @@ -2414,11 +2422,11 @@ Scheduling invalidateFailedLookup Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/node_modules/foo2/index.d.ts :: WatchInfo: /home/src/projects/project/node_modules 1 undefined Failed Lookup Locations Scheduling update Synchronizing program -[12:02:40 AM] File change detected. Starting incremental compilation... +[12:02:42 AM] File change detected. Starting incremental compilation... CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] - options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} + options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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. @@ -2505,15 +2513,15 @@ File '/package.json' does not exist according to earlier cached lookups. 4 import { bar2 } from "bar2";    ~~~~~~ -[12:02:41 AM] Found 2 errors. Watching for file changes. +[12:02:43 AM] Found 2 errors. Watching for file changes. Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: -/a/lib/lib.d.ts +/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts @@ -2545,11 +2553,11 @@ Scheduling invalidateFailedLookup Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/node_modules/@types/bar2/index.d.ts :: WatchInfo: /home/src/projects/project/node_modules 1 undefined Failed Lookup Locations Scheduling update Synchronizing program -[12:02:44 AM] File change detected. Starting incremental compilation... +[12:02:46 AM] File change detected. Starting incremental compilation... CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] - options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} + options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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. @@ -2642,15 +2650,15 @@ File '/package.json' does not exist according to earlier cached lookups. 4 import { bar2 } from "bar2";    ~~~~~~ -[12:02:45 AM] Found 2 errors. Watching for file changes. +[12:02:47 AM] Found 2 errors. Watching for file changes. Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: -/a/lib/lib.d.ts +/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts @@ -2682,11 +2690,11 @@ Scheduling invalidateFailedLookup Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/node_modules/foo2/index.d.ts :: WatchInfo: /home/src/projects/project/node_modules 1 undefined Failed Lookup Locations Scheduling update Synchronizing program -[12:02:49 AM] File change detected. Starting incremental compilation... +[12:02:51 AM] File change detected. Starting incremental compilation... CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] - options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} + options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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. @@ -2760,15 +2768,15 @@ File '/package.json' does not exist according to earlier cached lookups. 4 import { bar2 } from "bar2";    ~~~~~~ -[12:02:50 AM] Found 2 errors. Watching for file changes. +[12:02:52 AM] Found 2 errors. Watching for file changes. Program root files: ["/home/src/projects/project/index.mts"] -Program options: {"target":1,"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} +Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: -/a/lib/lib.d.ts +/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts diff --git a/tests/baselines/reference/tsserver/moduleResolution/node10Result.js b/tests/baselines/reference/tsserver/moduleResolution/node10Result.js index 7d06d88bd4247..bd390b243b7d4 100644 --- a/tests/baselines/reference/tsserver/moduleResolution/node10Result.js +++ b/tests/baselines/reference/tsserver/moduleResolution/node10Result.js @@ -124,8 +124,21 @@ import { foo2 } from "foo2"; import { bar2 } from "bar2"; +//// [/a/lib/lib.es2022.full.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; } + //// [/home/src/projects/project/tsconfig.json] -{"compilerOptions":{"target":"es5","module":"node16","moduleResolution":"node16","traceResolution":true,"incremental":true,"strict":true,"types":[]},"files":["index.mts"]} +{"compilerOptions":{"module":"node16","moduleResolution":"node16","traceResolution":true,"incremental":true,"strict":true,"types":[]},"files":["index.mts"]} //// [/a/lib/lib.d.ts] /// @@ -169,7 +182,6 @@ Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/tsconfig.json : { "/home/src/projects/project/index.mts" ], "options": { - "target": 1, "module": 100, "moduleResolution": 3, "traceResolution": true, @@ -351,7 +363,7 @@ Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/@types/ba Info seq [hh:mm:ss:mss] File '/a/lib/package.json' does not exist. Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist. Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/lib/lib.es2022.full.d.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects 0 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects 0 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations @@ -369,14 +381,14 @@ Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/pro Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" + /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /home/src/projects/project/node_modules/foo2/index.d.ts Text-1 "export declare const foo2: number;" /home/src/projects/project/node_modules/@types/bar2/index.d.ts Text-1 "export declare const bar2: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" - ../../../../a/lib/lib.d.ts - Default library for target 'es5' + ../../../../a/lib/lib.es2022.full.d.ts + Default library for target 'es2022' node_modules/foo2/index.d.ts Imported via "foo2" from file 'index.mts' with packageId 'foo2/index.d.ts@1.0.0' File is CommonJS module because 'node_modules/foo2/package.json' does not have field "type" @@ -420,7 +432,6 @@ Info seq [hh:mm:ss:mss] event: "deferredSize": 0 }, "compilerOptions": { - "target": "es5", "module": "node16", "moduleResolution": "node16", "traceResolution": true, @@ -474,7 +485,7 @@ PolledWatches:: {"pollingInterval":500} FsWatches:: -/a/lib/lib.d.ts: *new* +/a/lib/lib.es2022.full.d.ts: *new* {} /home/src/projects: *new* {} @@ -801,7 +812,7 @@ Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlie Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 2 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" + /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /home/src/projects/project/node_modules/foo2/index.d.ts Text-1 "export declare const foo2: number;" /home/src/projects/project/node_modules/@types/bar2/index.d.ts Text-1 "export declare const bar2: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" @@ -945,7 +956,7 @@ Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlie Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 3 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" + /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /home/src/projects/project/node_modules/foo2/index.d.ts Text-1 "export declare const foo2: number;" /home/src/projects/project/node_modules/@types/bar2/index.d.ts Text-1 "export declare const bar2: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" @@ -1177,7 +1188,7 @@ Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlie Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 4 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" + /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /home/src/projects/project/node_modules/foo2/index.d.ts Text-1 "export declare const foo2: number;" /home/src/projects/project/node_modules/@types/bar2/index.d.ts Text-1 "export declare const bar2: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" @@ -1390,7 +1401,7 @@ Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlie Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 5 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" + /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /home/src/projects/project/node_modules/foo2/index.d.ts Text-1 "export declare const foo2: number;" /home/src/projects/project/node_modules/@types/bar2/index.d.ts Text-1 "export declare const bar2: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" @@ -1593,15 +1604,15 @@ Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlie Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 6 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (5) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" + /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /home/src/projects/project/node_modules/@types/bar/index.d.ts Text-1 "export declare const bar: number;" /home/src/projects/project/node_modules/foo2/index.d.ts Text-1 "export declare const foo2: number;" /home/src/projects/project/node_modules/@types/bar2/index.d.ts Text-1 "export declare const bar2: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" - ../../../../a/lib/lib.d.ts - Default library for target 'es5' + ../../../../a/lib/lib.es2022.full.d.ts + Default library for target 'es2022' node_modules/@types/bar/index.d.ts Imported via "bar" from file 'index.mts' with packageId '@types/bar/index.d.ts@1.0.0' File is CommonJS module because 'node_modules/@types/bar/package.json' does not have field "type" @@ -1795,7 +1806,7 @@ Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /ho Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 7 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (6) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" + /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /home/src/projects/project/node_modules/foo/index.d.ts Text-1 "export declare const foo: number;" /home/src/projects/project/node_modules/@types/bar/index.d.ts Text-1 "export declare const bar: number;" /home/src/projects/project/node_modules/foo2/index.d.ts Text-1 "export declare const foo2: number;" @@ -1803,8 +1814,8 @@ Info seq [hh:mm:ss:mss] Files (6) /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" - ../../../../a/lib/lib.d.ts - Default library for target 'es5' + ../../../../a/lib/lib.es2022.full.d.ts + Default library for target 'es2022' node_modules/foo/index.d.ts Imported via "foo" from file 'index.mts' with packageId 'foo/index.d.ts@1.0.0' File is CommonJS module because 'node_modules/foo/package.json' does not have field "type" @@ -1839,7 +1850,7 @@ PolledWatches *deleted*:: {"pollingInterval":500} FsWatches:: -/a/lib/lib.d.ts: +/a/lib/lib.es2022.full.d.ts: {} /home/src/projects: {} @@ -2063,15 +2074,15 @@ Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /ho Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 8 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (5) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" + /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /home/src/projects/project/node_modules/foo/index.d.ts Text-1 "export declare const foo: number;" /home/src/projects/project/node_modules/@types/bar/index.d.ts Text-1 "export declare const bar: number;" /home/src/projects/project/node_modules/foo2/index.d.ts Text-1 "export declare const foo2: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" - ../../../../a/lib/lib.d.ts - Default library for target 'es5' + ../../../../a/lib/lib.es2022.full.d.ts + Default library for target 'es2022' node_modules/foo/index.d.ts Imported via "foo" from file 'index.mts' with packageId 'foo/index.d.ts@1.0.0' File is CommonJS module because 'node_modules/foo/package.json' does not have field "type" @@ -2103,7 +2114,7 @@ PolledWatches:: {"pollingInterval":500} FsWatches:: -/a/lib/lib.d.ts: +/a/lib/lib.es2022.full.d.ts: {} /home/src/projects: {} @@ -2319,14 +2330,14 @@ Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlie Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 9 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" + /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /home/src/projects/project/node_modules/foo/index.d.ts Text-1 "export declare const foo: number;" /home/src/projects/project/node_modules/@types/bar/index.d.ts Text-1 "export declare const bar: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" - ../../../../a/lib/lib.d.ts - Default library for target 'es5' + ../../../../a/lib/lib.es2022.full.d.ts + Default library for target 'es2022' node_modules/foo/index.d.ts Imported via "foo" from file 'index.mts' with packageId 'foo/index.d.ts@1.0.0' File is CommonJS module because 'node_modules/foo/package.json' does not have field "type" @@ -2574,7 +2585,7 @@ Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlie Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 10 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" + /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /home/src/projects/project/node_modules/foo/index.d.ts Text-1 "export declare const foo: number;" /home/src/projects/project/node_modules/@types/bar/index.d.ts Text-1 "export declare const bar: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" @@ -2798,7 +2809,7 @@ Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlie Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 11 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" + /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /home/src/projects/project/node_modules/foo/index.d.ts Text-1 "export declare const foo: number;" /home/src/projects/project/node_modules/@types/bar/index.d.ts Text-1 "export declare const bar: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" @@ -3030,7 +3041,7 @@ Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlie Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 12 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" + /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /home/src/projects/project/node_modules/foo/index.d.ts Text-1 "export declare const foo: number;" /home/src/projects/project/node_modules/@types/bar/index.d.ts Text-1 "export declare const bar: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" @@ -3243,7 +3254,7 @@ Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlie Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 13 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" + /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /home/src/projects/project/node_modules/foo/index.d.ts Text-1 "export declare const foo: number;" /home/src/projects/project/node_modules/@types/bar/index.d.ts Text-1 "export declare const bar: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" From 34cf76ca3bcfa14dadc925b884d007e75bb342d3 Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Mon, 26 Jun 2023 14:30:23 -0700 Subject: [PATCH 5/9] Replace lib file instead of changing target --- .../forceConsistentCasingInFileNames.ts | 3 +-- .../unittests/tscWatch/moduleResolution.ts | 13 +++++++++---- .../with-nodeNext-resolution.js | 18 +++++++++--------- .../moduleResolution/diagnostics-from-cache.js | 16 ++++++++-------- .../type-reference-resolutions-reuse.js | 18 +++++++++--------- 5 files changed, 36 insertions(+), 32 deletions(-) diff --git a/src/testRunner/unittests/tscWatch/forceConsistentCasingInFileNames.ts b/src/testRunner/unittests/tscWatch/forceConsistentCasingInFileNames.ts index 9eb0a025deb5a..635ad80aff0e1 100644 --- a/src/testRunner/unittests/tscWatch/forceConsistentCasingInFileNames.ts +++ b/src/testRunner/unittests/tscWatch/forceConsistentCasingInFileNames.ts @@ -295,14 +295,13 @@ a;b; }), "/Users/name/projects/web/tsconfig.json": JSON.stringify({ compilerOptions: { - target: "es5", module: "nodenext", moduleResolution: "nodenext", forceConsistentCasingInFileNames: true, traceResolution: true, } }), - [libFile.path]: libFile.content, + [libFile.path.replace("lib.d.ts", "lib.esnext.full.d.ts")]: libFile.content, }, { currentDirectory: "/Users/name/projects/web" }), }); diff --git a/src/testRunner/unittests/tscWatch/moduleResolution.ts b/src/testRunner/unittests/tscWatch/moduleResolution.ts index 07de6c69fe03f..88d9fd45f8292 100644 --- a/src/testRunner/unittests/tscWatch/moduleResolution.ts +++ b/src/testRunner/unittests/tscWatch/moduleResolution.ts @@ -89,7 +89,6 @@ describe("unittests:: tsc-watch:: moduleResolution", () => { path: `/user/username/projects/myproject/tsconfig.json`, content: JSON.stringify({ compilerOptions: { - target: "es5", module: "nodenext", moduleResolution: "nodenext", outDir: "./dist", @@ -125,7 +124,10 @@ describe("unittests:: tsc-watch:: moduleResolution", () => { export function thing(): void {} ` }, - libFile + { + ...libFile, + path: libFile.path.replace("lib.d.ts", "lib.esnext.full.d.ts") + } ], { currentDirectory: "/user/username/projects/myproject" }), commandLineArgs: ["-w", "--traceResolution"], edits: [{ @@ -354,7 +356,7 @@ describe("unittests:: tsc-watch:: moduleResolution", () => { { path: `/user/username/projects/myproject/tsconfig.json`, content: JSON.stringify({ - compilerOptions: { target: "es5", module: "node16", moduleResolution: "node16" }, + compilerOptions: { module: "node16", moduleResolution: "node16" }, }) }, { @@ -424,7 +426,10 @@ describe("unittests:: tsc-watch:: moduleResolution", () => { path: `/user/username/projects/myproject/node_modules/@types/pkg2/index.d.ts`, content: `export const x = 10;` }, - libFile + { + ...libFile, + path: libFile.path.replace("lib.d.ts", "lib.es2022.full.d.ts"), + } ], { currentDirectory: "/user/username/projects/myproject" }), commandLineArgs: ["-w", "--traceResolution"], edits: [ diff --git a/tests/baselines/reference/tscWatch/forceConsistentCasingInFileNames/with-nodeNext-resolution.js b/tests/baselines/reference/tscWatch/forceConsistentCasingInFileNames/with-nodeNext-resolution.js index 5ce4e93b9bbd9..319c2c17b1690 100644 --- a/tests/baselines/reference/tscWatch/forceConsistentCasingInFileNames/with-nodeNext-resolution.js +++ b/tests/baselines/reference/tscWatch/forceConsistentCasingInFileNames/with-nodeNext-resolution.js @@ -13,9 +13,9 @@ export function foo(): void; {"name":"yargs","version":"17.0.12","exports":{".":{"types":{"import":"./index.d.mts","default":"./index.d.ts"}}}} //// [/Users/name/projects/web/tsconfig.json] -{"compilerOptions":{"target":"es5","module":"nodenext","moduleResolution":"nodenext","forceConsistentCasingInFileNames":true,"traceResolution":true}} +{"compilerOptions":{"module":"nodenext","moduleResolution":"nodenext","forceConsistentCasingInFileNames":true,"traceResolution":true}} -//// [/a/lib/lib.d.ts] +//// [/a/lib/lib.esnext.full.d.ts] /// interface Boolean {} interface Function {} @@ -83,8 +83,8 @@ Resolving real path for '/Users/name/projects/web/node_modules/@types/yargs/inde 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' +../../../../a/lib/lib.esnext.full.d.ts + Default library for target 'esnext' node_modules/@types/yargs/index.d.ts Imported via "yargs" from file 'src/bin.ts' with packageId 'yargs/index.d.ts@17.0.12' Entry point for implicit type library 'yargs' with packageId 'yargs/index.d.ts@17.0.12' @@ -97,20 +97,20 @@ src/bin.ts Program root files: ["/Users/name/projects/web/src/bin.ts"] -Program options: {"target":1,"module":199,"moduleResolution":99,"forceConsistentCasingInFileNames":true,"traceResolution":true,"watch":true,"explainFiles":true,"configFilePath":"/Users/name/projects/web/tsconfig.json"} +Program options: {"module":199,"moduleResolution":99,"forceConsistentCasingInFileNames":true,"traceResolution":true,"watch":true,"explainFiles":true,"configFilePath":"/Users/name/projects/web/tsconfig.json"} Program structureReused: Not Program files:: -/a/lib/lib.d.ts +/a/lib/lib.esnext.full.d.ts /Users/name/projects/web/node_modules/@types/yargs/index.d.ts /Users/name/projects/web/src/bin.ts Semantic diagnostics in builder refreshed for:: -/a/lib/lib.d.ts +/a/lib/lib.esnext.full.d.ts /Users/name/projects/web/node_modules/@types/yargs/index.d.ts /Users/name/projects/web/src/bin.ts Shape signatures in builder refreshed for:: -/a/lib/lib.d.ts (used version) +/a/lib/lib.esnext.full.d.ts (used version) /users/name/projects/web/node_modules/@types/yargs/index.d.ts (used version) /users/name/projects/web/src/bin.ts (used version) @@ -125,7 +125,7 @@ PolledWatches:: {"pollingInterval":2000} FsWatches:: -/a/lib/lib.d.ts: *new* +/a/lib/lib.esnext.full.d.ts: *new* {} /users/name/projects: *new* {} diff --git a/tests/baselines/reference/tscWatch/moduleResolution/diagnostics-from-cache.js b/tests/baselines/reference/tscWatch/moduleResolution/diagnostics-from-cache.js index 36cca1f87dfe7..849445e987fd3 100644 --- a/tests/baselines/reference/tscWatch/moduleResolution/diagnostics-from-cache.js +++ b/tests/baselines/reference/tscWatch/moduleResolution/diagnostics-from-cache.js @@ -1,7 +1,7 @@ currentDirectory:: /user/username/projects/myproject useCaseSensitiveFileNames: false Input:: //// [/user/username/projects/myproject/tsconfig.json] -{"compilerOptions":{"target":"es5","module":"nodenext","moduleResolution":"nodenext","outDir":"./dist","declaration":true,"declarationDir":"./types"}} +{"compilerOptions":{"module":"nodenext","moduleResolution":"nodenext","outDir":"./dist","declaration":true,"declarationDir":"./types"}} //// [/user/username/projects/myproject/package.json] {"name":"@this/package","type":"module","exports":{".":{"default":"./dist/index.js","types":"./types/index.d.ts"}}} @@ -16,7 +16,7 @@ export function thing(): void {} export function thing(): void {} -//// [/a/lib/lib.d.ts] +//// [/a/lib/lib.esnext.full.d.ts] /// interface Boolean {} interface Function {} @@ -59,17 +59,17 @@ File '/package.json' does not exist. Program root files: ["/user/username/projects/myproject/index.ts","/user/username/projects/myproject/index2.ts"] -Program options: {"target":1,"module":199,"moduleResolution":99,"outDir":"/user/username/projects/myproject/dist","declaration":true,"declarationDir":"/user/username/projects/myproject/types","watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"module":199,"moduleResolution":99,"outDir":"/user/username/projects/myproject/dist","declaration":true,"declarationDir":"/user/username/projects/myproject/types","watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program structureReused: Not Program files:: -/a/lib/lib.d.ts +/a/lib/lib.esnext.full.d.ts /user/username/projects/myproject/index.ts /user/username/projects/myproject/index2.ts No cached semantic diagnostics in the builder:: Shape signatures in builder refreshed for:: -/a/lib/lib.d.ts (used version) +/a/lib/lib.esnext.full.d.ts (used version) /user/username/projects/myproject/index.ts (computed .d.ts during emit) /user/username/projects/myproject/index2.ts (computed .d.ts during emit) @@ -80,7 +80,7 @@ PolledWatches:: {"pollingInterval":500} FsWatches:: -/a/lib/lib.d.ts: *new* +/a/lib/lib.esnext.full.d.ts: *new* {} /user/username/projects/myproject/index.ts: *new* {} @@ -156,10 +156,10 @@ File '/package.json' does not exist according to earlier cached lookups. Program root files: ["/user/username/projects/myproject/index.ts","/user/username/projects/myproject/index2.ts"] -Program options: {"target":1,"module":199,"moduleResolution":99,"outDir":"/user/username/projects/myproject/dist","declaration":true,"declarationDir":"/user/username/projects/myproject/types","watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"module":199,"moduleResolution":99,"outDir":"/user/username/projects/myproject/dist","declaration":true,"declarationDir":"/user/username/projects/myproject/types","watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program structureReused: SafeModules Program files:: -/a/lib/lib.d.ts +/a/lib/lib.esnext.full.d.ts /user/username/projects/myproject/index.ts /user/username/projects/myproject/index2.ts diff --git a/tests/baselines/reference/tscWatch/moduleResolution/type-reference-resolutions-reuse.js b/tests/baselines/reference/tscWatch/moduleResolution/type-reference-resolutions-reuse.js index 2af1ce80f9ca2..e78fc3f6a432d 100644 --- a/tests/baselines/reference/tscWatch/moduleResolution/type-reference-resolutions-reuse.js +++ b/tests/baselines/reference/tscWatch/moduleResolution/type-reference-resolutions-reuse.js @@ -1,7 +1,7 @@ currentDirectory:: /user/username/projects/myproject useCaseSensitiveFileNames: false Input:: //// [/user/username/projects/myproject/tsconfig.json] -{"compilerOptions":{"target":"es5","module":"node16","moduleResolution":"node16"}} +{"compilerOptions":{"module":"node16","moduleResolution":"node16"}} //// [/user/username/projects/myproject/index.ts] /// @@ -43,7 +43,7 @@ declare global { //// [/user/username/projects/myproject/node_modules/@types/pkg2/index.d.ts] export const x = 10; -//// [/a/lib/lib.d.ts] +//// [/a/lib/lib.es2022.full.d.ts] /// interface Boolean {} interface Function {} @@ -146,24 +146,24 @@ File '/package.json' does not exist according to earlier cached lookups. Program root files: ["/user/username/projects/myproject/a.ts","/user/username/projects/myproject/index.ts"] -Program options: {"target":1,"module":100,"moduleResolution":3,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"module":100,"moduleResolution":3,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program structureReused: Not Program files:: -/a/lib/lib.d.ts +/a/lib/lib.es2022.full.d.ts /user/username/projects/myproject/a.ts /user/username/projects/myproject/node_modules/pkg/import.d.ts /user/username/projects/myproject/index.ts /user/username/projects/myproject/node_modules/@types/pkg2/index.d.ts Semantic diagnostics in builder refreshed for:: -/a/lib/lib.d.ts +/a/lib/lib.es2022.full.d.ts /user/username/projects/myproject/a.ts /user/username/projects/myproject/node_modules/pkg/import.d.ts /user/username/projects/myproject/index.ts /user/username/projects/myproject/node_modules/@types/pkg2/index.d.ts Shape signatures in builder refreshed for:: -/a/lib/lib.d.ts (used version) +/a/lib/lib.es2022.full.d.ts (used version) /user/username/projects/myproject/a.ts (used version) /user/username/projects/myproject/node_modules/pkg/import.d.ts (used version) /user/username/projects/myproject/index.ts (used version) @@ -186,7 +186,7 @@ PolledWatches:: {"pollingInterval":2000} FsWatches:: -/a/lib/lib.d.ts: *new* +/a/lib/lib.es2022.full.d.ts: *new* {} /user/username/projects/myproject/a.ts: *new* {} @@ -324,10 +324,10 @@ File '/package.json' does not exist according to earlier cached lookups. Program root files: ["/user/username/projects/myproject/a.ts","/user/username/projects/myproject/index.ts"] -Program options: {"target":1,"module":100,"moduleResolution":3,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"module":100,"moduleResolution":3,"watch":true,"traceResolution":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program structureReused: SafeModules Program files:: -/a/lib/lib.d.ts +/a/lib/lib.es2022.full.d.ts /user/username/projects/myproject/node_modules/pkg/import.d.ts /user/username/projects/myproject/a.ts /user/username/projects/myproject/index.ts From 46572b0f64abeff44848dc9a0f706cac5223987d Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Tue, 27 Jun 2023 14:20:42 -0700 Subject: [PATCH 6/9] Apply suggestions from code review Co-authored-by: Sheetal Nandi --- src/testRunner/unittests/helpers/node10Result.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/testRunner/unittests/helpers/node10Result.ts b/src/testRunner/unittests/helpers/node10Result.ts index 280d04ec57a3a..534143961953d 100644 --- a/src/testRunner/unittests/helpers/node10Result.ts +++ b/src/testRunner/unittests/helpers/node10Result.ts @@ -70,7 +70,7 @@ export function getFsContentsForNode10Result(): FsContents { import { foo2 } from "foo2"; import { bar2 } from "bar2"; `, - "/a/lib/lib.es2022.full.d.ts": libFile.content, + "/lib/lib.es2022.full.d.ts": libFile.content, "/home/src/projects/project/tsconfig.json": JSON.stringify({ compilerOptions: { module: "node16", @@ -82,6 +82,6 @@ export function getFsContentsForNode10Result(): FsContents { }, files: ["index.mts"] }), - [libFile.path]: libFile.content, + [libFile.path.replace("lib.d.ts", "lib.esnext.full.d.ts")]: libFile.content, }; } From f346be48b50443082d0d16d5653aac020a15676d Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Tue, 27 Jun 2023 14:28:28 -0700 Subject: [PATCH 7/9] Update node10Result baselines --- .../tsc/moduleResolution/node10Result.js | 735 ++++++++-------- .../tscWatch/moduleResolution/node10Result.js | 794 ++++++++---------- .../tsserver/moduleResolution/node10Result.js | 217 +++-- 3 files changed, 854 insertions(+), 892 deletions(-) diff --git a/tests/baselines/reference/tsc/moduleResolution/node10Result.js b/tests/baselines/reference/tsc/moduleResolution/node10Result.js index ae4ccf5df6410..c31511842fb09 100644 --- a/tests/baselines/reference/tsc/moduleResolution/node10Result.js +++ b/tests/baselines/reference/tsc/moduleResolution/node10Result.js @@ -1,19 +1,6 @@ currentDirectory:: / useCaseSensitiveFileNames: false Input:: -//// [/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/lib.es2022.full.d.ts] +//// [/a/lib/lib.esnext.full.d.ts] /// interface Boolean {} interface Function {} @@ -167,6 +154,19 @@ interface Array { length: number; [n: number]: T; } interface ReadonlyArray {} declare const console: { log(msg: any): void; }; +//// [/lib/lib.es2022.full.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; } + Output:: @@ -339,48 +339,42 @@ File '/home/src/projects/project/node_modules/foo2/package.json' exists accordin File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -error TS2318: Cannot find global type 'Array'. +home/src/projects/project/index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/foo/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo' library may need to update its package.json or typings. -error TS2318: Cannot find global type 'Boolean'. +1 import { foo } from "foo"; +   ~~~~~ -error TS2318: Cannot find global type 'CallableFunction'. +home/src/projects/project/index.mts:2:21 - error TS7016: Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/@types/bar/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar' library may need to update its package.json or typings. -error TS2318: Cannot find global type 'Function'. +2 import { bar } from "bar"; +   ~~~~~ -error TS2318: Cannot find global type 'IArguments'. -error TS2318: Cannot find global type 'NewableFunction'. - -error TS2318: Cannot find global type 'Number'. - -error TS2318: Cannot find global type 'Object'. - -error TS2318: Cannot find global type 'RegExp'. - -error TS2318: Cannot find global type 'String'. - -error TS6053: File '/lib/lib.es2022.full.d.ts' not found. - The file is in the program because: - Default library for target 'es2022' - - -Found 11 errors. +Found 2 errors in the same file, starting at: home/src/projects/project/index.mts:1 exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: +/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/lib/lib.es2022.full.d.ts +/home/src/projects/project/node_modules/foo2/index.d.ts +/home/src/projects/project/node_modules/@types/bar2/index.d.ts +/home/src/projects/project/index.mts Shape signatures in builder refreshed for:: +/lib/lib.es2022.full.d.ts (used version) /home/src/projects/project/node_modules/foo2/index.d.ts (used version) -/home/src/projects/project/index.mts (used version) /home/src/projects/project/node_modules/@types/bar2/index.d.ts (used version) +/home/src/projects/project/index.mts (used version) //// [/home/src/projects/project/index.mjs] @@ -388,12 +382,13 @@ export {}; //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"fileInfos":[{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","impliedFormat":99}],"root":[3],"options":{"module":100,"strict":true},"fileIdsList":[[1,2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../lib/lib.es2022.full.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"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":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","impliedFormat":99}],"root":[4],"options":{"module":100,"strict":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[[4,[{"file":"./index.mts","start":20,"length":5,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"foo","mode":99}}]}},{"file":"./index.mts","start":47,"length":5,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"bar","mode":99}}]}}]],3,2,1]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { "program": { "fileNames": [ + "../../../../lib/lib.es2022.full.d.ts", "./node_modules/foo2/index.d.ts", "./node_modules/@types/bar2/index.d.ts", "./index.mts" @@ -405,6 +400,17 @@ export {}; ] ], "fileInfos": { + "../../../../lib/lib.es2022.full.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/foo2/index.d.ts": { "original": { "version": "-1622383150-export declare const foo2: number;", @@ -435,7 +441,7 @@ export {}; }, "root": [ [ - 3, + 4, "./index.mts" ] ], @@ -454,10 +460,60 @@ export {}; "./node_modules/foo2/index.d.ts", "./node_modules/@types/bar2/index.d.ts" ] - } + }, + "semanticDiagnosticsPerFile": [ + [ + "./index.mts", + [ + { + "file": "./index.mts", + "start": 20, + "length": 5, + "code": 7016, + "category": 1, + "messageText": { + "messageText": "Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type.", + "category": 1, + "code": 7016, + "next": [ + { + "info": { + "moduleReference": "foo", + "mode": 99 + } + } + ] + } + }, + { + "file": "./index.mts", + "start": 47, + "length": 5, + "code": 7016, + "category": 1, + "messageText": { + "messageText": "Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type.", + "category": 1, + "code": 7016, + "next": [ + { + "info": { + "moduleReference": "bar", + "mode": 99 + } + } + ] + } + } + ] + ], + "./node_modules/@types/bar2/index.d.ts", + "./node_modules/foo2/index.d.ts", + "../../../../lib/lib.es2022.full.d.ts" + ] }, "version": "FakeTSVersion", - "size": 607 + "size": 1744 } @@ -650,43 +706,32 @@ File '/home/src/projects/project/node_modules/foo2/package.json' exists accordin File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -error TS2318: Cannot find global type 'Array'. - -error TS2318: Cannot find global type 'Boolean'. +home/src/projects/project/index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/foo/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo' library may need to update its package.json or typings. -error TS2318: Cannot find global type 'CallableFunction'. +1 import { foo } from "foo"; +   ~~~~~ -error TS2318: Cannot find global type 'Function'. +home/src/projects/project/index.mts:2:21 - error TS7016: Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type. + Try `npm i --save-dev @types/bar` if it exists or add a new declaration (.d.ts) file containing `declare module 'bar';` -error TS2318: Cannot find global type 'IArguments'. +2 import { bar } from "bar"; +   ~~~~~ -error TS2318: Cannot find global type 'NewableFunction'. -error TS2318: Cannot find global type 'Number'. - -error TS2318: Cannot find global type 'Object'. - -error TS2318: Cannot find global type 'RegExp'. - -error TS2318: Cannot find global type 'String'. - -error TS6053: File '/lib/lib.es2022.full.d.ts' not found. - The file is in the program because: - Default library for target 'es2022' - - -Found 11 errors. +Found 2 errors in the same file, starting at: home/src/projects/project/index.mts:1 exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: +/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -894,43 +939,32 @@ File '/home/src/projects/project/node_modules/foo2/package.json' exists accordin File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -error TS2318: Cannot find global type 'Array'. - -error TS2318: Cannot find global type 'Boolean'. - -error TS2318: Cannot find global type 'CallableFunction'. - -error TS2318: Cannot find global type 'Function'. - -error TS2318: Cannot find global type 'IArguments'. - -error TS2318: Cannot find global type 'NewableFunction'. - -error TS2318: Cannot find global type 'Number'. +home/src/projects/project/index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. + Try `npm i --save-dev @types/foo` if it exists or add a new declaration (.d.ts) file containing `declare module 'foo';` -error TS2318: Cannot find global type 'Object'. +1 import { foo } from "foo"; +   ~~~~~ -error TS2318: Cannot find global type 'RegExp'. +home/src/projects/project/index.mts:2:21 - error TS7016: Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type. + Try `npm i --save-dev @types/bar` if it exists or add a new declaration (.d.ts) file containing `declare module 'bar';` -error TS2318: Cannot find global type 'String'. +2 import { bar } from "bar"; +   ~~~~~ -error TS6053: File '/lib/lib.es2022.full.d.ts' not found. - The file is in the program because: - Default library for target 'es2022' - -Found 11 errors. +Found 2 errors in the same file, starting at: home/src/projects/project/index.mts:1 exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: +/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -1127,43 +1161,32 @@ File '/home/src/projects/project/node_modules/foo2/package.json' exists accordin File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -error TS2318: Cannot find global type 'Array'. - -error TS2318: Cannot find global type 'Boolean'. - -error TS2318: Cannot find global type 'CallableFunction'. - -error TS2318: Cannot find global type 'Function'. - -error TS2318: Cannot find global type 'IArguments'. - -error TS2318: Cannot find global type 'NewableFunction'. +home/src/projects/project/index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. + Try `npm i --save-dev @types/foo` if it exists or add a new declaration (.d.ts) file containing `declare module 'foo';` -error TS2318: Cannot find global type 'Number'. +1 import { foo } from "foo"; +   ~~~~~ -error TS2318: Cannot find global type 'Object'. +home/src/projects/project/index.mts:2:21 - error TS7016: Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/@types/bar/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar' library may need to update its package.json or typings. -error TS2318: Cannot find global type 'RegExp'. +2 import { bar } from "bar"; +   ~~~~~ -error TS2318: Cannot find global type 'String'. -error TS6053: File '/lib/lib.es2022.full.d.ts' not found. - The file is in the program because: - Default library for target 'es2022' - - -Found 11 errors. +Found 2 errors in the same file, starting at: home/src/projects/project/index.mts:1 exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: +/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -1347,43 +1370,32 @@ File '/home/src/projects/project/node_modules/foo2/package.json' exists accordin File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -error TS2318: Cannot find global type 'Array'. - -error TS2318: Cannot find global type 'Boolean'. - -error TS2318: Cannot find global type 'CallableFunction'. - -error TS2318: Cannot find global type 'Function'. - -error TS2318: Cannot find global type 'IArguments'. +home/src/projects/project/index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/foo/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo' library may need to update its package.json or typings. -error TS2318: Cannot find global type 'NewableFunction'. +1 import { foo } from "foo"; +   ~~~~~ -error TS2318: Cannot find global type 'Number'. +home/src/projects/project/index.mts:2:21 - error TS7016: Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/@types/bar/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar' library may need to update its package.json or typings. -error TS2318: Cannot find global type 'Object'. +2 import { bar } from "bar"; +   ~~~~~ -error TS2318: Cannot find global type 'RegExp'. -error TS2318: Cannot find global type 'String'. - -error TS6053: File '/lib/lib.es2022.full.d.ts' not found. - The file is in the program because: - Default library for target 'es2022' - - -Found 11 errors. +Found 2 errors in the same file, starting at: home/src/projects/project/index.mts:1 exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: +/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -1539,44 +1551,29 @@ File '/home/src/projects/project/node_modules/foo2/package.json' exists accordin File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -error TS2318: Cannot find global type 'Array'. - -error TS2318: Cannot find global type 'Boolean'. - -error TS2318: Cannot find global type 'CallableFunction'. - -error TS2318: Cannot find global type 'Function'. - -error TS2318: Cannot find global type 'IArguments'. - -error TS2318: Cannot find global type 'NewableFunction'. - -error TS2318: Cannot find global type 'Number'. - -error TS2318: Cannot find global type 'Object'. - -error TS2318: Cannot find global type 'RegExp'. - -error TS2318: Cannot find global type 'String'. +home/src/projects/project/index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/foo/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo' library may need to update its package.json or typings. -error TS6053: File '/lib/lib.es2022.full.d.ts' not found. - The file is in the program because: - Default library for target 'es2022' +1 import { foo } from "foo"; +   ~~~~~ -Found 11 errors. +Found 1 error in home/src/projects/project/index.mts:1 exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: +/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/home/src/projects/project/node_modules/@types/bar/index.d.ts +/home/src/projects/project/index.mts Shape signatures in builder refreshed for:: /home/src/projects/project/node_modules/@types/bar/index.d.ts (used version) @@ -1585,12 +1582,13 @@ Shape signatures in builder refreshed for:: //// [/home/src/projects/project/index.mjs] file written with same contents //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"fileInfos":[{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[4],"options":{"module":100,"strict":true},"fileIdsList":[[1,2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../lib/lib.es2022.full.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"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":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[5],"options":{"module":100,"strict":true},"fileIdsList":[[2,3,4]],"referencedMap":[[5,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[[5,[{"file":"./index.mts","start":20,"length":5,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"foo","mode":99}}]}}]],2,4,3,1]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { "program": { "fileNames": [ + "../../../../lib/lib.es2022.full.d.ts", "./node_modules/@types/bar/index.d.ts", "./node_modules/foo2/index.d.ts", "./node_modules/@types/bar2/index.d.ts", @@ -1604,6 +1602,17 @@ Shape signatures in builder refreshed for:: ] ], "fileInfos": { + "../../../../lib/lib.es2022.full.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/@types/bar/index.d.ts": { "original": { "version": "-9556021903-export declare const bar: number;", @@ -1644,7 +1653,7 @@ Shape signatures in builder refreshed for:: }, "root": [ [ - 4, + 5, "./index.mts" ] ], @@ -1659,10 +1668,41 @@ Shape signatures in builder refreshed for:: "./node_modules/@types/bar2/index.d.ts" ] }, - "exportedModulesMap": {} + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + [ + "./index.mts", + [ + { + "file": "./index.mts", + "start": 20, + "length": 5, + "code": 7016, + "category": 1, + "messageText": { + "messageText": "Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type.", + "category": 1, + "code": 7016, + "next": [ + { + "info": { + "moduleReference": "foo", + "mode": 99 + } + } + ] + } + } + ] + ], + "./node_modules/@types/bar/index.d.ts", + "./node_modules/@types/bar2/index.d.ts", + "./node_modules/foo2/index.d.ts", + "../../../../lib/lib.es2022.full.d.ts" + ] }, "version": "FakeTSVersion", - "size": 760 + "size": 1580 } @@ -1790,45 +1830,21 @@ File '/home/src/projects/project/node_modules/foo2/package.json' exists accordin File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -error TS2318: Cannot find global type 'Array'. - -error TS2318: Cannot find global type 'Boolean'. - -error TS2318: Cannot find global type 'CallableFunction'. - -error TS2318: Cannot find global type 'Function'. - -error TS2318: Cannot find global type 'IArguments'. - -error TS2318: Cannot find global type 'NewableFunction'. - -error TS2318: Cannot find global type 'Number'. - -error TS2318: Cannot find global type 'Object'. - -error TS2318: Cannot find global type 'RegExp'. - -error TS2318: Cannot find global type 'String'. - -error TS6053: File '/lib/lib.es2022.full.d.ts' not found. - The file is in the program because: - Default library for target 'es2022' - - -Found 11 errors. - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +exitCode:: ExitStatus.Success Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: +/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/home/src/projects/project/node_modules/foo/index.d.ts +/home/src/projects/project/index.mts Shape signatures in builder refreshed for:: /home/src/projects/project/node_modules/foo/index.d.ts (used version) @@ -1837,12 +1853,13 @@ Shape signatures in builder refreshed for:: //// [/home/src/projects/project/index.mjs] file written with same contents //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"fileInfos":[{"version":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[5],"options":{"module":100,"strict":true},"fileIdsList":[[1,2,3,4]],"referencedMap":[[5,1]],"exportedModulesMap":[]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../lib/lib.es2022.full.d.ts","./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"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":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[6],"options":{"module":100,"strict":true},"fileIdsList":[[2,3,4,5]],"referencedMap":[[6,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[6,3,5,2,4,1]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { "program": { "fileNames": [ + "../../../../lib/lib.es2022.full.d.ts", "./node_modules/foo/index.d.ts", "./node_modules/@types/bar/index.d.ts", "./node_modules/foo2/index.d.ts", @@ -1858,6 +1875,17 @@ Shape signatures in builder refreshed for:: ] ], "fileInfos": { + "../../../../lib/lib.es2022.full.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/foo/index.d.ts": { "original": { "version": "-5214938848-export declare const foo: number;", @@ -1907,7 +1935,7 @@ Shape signatures in builder refreshed for:: }, "root": [ [ - 5, + 6, "./index.mts" ] ], @@ -1923,10 +1951,18 @@ Shape signatures in builder refreshed for:: "./node_modules/@types/bar2/index.d.ts" ] }, - "exportedModulesMap": {} + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "./index.mts", + "./node_modules/@types/bar/index.d.ts", + "./node_modules/@types/bar2/index.d.ts", + "./node_modules/foo/index.d.ts", + "./node_modules/foo2/index.d.ts", + "../../../../lib/lib.es2022.full.d.ts" + ] }, "version": "FakeTSVersion", - "size": 872 + "size": 1371 } @@ -2089,44 +2125,28 @@ File '/home/src/projects/project/node_modules/@types/bar/package.json' exists ac File '/home/src/projects/project/node_modules/foo2/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -error TS2318: Cannot find global type 'Array'. - -error TS2318: Cannot find global type 'Boolean'. - -error TS2318: Cannot find global type 'CallableFunction'. - -error TS2318: Cannot find global type 'Function'. - -error TS2318: Cannot find global type 'IArguments'. - -error TS2318: Cannot find global type 'NewableFunction'. - -error TS2318: Cannot find global type 'Number'. - -error TS2318: Cannot find global type 'Object'. - -error TS2318: Cannot find global type 'RegExp'. +home/src/projects/project/index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/@types/bar2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar2' library may need to update its package.json or typings. -error TS2318: Cannot find global type 'String'. +4 import { bar2 } from "bar2"; +   ~~~~~~ -error TS6053: File '/lib/lib.es2022.full.d.ts' not found. - The file is in the program because: - Default library for target 'es2022' - -Found 11 errors. +Found 1 error in home/src/projects/project/index.mts:4 exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: +/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/home/src/projects/project/index.mts Shape signatures in builder refreshed for:: /home/src/projects/project/index.mts (computed .d.ts) @@ -2134,12 +2154,13 @@ Shape signatures in builder refreshed for:: //// [/home/src/projects/project/index.mjs] file written with same contents //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./index.mts"],"fileInfos":[{"version":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[4],"options":{"module":100,"strict":true},"fileIdsList":[[1,2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../lib/lib.es2022.full.d.ts","./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./index.mts"],"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":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[5],"options":{"module":100,"strict":true},"fileIdsList":[[2,3,4]],"referencedMap":[[5,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[[5,[{"file":"./index.mts","start":104,"length":6,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"bar2","mode":99}}]}}]],3,2,4,1]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { "program": { "fileNames": [ + "../../../../lib/lib.es2022.full.d.ts", "./node_modules/foo/index.d.ts", "./node_modules/@types/bar/index.d.ts", "./node_modules/foo2/index.d.ts", @@ -2153,6 +2174,17 @@ Shape signatures in builder refreshed for:: ] ], "fileInfos": { + "../../../../lib/lib.es2022.full.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/foo/index.d.ts": { "original": { "version": "-5214938848-export declare const foo: number;", @@ -2193,7 +2225,7 @@ Shape signatures in builder refreshed for:: }, "root": [ [ - 4, + 5, "./index.mts" ] ], @@ -2208,10 +2240,41 @@ Shape signatures in builder refreshed for:: "./node_modules/foo2/index.d.ts" ] }, - "exportedModulesMap": {} + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + [ + "./index.mts", + [ + { + "file": "./index.mts", + "start": 104, + "length": 6, + "code": 7016, + "category": 1, + "messageText": { + "messageText": "Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type.", + "category": 1, + "code": 7016, + "next": [ + { + "info": { + "moduleReference": "bar2", + "mode": 99 + } + } + ] + } + } + ] + ], + "./node_modules/@types/bar/index.d.ts", + "./node_modules/foo/index.d.ts", + "./node_modules/foo2/index.d.ts", + "../../../../lib/lib.es2022.full.d.ts" + ] }, "version": "FakeTSVersion", - "size": 751 + "size": 1575 } @@ -2404,43 +2467,33 @@ File '/home/src/projects/project/node_modules/foo/package.json' exists according File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -error TS2318: Cannot find global type 'Array'. - -error TS2318: Cannot find global type 'Boolean'. - -error TS2318: Cannot find global type 'CallableFunction'. - -error TS2318: Cannot find global type 'Function'. - -error TS2318: Cannot find global type 'IArguments'. +home/src/projects/project/index.mts:3:22 - error TS7016: Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/foo2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo2' library may need to update its package.json or typings. -error TS2318: Cannot find global type 'NewableFunction'. +3 import { foo2 } from "foo2"; +   ~~~~~~ -error TS2318: Cannot find global type 'Number'. +home/src/projects/project/index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/@types/bar2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar2' library may need to update its package.json or typings. -error TS2318: Cannot find global type 'Object'. +4 import { bar2 } from "bar2"; +   ~~~~~~ -error TS2318: Cannot find global type 'RegExp'. -error TS2318: Cannot find global type 'String'. - -error TS6053: File '/lib/lib.es2022.full.d.ts' not found. - The file is in the program because: - Default library for target 'es2022' - - -Found 11 errors. +Found 2 errors in the same file, starting at: home/src/projects/project/index.mts:3 exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: +/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/home/src/projects/project/index.mts Shape signatures in builder refreshed for:: /home/src/projects/project/index.mts (computed .d.ts) @@ -2448,12 +2501,13 @@ Shape signatures in builder refreshed for:: //// [/home/src/projects/project/index.mjs] file written with same contents //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./index.mts"],"fileInfos":[{"version":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[3],"options":{"module":100,"strict":true},"fileIdsList":[[1,2]],"referencedMap":[[3,1]],"exportedModulesMap":[]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../lib/lib.es2022.full.d.ts","./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./index.mts"],"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":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[4],"options":{"module":100,"strict":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[[4,[{"file":"./index.mts","start":75,"length":6,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"foo2","mode":99}}]}},{"file":"./index.mts","start":104,"length":6,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"bar2","mode":99}}]}}]],3,2,1]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { "program": { "fileNames": [ + "../../../../lib/lib.es2022.full.d.ts", "./node_modules/foo/index.d.ts", "./node_modules/@types/bar/index.d.ts", "./index.mts" @@ -2465,6 +2519,17 @@ Shape signatures in builder refreshed for:: ] ], "fileInfos": { + "../../../../lib/lib.es2022.full.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/foo/index.d.ts": { "original": { "version": "-5214938848-export declare const foo: number;", @@ -2496,7 +2561,7 @@ Shape signatures in builder refreshed for:: }, "root": [ [ - 3, + 4, "./index.mts" ] ], @@ -2510,10 +2575,60 @@ Shape signatures in builder refreshed for:: "./node_modules/@types/bar/index.d.ts" ] }, - "exportedModulesMap": {} + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + [ + "./index.mts", + [ + { + "file": "./index.mts", + "start": 75, + "length": 6, + "code": 7016, + "category": 1, + "messageText": { + "messageText": "Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type.", + "category": 1, + "code": 7016, + "next": [ + { + "info": { + "moduleReference": "foo2", + "mode": 99 + } + } + ] + } + }, + { + "file": "./index.mts", + "start": 104, + "length": 6, + "code": 7016, + "category": 1, + "messageText": { + "messageText": "Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type.", + "category": 1, + "code": 7016, + "next": [ + { + "info": { + "moduleReference": "bar2", + "mode": 99 + } + } + ] + } + } + ] + ], + "./node_modules/@types/bar/index.d.ts", + "./node_modules/foo/index.d.ts", + "../../../../lib/lib.es2022.full.d.ts" + ] }, "version": "FakeTSVersion", - "size": 637 + "size": 1781 } @@ -2706,43 +2821,32 @@ File '/home/src/projects/project/node_modules/foo/package.json' exists according File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -error TS2318: Cannot find global type 'Array'. - -error TS2318: Cannot find global type 'Boolean'. - -error TS2318: Cannot find global type 'CallableFunction'. - -error TS2318: Cannot find global type 'Function'. - -error TS2318: Cannot find global type 'IArguments'. - -error TS2318: Cannot find global type 'NewableFunction'. +home/src/projects/project/index.mts:3:22 - error TS7016: Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/foo2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo2' library may need to update its package.json or typings. -error TS2318: Cannot find global type 'Number'. +3 import { foo2 } from "foo2"; +   ~~~~~~ -error TS2318: Cannot find global type 'Object'. +home/src/projects/project/index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. + Try `npm i --save-dev @types/bar2` if it exists or add a new declaration (.d.ts) file containing `declare module 'bar2';` -error TS2318: Cannot find global type 'RegExp'. +4 import { bar2 } from "bar2"; +   ~~~~~~ -error TS2318: Cannot find global type 'String'. -error TS6053: File '/lib/lib.es2022.full.d.ts' not found. - The file is in the program because: - Default library for target 'es2022' - - -Found 11 errors. +Found 2 errors in the same file, starting at: home/src/projects/project/index.mts:3 exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: +/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -2950,43 +3054,32 @@ File '/home/src/projects/project/node_modules/foo/package.json' exists according File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -error TS2318: Cannot find global type 'Array'. - -error TS2318: Cannot find global type 'Boolean'. - -error TS2318: Cannot find global type 'CallableFunction'. - -error TS2318: Cannot find global type 'Function'. - -error TS2318: Cannot find global type 'IArguments'. +home/src/projects/project/index.mts:3:22 - error TS7016: Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type. + Try `npm i --save-dev @types/foo2` if it exists or add a new declaration (.d.ts) file containing `declare module 'foo2';` -error TS2318: Cannot find global type 'NewableFunction'. +3 import { foo2 } from "foo2"; +   ~~~~~~ -error TS2318: Cannot find global type 'Number'. +home/src/projects/project/index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. + Try `npm i --save-dev @types/bar2` if it exists or add a new declaration (.d.ts) file containing `declare module 'bar2';` -error TS2318: Cannot find global type 'Object'. +4 import { bar2 } from "bar2"; +   ~~~~~~ -error TS2318: Cannot find global type 'RegExp'. -error TS2318: Cannot find global type 'String'. - -error TS6053: File '/lib/lib.es2022.full.d.ts' not found. - The file is in the program because: - Default library for target 'es2022' - - -Found 11 errors. +Found 2 errors in the same file, starting at: home/src/projects/project/index.mts:3 exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: +/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -3183,43 +3276,32 @@ File '/home/src/projects/project/node_modules/foo/package.json' exists according File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -error TS2318: Cannot find global type 'Array'. - -error TS2318: Cannot find global type 'Boolean'. - -error TS2318: Cannot find global type 'CallableFunction'. - -error TS2318: Cannot find global type 'Function'. +home/src/projects/project/index.mts:3:22 - error TS7016: Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type. + Try `npm i --save-dev @types/foo2` if it exists or add a new declaration (.d.ts) file containing `declare module 'foo2';` -error TS2318: Cannot find global type 'IArguments'. +3 import { foo2 } from "foo2"; +   ~~~~~~ -error TS2318: Cannot find global type 'NewableFunction'. +home/src/projects/project/index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/@types/bar2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar2' library may need to update its package.json or typings. -error TS2318: Cannot find global type 'Number'. +4 import { bar2 } from "bar2"; +   ~~~~~~ -error TS2318: Cannot find global type 'Object'. -error TS2318: Cannot find global type 'RegExp'. - -error TS2318: Cannot find global type 'String'. - -error TS6053: File '/lib/lib.es2022.full.d.ts' not found. - The file is in the program because: - Default library for target 'es2022' - - -Found 11 errors. +Found 2 errors in the same file, starting at: home/src/projects/project/index.mts:3 exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: +/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -3403,43 +3485,32 @@ File '/home/src/projects/project/node_modules/foo/package.json' exists according File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. File '/lib/package.json' does not exist. File '/package.json' does not exist according to earlier cached lookups. -error TS2318: Cannot find global type 'Array'. - -error TS2318: Cannot find global type 'Boolean'. - -error TS2318: Cannot find global type 'CallableFunction'. - -error TS2318: Cannot find global type 'Function'. - -error TS2318: Cannot find global type 'IArguments'. - -error TS2318: Cannot find global type 'NewableFunction'. - -error TS2318: Cannot find global type 'Number'. - -error TS2318: Cannot find global type 'Object'. +home/src/projects/project/index.mts:3:22 - error TS7016: Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/foo2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo2' library may need to update its package.json or typings. -error TS2318: Cannot find global type 'RegExp'. +3 import { foo2 } from "foo2"; +   ~~~~~~ -error TS2318: Cannot find global type 'String'. +home/src/projects/project/index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/@types/bar2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar2' library may need to update its package.json or typings. -error TS6053: File '/lib/lib.es2022.full.d.ts' not found. - The file is in the program because: - Default library for target 'es2022' +4 import { bar2 } from "bar2"; +   ~~~~~~ -Found 11 errors. +Found 2 errors in the same file, starting at: home/src/projects/project/index.mts:3 exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"project":"/home/src/projects/project","configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: +/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: diff --git a/tests/baselines/reference/tscWatch/moduleResolution/node10Result.js b/tests/baselines/reference/tscWatch/moduleResolution/node10Result.js index 9faffcf1977f0..53fc1d9b01b11 100644 --- a/tests/baselines/reference/tscWatch/moduleResolution/node10Result.js +++ b/tests/baselines/reference/tscWatch/moduleResolution/node10Result.js @@ -123,7 +123,7 @@ import { foo2 } from "foo2"; import { bar2 } from "bar2"; -//// [/a/lib/lib.es2022.full.d.ts] +//// [/lib/lib.es2022.full.d.ts] /// interface Boolean {} interface Function {} @@ -139,7 +139,7 @@ interface Array { length: number; [n: number]: T; } //// [/home/src/projects/project/tsconfig.json] {"compilerOptions":{"module":"node16","moduleResolution":"node16","traceResolution":true,"incremental":true,"strict":true,"types":[]},"files":["index.mts"]} -//// [/a/lib/lib.d.ts] +//// [/a/lib/lib.esnext.full.d.ts] /// interface Boolean {} interface Function {} @@ -155,7 +155,7 @@ interface Array { length: number; [n: number]: T; } /a/lib/tsc.js -w --extendedDiagnostics Output:: -[12:01:15 AM] Starting compilation in watch mode... +[12:01:17 AM] Starting compilation in watch mode... Current directory: /home/src/projects/project CaseSensitiveFileNames: false FileWatcher:: Added:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined Config file @@ -335,7 +335,6 @@ FileWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types/ 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.es2022.full.d.ts 250 undefined Source file DirectoryWatcher:: Added:: WatchInfo: /home/src/projects 0 undefined Failed Lookup Locations Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects 0 undefined Failed Lookup Locations DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Failed Lookup Locations @@ -350,25 +349,38 @@ FileWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types/ FileWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/foo2/package.json 2000 undefined File location affecting resolution FileWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/bar2/package.json 2000 undefined File location affecting resolution FileWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types/bar2/package.json 2000 undefined File location affecting resolution +FileWatcher:: Added:: WatchInfo: /a/lib/lib.es2022.full.d.ts 500 undefined Missing file DirectoryWatcher:: Triggered with /home/src/projects/project/index.mjs :: WatchInfo: /home/src/projects/project 0 undefined Failed Lookup Locations Scheduling invalidateFailedLookup Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/index.mjs :: WatchInfo: /home/src/projects/project 0 undefined Failed Lookup Locations DirectoryWatcher:: Triggered with /home/src/projects/project/tsconfig.tsbuildinfo :: WatchInfo: /home/src/projects/project 0 undefined Failed Lookup Locations Scheduling invalidateFailedLookup, Cancelled earlier one Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/tsconfig.tsbuildinfo :: WatchInfo: /home/src/projects/project 0 undefined Failed Lookup Locations -index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. - There are types at '/home/src/projects/project/node_modules/foo/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo' library may need to update its package.json or typings. +error TS2318: Cannot find global type 'Array'. -1 import { foo } from "foo"; -   ~~~~~ +error TS2318: Cannot find global type 'Boolean'. -index.mts:2:21 - error TS7016: Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type. - There are types at '/home/src/projects/project/node_modules/@types/bar/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar' library may need to update its package.json or typings. +error TS2318: Cannot find global type 'CallableFunction'. -2 import { bar } from "bar"; -   ~~~~~ +error TS2318: Cannot find global type 'Function'. -[12:01:20 AM] Found 2 errors. Watching for file changes. +error TS2318: Cannot find global type 'IArguments'. + +error TS2318: Cannot find global type 'NewableFunction'. + +error TS2318: Cannot find global type 'Number'. + +error TS2318: Cannot find global type 'Object'. + +error TS2318: Cannot find global type 'RegExp'. + +error TS2318: Cannot find global type 'String'. + +error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2022' + +[12:01:22 AM] Found 11 errors. Watching for file changes. DirectoryWatcher:: Triggered with /home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt :: WatchInfo: /home/src/projects/project 0 undefined Failed Lookup Locations Scheduling invalidateFailedLookup, Cancelled earlier one @@ -379,30 +391,24 @@ Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: -/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -Semantic diagnostics in builder refreshed for:: -/a/lib/lib.es2022.full.d.ts -/home/src/projects/project/node_modules/foo2/index.d.ts -/home/src/projects/project/node_modules/@types/bar2/index.d.ts -/home/src/projects/project/index.mts +No cached semantic diagnostics in the builder:: Shape signatures in builder refreshed for:: -/a/lib/lib.es2022.full.d.ts (used version) /home/src/projects/project/node_modules/foo2/index.d.ts (used version) -/home/src/projects/project/node_modules/@types/bar2/index.d.ts (used version) /home/src/projects/project/index.mts (used version) +/home/src/projects/project/node_modules/@types/bar2/index.d.ts (used version) PolledWatches:: +/a/lib/lib.es2022.full.d.ts: *new* + {"pollingInterval":500} /home/src/projects/node_modules: *new* {"pollingInterval":500} FsWatches:: -/a/lib/lib.es2022.full.d.ts: *new* - {} /home/src/projects: *new* {} /home/src/projects/project: *new* @@ -439,13 +445,12 @@ export {}; //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.es2022.full.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"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":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","impliedFormat":99}],"root":[4],"options":{"module":100,"strict":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,[4,[{"file":"./index.mts","start":20,"length":5,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"foo","mode":99}}]}},{"file":"./index.mts","start":47,"length":5,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"bar","mode":99}}]}}]],3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"fileInfos":[{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","impliedFormat":99}],"root":[3],"options":{"module":100,"strict":true},"fileIdsList":[[1,2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { "program": { "fileNames": [ - "../../../../a/lib/lib.es2022.full.d.ts", "./node_modules/foo2/index.d.ts", "./node_modules/@types/bar2/index.d.ts", "./index.mts" @@ -457,17 +462,6 @@ export {}; ] ], "fileInfos": { - "../../../../a/lib/lib.es2022.full.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/foo2/index.d.ts": { "original": { "version": "-1622383150-export declare const foo2: number;", @@ -498,7 +492,7 @@ export {}; }, "root": [ [ - 4, + 3, "./index.mts" ] ], @@ -517,60 +511,10 @@ export {}; "./node_modules/foo2/index.d.ts", "./node_modules/@types/bar2/index.d.ts" ] - }, - "semanticDiagnosticsPerFile": [ - "../../../../a/lib/lib.es2022.full.d.ts", - [ - "./index.mts", - [ - { - "file": "./index.mts", - "start": 20, - "length": 5, - "code": 7016, - "category": 1, - "messageText": { - "messageText": "Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type.", - "category": 1, - "code": 7016, - "next": [ - { - "info": { - "moduleReference": "foo", - "mode": 99 - } - } - ] - } - }, - { - "file": "./index.mts", - "start": 47, - "length": 5, - "code": 7016, - "category": 1, - "messageText": { - "messageText": "Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type.", - "category": 1, - "code": 7016, - "next": [ - { - "info": { - "moduleReference": "bar", - "mode": 99 - } - } - ] - } - } - ] - ], - "./node_modules/@types/bar2/index.d.ts", - "./node_modules/foo2/index.d.ts" - ] + } }, "version": "FakeTSVersion", - "size": 1746 + "size": 607 } @@ -592,14 +536,11 @@ Scheduling invalidateFailedLookup, Cancelled earlier one Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/node_modules/@types/bar/index.d.ts :: WatchInfo: /home/src/projects/project/node_modules 1 undefined Failed Lookup Locations Scheduling update Synchronizing program -[12:01:24 AM] File change detected. Starting incremental compilation... +[12:01:26 AM] File change detected. Starting incremental compilation... CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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 '/home/src/projects/project/node_modules/foo2/package.json' exists according to earlier cached lookups. Found 'package.json' at '/home/src/projects/project/node_modules/@types/bar2/package.json'. Reusing resolution of module 'foo' from '/home/src/projects/project/index.mts' of old program, it was successfully resolved to '/home/src/projects/project/node_modules/foo/index.mjs' with Package ID 'foo/index.mjs@1.0.0'. @@ -690,19 +631,31 @@ File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists a 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. -index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. - There are types at '/home/src/projects/project/node_modules/foo/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo' library may need to update its package.json or typings. +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'CallableFunction'. + +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. + +error TS2318: Cannot find global type 'NewableFunction'. + +error TS2318: Cannot find global type 'Number'. -1 import { foo } from "foo"; -   ~~~~~ +error TS2318: Cannot find global type 'Object'. -index.mts:2:21 - error TS7016: Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type. - Try `npm i --save-dev @types/bar` if it exists or add a new declaration (.d.ts) file containing `declare module 'bar';` +error TS2318: Cannot find global type 'RegExp'. -2 import { bar } from "bar"; -   ~~~~~ +error TS2318: Cannot find global type 'String'. -[12:01:25 AM] Found 2 errors. Watching for file changes. +error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2022' + +[12:01:27 AM] Found 11 errors. Watching for file changes. @@ -710,12 +663,11 @@ Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: -/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -Semantic diagnostics in builder refreshed for:: +No cached semantic diagnostics in the builder:: No shapes updated in the builder:: @@ -740,14 +692,11 @@ Scheduling invalidateFailedLookup Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/node_modules/foo/index.d.ts :: WatchInfo: /home/src/projects/project/node_modules 1 undefined Failed Lookup Locations Scheduling update Synchronizing program -[12:01:28 AM] File change detected. Starting incremental compilation... +[12:01:30 AM] File change detected. Starting incremental compilation... CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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 '/home/src/projects/project/node_modules/foo2/package.json'. File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. ======== Resolving module 'foo' from '/home/src/projects/project/index.mts'. ======== @@ -819,19 +768,31 @@ File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists a 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. -index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. - Try `npm i --save-dev @types/foo` if it exists or add a new declaration (.d.ts) file containing `declare module 'foo';` +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'CallableFunction'. + +error TS2318: Cannot find global type 'Function'. -1 import { foo } from "foo"; -   ~~~~~ +error TS2318: Cannot find global type 'IArguments'. -index.mts:2:21 - error TS7016: Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type. - Try `npm i --save-dev @types/bar` if it exists or add a new declaration (.d.ts) file containing `declare module 'bar';` +error TS2318: Cannot find global type 'NewableFunction'. -2 import { bar } from "bar"; -   ~~~~~ +error TS2318: Cannot find global type 'Number'. -[12:01:29 AM] Found 2 errors. Watching for file changes. +error TS2318: Cannot find global type 'Object'. + +error TS2318: Cannot find global type 'RegExp'. + +error TS2318: Cannot find global type 'String'. + +error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2022' + +[12:01:31 AM] Found 11 errors. Watching for file changes. @@ -839,12 +800,11 @@ Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: -/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -Semantic diagnostics in builder refreshed for:: +No cached semantic diagnostics in the builder:: No shapes updated in the builder:: @@ -871,14 +831,11 @@ Scheduling invalidateFailedLookup Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/node_modules/@types/bar/index.d.ts :: WatchInfo: /home/src/projects/project/node_modules 1 undefined Failed Lookup Locations Scheduling update Synchronizing program -[12:01:32 AM] File change detected. Starting incremental compilation... +[12:01:34 AM] File change detected. Starting incremental compilation... CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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 '/home/src/projects/project/node_modules/foo2/package.json' exists according to earlier cached lookups. Found 'package.json' at '/home/src/projects/project/node_modules/@types/bar2/package.json'. Reusing resolution of module 'foo' from '/home/src/projects/project/index.mts' of old program, it was successfully resolved to '/home/src/projects/project/node_modules/foo/index.mjs' with Package ID 'foo/index.mjs@1.0.0'. @@ -956,19 +913,31 @@ File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists a 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. -index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. - Try `npm i --save-dev @types/foo` if it exists or add a new declaration (.d.ts) file containing `declare module 'foo';` +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'CallableFunction'. + +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. + +error TS2318: Cannot find global type 'NewableFunction'. + +error TS2318: Cannot find global type 'Number'. -1 import { foo } from "foo"; -   ~~~~~ +error TS2318: Cannot find global type 'Object'. -index.mts:2:21 - error TS7016: Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type. - There are types at '/home/src/projects/project/node_modules/@types/bar/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar' library may need to update its package.json or typings. +error TS2318: Cannot find global type 'RegExp'. -2 import { bar } from "bar"; -   ~~~~~ +error TS2318: Cannot find global type 'String'. -[12:01:33 AM] Found 2 errors. Watching for file changes. +error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2022' + +[12:01:35 AM] Found 11 errors. Watching for file changes. @@ -976,12 +945,11 @@ Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: -/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -Semantic diagnostics in builder refreshed for:: +No cached semantic diagnostics in the builder:: No shapes updated in the builder:: @@ -1008,14 +976,11 @@ Scheduling invalidateFailedLookup Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/node_modules/foo/index.d.ts :: WatchInfo: /home/src/projects/project/node_modules 1 undefined Failed Lookup Locations Scheduling update Synchronizing program -[12:01:37 AM] File change detected. Starting incremental compilation... +[12:01:39 AM] File change detected. Starting incremental compilation... CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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 '/home/src/projects/project/node_modules/foo2/package.json'. File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. ======== Resolving module 'foo' from '/home/src/projects/project/index.mts'. ======== @@ -1074,19 +1039,31 @@ File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists a 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. -index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. - There are types at '/home/src/projects/project/node_modules/foo/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo' library may need to update its package.json or typings. +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'CallableFunction'. + +error TS2318: Cannot find global type 'Function'. -1 import { foo } from "foo"; -   ~~~~~ +error TS2318: Cannot find global type 'IArguments'. -index.mts:2:21 - error TS7016: Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type. - There are types at '/home/src/projects/project/node_modules/@types/bar/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar' library may need to update its package.json or typings. +error TS2318: Cannot find global type 'NewableFunction'. -2 import { bar } from "bar"; -   ~~~~~ +error TS2318: Cannot find global type 'Number'. -[12:01:38 AM] Found 2 errors. Watching for file changes. +error TS2318: Cannot find global type 'Object'. + +error TS2318: Cannot find global type 'RegExp'. + +error TS2318: Cannot find global type 'String'. + +error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2022' + +[12:01:40 AM] Found 11 errors. Watching for file changes. @@ -1094,12 +1071,11 @@ Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: -/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -Semantic diagnostics in builder refreshed for:: +No cached semantic diagnostics in the builder:: No shapes updated in the builder:: @@ -1136,14 +1112,11 @@ Scheduling invalidateFailedLookup Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/node_modules/@types/bar/package.json 1:: WatchInfo: /home/src/projects/project/node_modules/@types/bar/package.json 2000 undefined File location affecting resolution Scheduling update Synchronizing program -[12:01:42 AM] File change detected. Starting incremental compilation... +[12:01:44 AM] File change detected. Starting incremental compilation... CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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 '/home/src/projects/project/node_modules/foo2/package.json' exists according to earlier cached lookups. File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. Reusing resolution of module 'foo' from '/home/src/projects/project/index.mts' of old program, it was successfully resolved to '/home/src/projects/project/node_modules/foo/index.mjs' with Package ID 'foo/index.mjs@1.0.0'. @@ -1185,13 +1158,31 @@ File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists a 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. -index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. - There are types at '/home/src/projects/project/node_modules/foo/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo' library may need to update its package.json or typings. +error TS2318: Cannot find global type 'Array'. -1 import { foo } from "foo"; -   ~~~~~ +error TS2318: Cannot find global type 'Boolean'. -[12:01:49 AM] Found 1 error. Watching for file changes. +error TS2318: Cannot find global type 'CallableFunction'. + +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. + +error TS2318: Cannot find global type 'NewableFunction'. + +error TS2318: Cannot find global type 'Number'. + +error TS2318: Cannot find global type 'Object'. + +error TS2318: Cannot find global type 'RegExp'. + +error TS2318: Cannot find global type 'String'. + +error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2022' + +[12:01:51 AM] Found 11 errors. Watching for file changes. @@ -1199,27 +1190,24 @@ Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: -/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -Semantic diagnostics in builder refreshed for:: -/home/src/projects/project/node_modules/@types/bar/index.d.ts -/home/src/projects/project/index.mts +No cached semantic diagnostics in the builder:: Shape signatures in builder refreshed for:: /home/src/projects/project/node_modules/@types/bar/index.d.ts (used version) /home/src/projects/project/index.mts (computed .d.ts) PolledWatches:: +/a/lib/lib.es2022.full.d.ts: + {"pollingInterval":500} /home/src/projects/node_modules: {"pollingInterval":500} FsWatches:: -/a/lib/lib.es2022.full.d.ts: - {} /home/src/projects: {} /home/src/projects/project: @@ -1255,13 +1243,12 @@ exitCode:: ExitStatus.undefined //// [/home/src/projects/project/index.mjs] file written with same contents //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.es2022.full.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"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":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[5],"options":{"module":100,"strict":true},"fileIdsList":[[2,3,4]],"referencedMap":[[5,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,[5,[{"file":"./index.mts","start":20,"length":5,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"foo","mode":99}}]}}]],2,4,3]},"version":"FakeTSVersion"} +{"program":{"fileNames":["./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"fileInfos":[{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[4],"options":{"module":100,"strict":true},"fileIdsList":[[1,2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { "program": { "fileNames": [ - "../../../../a/lib/lib.es2022.full.d.ts", "./node_modules/@types/bar/index.d.ts", "./node_modules/foo2/index.d.ts", "./node_modules/@types/bar2/index.d.ts", @@ -1275,17 +1262,6 @@ exitCode:: ExitStatus.undefined ] ], "fileInfos": { - "../../../../a/lib/lib.es2022.full.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/@types/bar/index.d.ts": { "original": { "version": "-9556021903-export declare const bar: number;", @@ -1326,7 +1302,7 @@ exitCode:: ExitStatus.undefined }, "root": [ [ - 5, + 4, "./index.mts" ] ], @@ -1341,41 +1317,10 @@ exitCode:: ExitStatus.undefined "./node_modules/@types/bar2/index.d.ts" ] }, - "exportedModulesMap": {}, - "semanticDiagnosticsPerFile": [ - "../../../../a/lib/lib.es2022.full.d.ts", - [ - "./index.mts", - [ - { - "file": "./index.mts", - "start": 20, - "length": 5, - "code": 7016, - "category": 1, - "messageText": { - "messageText": "Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type.", - "category": 1, - "code": 7016, - "next": [ - { - "info": { - "moduleReference": "foo", - "mode": 99 - } - } - ] - } - } - ] - ], - "./node_modules/@types/bar/index.d.ts", - "./node_modules/@types/bar2/index.d.ts", - "./node_modules/foo2/index.d.ts" - ] + "exportedModulesMap": {} }, "version": "FakeTSVersion", - "size": 1582 + "size": 760 } @@ -1411,14 +1356,11 @@ Scheduling invalidateFailedLookup Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/node_modules/foo/package.json 1:: WatchInfo: /home/src/projects/project/node_modules/foo/package.json 2000 undefined File location affecting resolution Scheduling update Synchronizing program -[12:01:57 AM] File change detected. Starting incremental compilation... +[12:01:59 AM] File change detected. Starting incremental compilation... CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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 '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. File '/home/src/projects/project/node_modules/foo2/package.json' exists according to earlier cached lookups. File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. @@ -1454,7 +1396,31 @@ File '/a/package.json' does not exist according to earlier cached lookups. File '/package.json' does not exist according to earlier cached lookups. DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Failed Lookup Locations Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Failed Lookup Locations -[12:02:04 AM] Found 0 errors. Watching for file changes. +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'CallableFunction'. + +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. + +error TS2318: Cannot find global type 'NewableFunction'. + +error TS2318: Cannot find global type 'Number'. + +error TS2318: Cannot find global type 'Object'. + +error TS2318: Cannot find global type 'RegExp'. + +error TS2318: Cannot find global type 'String'. + +error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2022' + +[12:02:06 AM] Found 11 errors. Watching for file changes. @@ -1462,28 +1428,27 @@ Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: -/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -Semantic diagnostics in builder refreshed for:: -/home/src/projects/project/node_modules/foo/index.d.ts -/home/src/projects/project/index.mts +No cached semantic diagnostics in the builder:: Shape signatures in builder refreshed for:: /home/src/projects/project/node_modules/foo/index.d.ts (used version) /home/src/projects/project/index.mts (computed .d.ts) +PolledWatches:: +/a/lib/lib.es2022.full.d.ts: + {"pollingInterval":500} + PolledWatches *deleted*:: /home/src/projects/node_modules: {"pollingInterval":500} FsWatches:: -/a/lib/lib.es2022.full.d.ts: - {} /home/src/projects: {} /home/src/projects/project: @@ -1521,13 +1486,12 @@ exitCode:: ExitStatus.undefined //// [/home/src/projects/project/index.mjs] file written with same contents //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.es2022.full.d.ts","./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"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":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[6],"options":{"module":100,"strict":true},"fileIdsList":[[2,3,4,5]],"referencedMap":[[6,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,6,3,5,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"fileInfos":[{"version":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[5],"options":{"module":100,"strict":true},"fileIdsList":[[1,2,3,4]],"referencedMap":[[5,1]],"exportedModulesMap":[]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { "program": { "fileNames": [ - "../../../../a/lib/lib.es2022.full.d.ts", "./node_modules/foo/index.d.ts", "./node_modules/@types/bar/index.d.ts", "./node_modules/foo2/index.d.ts", @@ -1543,17 +1507,6 @@ exitCode:: ExitStatus.undefined ] ], "fileInfos": { - "../../../../a/lib/lib.es2022.full.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/foo/index.d.ts": { "original": { "version": "-5214938848-export declare const foo: number;", @@ -1603,7 +1556,7 @@ exitCode:: ExitStatus.undefined }, "root": [ [ - 6, + 5, "./index.mts" ] ], @@ -1619,18 +1572,10 @@ exitCode:: ExitStatus.undefined "./node_modules/@types/bar2/index.d.ts" ] }, - "exportedModulesMap": {}, - "semanticDiagnosticsPerFile": [ - "../../../../a/lib/lib.es2022.full.d.ts", - "./index.mts", - "./node_modules/@types/bar/index.d.ts", - "./node_modules/@types/bar2/index.d.ts", - "./node_modules/foo/index.d.ts", - "./node_modules/foo2/index.d.ts" - ] + "exportedModulesMap": {} }, "version": "FakeTSVersion", - "size": 1373 + "size": 872 } @@ -1663,14 +1608,11 @@ Scheduling invalidateFailedLookup Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/node_modules/@types/bar2/package.json 1:: WatchInfo: /home/src/projects/project/node_modules/@types/bar2/package.json 2000 undefined File location affecting resolution Scheduling update Synchronizing program -[12:02:11 AM] File change detected. Starting incremental compilation... +[12:02:13 AM] File change detected. Starting incremental compilation... CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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 '/home/src/projects/project/node_modules/foo/package.json' exists according to earlier cached lookups. File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. File '/home/src/projects/project/node_modules/foo2/package.json' exists according to earlier cached lookups. @@ -1755,13 +1697,31 @@ File '/package.json' does not exist according to earlier cached lookups. FileWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types/bar2/index.d.ts 250 undefined Source file DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Failed Lookup Locations Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Failed Lookup Locations -index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. - There are types at '/home/src/projects/project/node_modules/@types/bar2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar2' library may need to update its package.json or typings. +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'CallableFunction'. + +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. + +error TS2318: Cannot find global type 'NewableFunction'. + +error TS2318: Cannot find global type 'Number'. + +error TS2318: Cannot find global type 'Object'. -4 import { bar2 } from "bar2"; -   ~~~~~~ +error TS2318: Cannot find global type 'RegExp'. -[12:02:18 AM] Found 1 error. Watching for file changes. +error TS2318: Cannot find global type 'String'. + +error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2022' + +[12:02:20 AM] Found 11 errors. Watching for file changes. @@ -1769,25 +1729,23 @@ Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: -/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/index.mts -Semantic diagnostics in builder refreshed for:: -/home/src/projects/project/index.mts +No cached semantic diagnostics in the builder:: Shape signatures in builder refreshed for:: /home/src/projects/project/index.mts (computed .d.ts) PolledWatches:: +/a/lib/lib.es2022.full.d.ts: + {"pollingInterval":500} /home/src/projects/node_modules: *new* {"pollingInterval":500} FsWatches:: -/a/lib/lib.es2022.full.d.ts: - {} /home/src/projects: {} /home/src/projects/project: @@ -1827,13 +1785,12 @@ exitCode:: ExitStatus.undefined //// [/home/src/projects/project/index.mjs] file written with same contents //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.es2022.full.d.ts","./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./index.mts"],"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":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[5],"options":{"module":100,"strict":true},"fileIdsList":[[2,3,4]],"referencedMap":[[5,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,[5,[{"file":"./index.mts","start":104,"length":6,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"bar2","mode":99}}]}}]],3,2,4]},"version":"FakeTSVersion"} +{"program":{"fileNames":["./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./index.mts"],"fileInfos":[{"version":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[4],"options":{"module":100,"strict":true},"fileIdsList":[[1,2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { "program": { "fileNames": [ - "../../../../a/lib/lib.es2022.full.d.ts", "./node_modules/foo/index.d.ts", "./node_modules/@types/bar/index.d.ts", "./node_modules/foo2/index.d.ts", @@ -1847,17 +1804,6 @@ exitCode:: ExitStatus.undefined ] ], "fileInfos": { - "../../../../a/lib/lib.es2022.full.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/foo/index.d.ts": { "original": { "version": "-5214938848-export declare const foo: number;", @@ -1898,7 +1844,7 @@ exitCode:: ExitStatus.undefined }, "root": [ [ - 5, + 4, "./index.mts" ] ], @@ -1913,41 +1859,10 @@ exitCode:: ExitStatus.undefined "./node_modules/foo2/index.d.ts" ] }, - "exportedModulesMap": {}, - "semanticDiagnosticsPerFile": [ - "../../../../a/lib/lib.es2022.full.d.ts", - [ - "./index.mts", - [ - { - "file": "./index.mts", - "start": 104, - "length": 6, - "code": 7016, - "category": 1, - "messageText": { - "messageText": "Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type.", - "category": 1, - "code": 7016, - "next": [ - { - "info": { - "moduleReference": "bar2", - "mode": 99 - } - } - ] - } - } - ] - ], - "./node_modules/@types/bar/index.d.ts", - "./node_modules/foo/index.d.ts", - "./node_modules/foo2/index.d.ts" - ] + "exportedModulesMap": {} }, "version": "FakeTSVersion", - "size": 1577 + "size": 751 } @@ -1982,14 +1897,11 @@ Scheduling invalidateFailedLookup Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/node_modules/foo2/package.json 1:: WatchInfo: /home/src/projects/project/node_modules/foo2/package.json 2000 undefined File location affecting resolution Scheduling update Synchronizing program -[12:02:26 AM] File change detected. Starting incremental compilation... +[12:02:28 AM] File change detected. Starting incremental compilation... CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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 '/home/src/projects/project/node_modules/foo/package.json' exists according to earlier cached lookups. File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. Found 'package.json' at '/home/src/projects/project/node_modules/foo2/package.json'. @@ -2050,19 +1962,31 @@ 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: /home/src/projects/project/node_modules/foo2/index.d.ts 250 undefined Source file -index.mts:3:22 - error TS7016: Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type. - There are types at '/home/src/projects/project/node_modules/foo2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo2' library may need to update its package.json or typings. +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'CallableFunction'. + +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. + +error TS2318: Cannot find global type 'NewableFunction'. + +error TS2318: Cannot find global type 'Number'. + +error TS2318: Cannot find global type 'Object'. -3 import { foo2 } from "foo2"; -   ~~~~~~ +error TS2318: Cannot find global type 'RegExp'. -index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. - There are types at '/home/src/projects/project/node_modules/@types/bar2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar2' library may need to update its package.json or typings. +error TS2318: Cannot find global type 'String'. -4 import { bar2 } from "bar2"; -   ~~~~~~ +error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2022' -[12:02:33 AM] Found 2 errors. Watching for file changes. +[12:02:35 AM] Found 11 errors. Watching for file changes. @@ -2070,24 +1994,22 @@ Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: -/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts -Semantic diagnostics in builder refreshed for:: -/home/src/projects/project/index.mts +No cached semantic diagnostics in the builder:: Shape signatures in builder refreshed for:: /home/src/projects/project/index.mts (computed .d.ts) PolledWatches:: +/a/lib/lib.es2022.full.d.ts: + {"pollingInterval":500} /home/src/projects/node_modules: {"pollingInterval":500} FsWatches:: -/a/lib/lib.es2022.full.d.ts: - {} /home/src/projects: {} /home/src/projects/project: @@ -2125,13 +2047,12 @@ exitCode:: ExitStatus.undefined //// [/home/src/projects/project/index.mjs] file written with same contents //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../../../a/lib/lib.es2022.full.d.ts","./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./index.mts"],"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":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[4],"options":{"module":100,"strict":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,[4,[{"file":"./index.mts","start":75,"length":6,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"foo2","mode":99}}]}},{"file":"./index.mts","start":104,"length":6,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"bar2","mode":99}}]}}]],3,2]},"version":"FakeTSVersion"} +{"program":{"fileNames":["./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./index.mts"],"fileInfos":[{"version":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[3],"options":{"module":100,"strict":true},"fileIdsList":[[1,2]],"referencedMap":[[3,1]],"exportedModulesMap":[]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { "program": { "fileNames": [ - "../../../../a/lib/lib.es2022.full.d.ts", "./node_modules/foo/index.d.ts", "./node_modules/@types/bar/index.d.ts", "./index.mts" @@ -2143,17 +2064,6 @@ exitCode:: ExitStatus.undefined ] ], "fileInfos": { - "../../../../a/lib/lib.es2022.full.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/foo/index.d.ts": { "original": { "version": "-5214938848-export declare const foo: number;", @@ -2185,7 +2095,7 @@ exitCode:: ExitStatus.undefined }, "root": [ [ - 4, + 3, "./index.mts" ] ], @@ -2199,60 +2109,10 @@ exitCode:: ExitStatus.undefined "./node_modules/@types/bar/index.d.ts" ] }, - "exportedModulesMap": {}, - "semanticDiagnosticsPerFile": [ - "../../../../a/lib/lib.es2022.full.d.ts", - [ - "./index.mts", - [ - { - "file": "./index.mts", - "start": 75, - "length": 6, - "code": 7016, - "category": 1, - "messageText": { - "messageText": "Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type.", - "category": 1, - "code": 7016, - "next": [ - { - "info": { - "moduleReference": "foo2", - "mode": 99 - } - } - ] - } - }, - { - "file": "./index.mts", - "start": 104, - "length": 6, - "code": 7016, - "category": 1, - "messageText": { - "messageText": "Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type.", - "category": 1, - "code": 7016, - "next": [ - { - "info": { - "moduleReference": "bar2", - "mode": 99 - } - } - ] - } - } - ] - ], - "./node_modules/@types/bar/index.d.ts", - "./node_modules/foo/index.d.ts" - ] + "exportedModulesMap": {} }, "version": "FakeTSVersion", - "size": 1783 + "size": 637 } @@ -2274,14 +2134,11 @@ Scheduling invalidateFailedLookup Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/node_modules/@types/bar2/index.d.ts :: WatchInfo: /home/src/projects/project/node_modules 1 undefined Failed Lookup Locations Scheduling update Synchronizing program -[12:02:38 AM] File change detected. Starting incremental compilation... +[12:02:40 AM] File change detected. Starting incremental compilation... CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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 '/home/src/projects/project/node_modules/foo/package.json' exists according to earlier cached lookups. File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. Reusing resolution of module 'foo' from '/home/src/projects/project/index.mts' of old program, it was successfully resolved to '/home/src/projects/project/node_modules/foo/index.d.ts' with Package ID 'foo/index.d.ts@1.0.0'. @@ -2372,19 +2229,31 @@ File '/home/src/projects/project/node_modules/@types/bar/package.json' exists ac 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. -index.mts:3:22 - error TS7016: Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type. - There are types at '/home/src/projects/project/node_modules/foo2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo2' library may need to update its package.json or typings. +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'CallableFunction'. + +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. + +error TS2318: Cannot find global type 'NewableFunction'. -3 import { foo2 } from "foo2"; -   ~~~~~~ +error TS2318: Cannot find global type 'Number'. -index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. - Try `npm i --save-dev @types/bar2` if it exists or add a new declaration (.d.ts) file containing `declare module 'bar2';` +error TS2318: Cannot find global type 'Object'. -4 import { bar2 } from "bar2"; -   ~~~~~~ +error TS2318: Cannot find global type 'RegExp'. -[12:02:39 AM] Found 2 errors. Watching for file changes. +error TS2318: Cannot find global type 'String'. + +error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2022' + +[12:02:41 AM] Found 11 errors. Watching for file changes. @@ -2392,12 +2261,11 @@ Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: -/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts -Semantic diagnostics in builder refreshed for:: +No cached semantic diagnostics in the builder:: No shapes updated in the builder:: @@ -2422,14 +2290,11 @@ Scheduling invalidateFailedLookup Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/node_modules/foo2/index.d.ts :: WatchInfo: /home/src/projects/project/node_modules 1 undefined Failed Lookup Locations Scheduling update Synchronizing program -[12:02:42 AM] File change detected. Starting incremental compilation... +[12:02:44 AM] File change detected. Starting incremental compilation... CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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 '/home/src/projects/project/node_modules/foo/package.json' exists according to earlier cached lookups. File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. Reusing resolution of module 'foo' from '/home/src/projects/project/index.mts' of old program, it was successfully resolved to '/home/src/projects/project/node_modules/foo/index.d.ts' with Package ID 'foo/index.d.ts@1.0.0'. @@ -2501,19 +2366,31 @@ File '/home/src/projects/project/node_modules/@types/bar/package.json' exists ac 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. -index.mts:3:22 - error TS7016: Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type. - Try `npm i --save-dev @types/foo2` if it exists or add a new declaration (.d.ts) file containing `declare module 'foo2';` +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. -3 import { foo2 } from "foo2"; -   ~~~~~~ +error TS2318: Cannot find global type 'CallableFunction'. -index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. - Try `npm i --save-dev @types/bar2` if it exists or add a new declaration (.d.ts) file containing `declare module 'bar2';` +error TS2318: Cannot find global type 'Function'. -4 import { bar2 } from "bar2"; -   ~~~~~~ +error TS2318: Cannot find global type 'IArguments'. -[12:02:43 AM] Found 2 errors. Watching for file changes. +error TS2318: Cannot find global type 'NewableFunction'. + +error TS2318: Cannot find global type 'Number'. + +error TS2318: Cannot find global type 'Object'. + +error TS2318: Cannot find global type 'RegExp'. + +error TS2318: Cannot find global type 'String'. + +error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2022' + +[12:02:45 AM] Found 11 errors. Watching for file changes. @@ -2521,12 +2398,11 @@ Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: -/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts -Semantic diagnostics in builder refreshed for:: +No cached semantic diagnostics in the builder:: No shapes updated in the builder:: @@ -2553,14 +2429,11 @@ Scheduling invalidateFailedLookup Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/node_modules/@types/bar2/index.d.ts :: WatchInfo: /home/src/projects/project/node_modules 1 undefined Failed Lookup Locations Scheduling update Synchronizing program -[12:02:46 AM] File change detected. Starting incremental compilation... +[12:02:48 AM] File change detected. Starting incremental compilation... CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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 '/home/src/projects/project/node_modules/foo/package.json' exists according to earlier cached lookups. File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. Reusing resolution of module 'foo' from '/home/src/projects/project/index.mts' of old program, it was successfully resolved to '/home/src/projects/project/node_modules/foo/index.d.ts' with Package ID 'foo/index.d.ts@1.0.0'. @@ -2638,19 +2511,31 @@ File '/home/src/projects/project/node_modules/@types/bar/package.json' exists ac 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. -index.mts:3:22 - error TS7016: Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type. - Try `npm i --save-dev @types/foo2` if it exists or add a new declaration (.d.ts) file containing `declare module 'foo2';` +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'CallableFunction'. + +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. -3 import { foo2 } from "foo2"; -   ~~~~~~ +error TS2318: Cannot find global type 'NewableFunction'. -index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. - There are types at '/home/src/projects/project/node_modules/@types/bar2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar2' library may need to update its package.json or typings. +error TS2318: Cannot find global type 'Number'. -4 import { bar2 } from "bar2"; -   ~~~~~~ +error TS2318: Cannot find global type 'Object'. -[12:02:47 AM] Found 2 errors. Watching for file changes. +error TS2318: Cannot find global type 'RegExp'. + +error TS2318: Cannot find global type 'String'. + +error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2022' + +[12:02:49 AM] Found 11 errors. Watching for file changes. @@ -2658,12 +2543,11 @@ Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: -/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts -Semantic diagnostics in builder refreshed for:: +No cached semantic diagnostics in the builder:: No shapes updated in the builder:: @@ -2690,14 +2574,11 @@ Scheduling invalidateFailedLookup Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/node_modules/foo2/index.d.ts :: WatchInfo: /home/src/projects/project/node_modules 1 undefined Failed Lookup Locations Scheduling update Synchronizing program -[12:02:51 AM] File change detected. Starting incremental compilation... +[12:02:53 AM] File change detected. Starting incremental compilation... CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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 '/home/src/projects/project/node_modules/foo/package.json' exists according to earlier cached lookups. File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. Reusing resolution of module 'foo' from '/home/src/projects/project/index.mts' of old program, it was successfully resolved to '/home/src/projects/project/node_modules/foo/index.d.ts' with Package ID 'foo/index.d.ts@1.0.0'. @@ -2756,19 +2637,31 @@ File '/home/src/projects/project/node_modules/@types/bar/package.json' exists ac 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. -index.mts:3:22 - error TS7016: Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type. - There are types at '/home/src/projects/project/node_modules/foo2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo2' library may need to update its package.json or typings. +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'CallableFunction'. + +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. + +error TS2318: Cannot find global type 'NewableFunction'. + +error TS2318: Cannot find global type 'Number'. + +error TS2318: Cannot find global type 'Object'. -3 import { foo2 } from "foo2"; -   ~~~~~~ +error TS2318: Cannot find global type 'RegExp'. -index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. - There are types at '/home/src/projects/project/node_modules/@types/bar2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar2' library may need to update its package.json or typings. +error TS2318: Cannot find global type 'String'. -4 import { bar2 } from "bar2"; -   ~~~~~~ +error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2022' -[12:02:52 AM] Found 2 errors. Watching for file changes. +[12:02:54 AM] Found 11 errors. Watching for file changes. @@ -2776,12 +2669,11 @@ Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: -/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts -Semantic diagnostics in builder refreshed for:: +No cached semantic diagnostics in the builder:: No shapes updated in the builder:: diff --git a/tests/baselines/reference/tsserver/moduleResolution/node10Result.js b/tests/baselines/reference/tsserver/moduleResolution/node10Result.js index bd390b243b7d4..f62d7e37748a3 100644 --- a/tests/baselines/reference/tsserver/moduleResolution/node10Result.js +++ b/tests/baselines/reference/tsserver/moduleResolution/node10Result.js @@ -124,7 +124,7 @@ import { foo2 } from "foo2"; import { bar2 } from "bar2"; -//// [/a/lib/lib.es2022.full.d.ts] +//// [/lib/lib.es2022.full.d.ts] /// interface Boolean {} interface Function {} @@ -140,7 +140,7 @@ interface Array { length: number; [n: number]: T; } //// [/home/src/projects/project/tsconfig.json] {"compilerOptions":{"module":"node16","moduleResolution":"node16","traceResolution":true,"incremental":true,"strict":true,"types":[]},"files":["index.mts"]} -//// [/a/lib/lib.d.ts] +//// [/a/lib/lib.esnext.full.d.ts] /// interface Boolean {} interface Function {} @@ -363,7 +363,6 @@ Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/@types/ba Info seq [hh:mm:ss:mss] File '/a/lib/package.json' does not exist. Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist. Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/lib/lib.es2022.full.d.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects 0 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects 0 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations @@ -378,17 +377,15 @@ Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/pro Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/foo2/package.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/bar2/package.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types/bar2/package.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/lib/lib.es2022.full.d.ts 500 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Missing file Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" +Info seq [hh:mm:ss:mss] Files (3) /home/src/projects/project/node_modules/foo2/index.d.ts Text-1 "export declare const foo2: number;" /home/src/projects/project/node_modules/@types/bar2/index.d.ts Text-1 "export declare const bar2: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" - ../../../../a/lib/lib.es2022.full.d.ts - Default library for target 'es2022' node_modules/foo2/index.d.ts Imported via "foo2" from file 'index.mts' with packageId 'foo2/index.d.ts@1.0.0' File is CommonJS module because 'node_modules/foo2/package.json' does not have field "type" @@ -426,8 +423,8 @@ Info seq [hh:mm:ss:mss] event: "tsSize": 112, "tsx": 0, "tsxSize": 0, - "dts": 3, - "dtsSize": 402, + "dts": 2, + "dtsSize": 68, "deferred": 0, "deferredSize": 0 }, @@ -464,11 +461,67 @@ Info seq [hh:mm:ss:mss] event: "body": { "triggerFile": "/home/src/projects/project/index.mts", "configFile": "/home/src/projects/project/tsconfig.json", - "diagnostics": [] + "diagnostics": [ + { + "text": "File '/a/lib/lib.es2022.full.d.ts' not found.\n The file is in the program because:\n Default library for target 'es2022'", + "code": 6053, + "category": "error" + }, + { + "text": "Cannot find global type 'Array'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Boolean'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'CallableFunction'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Function'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'IArguments'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'NewableFunction'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Number'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Object'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'RegExp'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'String'.", + "code": 2318, + "category": "error" + } + ] } } Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) +Info seq [hh:mm:ss:mss] Files (3) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -481,12 +534,12 @@ Info seq [hh:mm:ss:mss] response: After request PolledWatches:: +/a/lib/lib.es2022.full.d.ts: *new* + {"pollingInterval":500} /home/src/projects/node_modules: *new* {"pollingInterval":500} FsWatches:: -/a/lib/lib.es2022.full.d.ts: *new* - {} /home/src/projects: *new* {} /home/src/projects/project: *new* @@ -716,9 +769,6 @@ Before running Timeout callback:: count: 3 Info seq [hh:mm:ss:mss] Running: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] File '/a/lib/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/foo2/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] Found 'package.json' at '/home/src/projects/project/node_modules/@types/bar2/package.json'. Info seq [hh:mm:ss:mss] Reusing resolution of module 'foo' from '/home/src/projects/project/index.mts' of old program, it was successfully resolved to '/home/src/projects/project/node_modules/foo/index.mjs' with Package ID 'foo/index.mjs@1.0.0'. @@ -811,8 +861,7 @@ Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earl Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 2 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" +Info seq [hh:mm:ss:mss] Files (3) /home/src/projects/project/node_modules/foo2/index.d.ts Text-1 "export declare const foo2: number;" /home/src/projects/project/node_modules/@types/bar2/index.d.ts Text-1 "export declare const bar2: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" @@ -821,7 +870,7 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) +Info seq [hh:mm:ss:mss] Files (3) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -829,7 +878,7 @@ Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/index.mts Project Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) +Info seq [hh:mm:ss:mss] Files (3) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -879,9 +928,6 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] File '/a/lib/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] Found 'package.json' at '/home/src/projects/project/node_modules/foo2/package.json'. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] ======== Resolving module 'foo' from '/home/src/projects/project/index.mts'. ======== @@ -955,8 +1001,7 @@ Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earl Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 3 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" +Info seq [hh:mm:ss:mss] Files (3) /home/src/projects/project/node_modules/foo2/index.d.ts Text-1 "export declare const foo2: number;" /home/src/projects/project/node_modules/@types/bar2/index.d.ts Text-1 "export declare const bar2: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" @@ -1045,7 +1090,7 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) +Info seq [hh:mm:ss:mss] Files (3) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -1053,7 +1098,7 @@ Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/index.mts Project Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) +Info seq [hh:mm:ss:mss] Files (3) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -1105,9 +1150,6 @@ export declare const bar: number; Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] File '/a/lib/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/foo2/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] Found 'package.json' at '/home/src/projects/project/node_modules/@types/bar2/package.json'. Info seq [hh:mm:ss:mss] Reusing resolution of module 'foo' from '/home/src/projects/project/index.mts' of old program, it was successfully resolved to '/home/src/projects/project/node_modules/foo/index.mjs' with Package ID 'foo/index.mjs@1.0.0'. @@ -1187,8 +1229,7 @@ Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earl Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 4 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" +Info seq [hh:mm:ss:mss] Files (3) /home/src/projects/project/node_modules/foo2/index.d.ts Text-1 "export declare const foo2: number;" /home/src/projects/project/node_modules/@types/bar2/index.d.ts Text-1 "export declare const bar2: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" @@ -1277,7 +1318,7 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) +Info seq [hh:mm:ss:mss] Files (3) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -1285,7 +1326,7 @@ Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/index.mts Project Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) +Info seq [hh:mm:ss:mss] Files (3) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -1337,9 +1378,6 @@ export declare const foo: number; Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] File '/a/lib/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] Found 'package.json' at '/home/src/projects/project/node_modules/foo2/package.json'. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] ======== Resolving module 'foo' from '/home/src/projects/project/index.mts'. ======== @@ -1400,8 +1438,7 @@ Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earl Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 5 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" +Info seq [hh:mm:ss:mss] Files (3) /home/src/projects/project/node_modules/foo2/index.d.ts Text-1 "export declare const foo2: number;" /home/src/projects/project/node_modules/@types/bar2/index.d.ts Text-1 "export declare const bar2: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" @@ -1490,7 +1527,7 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) +Info seq [hh:mm:ss:mss] Files (3) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -1498,7 +1535,7 @@ Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/index.mts Project Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) +Info seq [hh:mm:ss:mss] Files (3) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -1558,9 +1595,6 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] File '/a/lib/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/foo2/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] Reusing resolution of module 'foo' from '/home/src/projects/project/index.mts' of old program, it was successfully resolved to '/home/src/projects/project/node_modules/foo/index.mjs' with Package ID 'foo/index.mjs@1.0.0'. @@ -1603,16 +1637,13 @@ Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earl Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 6 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (5) - /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" +Info seq [hh:mm:ss:mss] Files (4) /home/src/projects/project/node_modules/@types/bar/index.d.ts Text-1 "export declare const bar: number;" /home/src/projects/project/node_modules/foo2/index.d.ts Text-1 "export declare const foo2: number;" /home/src/projects/project/node_modules/@types/bar2/index.d.ts Text-1 "export declare const bar2: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" - ../../../../a/lib/lib.es2022.full.d.ts - Default library for target 'es2022' node_modules/@types/bar/index.d.ts Imported via "bar" from file 'index.mts' with packageId '@types/bar/index.d.ts@1.0.0' File is CommonJS module because 'node_modules/@types/bar/package.json' does not have field "type" @@ -1696,7 +1727,7 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (5) +Info seq [hh:mm:ss:mss] Files (4) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -1704,7 +1735,7 @@ Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/index.mts Project Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (5) +Info seq [hh:mm:ss:mss] Files (4) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -1766,9 +1797,6 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] File '/a/lib/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/foo2/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. @@ -1805,8 +1833,7 @@ Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/project Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 7 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (6) - /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" +Info seq [hh:mm:ss:mss] Files (5) /home/src/projects/project/node_modules/foo/index.d.ts Text-1 "export declare const foo: number;" /home/src/projects/project/node_modules/@types/bar/index.d.ts Text-1 "export declare const bar: number;" /home/src/projects/project/node_modules/foo2/index.d.ts Text-1 "export declare const foo2: number;" @@ -1814,8 +1841,6 @@ Info seq [hh:mm:ss:mss] Files (6) /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" - ../../../../a/lib/lib.es2022.full.d.ts - Default library for target 'es2022' node_modules/foo/index.d.ts Imported via "foo" from file 'index.mts' with packageId 'foo/index.d.ts@1.0.0' File is CommonJS module because 'node_modules/foo/package.json' does not have field "type" @@ -1845,13 +1870,15 @@ Info seq [hh:mm:ss:mss] event: After running Timeout callback:: count: 1 24: *ensureProjectForOpenFiles* +PolledWatches:: +/a/lib/lib.es2022.full.d.ts: + {"pollingInterval":500} + PolledWatches *deleted*:: /home/src/projects/node_modules: {"pollingInterval":500} FsWatches:: -/a/lib/lib.es2022.full.d.ts: - {} /home/src/projects: {} /home/src/projects/project: @@ -1918,7 +1945,7 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (6) +Info seq [hh:mm:ss:mss] Files (5) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -1926,7 +1953,7 @@ Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/index.mts Project Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (6) +Info seq [hh:mm:ss:mss] Files (5) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -1985,9 +2012,6 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] File '/a/lib/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/foo/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/foo2/package.json' exists according to earlier cached lookups. @@ -2073,16 +2097,13 @@ Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/project Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 8 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (5) - /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" +Info seq [hh:mm:ss:mss] Files (4) /home/src/projects/project/node_modules/foo/index.d.ts Text-1 "export declare const foo: number;" /home/src/projects/project/node_modules/@types/bar/index.d.ts Text-1 "export declare const bar: number;" /home/src/projects/project/node_modules/foo2/index.d.ts Text-1 "export declare const foo2: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" - ../../../../a/lib/lib.es2022.full.d.ts - Default library for target 'es2022' node_modules/foo/index.d.ts Imported via "foo" from file 'index.mts' with packageId 'foo/index.d.ts@1.0.0' File is CommonJS module because 'node_modules/foo/package.json' does not have field "type" @@ -2110,12 +2131,12 @@ After running Timeout callback:: count: 1 28: *ensureProjectForOpenFiles* PolledWatches:: +/a/lib/lib.es2022.full.d.ts: + {"pollingInterval":500} /home/src/projects/node_modules: *new* {"pollingInterval":500} FsWatches:: -/a/lib/lib.es2022.full.d.ts: - {} /home/src/projects: {} /home/src/projects/project: @@ -2196,7 +2217,7 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (5) +Info seq [hh:mm:ss:mss] Files (4) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -2204,7 +2225,7 @@ Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/index.mts Project Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (5) +Info seq [hh:mm:ss:mss] Files (4) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -2265,9 +2286,6 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] File '/a/lib/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/foo/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] Found 'package.json' at '/home/src/projects/project/node_modules/foo2/package.json'. @@ -2329,15 +2347,12 @@ Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earl Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 9 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" +Info seq [hh:mm:ss:mss] Files (3) /home/src/projects/project/node_modules/foo/index.d.ts Text-1 "export declare const foo: number;" /home/src/projects/project/node_modules/@types/bar/index.d.ts Text-1 "export declare const bar: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" - ../../../../a/lib/lib.es2022.full.d.ts - Default library for target 'es2022' node_modules/foo/index.d.ts Imported via "foo" from file 'index.mts' with packageId 'foo/index.d.ts@1.0.0' File is CommonJS module because 'node_modules/foo/package.json' does not have field "type" @@ -2431,7 +2446,7 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) +Info seq [hh:mm:ss:mss] Files (3) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -2439,7 +2454,7 @@ Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/index.mts Project Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) +Info seq [hh:mm:ss:mss] Files (3) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -2489,9 +2504,6 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] File '/a/lib/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/foo/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] Reusing resolution of module 'foo' from '/home/src/projects/project/index.mts' of old program, it was successfully resolved to '/home/src/projects/project/node_modules/foo/index.d.ts' with Package ID 'foo/index.d.ts@1.0.0'. @@ -2584,8 +2596,7 @@ Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earl Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 10 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" +Info seq [hh:mm:ss:mss] Files (3) /home/src/projects/project/node_modules/foo/index.d.ts Text-1 "export declare const foo: number;" /home/src/projects/project/node_modules/@types/bar/index.d.ts Text-1 "export declare const bar: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" @@ -2674,7 +2685,7 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) +Info seq [hh:mm:ss:mss] Files (3) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -2682,7 +2693,7 @@ Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/index.mts Project Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) +Info seq [hh:mm:ss:mss] Files (3) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -2732,9 +2743,6 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] File '/a/lib/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/foo/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] Reusing resolution of module 'foo' from '/home/src/projects/project/index.mts' of old program, it was successfully resolved to '/home/src/projects/project/node_modules/foo/index.d.ts' with Package ID 'foo/index.d.ts@1.0.0'. @@ -2808,8 +2816,7 @@ Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earl Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 11 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" +Info seq [hh:mm:ss:mss] Files (3) /home/src/projects/project/node_modules/foo/index.d.ts Text-1 "export declare const foo: number;" /home/src/projects/project/node_modules/@types/bar/index.d.ts Text-1 "export declare const bar: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" @@ -2898,7 +2905,7 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) +Info seq [hh:mm:ss:mss] Files (3) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -2906,7 +2913,7 @@ Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/index.mts Project Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) +Info seq [hh:mm:ss:mss] Files (3) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -2958,9 +2965,6 @@ export declare const bar2: number; Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] File '/a/lib/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/foo/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] Reusing resolution of module 'foo' from '/home/src/projects/project/index.mts' of old program, it was successfully resolved to '/home/src/projects/project/node_modules/foo/index.d.ts' with Package ID 'foo/index.d.ts@1.0.0'. @@ -3040,8 +3044,7 @@ Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earl Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 12 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" +Info seq [hh:mm:ss:mss] Files (3) /home/src/projects/project/node_modules/foo/index.d.ts Text-1 "export declare const foo: number;" /home/src/projects/project/node_modules/@types/bar/index.d.ts Text-1 "export declare const bar: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" @@ -3130,7 +3133,7 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) +Info seq [hh:mm:ss:mss] Files (3) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -3138,7 +3141,7 @@ Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/index.mts Project Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) +Info seq [hh:mm:ss:mss] Files (3) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -3190,9 +3193,6 @@ export declare const foo2: number; Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] File '/a/lib/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/foo/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] Reusing resolution of module 'foo' from '/home/src/projects/project/index.mts' of old program, it was successfully resolved to '/home/src/projects/project/node_modules/foo/index.d.ts' with Package ID 'foo/index.d.ts@1.0.0'. @@ -3253,8 +3253,7 @@ Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earl Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 13 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" +Info seq [hh:mm:ss:mss] Files (3) /home/src/projects/project/node_modules/foo/index.d.ts Text-1 "export declare const foo: number;" /home/src/projects/project/node_modules/@types/bar/index.d.ts Text-1 "export declare const bar: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" @@ -3343,7 +3342,7 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) +Info seq [hh:mm:ss:mss] Files (3) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -3351,7 +3350,7 @@ Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/index.mts Project Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) +Info seq [hh:mm:ss:mss] Files (3) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: From 4e3597696e12e620222a4a08d2d44674a3148db7 Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Tue, 27 Jun 2023 16:08:30 -0700 Subject: [PATCH 8/9] Update src/testRunner/unittests/helpers/node10Result.ts Co-authored-by: Sheetal Nandi --- src/testRunner/unittests/helpers/node10Result.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/testRunner/unittests/helpers/node10Result.ts b/src/testRunner/unittests/helpers/node10Result.ts index 534143961953d..aa3e0b2581f35 100644 --- a/src/testRunner/unittests/helpers/node10Result.ts +++ b/src/testRunner/unittests/helpers/node10Result.ts @@ -82,6 +82,6 @@ export function getFsContentsForNode10Result(): FsContents { }, files: ["index.mts"] }), - [libFile.path.replace("lib.d.ts", "lib.esnext.full.d.ts")]: libFile.content, + [libFile.path.replace("lib.d.ts", "lib.es2022.full.d.ts")]: libFile.content, }; } From 4d47e76d0938d980bd096ca0c19a8a3a3567b8d5 Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Tue, 27 Jun 2023 16:09:16 -0700 Subject: [PATCH 9/9] Fix node10Result baselines --- .../tsc/moduleResolution/node10Result.js | 2 +- .../tscWatch/moduleResolution/node10Result.js | 766 ++++++++++-------- .../tsserver/moduleResolution/node10Result.js | 215 ++--- 3 files changed, 546 insertions(+), 437 deletions(-) diff --git a/tests/baselines/reference/tsc/moduleResolution/node10Result.js b/tests/baselines/reference/tsc/moduleResolution/node10Result.js index c31511842fb09..ae64bd457c45c 100644 --- a/tests/baselines/reference/tsc/moduleResolution/node10Result.js +++ b/tests/baselines/reference/tsc/moduleResolution/node10Result.js @@ -1,6 +1,6 @@ currentDirectory:: / useCaseSensitiveFileNames: false Input:: -//// [/a/lib/lib.esnext.full.d.ts] +//// [/a/lib/lib.es2022.full.d.ts] /// interface Boolean {} interface Function {} diff --git a/tests/baselines/reference/tscWatch/moduleResolution/node10Result.js b/tests/baselines/reference/tscWatch/moduleResolution/node10Result.js index 53fc1d9b01b11..b0e37abbf52b4 100644 --- a/tests/baselines/reference/tscWatch/moduleResolution/node10Result.js +++ b/tests/baselines/reference/tscWatch/moduleResolution/node10Result.js @@ -139,7 +139,7 @@ interface Array { length: number; [n: number]: T; } //// [/home/src/projects/project/tsconfig.json] {"compilerOptions":{"module":"node16","moduleResolution":"node16","traceResolution":true,"incremental":true,"strict":true,"types":[]},"files":["index.mts"]} -//// [/a/lib/lib.esnext.full.d.ts] +//// [/a/lib/lib.es2022.full.d.ts] /// interface Boolean {} interface Function {} @@ -335,6 +335,7 @@ FileWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types/ 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.es2022.full.d.ts 250 undefined Source file DirectoryWatcher:: Added:: WatchInfo: /home/src/projects 0 undefined Failed Lookup Locations Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects 0 undefined Failed Lookup Locations DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Failed Lookup Locations @@ -349,38 +350,25 @@ FileWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types/ FileWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/foo2/package.json 2000 undefined File location affecting resolution FileWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/bar2/package.json 2000 undefined File location affecting resolution FileWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types/bar2/package.json 2000 undefined File location affecting resolution -FileWatcher:: Added:: WatchInfo: /a/lib/lib.es2022.full.d.ts 500 undefined Missing file DirectoryWatcher:: Triggered with /home/src/projects/project/index.mjs :: WatchInfo: /home/src/projects/project 0 undefined Failed Lookup Locations Scheduling invalidateFailedLookup Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/index.mjs :: WatchInfo: /home/src/projects/project 0 undefined Failed Lookup Locations DirectoryWatcher:: Triggered with /home/src/projects/project/tsconfig.tsbuildinfo :: WatchInfo: /home/src/projects/project 0 undefined Failed Lookup Locations Scheduling invalidateFailedLookup, Cancelled earlier one Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/tsconfig.tsbuildinfo :: WatchInfo: /home/src/projects/project 0 undefined Failed Lookup Locations -error TS2318: Cannot find global type 'Array'. +index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/foo/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo' library may need to update its package.json or typings. -error TS2318: Cannot find global type 'Boolean'. +1 import { foo } from "foo"; +   ~~~~~ -error TS2318: Cannot find global type 'CallableFunction'. +index.mts:2:21 - error TS7016: Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/@types/bar/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar' library may need to update its package.json or typings. -error TS2318: Cannot find global type 'Function'. +2 import { bar } from "bar"; +   ~~~~~ -error TS2318: Cannot find global type 'IArguments'. - -error TS2318: Cannot find global type 'NewableFunction'. - -error TS2318: Cannot find global type 'Number'. - -error TS2318: Cannot find global type 'Object'. - -error TS2318: Cannot find global type 'RegExp'. - -error TS2318: Cannot find global type 'String'. - -error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. - The file is in the program because: - Default library for target 'es2022' - -[12:01:22 AM] Found 11 errors. Watching for file changes. +[12:01:22 AM] Found 2 errors. Watching for file changes. DirectoryWatcher:: Triggered with /home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt :: WatchInfo: /home/src/projects/project 0 undefined Failed Lookup Locations Scheduling invalidateFailedLookup, Cancelled earlier one @@ -391,24 +379,30 @@ Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: Not Program files:: +/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.es2022.full.d.ts +/home/src/projects/project/node_modules/foo2/index.d.ts +/home/src/projects/project/node_modules/@types/bar2/index.d.ts +/home/src/projects/project/index.mts Shape signatures in builder refreshed for:: +/a/lib/lib.es2022.full.d.ts (used version) /home/src/projects/project/node_modules/foo2/index.d.ts (used version) -/home/src/projects/project/index.mts (used version) /home/src/projects/project/node_modules/@types/bar2/index.d.ts (used version) +/home/src/projects/project/index.mts (used version) PolledWatches:: -/a/lib/lib.es2022.full.d.ts: *new* - {"pollingInterval":500} /home/src/projects/node_modules: *new* {"pollingInterval":500} FsWatches:: +/a/lib/lib.es2022.full.d.ts: *new* + {} /home/src/projects: *new* {} /home/src/projects/project: *new* @@ -445,12 +439,13 @@ export {}; //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"fileInfos":[{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","impliedFormat":99}],"root":[3],"options":{"module":100,"strict":true},"fileIdsList":[[1,2]],"referencedMap":[[3,1]],"exportedModulesMap":[[3,1]]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.es2022.full.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"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":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","impliedFormat":99}],"root":[4],"options":{"module":100,"strict":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,[4,[{"file":"./index.mts","start":20,"length":5,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"foo","mode":99}}]}},{"file":"./index.mts","start":47,"length":5,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"bar","mode":99}}]}}]],3,2]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { "program": { "fileNames": [ + "../../../../a/lib/lib.es2022.full.d.ts", "./node_modules/foo2/index.d.ts", "./node_modules/@types/bar2/index.d.ts", "./index.mts" @@ -462,6 +457,17 @@ export {}; ] ], "fileInfos": { + "../../../../a/lib/lib.es2022.full.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/foo2/index.d.ts": { "original": { "version": "-1622383150-export declare const foo2: number;", @@ -492,7 +498,7 @@ export {}; }, "root": [ [ - 3, + 4, "./index.mts" ] ], @@ -511,10 +517,60 @@ export {}; "./node_modules/foo2/index.d.ts", "./node_modules/@types/bar2/index.d.ts" ] - } + }, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.es2022.full.d.ts", + [ + "./index.mts", + [ + { + "file": "./index.mts", + "start": 20, + "length": 5, + "code": 7016, + "category": 1, + "messageText": { + "messageText": "Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type.", + "category": 1, + "code": 7016, + "next": [ + { + "info": { + "moduleReference": "foo", + "mode": 99 + } + } + ] + } + }, + { + "file": "./index.mts", + "start": 47, + "length": 5, + "code": 7016, + "category": 1, + "messageText": { + "messageText": "Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type.", + "category": 1, + "code": 7016, + "next": [ + { + "info": { + "moduleReference": "bar", + "mode": 99 + } + } + ] + } + } + ] + ], + "./node_modules/@types/bar2/index.d.ts", + "./node_modules/foo2/index.d.ts" + ] }, "version": "FakeTSVersion", - "size": 607 + "size": 1746 } @@ -541,6 +597,9 @@ Synchronizing program CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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 '/home/src/projects/project/node_modules/foo2/package.json' exists according to earlier cached lookups. Found 'package.json' at '/home/src/projects/project/node_modules/@types/bar2/package.json'. Reusing resolution of module 'foo' from '/home/src/projects/project/index.mts' of old program, it was successfully resolved to '/home/src/projects/project/node_modules/foo/index.mjs' with Package ID 'foo/index.mjs@1.0.0'. @@ -631,31 +690,19 @@ File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists a 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. -error TS2318: Cannot find global type 'Array'. - -error TS2318: Cannot find global type 'Boolean'. - -error TS2318: Cannot find global type 'CallableFunction'. - -error TS2318: Cannot find global type 'Function'. - -error TS2318: Cannot find global type 'IArguments'. - -error TS2318: Cannot find global type 'NewableFunction'. - -error TS2318: Cannot find global type 'Number'. +index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/foo/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo' library may need to update its package.json or typings. -error TS2318: Cannot find global type 'Object'. +1 import { foo } from "foo"; +   ~~~~~ -error TS2318: Cannot find global type 'RegExp'. +index.mts:2:21 - error TS7016: Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type. + Try `npm i --save-dev @types/bar` if it exists or add a new declaration (.d.ts) file containing `declare module 'bar';` -error TS2318: Cannot find global type 'String'. +2 import { bar } from "bar"; +   ~~~~~ -error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. - The file is in the program because: - Default library for target 'es2022' - -[12:01:27 AM] Found 11 errors. Watching for file changes. +[12:01:27 AM] Found 2 errors. Watching for file changes. @@ -663,11 +710,12 @@ Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: +/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -697,6 +745,9 @@ Synchronizing program CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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 '/home/src/projects/project/node_modules/foo2/package.json'. File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. ======== Resolving module 'foo' from '/home/src/projects/project/index.mts'. ======== @@ -768,31 +819,19 @@ File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists a 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. -error TS2318: Cannot find global type 'Array'. - -error TS2318: Cannot find global type 'Boolean'. - -error TS2318: Cannot find global type 'CallableFunction'. - -error TS2318: Cannot find global type 'Function'. +index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. + Try `npm i --save-dev @types/foo` if it exists or add a new declaration (.d.ts) file containing `declare module 'foo';` -error TS2318: Cannot find global type 'IArguments'. +1 import { foo } from "foo"; +   ~~~~~ -error TS2318: Cannot find global type 'NewableFunction'. +index.mts:2:21 - error TS7016: Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type. + Try `npm i --save-dev @types/bar` if it exists or add a new declaration (.d.ts) file containing `declare module 'bar';` -error TS2318: Cannot find global type 'Number'. +2 import { bar } from "bar"; +   ~~~~~ -error TS2318: Cannot find global type 'Object'. - -error TS2318: Cannot find global type 'RegExp'. - -error TS2318: Cannot find global type 'String'. - -error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. - The file is in the program because: - Default library for target 'es2022' - -[12:01:31 AM] Found 11 errors. Watching for file changes. +[12:01:31 AM] Found 2 errors. Watching for file changes. @@ -800,11 +839,12 @@ Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: +/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -836,6 +876,9 @@ Synchronizing program CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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 '/home/src/projects/project/node_modules/foo2/package.json' exists according to earlier cached lookups. Found 'package.json' at '/home/src/projects/project/node_modules/@types/bar2/package.json'. Reusing resolution of module 'foo' from '/home/src/projects/project/index.mts' of old program, it was successfully resolved to '/home/src/projects/project/node_modules/foo/index.mjs' with Package ID 'foo/index.mjs@1.0.0'. @@ -913,31 +956,19 @@ File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists a 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. -error TS2318: Cannot find global type 'Array'. - -error TS2318: Cannot find global type 'Boolean'. - -error TS2318: Cannot find global type 'CallableFunction'. - -error TS2318: Cannot find global type 'Function'. - -error TS2318: Cannot find global type 'IArguments'. - -error TS2318: Cannot find global type 'NewableFunction'. - -error TS2318: Cannot find global type 'Number'. +index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. + Try `npm i --save-dev @types/foo` if it exists or add a new declaration (.d.ts) file containing `declare module 'foo';` -error TS2318: Cannot find global type 'Object'. +1 import { foo } from "foo"; +   ~~~~~ -error TS2318: Cannot find global type 'RegExp'. +index.mts:2:21 - error TS7016: Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/@types/bar/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar' library may need to update its package.json or typings. -error TS2318: Cannot find global type 'String'. +2 import { bar } from "bar"; +   ~~~~~ -error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. - The file is in the program because: - Default library for target 'es2022' - -[12:01:35 AM] Found 11 errors. Watching for file changes. +[12:01:35 AM] Found 2 errors. Watching for file changes. @@ -945,11 +976,12 @@ Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: +/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -981,6 +1013,9 @@ Synchronizing program CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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 '/home/src/projects/project/node_modules/foo2/package.json'. File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. ======== Resolving module 'foo' from '/home/src/projects/project/index.mts'. ======== @@ -1039,31 +1074,19 @@ File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists a 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. -error TS2318: Cannot find global type 'Array'. - -error TS2318: Cannot find global type 'Boolean'. - -error TS2318: Cannot find global type 'CallableFunction'. - -error TS2318: Cannot find global type 'Function'. +index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/foo/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo' library may need to update its package.json or typings. -error TS2318: Cannot find global type 'IArguments'. +1 import { foo } from "foo"; +   ~~~~~ -error TS2318: Cannot find global type 'NewableFunction'. +index.mts:2:21 - error TS7016: Could not find a declaration file for module 'bar'. '/home/src/projects/project/node_modules/bar/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/@types/bar/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar' library may need to update its package.json or typings. -error TS2318: Cannot find global type 'Number'. +2 import { bar } from "bar"; +   ~~~~~ -error TS2318: Cannot find global type 'Object'. - -error TS2318: Cannot find global type 'RegExp'. - -error TS2318: Cannot find global type 'String'. - -error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. - The file is in the program because: - Default library for target 'es2022' - -[12:01:40 AM] Found 11 errors. Watching for file changes. +[12:01:40 AM] Found 2 errors. Watching for file changes. @@ -1071,11 +1094,12 @@ Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: +/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -1117,6 +1141,9 @@ Synchronizing program CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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 '/home/src/projects/project/node_modules/foo2/package.json' exists according to earlier cached lookups. File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. Reusing resolution of module 'foo' from '/home/src/projects/project/index.mts' of old program, it was successfully resolved to '/home/src/projects/project/node_modules/foo/index.mjs' with Package ID 'foo/index.mjs@1.0.0'. @@ -1158,31 +1185,13 @@ File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists a 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. -error TS2318: Cannot find global type 'Array'. +index.mts:1:21 - error TS7016: Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/foo/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo' library may need to update its package.json or typings. -error TS2318: Cannot find global type 'Boolean'. +1 import { foo } from "foo"; +   ~~~~~ -error TS2318: Cannot find global type 'CallableFunction'. - -error TS2318: Cannot find global type 'Function'. - -error TS2318: Cannot find global type 'IArguments'. - -error TS2318: Cannot find global type 'NewableFunction'. - -error TS2318: Cannot find global type 'Number'. - -error TS2318: Cannot find global type 'Object'. - -error TS2318: Cannot find global type 'RegExp'. - -error TS2318: Cannot find global type 'String'. - -error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. - The file is in the program because: - Default library for target 'es2022' - -[12:01:51 AM] Found 11 errors. Watching for file changes. +[12:01:51 AM] Found 1 error. Watching for file changes. @@ -1190,24 +1199,27 @@ Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: +/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/home/src/projects/project/node_modules/@types/bar/index.d.ts +/home/src/projects/project/index.mts Shape signatures in builder refreshed for:: /home/src/projects/project/node_modules/@types/bar/index.d.ts (used version) /home/src/projects/project/index.mts (computed .d.ts) PolledWatches:: -/a/lib/lib.es2022.full.d.ts: - {"pollingInterval":500} /home/src/projects/node_modules: {"pollingInterval":500} FsWatches:: +/a/lib/lib.es2022.full.d.ts: + {} /home/src/projects: {} /home/src/projects/project: @@ -1243,12 +1255,13 @@ exitCode:: ExitStatus.undefined //// [/home/src/projects/project/index.mjs] file written with same contents //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"fileInfos":[{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[4],"options":{"module":100,"strict":true},"fileIdsList":[[1,2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.es2022.full.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"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":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[5],"options":{"module":100,"strict":true},"fileIdsList":[[2,3,4]],"referencedMap":[[5,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,[5,[{"file":"./index.mts","start":20,"length":5,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"foo","mode":99}}]}}]],2,4,3]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { "program": { "fileNames": [ + "../../../../a/lib/lib.es2022.full.d.ts", "./node_modules/@types/bar/index.d.ts", "./node_modules/foo2/index.d.ts", "./node_modules/@types/bar2/index.d.ts", @@ -1262,6 +1275,17 @@ exitCode:: ExitStatus.undefined ] ], "fileInfos": { + "../../../../a/lib/lib.es2022.full.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/@types/bar/index.d.ts": { "original": { "version": "-9556021903-export declare const bar: number;", @@ -1302,7 +1326,7 @@ exitCode:: ExitStatus.undefined }, "root": [ [ - 4, + 5, "./index.mts" ] ], @@ -1317,10 +1341,41 @@ exitCode:: ExitStatus.undefined "./node_modules/@types/bar2/index.d.ts" ] }, - "exportedModulesMap": {} + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.es2022.full.d.ts", + [ + "./index.mts", + [ + { + "file": "./index.mts", + "start": 20, + "length": 5, + "code": 7016, + "category": 1, + "messageText": { + "messageText": "Could not find a declaration file for module 'foo'. '/home/src/projects/project/node_modules/foo/index.mjs' implicitly has an 'any' type.", + "category": 1, + "code": 7016, + "next": [ + { + "info": { + "moduleReference": "foo", + "mode": 99 + } + } + ] + } + } + ] + ], + "./node_modules/@types/bar/index.d.ts", + "./node_modules/@types/bar2/index.d.ts", + "./node_modules/foo2/index.d.ts" + ] }, "version": "FakeTSVersion", - "size": 760 + "size": 1582 } @@ -1361,6 +1416,9 @@ Synchronizing program CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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 '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. File '/home/src/projects/project/node_modules/foo2/package.json' exists according to earlier cached lookups. File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. @@ -1396,31 +1454,7 @@ File '/a/package.json' does not exist according to earlier cached lookups. File '/package.json' does not exist according to earlier cached lookups. DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Failed Lookup Locations Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Failed Lookup Locations -error TS2318: Cannot find global type 'Array'. - -error TS2318: Cannot find global type 'Boolean'. - -error TS2318: Cannot find global type 'CallableFunction'. - -error TS2318: Cannot find global type 'Function'. - -error TS2318: Cannot find global type 'IArguments'. - -error TS2318: Cannot find global type 'NewableFunction'. - -error TS2318: Cannot find global type 'Number'. - -error TS2318: Cannot find global type 'Object'. - -error TS2318: Cannot find global type 'RegExp'. - -error TS2318: Cannot find global type 'String'. - -error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. - The file is in the program because: - Default library for target 'es2022' - -[12:02:06 AM] Found 11 errors. Watching for file changes. +[12:02:06 AM] Found 0 errors. Watching for file changes. @@ -1428,27 +1462,28 @@ Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: +/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/node_modules/@types/bar2/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/home/src/projects/project/node_modules/foo/index.d.ts +/home/src/projects/project/index.mts Shape signatures in builder refreshed for:: /home/src/projects/project/node_modules/foo/index.d.ts (used version) /home/src/projects/project/index.mts (computed .d.ts) -PolledWatches:: -/a/lib/lib.es2022.full.d.ts: - {"pollingInterval":500} - PolledWatches *deleted*:: /home/src/projects/node_modules: {"pollingInterval":500} FsWatches:: +/a/lib/lib.es2022.full.d.ts: + {} /home/src/projects: {} /home/src/projects/project: @@ -1486,12 +1521,13 @@ exitCode:: ExitStatus.undefined //// [/home/src/projects/project/index.mjs] file written with same contents //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"fileInfos":[{"version":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[5],"options":{"module":100,"strict":true},"fileIdsList":[[1,2,3,4]],"referencedMap":[[5,1]],"exportedModulesMap":[]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.es2022.full.d.ts","./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./node_modules/@types/bar2/index.d.ts","./index.mts"],"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":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-7439170493-export declare const bar2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[6],"options":{"module":100,"strict":true},"fileIdsList":[[2,3,4,5]],"referencedMap":[[6,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,6,3,5,2,4]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { "program": { "fileNames": [ + "../../../../a/lib/lib.es2022.full.d.ts", "./node_modules/foo/index.d.ts", "./node_modules/@types/bar/index.d.ts", "./node_modules/foo2/index.d.ts", @@ -1507,6 +1543,17 @@ exitCode:: ExitStatus.undefined ] ], "fileInfos": { + "../../../../a/lib/lib.es2022.full.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/foo/index.d.ts": { "original": { "version": "-5214938848-export declare const foo: number;", @@ -1556,7 +1603,7 @@ exitCode:: ExitStatus.undefined }, "root": [ [ - 5, + 6, "./index.mts" ] ], @@ -1572,10 +1619,18 @@ exitCode:: ExitStatus.undefined "./node_modules/@types/bar2/index.d.ts" ] }, - "exportedModulesMap": {} + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.es2022.full.d.ts", + "./index.mts", + "./node_modules/@types/bar/index.d.ts", + "./node_modules/@types/bar2/index.d.ts", + "./node_modules/foo/index.d.ts", + "./node_modules/foo2/index.d.ts" + ] }, "version": "FakeTSVersion", - "size": 872 + "size": 1373 } @@ -1613,6 +1668,9 @@ Synchronizing program CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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 '/home/src/projects/project/node_modules/foo/package.json' exists according to earlier cached lookups. File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. File '/home/src/projects/project/node_modules/foo2/package.json' exists according to earlier cached lookups. @@ -1697,31 +1755,13 @@ File '/package.json' does not exist according to earlier cached lookups. FileWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types/bar2/index.d.ts 250 undefined Source file DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Failed Lookup Locations Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Failed Lookup Locations -error TS2318: Cannot find global type 'Array'. - -error TS2318: Cannot find global type 'Boolean'. - -error TS2318: Cannot find global type 'CallableFunction'. - -error TS2318: Cannot find global type 'Function'. - -error TS2318: Cannot find global type 'IArguments'. - -error TS2318: Cannot find global type 'NewableFunction'. - -error TS2318: Cannot find global type 'Number'. - -error TS2318: Cannot find global type 'Object'. +index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/@types/bar2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar2' library may need to update its package.json or typings. -error TS2318: Cannot find global type 'RegExp'. +4 import { bar2 } from "bar2"; +   ~~~~~~ -error TS2318: Cannot find global type 'String'. - -error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. - The file is in the program because: - Default library for target 'es2022' - -[12:02:20 AM] Found 11 errors. Watching for file changes. +[12:02:20 AM] Found 1 error. Watching for file changes. @@ -1729,23 +1769,25 @@ Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: +/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/node_modules/foo2/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/home/src/projects/project/index.mts Shape signatures in builder refreshed for:: /home/src/projects/project/index.mts (computed .d.ts) PolledWatches:: -/a/lib/lib.es2022.full.d.ts: - {"pollingInterval":500} /home/src/projects/node_modules: *new* {"pollingInterval":500} FsWatches:: +/a/lib/lib.es2022.full.d.ts: + {} /home/src/projects: {} /home/src/projects/project: @@ -1785,12 +1827,13 @@ exitCode:: ExitStatus.undefined //// [/home/src/projects/project/index.mjs] file written with same contents //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./index.mts"],"fileInfos":[{"version":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[4],"options":{"module":100,"strict":true},"fileIdsList":[[1,2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.es2022.full.d.ts","./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./node_modules/foo2/index.d.ts","./index.mts"],"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":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-1622383150-export declare const foo2: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[5],"options":{"module":100,"strict":true},"fileIdsList":[[2,3,4]],"referencedMap":[[5,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,[5,[{"file":"./index.mts","start":104,"length":6,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"bar2","mode":99}}]}}]],3,2,4]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { "program": { "fileNames": [ + "../../../../a/lib/lib.es2022.full.d.ts", "./node_modules/foo/index.d.ts", "./node_modules/@types/bar/index.d.ts", "./node_modules/foo2/index.d.ts", @@ -1804,6 +1847,17 @@ exitCode:: ExitStatus.undefined ] ], "fileInfos": { + "../../../../a/lib/lib.es2022.full.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/foo/index.d.ts": { "original": { "version": "-5214938848-export declare const foo: number;", @@ -1844,7 +1898,7 @@ exitCode:: ExitStatus.undefined }, "root": [ [ - 4, + 5, "./index.mts" ] ], @@ -1859,10 +1913,41 @@ exitCode:: ExitStatus.undefined "./node_modules/foo2/index.d.ts" ] }, - "exportedModulesMap": {} + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.es2022.full.d.ts", + [ + "./index.mts", + [ + { + "file": "./index.mts", + "start": 104, + "length": 6, + "code": 7016, + "category": 1, + "messageText": { + "messageText": "Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type.", + "category": 1, + "code": 7016, + "next": [ + { + "info": { + "moduleReference": "bar2", + "mode": 99 + } + } + ] + } + } + ] + ], + "./node_modules/@types/bar/index.d.ts", + "./node_modules/foo/index.d.ts", + "./node_modules/foo2/index.d.ts" + ] }, "version": "FakeTSVersion", - "size": 751 + "size": 1577 } @@ -1902,6 +1987,9 @@ Synchronizing program CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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 '/home/src/projects/project/node_modules/foo/package.json' exists according to earlier cached lookups. File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. Found 'package.json' at '/home/src/projects/project/node_modules/foo2/package.json'. @@ -1962,31 +2050,19 @@ 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: /home/src/projects/project/node_modules/foo2/index.d.ts 250 undefined Source file -error TS2318: Cannot find global type 'Array'. - -error TS2318: Cannot find global type 'Boolean'. - -error TS2318: Cannot find global type 'CallableFunction'. - -error TS2318: Cannot find global type 'Function'. - -error TS2318: Cannot find global type 'IArguments'. - -error TS2318: Cannot find global type 'NewableFunction'. - -error TS2318: Cannot find global type 'Number'. - -error TS2318: Cannot find global type 'Object'. +index.mts:3:22 - error TS7016: Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/foo2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo2' library may need to update its package.json or typings. -error TS2318: Cannot find global type 'RegExp'. +3 import { foo2 } from "foo2"; +   ~~~~~~ -error TS2318: Cannot find global type 'String'. +index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/@types/bar2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar2' library may need to update its package.json or typings. -error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. - The file is in the program because: - Default library for target 'es2022' +4 import { bar2 } from "bar2"; +   ~~~~~~ -[12:02:35 AM] Found 11 errors. Watching for file changes. +[12:02:35 AM] Found 2 errors. Watching for file changes. @@ -1994,22 +2070,24 @@ Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: +/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/home/src/projects/project/index.mts Shape signatures in builder refreshed for:: /home/src/projects/project/index.mts (computed .d.ts) PolledWatches:: -/a/lib/lib.es2022.full.d.ts: - {"pollingInterval":500} /home/src/projects/node_modules: {"pollingInterval":500} FsWatches:: +/a/lib/lib.es2022.full.d.ts: + {} /home/src/projects: {} /home/src/projects/project: @@ -2047,12 +2125,13 @@ exitCode:: ExitStatus.undefined //// [/home/src/projects/project/index.mjs] file written with same contents //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./index.mts"],"fileInfos":[{"version":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[3],"options":{"module":100,"strict":true},"fileIdsList":[[1,2]],"referencedMap":[[3,1]],"exportedModulesMap":[]},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../../../a/lib/lib.es2022.full.d.ts","./node_modules/foo/index.d.ts","./node_modules/@types/bar/index.d.ts","./index.mts"],"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":"-5214938848-export declare const foo: number;","impliedFormat":1},{"version":"-9556021903-export declare const bar: number;","impliedFormat":1},{"version":"-4806968175-import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n","signature":"-3531856636-export {};\n","impliedFormat":99}],"root":[4],"options":{"module":100,"strict":true},"fileIdsList":[[2,3]],"referencedMap":[[4,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,[4,[{"file":"./index.mts","start":75,"length":6,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"foo2","mode":99}}]}},{"file":"./index.mts","start":104,"length":6,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"bar2","mode":99}}]}}]],3,2]},"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { "program": { "fileNames": [ + "../../../../a/lib/lib.es2022.full.d.ts", "./node_modules/foo/index.d.ts", "./node_modules/@types/bar/index.d.ts", "./index.mts" @@ -2064,6 +2143,17 @@ exitCode:: ExitStatus.undefined ] ], "fileInfos": { + "../../../../a/lib/lib.es2022.full.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/foo/index.d.ts": { "original": { "version": "-5214938848-export declare const foo: number;", @@ -2095,7 +2185,7 @@ exitCode:: ExitStatus.undefined }, "root": [ [ - 3, + 4, "./index.mts" ] ], @@ -2109,10 +2199,60 @@ exitCode:: ExitStatus.undefined "./node_modules/@types/bar/index.d.ts" ] }, - "exportedModulesMap": {} + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.es2022.full.d.ts", + [ + "./index.mts", + [ + { + "file": "./index.mts", + "start": 75, + "length": 6, + "code": 7016, + "category": 1, + "messageText": { + "messageText": "Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type.", + "category": 1, + "code": 7016, + "next": [ + { + "info": { + "moduleReference": "foo2", + "mode": 99 + } + } + ] + } + }, + { + "file": "./index.mts", + "start": 104, + "length": 6, + "code": 7016, + "category": 1, + "messageText": { + "messageText": "Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type.", + "category": 1, + "code": 7016, + "next": [ + { + "info": { + "moduleReference": "bar2", + "mode": 99 + } + } + ] + } + } + ] + ], + "./node_modules/@types/bar/index.d.ts", + "./node_modules/foo/index.d.ts" + ] }, "version": "FakeTSVersion", - "size": 637 + "size": 1783 } @@ -2139,6 +2279,9 @@ Synchronizing program CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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 '/home/src/projects/project/node_modules/foo/package.json' exists according to earlier cached lookups. File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. Reusing resolution of module 'foo' from '/home/src/projects/project/index.mts' of old program, it was successfully resolved to '/home/src/projects/project/node_modules/foo/index.d.ts' with Package ID 'foo/index.d.ts@1.0.0'. @@ -2229,31 +2372,19 @@ File '/home/src/projects/project/node_modules/@types/bar/package.json' exists ac 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. -error TS2318: Cannot find global type 'Array'. - -error TS2318: Cannot find global type 'Boolean'. - -error TS2318: Cannot find global type 'CallableFunction'. - -error TS2318: Cannot find global type 'Function'. - -error TS2318: Cannot find global type 'IArguments'. - -error TS2318: Cannot find global type 'NewableFunction'. +index.mts:3:22 - error TS7016: Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/foo2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo2' library may need to update its package.json or typings. -error TS2318: Cannot find global type 'Number'. +3 import { foo2 } from "foo2"; +   ~~~~~~ -error TS2318: Cannot find global type 'Object'. +index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. + Try `npm i --save-dev @types/bar2` if it exists or add a new declaration (.d.ts) file containing `declare module 'bar2';` -error TS2318: Cannot find global type 'RegExp'. +4 import { bar2 } from "bar2"; +   ~~~~~~ -error TS2318: Cannot find global type 'String'. - -error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. - The file is in the program because: - Default library for target 'es2022' - -[12:02:41 AM] Found 11 errors. Watching for file changes. +[12:02:41 AM] Found 2 errors. Watching for file changes. @@ -2261,11 +2392,12 @@ Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: +/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -2295,6 +2427,9 @@ Synchronizing program CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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 '/home/src/projects/project/node_modules/foo/package.json' exists according to earlier cached lookups. File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. Reusing resolution of module 'foo' from '/home/src/projects/project/index.mts' of old program, it was successfully resolved to '/home/src/projects/project/node_modules/foo/index.d.ts' with Package ID 'foo/index.d.ts@1.0.0'. @@ -2366,31 +2501,19 @@ File '/home/src/projects/project/node_modules/@types/bar/package.json' exists ac 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. -error TS2318: Cannot find global type 'Array'. - -error TS2318: Cannot find global type 'Boolean'. +index.mts:3:22 - error TS7016: Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type. + Try `npm i --save-dev @types/foo2` if it exists or add a new declaration (.d.ts) file containing `declare module 'foo2';` -error TS2318: Cannot find global type 'CallableFunction'. +3 import { foo2 } from "foo2"; +   ~~~~~~ -error TS2318: Cannot find global type 'Function'. +index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. + Try `npm i --save-dev @types/bar2` if it exists or add a new declaration (.d.ts) file containing `declare module 'bar2';` -error TS2318: Cannot find global type 'IArguments'. +4 import { bar2 } from "bar2"; +   ~~~~~~ -error TS2318: Cannot find global type 'NewableFunction'. - -error TS2318: Cannot find global type 'Number'. - -error TS2318: Cannot find global type 'Object'. - -error TS2318: Cannot find global type 'RegExp'. - -error TS2318: Cannot find global type 'String'. - -error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. - The file is in the program because: - Default library for target 'es2022' - -[12:02:45 AM] Found 11 errors. Watching for file changes. +[12:02:45 AM] Found 2 errors. Watching for file changes. @@ -2398,11 +2521,12 @@ Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: +/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -2434,6 +2558,9 @@ Synchronizing program CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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 '/home/src/projects/project/node_modules/foo/package.json' exists according to earlier cached lookups. File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. Reusing resolution of module 'foo' from '/home/src/projects/project/index.mts' of old program, it was successfully resolved to '/home/src/projects/project/node_modules/foo/index.d.ts' with Package ID 'foo/index.d.ts@1.0.0'. @@ -2511,31 +2638,19 @@ File '/home/src/projects/project/node_modules/@types/bar/package.json' exists ac 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. -error TS2318: Cannot find global type 'Array'. - -error TS2318: Cannot find global type 'Boolean'. - -error TS2318: Cannot find global type 'CallableFunction'. - -error TS2318: Cannot find global type 'Function'. - -error TS2318: Cannot find global type 'IArguments'. +index.mts:3:22 - error TS7016: Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type. + Try `npm i --save-dev @types/foo2` if it exists or add a new declaration (.d.ts) file containing `declare module 'foo2';` -error TS2318: Cannot find global type 'NewableFunction'. +3 import { foo2 } from "foo2"; +   ~~~~~~ -error TS2318: Cannot find global type 'Number'. +index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/@types/bar2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar2' library may need to update its package.json or typings. -error TS2318: Cannot find global type 'Object'. +4 import { bar2 } from "bar2"; +   ~~~~~~ -error TS2318: Cannot find global type 'RegExp'. - -error TS2318: Cannot find global type 'String'. - -error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. - The file is in the program because: - Default library for target 'es2022' - -[12:02:49 AM] Found 11 errors. Watching for file changes. +[12:02:49 AM] Found 2 errors. Watching for file changes. @@ -2543,11 +2658,12 @@ Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: +/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -2579,6 +2695,9 @@ Synchronizing program CreatingProgramWith:: roots: ["/home/src/projects/project/index.mts"] options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/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 '/home/src/projects/project/node_modules/foo/package.json' exists according to earlier cached lookups. File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. Reusing resolution of module 'foo' from '/home/src/projects/project/index.mts' of old program, it was successfully resolved to '/home/src/projects/project/node_modules/foo/index.d.ts' with Package ID 'foo/index.d.ts@1.0.0'. @@ -2637,31 +2756,19 @@ File '/home/src/projects/project/node_modules/@types/bar/package.json' exists ac 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. -error TS2318: Cannot find global type 'Array'. - -error TS2318: Cannot find global type 'Boolean'. - -error TS2318: Cannot find global type 'CallableFunction'. - -error TS2318: Cannot find global type 'Function'. - -error TS2318: Cannot find global type 'IArguments'. - -error TS2318: Cannot find global type 'NewableFunction'. - -error TS2318: Cannot find global type 'Number'. - -error TS2318: Cannot find global type 'Object'. +index.mts:3:22 - error TS7016: Could not find a declaration file for module 'foo2'. '/home/src/projects/project/node_modules/foo2/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/foo2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'foo2' library may need to update its package.json or typings. -error TS2318: Cannot find global type 'RegExp'. +3 import { foo2 } from "foo2"; +   ~~~~~~ -error TS2318: Cannot find global type 'String'. +index.mts:4:22 - error TS7016: Could not find a declaration file for module 'bar2'. '/home/src/projects/project/node_modules/bar2/index.mjs' implicitly has an 'any' type. + There are types at '/home/src/projects/project/node_modules/@types/bar2/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar2' library may need to update its package.json or typings. -error TS6053: File '/a/lib/lib.es2022.full.d.ts' not found. - The file is in the program because: - Default library for target 'es2022' +4 import { bar2 } from "bar2"; +   ~~~~~~ -[12:02:54 AM] Found 11 errors. Watching for file changes. +[12:02:54 AM] Found 2 errors. Watching for file changes. @@ -2669,11 +2776,12 @@ Program root files: ["/home/src/projects/project/index.mts"] Program options: {"module":100,"moduleResolution":3,"traceResolution":true,"incremental":true,"strict":true,"types":[],"watch":true,"extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/tsconfig.json"} Program structureReused: SafeModules Program files:: +/a/lib/lib.es2022.full.d.ts /home/src/projects/project/node_modules/foo/index.d.ts /home/src/projects/project/node_modules/@types/bar/index.d.ts /home/src/projects/project/index.mts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: diff --git a/tests/baselines/reference/tsserver/moduleResolution/node10Result.js b/tests/baselines/reference/tsserver/moduleResolution/node10Result.js index f62d7e37748a3..e68a01cdc2251 100644 --- a/tests/baselines/reference/tsserver/moduleResolution/node10Result.js +++ b/tests/baselines/reference/tsserver/moduleResolution/node10Result.js @@ -140,7 +140,7 @@ interface Array { length: number; [n: number]: T; } //// [/home/src/projects/project/tsconfig.json] {"compilerOptions":{"module":"node16","moduleResolution":"node16","traceResolution":true,"incremental":true,"strict":true,"types":[]},"files":["index.mts"]} -//// [/a/lib/lib.esnext.full.d.ts] +//// [/a/lib/lib.es2022.full.d.ts] /// interface Boolean {} interface Function {} @@ -363,6 +363,7 @@ Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/@types/ba Info seq [hh:mm:ss:mss] File '/a/lib/package.json' does not exist. Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist. Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/lib/lib.es2022.full.d.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects 0 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects 0 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations @@ -377,15 +378,17 @@ Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/pro Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/foo2/package.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/bar2/package.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types/bar2/package.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: File location affecting resolution -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/lib/lib.es2022.full.d.ts 500 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Missing file Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Files (4) + /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /home/src/projects/project/node_modules/foo2/index.d.ts Text-1 "export declare const foo2: number;" /home/src/projects/project/node_modules/@types/bar2/index.d.ts Text-1 "export declare const bar2: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" + ../../../../a/lib/lib.es2022.full.d.ts + Default library for target 'es2022' node_modules/foo2/index.d.ts Imported via "foo2" from file 'index.mts' with packageId 'foo2/index.d.ts@1.0.0' File is CommonJS module because 'node_modules/foo2/package.json' does not have field "type" @@ -423,8 +426,8 @@ Info seq [hh:mm:ss:mss] event: "tsSize": 112, "tsx": 0, "tsxSize": 0, - "dts": 2, - "dtsSize": 68, + "dts": 3, + "dtsSize": 402, "deferred": 0, "deferredSize": 0 }, @@ -461,67 +464,11 @@ Info seq [hh:mm:ss:mss] event: "body": { "triggerFile": "/home/src/projects/project/index.mts", "configFile": "/home/src/projects/project/tsconfig.json", - "diagnostics": [ - { - "text": "File '/a/lib/lib.es2022.full.d.ts' not found.\n The file is in the program because:\n Default library for target 'es2022'", - "code": 6053, - "category": "error" - }, - { - "text": "Cannot find global type 'Array'.", - "code": 2318, - "category": "error" - }, - { - "text": "Cannot find global type 'Boolean'.", - "code": 2318, - "category": "error" - }, - { - "text": "Cannot find global type 'CallableFunction'.", - "code": 2318, - "category": "error" - }, - { - "text": "Cannot find global type 'Function'.", - "code": 2318, - "category": "error" - }, - { - "text": "Cannot find global type 'IArguments'.", - "code": 2318, - "category": "error" - }, - { - "text": "Cannot find global type 'NewableFunction'.", - "code": 2318, - "category": "error" - }, - { - "text": "Cannot find global type 'Number'.", - "code": 2318, - "category": "error" - }, - { - "text": "Cannot find global type 'Object'.", - "code": 2318, - "category": "error" - }, - { - "text": "Cannot find global type 'RegExp'.", - "code": 2318, - "category": "error" - }, - { - "text": "Cannot find global type 'String'.", - "code": 2318, - "category": "error" - } - ] + "diagnostics": [] } } Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Files (4) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -534,12 +481,12 @@ Info seq [hh:mm:ss:mss] response: After request PolledWatches:: -/a/lib/lib.es2022.full.d.ts: *new* - {"pollingInterval":500} /home/src/projects/node_modules: *new* {"pollingInterval":500} FsWatches:: +/a/lib/lib.es2022.full.d.ts: *new* + {} /home/src/projects: *new* {} /home/src/projects/project: *new* @@ -769,6 +716,9 @@ Before running Timeout callback:: count: 3 Info seq [hh:mm:ss:mss] Running: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/foo2/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] Found 'package.json' at '/home/src/projects/project/node_modules/@types/bar2/package.json'. Info seq [hh:mm:ss:mss] Reusing resolution of module 'foo' from '/home/src/projects/project/index.mts' of old program, it was successfully resolved to '/home/src/projects/project/node_modules/foo/index.mjs' with Package ID 'foo/index.mjs@1.0.0'. @@ -861,7 +811,8 @@ Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earl Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 2 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Files (4) + /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /home/src/projects/project/node_modules/foo2/index.d.ts Text-1 "export declare const foo2: number;" /home/src/projects/project/node_modules/@types/bar2/index.d.ts Text-1 "export declare const bar2: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" @@ -870,7 +821,7 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Files (4) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -878,7 +829,7 @@ Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/index.mts Project Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Files (4) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -928,6 +879,9 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] Found 'package.json' at '/home/src/projects/project/node_modules/foo2/package.json'. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] ======== Resolving module 'foo' from '/home/src/projects/project/index.mts'. ======== @@ -1001,7 +955,8 @@ Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earl Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 3 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Files (4) + /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /home/src/projects/project/node_modules/foo2/index.d.ts Text-1 "export declare const foo2: number;" /home/src/projects/project/node_modules/@types/bar2/index.d.ts Text-1 "export declare const bar2: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" @@ -1090,7 +1045,7 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Files (4) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -1098,7 +1053,7 @@ Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/index.mts Project Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Files (4) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -1150,6 +1105,9 @@ export declare const bar: number; Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/foo2/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] Found 'package.json' at '/home/src/projects/project/node_modules/@types/bar2/package.json'. Info seq [hh:mm:ss:mss] Reusing resolution of module 'foo' from '/home/src/projects/project/index.mts' of old program, it was successfully resolved to '/home/src/projects/project/node_modules/foo/index.mjs' with Package ID 'foo/index.mjs@1.0.0'. @@ -1229,7 +1187,8 @@ Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earl Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 4 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Files (4) + /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /home/src/projects/project/node_modules/foo2/index.d.ts Text-1 "export declare const foo2: number;" /home/src/projects/project/node_modules/@types/bar2/index.d.ts Text-1 "export declare const bar2: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" @@ -1318,7 +1277,7 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Files (4) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -1326,7 +1285,7 @@ Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/index.mts Project Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Files (4) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -1378,6 +1337,9 @@ export declare const foo: number; Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] Found 'package.json' at '/home/src/projects/project/node_modules/foo2/package.json'. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] ======== Resolving module 'foo' from '/home/src/projects/project/index.mts'. ======== @@ -1438,7 +1400,8 @@ Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earl Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 5 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Files (4) + /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /home/src/projects/project/node_modules/foo2/index.d.ts Text-1 "export declare const foo2: number;" /home/src/projects/project/node_modules/@types/bar2/index.d.ts Text-1 "export declare const bar2: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" @@ -1527,7 +1490,7 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Files (4) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -1535,7 +1498,7 @@ Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/index.mts Project Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Files (4) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -1595,6 +1558,9 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/foo2/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] Reusing resolution of module 'foo' from '/home/src/projects/project/index.mts' of old program, it was successfully resolved to '/home/src/projects/project/node_modules/foo/index.mjs' with Package ID 'foo/index.mjs@1.0.0'. @@ -1637,13 +1603,16 @@ Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earl Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 6 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) +Info seq [hh:mm:ss:mss] Files (5) + /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /home/src/projects/project/node_modules/@types/bar/index.d.ts Text-1 "export declare const bar: number;" /home/src/projects/project/node_modules/foo2/index.d.ts Text-1 "export declare const foo2: number;" /home/src/projects/project/node_modules/@types/bar2/index.d.ts Text-1 "export declare const bar2: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" + ../../../../a/lib/lib.es2022.full.d.ts + Default library for target 'es2022' node_modules/@types/bar/index.d.ts Imported via "bar" from file 'index.mts' with packageId '@types/bar/index.d.ts@1.0.0' File is CommonJS module because 'node_modules/@types/bar/package.json' does not have field "type" @@ -1727,7 +1696,7 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) +Info seq [hh:mm:ss:mss] Files (5) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -1735,7 +1704,7 @@ Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/index.mts Project Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) +Info seq [hh:mm:ss:mss] Files (5) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -1797,6 +1766,9 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/foo2/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/@types/bar2/package.json' exists according to earlier cached lookups. @@ -1833,7 +1805,8 @@ Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/project Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 7 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (5) +Info seq [hh:mm:ss:mss] Files (6) + /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /home/src/projects/project/node_modules/foo/index.d.ts Text-1 "export declare const foo: number;" /home/src/projects/project/node_modules/@types/bar/index.d.ts Text-1 "export declare const bar: number;" /home/src/projects/project/node_modules/foo2/index.d.ts Text-1 "export declare const foo2: number;" @@ -1841,6 +1814,8 @@ Info seq [hh:mm:ss:mss] Files (5) /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" + ../../../../a/lib/lib.es2022.full.d.ts + Default library for target 'es2022' node_modules/foo/index.d.ts Imported via "foo" from file 'index.mts' with packageId 'foo/index.d.ts@1.0.0' File is CommonJS module because 'node_modules/foo/package.json' does not have field "type" @@ -1870,15 +1845,13 @@ Info seq [hh:mm:ss:mss] event: After running Timeout callback:: count: 1 24: *ensureProjectForOpenFiles* -PolledWatches:: -/a/lib/lib.es2022.full.d.ts: - {"pollingInterval":500} - PolledWatches *deleted*:: /home/src/projects/node_modules: {"pollingInterval":500} FsWatches:: +/a/lib/lib.es2022.full.d.ts: + {} /home/src/projects: {} /home/src/projects/project: @@ -1945,7 +1918,7 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (5) +Info seq [hh:mm:ss:mss] Files (6) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -1953,7 +1926,7 @@ Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/index.mts Project Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (5) +Info seq [hh:mm:ss:mss] Files (6) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -2012,6 +1985,9 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/foo/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/foo2/package.json' exists according to earlier cached lookups. @@ -2097,13 +2073,16 @@ Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/project Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 8 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) +Info seq [hh:mm:ss:mss] Files (5) + /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /home/src/projects/project/node_modules/foo/index.d.ts Text-1 "export declare const foo: number;" /home/src/projects/project/node_modules/@types/bar/index.d.ts Text-1 "export declare const bar: number;" /home/src/projects/project/node_modules/foo2/index.d.ts Text-1 "export declare const foo2: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" + ../../../../a/lib/lib.es2022.full.d.ts + Default library for target 'es2022' node_modules/foo/index.d.ts Imported via "foo" from file 'index.mts' with packageId 'foo/index.d.ts@1.0.0' File is CommonJS module because 'node_modules/foo/package.json' does not have field "type" @@ -2131,12 +2110,12 @@ After running Timeout callback:: count: 1 28: *ensureProjectForOpenFiles* PolledWatches:: -/a/lib/lib.es2022.full.d.ts: - {"pollingInterval":500} /home/src/projects/node_modules: *new* {"pollingInterval":500} FsWatches:: +/a/lib/lib.es2022.full.d.ts: + {} /home/src/projects: {} /home/src/projects/project: @@ -2217,7 +2196,7 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) +Info seq [hh:mm:ss:mss] Files (5) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -2225,7 +2204,7 @@ Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/index.mts Project Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) +Info seq [hh:mm:ss:mss] Files (5) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -2286,6 +2265,9 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/foo/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] Found 'package.json' at '/home/src/projects/project/node_modules/foo2/package.json'. @@ -2347,12 +2329,15 @@ Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earl Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 9 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Files (4) + /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /home/src/projects/project/node_modules/foo/index.d.ts Text-1 "export declare const foo: number;" /home/src/projects/project/node_modules/@types/bar/index.d.ts Text-1 "export declare const bar: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" + ../../../../a/lib/lib.es2022.full.d.ts + Default library for target 'es2022' node_modules/foo/index.d.ts Imported via "foo" from file 'index.mts' with packageId 'foo/index.d.ts@1.0.0' File is CommonJS module because 'node_modules/foo/package.json' does not have field "type" @@ -2446,7 +2431,7 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Files (4) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -2454,7 +2439,7 @@ Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/index.mts Project Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Files (4) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -2504,6 +2489,9 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/foo/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] Reusing resolution of module 'foo' from '/home/src/projects/project/index.mts' of old program, it was successfully resolved to '/home/src/projects/project/node_modules/foo/index.d.ts' with Package ID 'foo/index.d.ts@1.0.0'. @@ -2596,7 +2584,8 @@ Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earl Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 10 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Files (4) + /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /home/src/projects/project/node_modules/foo/index.d.ts Text-1 "export declare const foo: number;" /home/src/projects/project/node_modules/@types/bar/index.d.ts Text-1 "export declare const bar: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" @@ -2685,7 +2674,7 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Files (4) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -2693,7 +2682,7 @@ Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/index.mts Project Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Files (4) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -2743,6 +2732,9 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/foo/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] Reusing resolution of module 'foo' from '/home/src/projects/project/index.mts' of old program, it was successfully resolved to '/home/src/projects/project/node_modules/foo/index.d.ts' with Package ID 'foo/index.d.ts@1.0.0'. @@ -2816,7 +2808,8 @@ Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earl Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 11 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Files (4) + /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /home/src/projects/project/node_modules/foo/index.d.ts Text-1 "export declare const foo: number;" /home/src/projects/project/node_modules/@types/bar/index.d.ts Text-1 "export declare const bar: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" @@ -2905,7 +2898,7 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Files (4) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -2913,7 +2906,7 @@ Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/index.mts Project Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Files (4) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -2965,6 +2958,9 @@ export declare const bar2: number; Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/foo/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] Reusing resolution of module 'foo' from '/home/src/projects/project/index.mts' of old program, it was successfully resolved to '/home/src/projects/project/node_modules/foo/index.d.ts' with Package ID 'foo/index.d.ts@1.0.0'. @@ -3044,7 +3040,8 @@ Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earl Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 12 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Files (4) + /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /home/src/projects/project/node_modules/foo/index.d.ts Text-1 "export declare const foo: number;" /home/src/projects/project/node_modules/@types/bar/index.d.ts Text-1 "export declare const bar: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" @@ -3133,7 +3130,7 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Files (4) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -3141,7 +3138,7 @@ Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/index.mts Project Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Files (4) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -3193,6 +3190,9 @@ export declare const foo2: number; Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/foo/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/projects/project/node_modules/@types/bar/package.json' exists according to earlier cached lookups. Info seq [hh:mm:ss:mss] Reusing resolution of module 'foo' from '/home/src/projects/project/index.mts' of old program, it was successfully resolved to '/home/src/projects/project/node_modules/foo/index.d.ts' with Package ID 'foo/index.d.ts@1.0.0'. @@ -3253,7 +3253,8 @@ Info seq [hh:mm:ss:mss] File '/a/package.json' does not exist according to earl Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json Version: 13 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Files (4) + /a/lib/lib.es2022.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /home/src/projects/project/node_modules/foo/index.d.ts Text-1 "export declare const foo: number;" /home/src/projects/project/node_modules/@types/bar/index.d.ts Text-1 "export declare const bar: number;" /home/src/projects/project/index.mts SVC-1-0 "import { foo } from \"foo\";\nimport { bar } from \"bar\";\nimport { foo2 } from \"foo2\";\nimport { bar2 } from \"bar2\";\n" @@ -3342,7 +3343,7 @@ Before running Timeout callback:: count: 2 Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Files (4) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -3350,7 +3351,7 @@ Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/index.mts Project Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Files (4) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: