diff --git a/src/compiler/moduleNameResolver.ts b/src/compiler/moduleNameResolver.ts index 5177f1d5a57ab..188d62c7a526f 100644 --- a/src/compiler/moduleNameResolver.ts +++ b/src/compiler/moduleNameResolver.ts @@ -1818,7 +1818,7 @@ function tryFileLookup(fileName: string, onlyRecordFailures: boolean, state: Mod function loadNodeModuleFromDirectory(extensions: Extensions, candidate: string, onlyRecordFailures: boolean, state: ModuleResolutionState, considerPackageJson = true) { const packageInfo = considerPackageJson ? getPackageJsonInfo(candidate, onlyRecordFailures, state) : undefined; const packageJsonContent = packageInfo && packageInfo.contents.packageJsonContent; - const versionPaths = packageInfo && packageInfo.contents.versionPaths; + const versionPaths = packageInfo && getVersionPathsOfPackageJsonInfo(packageInfo, state); return withPackageId(packageInfo, loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageJsonContent, versionPaths)); } @@ -1848,7 +1848,7 @@ export function getEntrypointsFromPackageJsonInfo( /*onlyRecordFailures*/ false, requireState, packageJsonInfo.contents.packageJsonContent, - packageJsonInfo.contents.versionPaths); + getVersionPathsOfPackageJsonInfo(packageJsonInfo, requireState)); entrypoints = append(entrypoints, requireResolution?.path); if (features & NodeResolutionFeatures.Exports && packageJsonInfo.contents.packageJsonContent.exports) { @@ -1952,7 +1952,8 @@ export interface PackageJsonInfo { /** @internal */ export interface PackageJsonInfoContents { packageJsonContent: PackageJsonPathFields; - versionPaths: VersionPaths | undefined; + /** false: versionPaths are not present. undefined: not yet resolved */ + versionPaths: VersionPaths | false | undefined; /** false: resolved to nothing. undefined: not yet resolved */ resolvedEntrypoints: string[] | false | undefined; } @@ -1975,6 +1976,13 @@ export interface PackageJsonInfoContents { return undefined; } +function getVersionPathsOfPackageJsonInfo(packageJsonInfo: PackageJsonInfo, state: ModuleResolutionState): VersionPaths | undefined { + if (packageJsonInfo.contents.versionPaths === undefined) { + packageJsonInfo.contents.versionPaths = readPackageJsonTypesVersionPaths(packageJsonInfo.contents.packageJsonContent, state) || false; + } + return packageJsonInfo.contents.versionPaths || undefined; +} + /** @internal */ export function getPackageJsonInfo(packageDirectory: string, onlyRecordFailures: boolean, state: ModuleResolutionState): PackageJsonInfo | undefined { const { host, traceEnabled } = state; @@ -2005,8 +2013,7 @@ export function getPackageJsonInfo(packageDirectory: string, onlyRecordFailures: if (traceEnabled) { trace(host, Diagnostics.Found_package_json_at_0, packageJsonPath); } - const versionPaths = readPackageJsonTypesVersionPaths(packageJsonContent, state); - const result: PackageJsonInfo = { packageDirectory, contents: { packageJsonContent, versionPaths, resolvedEntrypoints: undefined } }; + const result: PackageJsonInfo = { packageDirectory, contents: { packageJsonContent, versionPaths: undefined, resolvedEntrypoints: undefined } }; state.packageJsonInfoCache?.setPackageJsonInfo(packageJsonPath, result); state.affectingLocations.push(packageJsonPath); return result; @@ -2587,7 +2594,7 @@ function loadModuleFromSpecificNodeModulesDirectory(extensions: Extensions, modu !nodeModulesDirectoryExists, state, packageInfo.contents.packageJsonContent, - packageInfo.contents.versionPaths + getVersionPathsOfPackageJsonInfo(packageInfo, state), ); return withPackageId(packageInfo, fromDirectory); } @@ -2602,7 +2609,7 @@ function loadModuleFromSpecificNodeModulesDirectory(extensions: Extensions, modu onlyRecordFailures, state, packageInfo && packageInfo.contents.packageJsonContent, - packageInfo && packageInfo.contents.versionPaths + packageInfo && getVersionPathsOfPackageJsonInfo(packageInfo, state), ); if ( !pathAndExtension && packageInfo @@ -2627,12 +2634,13 @@ function loadModuleFromSpecificNodeModulesDirectory(extensions: Extensions, modu if (packageInfo && packageInfo.contents.packageJsonContent.exports && state.features & NodeResolutionFeatures.Exports) { return loadModuleFromExports(packageInfo, extensions, combinePaths(".", rest), state, cache, redirectedReference)?.value; } - if (rest !== "" && packageInfo && packageInfo.contents.versionPaths) { + const versionPaths = rest !== "" && packageInfo ? getVersionPathsOfPackageJsonInfo(packageInfo, state) : undefined; + if (versionPaths) { if (state.traceEnabled) { - trace(state.host, Diagnostics.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2, packageInfo.contents.versionPaths.version, version, rest); + trace(state.host, Diagnostics.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2, versionPaths.version, version, rest); } const packageDirectoryExists = nodeModulesDirectoryExists && directoryProbablyExists(packageDirectory, state.host); - const fromPaths = tryLoadModuleUsingPaths(extensions, rest, packageDirectory, packageInfo.contents.versionPaths.paths, /*pathPatterns*/ undefined, loader, !packageDirectoryExists, state); + const fromPaths = tryLoadModuleUsingPaths(extensions, rest, packageDirectory, versionPaths.paths, /*pathPatterns*/ undefined, loader, !packageDirectoryExists, state); if (fromPaths) { return fromPaths.value; } diff --git a/tests/baselines/reference/duplicatePackage_relativeImportWithinPackage.trace.json b/tests/baselines/reference/duplicatePackage_relativeImportWithinPackage.trace.json index 438dd50a5ff5a..8fb25b0feb03d 100644 --- a/tests/baselines/reference/duplicatePackage_relativeImportWithinPackage.trace.json +++ b/tests/baselines/reference/duplicatePackage_relativeImportWithinPackage.trace.json @@ -33,10 +33,10 @@ "Module resolution kind is not specified, using 'NodeJs'.", "Loading module 'foo' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Found 'package.json' at '/node_modules/a/node_modules/foo/package.json'.", - "'package.json' does not have a 'typesVersions' field.", "File '/node_modules/a/node_modules/foo.ts' does not exist.", "File '/node_modules/a/node_modules/foo.tsx' does not exist.", "File '/node_modules/a/node_modules/foo.d.ts' does not exist.", + "'package.json' does not have a 'typesVersions' field.", "'package.json' does not have a 'typings' field.", "'package.json' does not have a 'types' field.", "'package.json' does not have a 'main' field.", diff --git a/tests/baselines/reference/duplicatePackage_relativeImportWithinPackage_scoped.trace.json b/tests/baselines/reference/duplicatePackage_relativeImportWithinPackage_scoped.trace.json index 5a9d602d03571..40dafd21ed2db 100644 --- a/tests/baselines/reference/duplicatePackage_relativeImportWithinPackage_scoped.trace.json +++ b/tests/baselines/reference/duplicatePackage_relativeImportWithinPackage_scoped.trace.json @@ -33,10 +33,10 @@ "Module resolution kind is not specified, using 'NodeJs'.", "Loading module '@foo/bar' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Found 'package.json' at '/node_modules/a/node_modules/@foo/bar/package.json'.", - "'package.json' does not have a 'typesVersions' field.", "File '/node_modules/a/node_modules/@foo/bar.ts' does not exist.", "File '/node_modules/a/node_modules/@foo/bar.tsx' does not exist.", "File '/node_modules/a/node_modules/@foo/bar.d.ts' does not exist.", + "'package.json' does not have a 'typesVersions' field.", "'package.json' does not have a 'typings' field.", "'package.json' does not have a 'types' field.", "'package.json' does not have a 'main' field.", diff --git a/tests/baselines/reference/library-reference-11.trace.json b/tests/baselines/reference/library-reference-11.trace.json index ff1905707a3d2..b2121f15d5de8 100644 --- a/tests/baselines/reference/library-reference-11.trace.json +++ b/tests/baselines/reference/library-reference-11.trace.json @@ -4,8 +4,8 @@ "Looking up in 'node_modules' folder, initial location '/a/b'.", "Directory '/a/b/node_modules' does not exist, skipping all lookups in it.", "Found 'package.json' at '/a/node_modules/jquery/package.json'.", - "'package.json' does not have a 'typesVersions' field.", "File '/a/node_modules/jquery.d.ts' does not exist.", + "'package.json' does not have a 'typesVersions' field.", "'package.json' has 'typings' field 'jquery.d.ts' that references '/a/node_modules/jquery/jquery.d.ts'.", "File '/a/node_modules/jquery/jquery.d.ts' exist - use it as a name resolution result.", "Resolving real path for '/a/node_modules/jquery/jquery.d.ts', result '/a/node_modules/jquery/jquery.d.ts'.", diff --git a/tests/baselines/reference/library-reference-12.trace.json b/tests/baselines/reference/library-reference-12.trace.json index 63be1cc32a35d..0ff14204c620b 100644 --- a/tests/baselines/reference/library-reference-12.trace.json +++ b/tests/baselines/reference/library-reference-12.trace.json @@ -4,8 +4,8 @@ "Looking up in 'node_modules' folder, initial location '/a/b'.", "Directory '/a/b/node_modules' does not exist, skipping all lookups in it.", "Found 'package.json' at '/a/node_modules/jquery/package.json'.", - "'package.json' does not have a 'typesVersions' field.", "File '/a/node_modules/jquery.d.ts' does not exist.", + "'package.json' does not have a 'typesVersions' field.", "'package.json' does not have a 'typings' field.", "'package.json' has 'types' field 'dist/jquery.d.ts' that references '/a/node_modules/jquery/dist/jquery.d.ts'.", "File '/a/node_modules/jquery/dist/jquery.d.ts' exist - use it as a name resolution result.", diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_unexpected.trace.json b/tests/baselines/reference/moduleResolutionWithExtensions_unexpected.trace.json index 7ca41cdf2787e..76d84fab3a210 100644 --- a/tests/baselines/reference/moduleResolutionWithExtensions_unexpected.trace.json +++ b/tests/baselines/reference/moduleResolutionWithExtensions_unexpected.trace.json @@ -3,10 +3,10 @@ "Module resolution kind is not specified, using 'NodeJs'.", "Loading module 'normalize.css' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Found 'package.json' at '/node_modules/normalize.css/package.json'.", - "'package.json' does not have a 'typesVersions' field.", "File '/node_modules/normalize.css.ts' does not exist.", "File '/node_modules/normalize.css.tsx' does not exist.", "File '/node_modules/normalize.css.d.ts' does not exist.", + "'package.json' does not have a 'typesVersions' field.", "'package.json' does not have a 'typings' field.", "'package.json' does not have a 'types' field.", "'package.json' has 'main' field 'normalize.css' that references '/node_modules/normalize.css/normalize.css'.", diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_unexpected2.trace.json b/tests/baselines/reference/moduleResolutionWithExtensions_unexpected2.trace.json index f3c8d73336e38..a2521c7f7395f 100644 --- a/tests/baselines/reference/moduleResolutionWithExtensions_unexpected2.trace.json +++ b/tests/baselines/reference/moduleResolutionWithExtensions_unexpected2.trace.json @@ -3,10 +3,10 @@ "Module resolution kind is not specified, using 'NodeJs'.", "Loading module 'foo' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Found 'package.json' at '/node_modules/foo/package.json'.", - "'package.json' does not have a 'typesVersions' field.", "File '/node_modules/foo.ts' does not exist.", "File '/node_modules/foo.tsx' does not exist.", "File '/node_modules/foo.d.ts' does not exist.", + "'package.json' does not have a 'typesVersions' field.", "'package.json' does not have a 'typings' field.", "'package.json' has 'types' field 'foo.js' that references '/node_modules/foo/foo.js'.", "File '/node_modules/foo/foo.js' exist - use it as a name resolution result.", diff --git a/tests/baselines/reference/moduleResolution_packageJson_notAtPackageRoot.trace.json b/tests/baselines/reference/moduleResolution_packageJson_notAtPackageRoot.trace.json index cfdc94c7e4468..89bc3bd6b6a60 100644 --- a/tests/baselines/reference/moduleResolution_packageJson_notAtPackageRoot.trace.json +++ b/tests/baselines/reference/moduleResolution_packageJson_notAtPackageRoot.trace.json @@ -3,10 +3,10 @@ "Module resolution kind is not specified, using 'NodeJs'.", "Loading module 'foo/bar' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Found 'package.json' at '/node_modules/foo/bar/package.json'.", - "'package.json' does not have a 'typesVersions' field.", "File '/node_modules/foo/bar.ts' does not exist.", "File '/node_modules/foo/bar.tsx' does not exist.", "File '/node_modules/foo/bar.d.ts' does not exist.", + "'package.json' does not have a 'typesVersions' field.", "'package.json' does not have a 'typings' field.", "'package.json' has 'types' field 'types.d.ts' that references '/node_modules/foo/bar/types.d.ts'.", "File '/node_modules/foo/bar/types.d.ts' exist - use it as a name resolution result.", diff --git a/tests/baselines/reference/moduleResolution_packageJson_notAtPackageRoot_fakeScopedPackage.trace.json b/tests/baselines/reference/moduleResolution_packageJson_notAtPackageRoot_fakeScopedPackage.trace.json index d1053c8094fd3..7dd7517a76e86 100644 --- a/tests/baselines/reference/moduleResolution_packageJson_notAtPackageRoot_fakeScopedPackage.trace.json +++ b/tests/baselines/reference/moduleResolution_packageJson_notAtPackageRoot_fakeScopedPackage.trace.json @@ -3,10 +3,10 @@ "Module resolution kind is not specified, using 'NodeJs'.", "Loading module 'foo/@bar' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Found 'package.json' at '/node_modules/foo/@bar/package.json'.", - "'package.json' does not have a 'typesVersions' field.", "File '/node_modules/foo/@bar.ts' does not exist.", "File '/node_modules/foo/@bar.tsx' does not exist.", "File '/node_modules/foo/@bar.d.ts' does not exist.", + "'package.json' does not have a 'typesVersions' field.", "'package.json' does not have a 'typings' field.", "'package.json' has 'types' field 'types.d.ts' that references '/node_modules/foo/@bar/types.d.ts'.", "File '/node_modules/foo/@bar/types.d.ts' exist - use it as a name resolution result.", diff --git a/tests/baselines/reference/moduleResolution_packageJson_scopedPackage.trace.json b/tests/baselines/reference/moduleResolution_packageJson_scopedPackage.trace.json index 97d8afc46adca..cb23d576d9070 100644 --- a/tests/baselines/reference/moduleResolution_packageJson_scopedPackage.trace.json +++ b/tests/baselines/reference/moduleResolution_packageJson_scopedPackage.trace.json @@ -3,10 +3,10 @@ "Module resolution kind is not specified, using 'NodeJs'.", "Loading module '@foo/bar' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Found 'package.json' at '/node_modules/@foo/bar/package.json'.", - "'package.json' does not have a 'typesVersions' field.", "File '/node_modules/@foo/bar.ts' does not exist.", "File '/node_modules/@foo/bar.tsx' does not exist.", "File '/node_modules/@foo/bar.d.ts' does not exist.", + "'package.json' does not have a 'typesVersions' field.", "'package.json' does not have a 'typings' field.", "'package.json' has 'types' field 'types.d.ts' that references '/node_modules/@foo/bar/types.d.ts'.", "File '/node_modules/@foo/bar/types.d.ts' exist - use it as a name resolution result.", diff --git a/tests/baselines/reference/moduleResolution_packageJson_yesAtPackageRoot_mainFieldInSubDirectory.trace.json b/tests/baselines/reference/moduleResolution_packageJson_yesAtPackageRoot_mainFieldInSubDirectory.trace.json index 5be14f09f5a1f..c5e106d405c06 100644 --- a/tests/baselines/reference/moduleResolution_packageJson_yesAtPackageRoot_mainFieldInSubDirectory.trace.json +++ b/tests/baselines/reference/moduleResolution_packageJson_yesAtPackageRoot_mainFieldInSubDirectory.trace.json @@ -3,10 +3,10 @@ "Module resolution kind is not specified, using 'NodeJs'.", "Loading module 'foo' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Found 'package.json' at '/node_modules/foo/package.json'.", - "'package.json' does not have a 'typesVersions' field.", "File '/node_modules/foo.ts' does not exist.", "File '/node_modules/foo.tsx' does not exist.", "File '/node_modules/foo.d.ts' does not exist.", + "'package.json' does not have a 'typesVersions' field.", "'package.json' does not have a 'typings' field.", "'package.json' does not have a 'types' field.", "'package.json' has 'main' field 'src/index.js' that references '/node_modules/foo/src/index.js'.", diff --git a/tests/baselines/reference/nodeModulesExportsBlocksTypesVersions(module=node16).trace.json b/tests/baselines/reference/nodeModulesExportsBlocksTypesVersions(module=node16).trace.json index c780ff097e58f..92b11bdaf42de 100644 --- a/tests/baselines/reference/nodeModulesExportsBlocksTypesVersions(module=node16).trace.json +++ b/tests/baselines/reference/nodeModulesExportsBlocksTypesVersions(module=node16).trace.json @@ -1,10 +1,8 @@ [ "File '/node_modules/exports-and-types-versions/types/package.json' does not exist.", "Found 'package.json' at '/node_modules/exports-and-types-versions/package.json'.", - "'package.json' has a 'typesVersions' field with version-specific path mappings.", "File '/node_modules/just-types-versions/types/package.json' does not exist.", "Found 'package.json' at '/node_modules/just-types-versions/package.json'.", - "'package.json' has a 'typesVersions' field with version-specific path mappings.", "======== Resolving module 'exports-and-types-versions/foo' from '/main.cts'. ========", "Module resolution kind is not specified, using 'Node16'.", "Resolving in CJS mode with conditions 'node', 'require', 'types'.", @@ -76,6 +74,7 @@ "File '/package.json' does not exist according to earlier cached lookups.", "Loading module 'just-types-versions/foo' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration.", "File '/node_modules/just-types-versions/package.json' exists according to earlier cached lookups.", + "'package.json' has a 'typesVersions' field with version-specific path mappings.", "'package.json' has a 'typesVersions' entry '*' that matches compiler version '3.1.0-dev', looking for a pattern to match module name 'foo'.", "Module name 'foo', matched pattern 'foo'.", "Trying substitution './types/foo.d.ts', candidate module location: './types/foo.d.ts'.", diff --git a/tests/baselines/reference/nodeModulesExportsBlocksTypesVersions(module=nodenext).trace.json b/tests/baselines/reference/nodeModulesExportsBlocksTypesVersions(module=nodenext).trace.json index 07f013e5604b6..29945f3f5c6f4 100644 --- a/tests/baselines/reference/nodeModulesExportsBlocksTypesVersions(module=nodenext).trace.json +++ b/tests/baselines/reference/nodeModulesExportsBlocksTypesVersions(module=nodenext).trace.json @@ -1,10 +1,8 @@ [ "File '/node_modules/exports-and-types-versions/types/package.json' does not exist.", "Found 'package.json' at '/node_modules/exports-and-types-versions/package.json'.", - "'package.json' has a 'typesVersions' field with version-specific path mappings.", "File '/node_modules/just-types-versions/types/package.json' does not exist.", "Found 'package.json' at '/node_modules/just-types-versions/package.json'.", - "'package.json' has a 'typesVersions' field with version-specific path mappings.", "======== Resolving module 'exports-and-types-versions/foo' from '/main.cts'. ========", "Module resolution kind is not specified, using 'NodeNext'.", "Resolving in CJS mode with conditions 'node', 'require', 'types'.", @@ -76,6 +74,7 @@ "File '/package.json' does not exist according to earlier cached lookups.", "Loading module 'just-types-versions/foo' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration.", "File '/node_modules/just-types-versions/package.json' exists according to earlier cached lookups.", + "'package.json' has a 'typesVersions' field with version-specific path mappings.", "'package.json' has a 'typesVersions' entry '*' that matches compiler version '3.1.0-dev', looking for a pattern to match module name 'foo'.", "Module name 'foo', matched pattern 'foo'.", "Trying substitution './types/foo.d.ts', candidate module location: './types/foo.d.ts'.", diff --git a/tests/baselines/reference/nodeModulesPackageImports(module=node16).trace.json b/tests/baselines/reference/nodeModulesPackageImports(module=node16).trace.json index bf3afd3d6ad9f..8764b05a71aa3 100644 --- a/tests/baselines/reference/nodeModulesPackageImports(module=node16).trace.json +++ b/tests/baselines/reference/nodeModulesPackageImports(module=node16).trace.json @@ -1,6 +1,5 @@ [ "Found 'package.json' at 'tests/cases/conformance/node/package.json'.", - "'package.json' does not have a 'typesVersions' field.", "======== Resolving module '#cjs' from 'tests/cases/conformance/node/index.ts'. ========", "Module resolution kind is not specified, using 'Node16'.", "Resolving in ESM mode with conditions 'node', 'import', 'types'.", diff --git a/tests/baselines/reference/nodeModulesPackageImports(module=nodenext).trace.json b/tests/baselines/reference/nodeModulesPackageImports(module=nodenext).trace.json index 538157242b7a9..e3703f64c7131 100644 --- a/tests/baselines/reference/nodeModulesPackageImports(module=nodenext).trace.json +++ b/tests/baselines/reference/nodeModulesPackageImports(module=nodenext).trace.json @@ -1,6 +1,5 @@ [ "Found 'package.json' at 'tests/cases/conformance/node/package.json'.", - "'package.json' does not have a 'typesVersions' field.", "======== Resolving module '#cjs' from 'tests/cases/conformance/node/index.ts'. ========", "Module resolution kind is not specified, using 'NodeNext'.", "Resolving in ESM mode with conditions 'node', 'import', 'types'.", diff --git a/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=node16).trace.json b/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=node16).trace.json index 0b338e8c685e2..649ebf69802a0 100644 --- a/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=node16).trace.json +++ b/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=node16).trace.json @@ -1,13 +1,11 @@ [ "Found 'package.json' at 'tests/cases/conformance/node/package.json'.", - "'package.json' does not have a 'typesVersions' field.", "======== Resolving module 'inner/cjs/index.cjs' from 'tests/cases/conformance/node/index.ts'. ========", "Module resolution kind is not specified, using 'Node16'.", "Resolving in ESM mode with conditions 'node', 'import', 'types'.", "File 'tests/cases/conformance/node/package.json' exists according to earlier cached lookups.", "Loading module 'inner/cjs/index.cjs' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration.", "Found 'package.json' at 'tests/cases/conformance/node/node_modules/inner/package.json'.", - "'package.json' does not have a 'typesVersions' field.", "Using 'exports' subpath './cjs/*.cjs' with target './index.cjs'.", "File name 'tests/cases/conformance/node/node_modules/inner/index.cjs' has a '.cjs' extension - stripping it.", "File 'tests/cases/conformance/node/node_modules/inner/index.cts' does not exist.", diff --git a/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=nodenext).trace.json b/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=nodenext).trace.json index d46f96f8ba0c3..0806a842d5c7d 100644 --- a/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=nodenext).trace.json +++ b/tests/baselines/reference/nodeModulesPackagePatternExportsTrailers(module=nodenext).trace.json @@ -1,13 +1,11 @@ [ "Found 'package.json' at 'tests/cases/conformance/node/package.json'.", - "'package.json' does not have a 'typesVersions' field.", "======== Resolving module 'inner/cjs/index.cjs' from 'tests/cases/conformance/node/index.ts'. ========", "Module resolution kind is not specified, using 'NodeNext'.", "Resolving in ESM mode with conditions 'node', 'import', 'types'.", "File 'tests/cases/conformance/node/package.json' exists according to earlier cached lookups.", "Loading module 'inner/cjs/index.cjs' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration.", "Found 'package.json' at 'tests/cases/conformance/node/node_modules/inner/package.json'.", - "'package.json' does not have a 'typesVersions' field.", "Using 'exports' subpath './cjs/*.cjs' with target './index.cjs'.", "File name 'tests/cases/conformance/node/node_modules/inner/index.cjs' has a '.cjs' extension - stripping it.", "File 'tests/cases/conformance/node/node_modules/inner/index.cts' does not exist.", diff --git a/tests/baselines/reference/packageJsonMain.trace.json b/tests/baselines/reference/packageJsonMain.trace.json index 4b7e05671e9a4..0b4ae83be9631 100644 --- a/tests/baselines/reference/packageJsonMain.trace.json +++ b/tests/baselines/reference/packageJsonMain.trace.json @@ -3,10 +3,10 @@ "Module resolution kind is not specified, using 'NodeJs'.", "Loading module 'foo' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Found 'package.json' at '/node_modules/foo/package.json'.", - "'package.json' does not have a 'typesVersions' field.", "File '/node_modules/foo.ts' does not exist.", "File '/node_modules/foo.tsx' does not exist.", "File '/node_modules/foo.d.ts' does not exist.", + "'package.json' does not have a 'typesVersions' field.", "'package.json' does not have a 'typings' field.", "'package.json' does not have a 'types' field.", "'package.json' has 'main' field 'oof' that references '/node_modules/foo/oof'.", @@ -34,10 +34,10 @@ "Module resolution kind is not specified, using 'NodeJs'.", "Loading module 'bar' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Found 'package.json' at '/node_modules/bar/package.json'.", - "'package.json' does not have a 'typesVersions' field.", "File '/node_modules/bar.ts' does not exist.", "File '/node_modules/bar.tsx' does not exist.", "File '/node_modules/bar.d.ts' does not exist.", + "'package.json' does not have a 'typesVersions' field.", "'package.json' does not have a 'typings' field.", "'package.json' does not have a 'types' field.", "'package.json' has 'main' field 'rab.js' that references '/node_modules/bar/rab.js'.", @@ -68,10 +68,10 @@ "Module resolution kind is not specified, using 'NodeJs'.", "Loading module 'baz' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Found 'package.json' at '/node_modules/baz/package.json'.", - "'package.json' does not have a 'typesVersions' field.", "File '/node_modules/baz.ts' does not exist.", "File '/node_modules/baz.tsx' does not exist.", "File '/node_modules/baz.d.ts' does not exist.", + "'package.json' does not have a 'typesVersions' field.", "'package.json' does not have a 'typings' field.", "'package.json' does not have a 'types' field.", "'package.json' has 'main' field 'zab' that references '/node_modules/baz/zab'.", diff --git a/tests/baselines/reference/packageJsonMain_isNonRecursive.trace.json b/tests/baselines/reference/packageJsonMain_isNonRecursive.trace.json index fe5615b96b033..ee0855453720f 100644 --- a/tests/baselines/reference/packageJsonMain_isNonRecursive.trace.json +++ b/tests/baselines/reference/packageJsonMain_isNonRecursive.trace.json @@ -3,10 +3,10 @@ "Module resolution kind is not specified, using 'NodeJs'.", "Loading module 'foo' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Found 'package.json' at '/node_modules/foo/package.json'.", - "'package.json' does not have a 'typesVersions' field.", "File '/node_modules/foo.ts' does not exist.", "File '/node_modules/foo.tsx' does not exist.", "File '/node_modules/foo.d.ts' does not exist.", + "'package.json' does not have a 'typesVersions' field.", "'package.json' does not have a 'typings' field.", "'package.json' does not have a 'types' field.", "'package.json' has 'main' field 'oof' that references '/node_modules/foo/oof'.", diff --git a/tests/baselines/reference/reactJsxReactResolvedNodeNextEsm.trace.json b/tests/baselines/reference/reactJsxReactResolvedNodeNextEsm.trace.json index 24ba72063b9a8..dfecb2b0ca052 100644 --- a/tests/baselines/reference/reactJsxReactResolvedNodeNextEsm.trace.json +++ b/tests/baselines/reference/reactJsxReactResolvedNodeNextEsm.trace.json @@ -1,13 +1,11 @@ [ "Found 'package.json' at 'tests/cases/compiler/package.json'.", - "'package.json' does not have a 'typesVersions' field.", "======== Resolving module 'react/jsx-runtime' from 'tests/cases/compiler/file.tsx'. ========", "Module resolution kind is not specified, using 'NodeNext'.", "Resolving in ESM mode with conditions 'node', 'import', 'types'.", "File 'tests/cases/compiler/package.json' exists according to earlier cached lookups.", "Loading module 'react/jsx-runtime' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration.", "Found 'package.json' at 'tests/cases/compiler/node_modules/@types/react/package.json'.", - "'package.json' does not have a 'typesVersions' field.", "Using 'exports' subpath './*' with target './jsx-runtime.js'.", "File name 'tests/cases/compiler/node_modules/@types/react/jsx-runtime.js' has a '.js' extension - stripping it.", "File 'tests/cases/compiler/node_modules/@types/react/jsx-runtime.d.ts' exist - use it as a name resolution result.", @@ -19,6 +17,7 @@ "Resolving in CJS mode with conditions 'node', 'require', 'types'.", "Loading module as file / folder, candidate module location 'tests/cases/compiler/node_modules/@types/react/', target file types: TypeScript, JavaScript, Declaration.", "File 'tests/cases/compiler/node_modules/@types/react/package.json' exists according to earlier cached lookups.", + "'package.json' does not have a 'typesVersions' field.", "'package.json' does not have a 'typings' field.", "'package.json' has 'types' field 'index.d.ts' that references 'tests/cases/compiler/node_modules/@types/react/index.d.ts'.", "File 'tests/cases/compiler/node_modules/@types/react/index.d.ts' exist - use it as a name resolution result.", diff --git a/tests/baselines/reference/tsbuild/moduleResolution/impliedNodeFormat-differs-between-projects-for-shared-file.js b/tests/baselines/reference/tsbuild/moduleResolution/impliedNodeFormat-differs-between-projects-for-shared-file.js index feee35691bf36..91ca1d745305c 100644 --- a/tests/baselines/reference/tsbuild/moduleResolution/impliedNodeFormat-differs-between-projects-for-shared-file.js +++ b/tests/baselines/reference/tsbuild/moduleResolution/impliedNodeFormat-differs-between-projects-for-shared-file.js @@ -83,7 +83,6 @@ src/projects/node_modules/@types/pg/index.d.ts File '/src/projects/b/src/package.json' does not exist. Found 'package.json' at '/src/projects/b/package.json'. -'package.json' does not have a 'typesVersions' field. ======== Resolving module 'pg' from '/src/projects/b/src/index.ts'. ======== Module resolution kind is not specified, using 'Node16'. Resolving in ESM mode with conditions 'node', 'import', 'types'. diff --git a/tests/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-preserveSymlinks.js b/tests/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-preserveSymlinks.js index 1465574e71f9e..b1a520412f573 100644 --- a/tests/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-preserveSymlinks.js +++ b/tests/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-preserveSymlinks.js @@ -60,10 +60,10 @@ Loading module 'pkg2' from 'node_modules' folder, target file types: TypeScript, Directory '/user/username/projects/myproject/packages/pkg1/node_modules' does not exist, skipping all lookups in it. Directory '/user/username/projects/myproject/packages/node_modules' does not exist, skipping all lookups in it. Found 'package.json' at '/user/username/projects/myproject/node_modules/pkg2/package.json'. -'package.json' does not have a 'typesVersions' field. File '/user/username/projects/myproject/node_modules/pkg2.ts' does not exist. File '/user/username/projects/myproject/node_modules/pkg2.tsx' does not exist. File '/user/username/projects/myproject/node_modules/pkg2.d.ts' does not exist. +'package.json' does not have a 'typesVersions' field. 'package.json' does not have a 'typings' field. 'package.json' does not have a 'types' field. 'package.json' has 'main' field 'build/index.js' that references '/user/username/projects/myproject/node_modules/pkg2/build/index.js'. diff --git a/tests/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly.js b/tests/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly.js index d7005853125ea..94132a15dd2eb 100644 --- a/tests/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly.js +++ b/tests/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly.js @@ -60,10 +60,10 @@ Loading module 'pkg2' from 'node_modules' folder, target file types: TypeScript, Directory '/user/username/projects/myproject/packages/pkg1/node_modules' does not exist, skipping all lookups in it. Directory '/user/username/projects/myproject/packages/node_modules' does not exist, skipping all lookups in it. Found 'package.json' at '/user/username/projects/myproject/node_modules/pkg2/package.json'. -'package.json' does not have a 'typesVersions' field. File '/user/username/projects/myproject/node_modules/pkg2.ts' does not exist. File '/user/username/projects/myproject/node_modules/pkg2.tsx' does not exist. File '/user/username/projects/myproject/node_modules/pkg2.d.ts' does not exist. +'package.json' does not have a 'typesVersions' field. 'package.json' does not have a 'typings' field. 'package.json' does not have a 'types' field. 'package.json' has 'main' field 'build/index.js' that references '/user/username/projects/myproject/node_modules/pkg2/build/index.js'. diff --git a/tests/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-for-changes-to-package-json-main-fields.js b/tests/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-for-changes-to-package-json-main-fields.js index d081292172fe6..2c09c2ebadf6a 100644 --- a/tests/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-for-changes-to-package-json-main-fields.js +++ b/tests/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-for-changes-to-package-json-main-fields.js @@ -68,10 +68,10 @@ Loading module 'pkg2' from 'node_modules' folder, target file types: TypeScript, Directory '/user/username/projects/myproject/packages/pkg1/node_modules' does not exist, skipping all lookups in it. Directory '/user/username/projects/myproject/packages/node_modules' does not exist, skipping all lookups in it. Found 'package.json' at '/user/username/projects/myproject/node_modules/pkg2/package.json'. -'package.json' does not have a 'typesVersions' field. File '/user/username/projects/myproject/node_modules/pkg2.ts' does not exist. File '/user/username/projects/myproject/node_modules/pkg2.tsx' does not exist. File '/user/username/projects/myproject/node_modules/pkg2.d.ts' does not exist. +'package.json' does not have a 'typesVersions' field. 'package.json' does not have a 'typings' field. 'package.json' does not have a 'types' field. 'package.json' has 'main' field 'build/index.js' that references '/user/username/projects/myproject/node_modules/pkg2/build/index.js'. @@ -299,10 +299,10 @@ Loading module 'pkg2' from 'node_modules' folder, target file types: TypeScript, Directory '/user/username/projects/myproject/packages/pkg1/node_modules' does not exist, skipping all lookups in it. Directory '/user/username/projects/myproject/packages/node_modules' does not exist, skipping all lookups in it. Found 'package.json' at '/user/username/projects/myproject/node_modules/pkg2/package.json'. -'package.json' does not have a 'typesVersions' field. File '/user/username/projects/myproject/node_modules/pkg2.ts' does not exist. File '/user/username/projects/myproject/node_modules/pkg2.tsx' does not exist. File '/user/username/projects/myproject/node_modules/pkg2.d.ts' does not exist. +'package.json' does not have a 'typesVersions' field. 'package.json' does not have a 'typings' field. 'package.json' does not have a 'types' field. 'package.json' has 'main' field 'build/other.js' that references '/user/username/projects/myproject/node_modules/pkg2/build/other.js'. @@ -388,10 +388,10 @@ Loading module 'pkg2' from 'node_modules' folder, target file types: TypeScript, Directory '/user/username/projects/myproject/packages/pkg1/node_modules' does not exist, skipping all lookups in it. Directory '/user/username/projects/myproject/packages/node_modules' does not exist, skipping all lookups in it. Found 'package.json' at '/user/username/projects/myproject/node_modules/pkg2/package.json'. -'package.json' does not have a 'typesVersions' field. File '/user/username/projects/myproject/node_modules/pkg2.ts' does not exist. File '/user/username/projects/myproject/node_modules/pkg2.tsx' does not exist. File '/user/username/projects/myproject/node_modules/pkg2.d.ts' does not exist. +'package.json' does not have a 'typesVersions' field. 'package.json' does not have a 'typings' field. 'package.json' does not have a 'types' field. 'package.json' has 'main' field 'build/index.js' that references '/user/username/projects/myproject/node_modules/pkg2/build/index.js'. diff --git a/tests/baselines/reference/tsbuildWatch/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-cts-and-mts-extensions.js b/tests/baselines/reference/tsbuildWatch/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-cts-and-mts-extensions.js index 9305de1d4c865..cfd10d5030873 100644 --- a/tests/baselines/reference/tsbuildWatch/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-cts-and-mts-extensions.js +++ b/tests/baselines/reference/tsbuildWatch/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-cts-and-mts-extensions.js @@ -50,7 +50,6 @@ Output:: [12:00:44 AM] Building project '/user/username/projects/myproject/packages/pkg2/tsconfig.json'... Found 'package.json' at '/user/username/projects/myproject/packages/pkg2/package.json'. -'package.json' does not have a 'typesVersions' field. ======== Resolving module './const.cjs' from '/user/username/projects/myproject/packages/pkg2/index.ts'. ======== Module resolution kind is not specified, using 'Node16'. Resolving in ESM mode with conditions 'node', 'import', 'types'. @@ -66,7 +65,6 @@ File '/package.json' does not exist. [12:01:02 AM] Building project '/user/username/projects/myproject/packages/pkg1/tsconfig.json'... Found 'package.json' at '/user/username/projects/myproject/packages/pkg1/package.json'. -'package.json' does not have a 'typesVersions' field. ======== Resolving module 'pkg2' from '/user/username/projects/myproject/packages/pkg1/index.ts'. ======== Module resolution kind is not specified, using 'Node16'. Resolving in ESM mode with conditions 'node', 'import', 'types'. @@ -292,7 +290,6 @@ Output:: [12:01:15 AM] Building project '/user/username/projects/myproject/packages/pkg1/tsconfig.json'... Found 'package.json' at '/user/username/projects/myproject/packages/pkg1/package.json'. -'package.json' does not have a 'typesVersions' field. ======== Resolving module 'pkg2' from '/user/username/projects/myproject/packages/pkg1/index.ts'. ======== Module resolution kind is not specified, using 'Node16'. Resolving in CJS mode with conditions 'node', 'require', 'types'. @@ -301,10 +298,10 @@ Loading module 'pkg2' from 'node_modules' folder, target file types: TypeScript, Directory '/user/username/projects/myproject/packages/pkg1/node_modules' does not exist, skipping all lookups in it. Directory '/user/username/projects/myproject/packages/node_modules' does not exist, skipping all lookups in it. Found 'package.json' at '/user/username/projects/myproject/node_modules/pkg2/package.json'. -'package.json' does not have a 'typesVersions' field. File '/user/username/projects/myproject/node_modules/pkg2.ts' does not exist. File '/user/username/projects/myproject/node_modules/pkg2.tsx' does not exist. File '/user/username/projects/myproject/node_modules/pkg2.d.ts' does not exist. +'package.json' does not have a 'typesVersions' field. 'package.json' does not have a 'typings' field. 'package.json' does not have a 'types' field. 'package.json' has 'main' field 'build/index.js' that references '/user/username/projects/myproject/node_modules/pkg2/build/index.js'. @@ -319,7 +316,6 @@ Resolving real path for '/user/username/projects/myproject/node_modules/pkg2/bui ======== Module name 'pkg2' was successfully resolved to '/user/username/projects/myproject/packages/pkg2/build/index.d.ts' with Package ID 'pkg2/build/index.d.ts@1.0.0'. ======== File '/user/username/projects/myproject/packages/pkg2/build/package.json' does not exist. Found 'package.json' at '/user/username/projects/myproject/packages/pkg2/package.json'. -'package.json' does not have a 'typesVersions' field. ======== Resolving module './const.cjs' from '/user/username/projects/myproject/packages/pkg2/build/index.d.ts'. ======== Using compiler options of project reference redirect '/user/username/projects/myproject/packages/pkg2/tsconfig.json'. Module resolution kind is not specified, using 'Node16'. @@ -408,7 +404,6 @@ Output:: [12:01:22 AM] Building project '/user/username/projects/myproject/packages/pkg1/tsconfig.json'... Found 'package.json' at '/user/username/projects/myproject/packages/pkg1/package.json'. -'package.json' does not have a 'typesVersions' field. ======== Resolving module 'pkg2' from '/user/username/projects/myproject/packages/pkg1/index.ts'. ======== Module resolution kind is not specified, using 'Node16'. Resolving in ESM mode with conditions 'node', 'import', 'types'. @@ -432,7 +427,6 @@ Resolving real path for '/user/username/projects/myproject/node_modules/pkg2/bui ======== Module name 'pkg2' was successfully resolved to '/user/username/projects/myproject/packages/pkg2/build/index.d.ts' with Package ID 'pkg2/build/index.d.ts@1.0.0'. ======== File '/user/username/projects/myproject/packages/pkg2/build/package.json' does not exist. Found 'package.json' at '/user/username/projects/myproject/packages/pkg2/package.json'. -'package.json' does not have a 'typesVersions' field. ======== Resolving module './const.cjs' from '/user/username/projects/myproject/packages/pkg2/build/index.d.ts'. ======== Using compiler options of project reference redirect '/user/username/projects/myproject/packages/pkg2/tsconfig.json'. Module resolution kind is not specified, using 'Node16'. @@ -516,7 +510,6 @@ Output:: [12:01:33 AM] Building project '/user/username/projects/myproject/packages/pkg1/tsconfig.json'... Found 'package.json' at '/user/username/projects/myproject/packages/pkg1/package.json'. -'package.json' does not have a 'typesVersions' field. ======== Resolving module 'pkg2' from '/user/username/projects/myproject/packages/pkg1/index.ts'. ======== Module resolution kind is not specified, using 'Node16'. Resolving in CJS mode with conditions 'node', 'require', 'types'. @@ -525,10 +518,10 @@ Loading module 'pkg2' from 'node_modules' folder, target file types: TypeScript, Directory '/user/username/projects/myproject/packages/pkg1/node_modules' does not exist, skipping all lookups in it. Directory '/user/username/projects/myproject/packages/node_modules' does not exist, skipping all lookups in it. Found 'package.json' at '/user/username/projects/myproject/node_modules/pkg2/package.json'. -'package.json' does not have a 'typesVersions' field. File '/user/username/projects/myproject/node_modules/pkg2.ts' does not exist. File '/user/username/projects/myproject/node_modules/pkg2.tsx' does not exist. File '/user/username/projects/myproject/node_modules/pkg2.d.ts' does not exist. +'package.json' does not have a 'typesVersions' field. 'package.json' does not have a 'typings' field. 'package.json' does not have a 'types' field. 'package.json' has 'main' field 'build/index.js' that references '/user/username/projects/myproject/node_modules/pkg2/build/index.js'. @@ -543,7 +536,6 @@ Resolving real path for '/user/username/projects/myproject/node_modules/pkg2/bui ======== Module name 'pkg2' was successfully resolved to '/user/username/projects/myproject/packages/pkg2/build/index.d.ts' with Package ID 'pkg2/build/index.d.ts@1.0.0'. ======== File '/user/username/projects/myproject/packages/pkg2/build/package.json' does not exist. Found 'package.json' at '/user/username/projects/myproject/packages/pkg2/package.json'. -'package.json' does not have a 'typesVersions' field. ======== Resolving module './const.cjs' from '/user/username/projects/myproject/packages/pkg2/build/index.d.ts'. ======== Using compiler options of project reference redirect '/user/username/projects/myproject/packages/pkg2/tsconfig.json'. Module resolution kind is not specified, using 'Node16'. @@ -650,7 +642,6 @@ File '/package.json' does not exist. [12:01:57 AM] Building project '/user/username/projects/myproject/packages/pkg1/tsconfig.json'... Found 'package.json' at '/user/username/projects/myproject/packages/pkg1/package.json'. -'package.json' does not have a 'typesVersions' field. ======== Resolving module 'pkg2' from '/user/username/projects/myproject/packages/pkg1/index.ts'. ======== Module resolution kind is not specified, using 'Node16'. Resolving in CJS mode with conditions 'node', 'require', 'types'. @@ -659,10 +650,10 @@ Loading module 'pkg2' from 'node_modules' folder, target file types: TypeScript, Directory '/user/username/projects/myproject/packages/pkg1/node_modules' does not exist, skipping all lookups in it. Directory '/user/username/projects/myproject/packages/node_modules' does not exist, skipping all lookups in it. Found 'package.json' at '/user/username/projects/myproject/node_modules/pkg2/package.json'. -'package.json' does not have a 'typesVersions' field. File '/user/username/projects/myproject/node_modules/pkg2.ts' does not exist. File '/user/username/projects/myproject/node_modules/pkg2.tsx' does not exist. File '/user/username/projects/myproject/node_modules/pkg2.d.ts' does not exist. +'package.json' does not have a 'typesVersions' field. 'package.json' does not have a 'typings' field. 'package.json' does not have a 'types' field. 'package.json' has 'main' field 'build/index.cjs' that references '/user/username/projects/myproject/node_modules/pkg2/build/index.cjs'. diff --git a/tests/baselines/reference/tsc/declarationEmit/when-same-version-is-referenced-through-source-and-another-symlinked-package-moduleCaseChange.js b/tests/baselines/reference/tsc/declarationEmit/when-same-version-is-referenced-through-source-and-another-symlinked-package-moduleCaseChange.js index 25c14692f1944..6674d1f86a311 100644 --- a/tests/baselines/reference/tsc/declarationEmit/when-same-version-is-referenced-through-source-and-another-symlinked-package-moduleCaseChange.js +++ b/tests/baselines/reference/tsc/declarationEmit/when-same-version-is-referenced-through-source-and-another-symlinked-package-moduleCaseChange.js @@ -91,10 +91,10 @@ Output:: Module resolution kind is not specified, using 'NodeJs'. Loading module 'typescript-fsa' from 'node_modules' folder, target file types: TypeScript, Declaration. Found 'package.json' at '/user/username/projects/myproject/plugin-one/node_modules/typescript-fsa/package.json'. -'package.json' does not have a 'typesVersions' field. File '/user/username/projects/myproject/plugin-one/node_modules/typescript-fsa.ts' does not exist. File '/user/username/projects/myproject/plugin-one/node_modules/typescript-fsa.tsx' does not exist. File '/user/username/projects/myproject/plugin-one/node_modules/typescript-fsa.d.ts' does not exist. +'package.json' does not have a 'typesVersions' field. 'package.json' does not have a 'typings' field. 'package.json' does not have a 'types' field. 'package.json' does not have a 'main' field. @@ -119,10 +119,10 @@ Resolving real path for '/user/username/projects/myproject/plugin-one/node_modul Module resolution kind is not specified, using 'NodeJs'. Loading module 'typescript-fsa' from 'node_modules' folder, target file types: TypeScript, Declaration. Found 'package.json' at '/user/username/projects/myProject/plugin-two/node_modules/typescript-fsa/package.json'. -'package.json' does not have a 'typesVersions' field. File '/user/username/projects/myProject/plugin-two/node_modules/typescript-fsa.ts' does not exist. File '/user/username/projects/myProject/plugin-two/node_modules/typescript-fsa.tsx' does not exist. File '/user/username/projects/myProject/plugin-two/node_modules/typescript-fsa.d.ts' does not exist. +'package.json' does not have a 'typesVersions' field. 'package.json' does not have a 'typings' field. 'package.json' does not have a 'types' field. 'package.json' does not have a 'main' field. diff --git a/tests/baselines/reference/tsc/declarationEmit/when-same-version-is-referenced-through-source-and-another-symlinked-package-with-indirect-link-moduleCaseChange.js b/tests/baselines/reference/tsc/declarationEmit/when-same-version-is-referenced-through-source-and-another-symlinked-package-with-indirect-link-moduleCaseChange.js index ed8b4eb993c45..d078c657247fc 100644 --- a/tests/baselines/reference/tsc/declarationEmit/when-same-version-is-referenced-through-source-and-another-symlinked-package-with-indirect-link-moduleCaseChange.js +++ b/tests/baselines/reference/tsc/declarationEmit/when-same-version-is-referenced-through-source-and-another-symlinked-package-with-indirect-link-moduleCaseChange.js @@ -93,10 +93,10 @@ Output:: Module resolution kind is not specified, using 'NodeJs'. Loading module 'plugin-two' from 'node_modules' folder, target file types: TypeScript, Declaration. Found 'package.json' at '/user/username/projects/myproject/plugin-one/node_modules/plugin-two/package.json'. -'package.json' does not have a 'typesVersions' field. File '/user/username/projects/myproject/plugin-one/node_modules/plugin-two.ts' does not exist. File '/user/username/projects/myproject/plugin-one/node_modules/plugin-two.tsx' does not exist. File '/user/username/projects/myproject/plugin-one/node_modules/plugin-two.d.ts' does not exist. +'package.json' does not have a 'typesVersions' field. 'package.json' does not have a 'typings' field. 'package.json' does not have a 'types' field. 'package.json' has 'main' field 'dist/commonjs/index.js' that references '/user/username/projects/myproject/plugin-one/node_modules/plugin-two/dist/commonjs/index.js'. @@ -112,10 +112,10 @@ Resolving real path for '/user/username/projects/myproject/plugin-one/node_modul Module resolution kind is not specified, using 'NodeJs'. Loading module 'typescript-fsa' from 'node_modules' folder, target file types: TypeScript, Declaration. Found 'package.json' at '/user/username/projects/myproject/plugin-one/node_modules/typescript-fsa/package.json'. -'package.json' does not have a 'typesVersions' field. File '/user/username/projects/myproject/plugin-one/node_modules/typescript-fsa.ts' does not exist. File '/user/username/projects/myproject/plugin-one/node_modules/typescript-fsa.tsx' does not exist. File '/user/username/projects/myproject/plugin-one/node_modules/typescript-fsa.d.ts' does not exist. +'package.json' does not have a 'typesVersions' field. 'package.json' does not have a 'typings' field. 'package.json' does not have a 'types' field. 'package.json' does not have a 'main' field. @@ -130,10 +130,10 @@ Loading module 'typescript-fsa' from 'node_modules' folder, target file types: T Directory '/user/username/projects/myProject/plugin-two/dist/commonjs/node_modules' does not exist, skipping all lookups in it. Directory '/user/username/projects/myProject/plugin-two/dist/node_modules' does not exist, skipping all lookups in it. Found 'package.json' at '/user/username/projects/myProject/plugin-two/node_modules/typescript-fsa/package.json'. -'package.json' does not have a 'typesVersions' field. File '/user/username/projects/myProject/plugin-two/node_modules/typescript-fsa.ts' does not exist. File '/user/username/projects/myProject/plugin-two/node_modules/typescript-fsa.tsx' does not exist. File '/user/username/projects/myProject/plugin-two/node_modules/typescript-fsa.d.ts' does not exist. +'package.json' does not have a 'typesVersions' field. 'package.json' does not have a 'typings' field. 'package.json' does not have a 'types' field. 'package.json' does not have a 'main' field. diff --git a/tests/baselines/reference/tsc/declarationEmit/when-same-version-is-referenced-through-source-and-another-symlinked-package-with-indirect-link.js b/tests/baselines/reference/tsc/declarationEmit/when-same-version-is-referenced-through-source-and-another-symlinked-package-with-indirect-link.js index b155ae818b824..54b5d3c18cd35 100644 --- a/tests/baselines/reference/tsc/declarationEmit/when-same-version-is-referenced-through-source-and-another-symlinked-package-with-indirect-link.js +++ b/tests/baselines/reference/tsc/declarationEmit/when-same-version-is-referenced-through-source-and-another-symlinked-package-with-indirect-link.js @@ -93,10 +93,10 @@ Output:: Module resolution kind is not specified, using 'NodeJs'. Loading module 'plugin-two' from 'node_modules' folder, target file types: TypeScript, Declaration. Found 'package.json' at '/user/username/projects/myproject/plugin-one/node_modules/plugin-two/package.json'. -'package.json' does not have a 'typesVersions' field. File '/user/username/projects/myproject/plugin-one/node_modules/plugin-two.ts' does not exist. File '/user/username/projects/myproject/plugin-one/node_modules/plugin-two.tsx' does not exist. File '/user/username/projects/myproject/plugin-one/node_modules/plugin-two.d.ts' does not exist. +'package.json' does not have a 'typesVersions' field. 'package.json' does not have a 'typings' field. 'package.json' does not have a 'types' field. 'package.json' has 'main' field 'dist/commonjs/index.js' that references '/user/username/projects/myproject/plugin-one/node_modules/plugin-two/dist/commonjs/index.js'. @@ -112,10 +112,10 @@ Resolving real path for '/user/username/projects/myproject/plugin-one/node_modul Module resolution kind is not specified, using 'NodeJs'. Loading module 'typescript-fsa' from 'node_modules' folder, target file types: TypeScript, Declaration. Found 'package.json' at '/user/username/projects/myproject/plugin-one/node_modules/typescript-fsa/package.json'. -'package.json' does not have a 'typesVersions' field. File '/user/username/projects/myproject/plugin-one/node_modules/typescript-fsa.ts' does not exist. File '/user/username/projects/myproject/plugin-one/node_modules/typescript-fsa.tsx' does not exist. File '/user/username/projects/myproject/plugin-one/node_modules/typescript-fsa.d.ts' does not exist. +'package.json' does not have a 'typesVersions' field. 'package.json' does not have a 'typings' field. 'package.json' does not have a 'types' field. 'package.json' does not have a 'main' field. @@ -130,10 +130,10 @@ Loading module 'typescript-fsa' from 'node_modules' folder, target file types: T Directory '/user/username/projects/myproject/plugin-two/dist/commonjs/node_modules' does not exist, skipping all lookups in it. Directory '/user/username/projects/myproject/plugin-two/dist/node_modules' does not exist, skipping all lookups in it. Found 'package.json' at '/user/username/projects/myproject/plugin-two/node_modules/typescript-fsa/package.json'. -'package.json' does not have a 'typesVersions' field. File '/user/username/projects/myproject/plugin-two/node_modules/typescript-fsa.ts' does not exist. File '/user/username/projects/myproject/plugin-two/node_modules/typescript-fsa.tsx' does not exist. File '/user/username/projects/myproject/plugin-two/node_modules/typescript-fsa.d.ts' does not exist. +'package.json' does not have a 'typesVersions' field. 'package.json' does not have a 'typings' field. 'package.json' does not have a 'types' field. 'package.json' does not have a 'main' field. diff --git a/tests/baselines/reference/tsc/declarationEmit/when-same-version-is-referenced-through-source-and-another-symlinked-package.js b/tests/baselines/reference/tsc/declarationEmit/when-same-version-is-referenced-through-source-and-another-symlinked-package.js index 7551fb51042d0..90041bb9968ae 100644 --- a/tests/baselines/reference/tsc/declarationEmit/when-same-version-is-referenced-through-source-and-another-symlinked-package.js +++ b/tests/baselines/reference/tsc/declarationEmit/when-same-version-is-referenced-through-source-and-another-symlinked-package.js @@ -91,10 +91,10 @@ Output:: Module resolution kind is not specified, using 'NodeJs'. Loading module 'typescript-fsa' from 'node_modules' folder, target file types: TypeScript, Declaration. Found 'package.json' at '/user/username/projects/myproject/plugin-one/node_modules/typescript-fsa/package.json'. -'package.json' does not have a 'typesVersions' field. File '/user/username/projects/myproject/plugin-one/node_modules/typescript-fsa.ts' does not exist. File '/user/username/projects/myproject/plugin-one/node_modules/typescript-fsa.tsx' does not exist. File '/user/username/projects/myproject/plugin-one/node_modules/typescript-fsa.d.ts' does not exist. +'package.json' does not have a 'typesVersions' field. 'package.json' does not have a 'typings' field. 'package.json' does not have a 'types' field. 'package.json' does not have a 'main' field. @@ -119,10 +119,10 @@ Resolving real path for '/user/username/projects/myproject/plugin-one/node_modul Module resolution kind is not specified, using 'NodeJs'. Loading module 'typescript-fsa' from 'node_modules' folder, target file types: TypeScript, Declaration. Found 'package.json' at '/user/username/projects/myproject/plugin-two/node_modules/typescript-fsa/package.json'. -'package.json' does not have a 'typesVersions' field. File '/user/username/projects/myproject/plugin-two/node_modules/typescript-fsa.ts' does not exist. File '/user/username/projects/myproject/plugin-two/node_modules/typescript-fsa.tsx' does not exist. File '/user/username/projects/myproject/plugin-two/node_modules/typescript-fsa.d.ts' does not exist. +'package.json' does not have a 'typesVersions' field. 'package.json' does not have a 'typings' field. 'package.json' does not have a 'types' field. 'package.json' does not have a 'main' field. diff --git a/tests/baselines/reference/tscWatch/forceConsistentCasingInFileNames/package-json-is-looked-up-for-file.js b/tests/baselines/reference/tscWatch/forceConsistentCasingInFileNames/package-json-is-looked-up-for-file.js index a97683f6d0825..c32282f5b8079 100644 --- a/tests/baselines/reference/tscWatch/forceConsistentCasingInFileNames/package-json-is-looked-up-for-file.js +++ b/tests/baselines/reference/tscWatch/forceConsistentCasingInFileNames/package-json-is-looked-up-for-file.js @@ -34,7 +34,6 @@ Output:: File '/Users/name/projects/lib-boilerplate/src/package.json' does not exist. Found 'package.json' at '/Users/name/projects/lib-boilerplate/package.json'. -'package.json' does not have a 'typesVersions' field. File '/Users/name/projects/lib-boilerplate/test/package.json' does not exist. File '/Users/name/projects/lib-boilerplate/package.json' exists according to earlier cached lookups. ======== Resolving module 'lib-boilerplate' from '/Users/name/projects/lib-boilerplate/test/basic.spec.ts'. ======== diff --git a/tests/baselines/reference/tscWatch/forceConsistentCasingInFileNames/self-name-package-reference.js b/tests/baselines/reference/tscWatch/forceConsistentCasingInFileNames/self-name-package-reference.js index dc846f43cc954..29995ad3375a4 100644 --- a/tests/baselines/reference/tscWatch/forceConsistentCasingInFileNames/self-name-package-reference.js +++ b/tests/baselines/reference/tscWatch/forceConsistentCasingInFileNames/self-name-package-reference.js @@ -31,7 +31,6 @@ Output:: [12:00:23 AM] Starting compilation in watch mode... Found 'package.json' at '/Users/name/projects/web/package.json'. -'package.json' does not have a 'typesVersions' field. ======== Resolving module '@this/package' from '/Users/name/projects/web/index.ts'. ======== Module resolution kind is not specified, using 'NodeNext'. Resolving in ESM mode with conditions 'node', 'import', 'types'. diff --git a/tests/baselines/reference/tscWatch/forceConsistentCasingInFileNames/with-nodeNext-resolution.js b/tests/baselines/reference/tscWatch/forceConsistentCasingInFileNames/with-nodeNext-resolution.js index c7f28d8491c28..659af38551610 100644 --- a/tests/baselines/reference/tscWatch/forceConsistentCasingInFileNames/with-nodeNext-resolution.js +++ b/tests/baselines/reference/tscWatch/forceConsistentCasingInFileNames/with-nodeNext-resolution.js @@ -54,7 +54,6 @@ File '/Users/name/projects/web/node_modules/yargs.ts' does not exist. File '/Users/name/projects/web/node_modules/yargs.tsx' does not exist. File '/Users/name/projects/web/node_modules/yargs.d.ts' does not exist. Found 'package.json' at '/Users/name/projects/web/node_modules/@types/yargs/package.json'. -'package.json' does not have a 'typesVersions' field. Matched 'exports' condition 'types'. Saw non-matching condition 'import'. Matched 'exports' condition 'default'. @@ -66,6 +65,7 @@ File '/Users/name/projects/web/node_modules/@types/yargs/package.json' exists ac ======== Resolving type reference directive 'yargs', containing file '/Users/name/projects/web/__inferred type names__.ts', root directory '/Users/name/projects/web/node_modules/@types'. ======== Resolving with primary search path '/Users/name/projects/web/node_modules/@types'. File '/Users/name/projects/web/node_modules/@types/yargs/package.json' exists according to earlier cached lookups. +'package.json' does not have a 'typesVersions' field. 'package.json' does not have a 'typings' field. 'package.json' does not have a 'types' field. 'package.json' does not have a 'main' field. diff --git a/tests/baselines/reference/tscWatch/moduleResolution/diagnostics-from-cache.js b/tests/baselines/reference/tscWatch/moduleResolution/diagnostics-from-cache.js index cef9d6c238b5e..b440517a7d230 100644 --- a/tests/baselines/reference/tscWatch/moduleResolution/diagnostics-from-cache.js +++ b/tests/baselines/reference/tscWatch/moduleResolution/diagnostics-from-cache.js @@ -31,7 +31,6 @@ Output:: [12:00:23 AM] Starting compilation in watch mode... Found 'package.json' at '/user/username/projects/myproject/package.json'. -'package.json' does not have a 'typesVersions' field. ======== Resolving module '@this/package' from '/user/username/projects/myproject/index.ts'. ======== Explicitly specified module resolution kind: 'NodeNext'. Resolving in ESM mode with conditions 'node', 'import', 'types'. 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 091c57b620650..faefb34ad89a1 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 @@ -66,7 +66,6 @@ File '/user/package.json' does not exist according to earlier cached lookups. File '/package.json' does not exist according to earlier cached lookups. Loading module 'pkg' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. Found 'package.json' at '/user/username/projects/myproject/node_modules/pkg/package.json'. -'package.json' does not have a 'typesVersions' field. Matched 'exports' condition 'import'. Using 'exports' subpath '.' with target './import.js'. File name '/user/username/projects/myproject/node_modules/pkg/import.js' has a '.js' extension - stripping it. @@ -85,7 +84,6 @@ File '/user/package.json' does not exist according to earlier cached lookups. File '/package.json' does not exist according to earlier cached lookups. Loading module 'pkg1' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. Found 'package.json' at '/user/username/projects/myproject/node_modules/pkg1/package.json'. -'package.json' does not have a 'typesVersions' field. Saw non-matching condition 'import'. Matched 'exports' condition 'require'. Using 'exports' subpath '.' with target './require.js'. diff --git a/tests/baselines/reference/tscWatch/moduleResolution/package-json-file-is-edited-when-package-json-with-type-module-exists.js b/tests/baselines/reference/tscWatch/moduleResolution/package-json-file-is-edited-when-package-json-with-type-module-exists.js index f326229b4234f..3d8b1ff5b569d 100644 --- a/tests/baselines/reference/tscWatch/moduleResolution/package-json-file-is-edited-when-package-json-with-type-module-exists.js +++ b/tests/baselines/reference/tscWatch/moduleResolution/package-json-file-is-edited-when-package-json-with-type-module-exists.js @@ -41,7 +41,6 @@ CreatingProgramWith:: options: {"target":3,"module":100,"outDir":"/user/username/projects/myproject/out","watch":true,"project":"/user/username/projects/myproject/src","extendedDiagnostics":true,"traceResolution":true,"explainFiles":true,"configFilePath":"/user/username/projects/myproject/src/tsconfig.json"} File '/user/username/projects/myproject/src/package.json' does not exist. Found 'package.json' at '/user/username/projects/myproject/package.json'. -'package.json' does not have a 'typesVersions' field. FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/fileA.ts 250 undefined Source file ======== Resolving module './fileB.mjs' from '/user/username/projects/myproject/src/fileA.ts'. ======== Module resolution kind is not specified, using 'Node16'. @@ -151,7 +150,6 @@ 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/src/package.json' does not exist according to earlier cached lookups. Found 'package.json' at '/user/username/projects/myproject/package.json'. -'package.json' does not have a 'typesVersions' field. File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. File '/user/username/projects/myproject/package.json' exists according to earlier cached lookups. ======== Resolving module './fileB.mjs' from '/user/username/projects/myproject/src/fileA.ts'. ======== @@ -260,7 +258,6 @@ 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/src/package.json' does not exist according to earlier cached lookups. Found 'package.json' at '/user/username/projects/myproject/package.json'. -'package.json' does not have a 'typesVersions' field. File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. File '/user/username/projects/myproject/package.json' exists according to earlier cached lookups. ======== Resolving module './fileB.mjs' from '/user/username/projects/myproject/src/fileA.ts'. ======== @@ -477,7 +474,6 @@ 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/src/package.json' does not exist according to earlier cached lookups. Found 'package.json' at '/user/username/projects/myproject/package.json'. -'package.json' does not have a 'typesVersions' field. File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. File '/user/username/projects/myproject/package.json' exists according to earlier cached lookups. Reusing resolution of module './fileB.mjs' from '/user/username/projects/myproject/src/fileA.ts' of old program, it was not resolved. diff --git a/tests/baselines/reference/tscWatch/moduleResolution/package-json-file-is-edited.js b/tests/baselines/reference/tscWatch/moduleResolution/package-json-file-is-edited.js index 47d25916f400b..688ac828dc9f7 100644 --- a/tests/baselines/reference/tscWatch/moduleResolution/package-json-file-is-edited.js +++ b/tests/baselines/reference/tscWatch/moduleResolution/package-json-file-is-edited.js @@ -41,7 +41,6 @@ CreatingProgramWith:: options: {"target":3,"module":100,"outDir":"/user/username/projects/myproject/out","watch":true,"project":"/user/username/projects/myproject/src","extendedDiagnostics":true,"traceResolution":true,"explainFiles":true,"configFilePath":"/user/username/projects/myproject/src/tsconfig.json"} File '/user/username/projects/myproject/src/package.json' does not exist. Found 'package.json' at '/user/username/projects/myproject/package.json'. -'package.json' does not have a 'typesVersions' field. FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/fileA.ts 250 undefined Source file ======== Resolving module './fileB.mjs' from '/user/username/projects/myproject/src/fileA.ts'. ======== Module resolution kind is not specified, using 'Node16'. @@ -162,7 +161,6 @@ 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/src/package.json' does not exist according to earlier cached lookups. Found 'package.json' at '/user/username/projects/myproject/package.json'. -'package.json' does not have a 'typesVersions' field. File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. File '/user/username/projects/myproject/package.json' exists according to earlier cached lookups. ======== Resolving module './fileB.mjs' from '/user/username/projects/myproject/src/fileA.ts'. ======== @@ -262,7 +260,6 @@ 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/src/package.json' does not exist according to earlier cached lookups. Found 'package.json' at '/user/username/projects/myproject/package.json'. -'package.json' does not have a 'typesVersions' field. File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. File '/user/username/projects/myproject/package.json' exists according to earlier cached lookups. ======== Resolving module './fileB.mjs' from '/user/username/projects/myproject/src/fileA.ts'. ======== @@ -463,7 +460,6 @@ 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/src/package.json' does not exist according to earlier cached lookups. Found 'package.json' at '/user/username/projects/myproject/package.json'. -'package.json' does not have a 'typesVersions' field. File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. File '/user/username/projects/myproject/package.json' exists according to earlier cached lookups. ======== Resolving module './fileB.mjs' from '/user/username/projects/myproject/src/fileA.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 30637c5340476..cf940c33e9e8e 100644 --- a/tests/baselines/reference/tscWatch/moduleResolution/type-reference-resolutions-reuse.js +++ b/tests/baselines/reference/tscWatch/moduleResolution/type-reference-resolutions-reuse.js @@ -75,7 +75,6 @@ File '/package.json' does not exist according to earlier cached lookups. Resolving with primary search path '/user/username/projects/myproject/node_modules/@types'. Looking up in 'node_modules' folder, initial location '/user/username/projects/myproject'. Found 'package.json' at '/user/username/projects/myproject/node_modules/pkg/package.json'. -'package.json' does not have a 'typesVersions' field. Matched 'exports' condition 'import'. Using 'exports' subpath '.' with target './import.js'. File name '/user/username/projects/myproject/node_modules/pkg/import.js' has a '.js' extension - stripping it. @@ -86,7 +85,6 @@ Resolving real path for '/user/username/projects/myproject/node_modules/pkg/impo Resolving with primary search path '/user/username/projects/myproject/node_modules/@types'. Looking up in 'node_modules' folder, initial location '/user/username/projects/myproject'. Found 'package.json' at '/user/username/projects/myproject/node_modules/pkg1/package.json'. -'package.json' does not have a 'typesVersions' field. Saw non-matching condition 'import'. Matched 'exports' condition 'require'. Using 'exports' subpath '.' with target './require.js'. diff --git a/tests/baselines/reference/tscWatch/moduleResolution/watches-for-changes-to-package-json-main-fields.js b/tests/baselines/reference/tscWatch/moduleResolution/watches-for-changes-to-package-json-main-fields.js index 88b69ff417087..628a313694706 100644 --- a/tests/baselines/reference/tscWatch/moduleResolution/watches-for-changes-to-package-json-main-fields.js +++ b/tests/baselines/reference/tscWatch/moduleResolution/watches-for-changes-to-package-json-main-fields.js @@ -47,10 +47,10 @@ Loading module 'pkg2' from 'node_modules' folder, target file types: TypeScript, Directory '/user/username/projects/myproject/packages/pkg1/node_modules' does not exist, skipping all lookups in it. Directory '/user/username/projects/myproject/packages/node_modules' does not exist, skipping all lookups in it. Found 'package.json' at '/user/username/projects/myproject/node_modules/pkg2/package.json'. -'package.json' does not have a 'typesVersions' field. File '/user/username/projects/myproject/node_modules/pkg2.ts' does not exist. File '/user/username/projects/myproject/node_modules/pkg2.tsx' does not exist. File '/user/username/projects/myproject/node_modules/pkg2.d.ts' does not exist. +'package.json' does not have a 'typesVersions' field. 'package.json' does not have a 'typings' field. 'package.json' does not have a 'types' field. 'package.json' has 'main' field 'build/index.js' that references '/user/username/projects/myproject/node_modules/pkg2/build/index.js'. @@ -156,10 +156,10 @@ Loading module 'pkg2' from 'node_modules' folder, target file types: TypeScript, Directory '/user/username/projects/myproject/packages/pkg1/node_modules' does not exist, skipping all lookups in it. Directory '/user/username/projects/myproject/packages/node_modules' does not exist, skipping all lookups in it. Found 'package.json' at '/user/username/projects/myproject/node_modules/pkg2/package.json'. -'package.json' does not have a 'typesVersions' field. File '/user/username/projects/myproject/node_modules/pkg2.ts' does not exist. File '/user/username/projects/myproject/node_modules/pkg2.tsx' does not exist. File '/user/username/projects/myproject/node_modules/pkg2.d.ts' does not exist. +'package.json' does not have a 'typesVersions' field. 'package.json' does not have a 'typings' field. 'package.json' does not have a 'types' field. 'package.json' has 'main' field 'build/other.js' that references '/user/username/projects/myproject/node_modules/pkg2/build/other.js'. @@ -247,10 +247,10 @@ Loading module 'pkg2' from 'node_modules' folder, target file types: TypeScript, Directory '/user/username/projects/myproject/packages/pkg1/node_modules' does not exist, skipping all lookups in it. Directory '/user/username/projects/myproject/packages/node_modules' does not exist, skipping all lookups in it. Found 'package.json' at '/user/username/projects/myproject/node_modules/pkg2/package.json'. -'package.json' does not have a 'typesVersions' field. File '/user/username/projects/myproject/node_modules/pkg2.ts' does not exist. File '/user/username/projects/myproject/node_modules/pkg2.tsx' does not exist. File '/user/username/projects/myproject/node_modules/pkg2.d.ts' does not exist. +'package.json' does not have a 'typesVersions' field. 'package.json' does not have a 'typings' field. 'package.json' does not have a 'types' field. 'package.json' has 'main' field 'build/index.js' that references '/user/username/projects/myproject/node_modules/pkg2/build/index.js'. diff --git a/tests/baselines/reference/tsserver/moduleResolution/package-json-file-is-edited-when-package-json-with-type-module-exists.js b/tests/baselines/reference/tsserver/moduleResolution/package-json-file-is-edited-when-package-json-with-type-module-exists.js index 9d846c7d84c40..5b4949ce9d45e 100644 --- a/tests/baselines/reference/tsserver/moduleResolution/package-json-file-is-edited-when-package-json-with-type-module-exists.js +++ b/tests/baselines/reference/tsserver/moduleResolution/package-json-file-is-edited-when-package-json-with-type-module-exists.js @@ -70,27 +70,26 @@ Info 10 [00:00:37.000] FileWatcher:: Added:: WatchInfo: /user/username/project Info 11 [00:00:38.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json Info 12 [00:00:39.000] File '/user/username/projects/myproject/src/package.json' does not exist. Info 13 [00:00:40.000] Found 'package.json' at '/user/username/projects/myproject/package.json'. -Info 14 [00:00:41.000] 'package.json' does not have a 'typesVersions' field. -Info 15 [00:00:42.000] ======== Resolving module './fileB.mjs' from '/user/username/projects/myproject/src/fileA.ts'. ======== -Info 16 [00:00:43.000] Module resolution kind is not specified, using 'Node16'. -Info 17 [00:00:44.000] Resolving in ESM mode with conditions 'node', 'import', 'types'. -Info 18 [00:00:45.000] Loading module as file / folder, candidate module location '/user/username/projects/myproject/src/fileB.mjs', target file types: TypeScript, JavaScript, Declaration. -Info 19 [00:00:46.000] File name '/user/username/projects/myproject/src/fileB.mjs' has a '.mjs' extension - stripping it. -Info 20 [00:00:47.000] File '/user/username/projects/myproject/src/fileB.mts' exist - use it as a name resolution result. -Info 21 [00:00:48.000] ======== Module name './fileB.mjs' was successfully resolved to '/user/username/projects/myproject/src/fileB.mts'. ======== -Info 22 [00:00:49.000] File '/a/lib/package.json' does not exist. -Info 23 [00:00:50.000] File '/a/package.json' does not exist. -Info 24 [00:00:51.000] File '/package.json' does not exist. -Info 25 [00:00:52.000] FileWatcher:: Added:: WatchInfo: /a/lib/lib.es2016.full.d.ts 500 undefined WatchType: Closed Script info -Info 26 [00:00:53.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution -Info 27 [00:00:54.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution -Info 28 [00:00:55.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/node_modules/@types 1 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: Type roots -Info 29 [00:00:56.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/node_modules/@types 1 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: Type roots -Info 30 [00:00:57.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: Type roots -Info 31 [00:00:58.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: Type roots -Info 32 [00:00:59.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info 33 [00:01:00.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) -Info 34 [00:01:01.000] Files (3) +Info 14 [00:00:41.000] ======== Resolving module './fileB.mjs' from '/user/username/projects/myproject/src/fileA.ts'. ======== +Info 15 [00:00:42.000] Module resolution kind is not specified, using 'Node16'. +Info 16 [00:00:43.000] Resolving in ESM mode with conditions 'node', 'import', 'types'. +Info 17 [00:00:44.000] Loading module as file / folder, candidate module location '/user/username/projects/myproject/src/fileB.mjs', target file types: TypeScript, JavaScript, Declaration. +Info 18 [00:00:45.000] File name '/user/username/projects/myproject/src/fileB.mjs' has a '.mjs' extension - stripping it. +Info 19 [00:00:46.000] File '/user/username/projects/myproject/src/fileB.mts' exist - use it as a name resolution result. +Info 20 [00:00:47.000] ======== Module name './fileB.mjs' was successfully resolved to '/user/username/projects/myproject/src/fileB.mts'. ======== +Info 21 [00:00:48.000] File '/a/lib/package.json' does not exist. +Info 22 [00:00:49.000] File '/a/package.json' does not exist. +Info 23 [00:00:50.000] File '/package.json' does not exist. +Info 24 [00:00:51.000] FileWatcher:: Added:: WatchInfo: /a/lib/lib.es2016.full.d.ts 500 undefined WatchType: Closed Script info +Info 25 [00:00:52.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution +Info 26 [00:00:53.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution +Info 27 [00:00:54.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/node_modules/@types 1 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: Type roots +Info 28 [00:00:55.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/node_modules/@types 1 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: Type roots +Info 29 [00:00:56.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: Type roots +Info 30 [00:00:57.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: Type roots +Info 31 [00:00:58.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 32 [00:00:59.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) +Info 33 [00:01:00.000] Files (3) /a/lib/lib.es2016.full.d.ts /user/username/projects/myproject/src/fileB.mts /user/username/projects/myproject/src/fileA.ts @@ -105,21 +104,21 @@ Info 34 [00:01:01.000] Files (3) Matched by default include pattern '**/*' File is ECMAScript module because '../package.json' has field "type" with value "module" -Info 35 [00:01:02.000] ----------------------------------------------- -Info 36 [00:01:03.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/package.json 250 undefined WatchType: package.json file -Info 37 [00:01:04.000] event: +Info 34 [00:01:01.000] ----------------------------------------------- +Info 35 [00:01:02.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/package.json 250 undefined WatchType: package.json file +Info 36 [00:01:03.000] event: {"seq":0,"type":"event","event":"projectLoadingFinish","body":{"projectName":"/user/username/projects/myproject/src/tsconfig.json"}} -Info 38 [00:01:05.000] event: +Info 37 [00:01:04.000] event: {"seq":0,"type":"event","event":"telemetry","body":{"telemetryEventName":"projectInfo","payload":{"projectId":"f026568af42c61ce0537de8ee0fa07c9359a76dcfb046248ed49dc76c91e4a37","fileStats":{"js":0,"jsSize":0,"jsx":0,"jsxSize":0,"ts":2,"tsSize":68,"tsx":0,"tsxSize":0,"dts":1,"dtsSize":334,"deferred":0,"deferredSize":0},"compilerOptions":{"target":"es2016","module":"node16","outDir":"","traceResolution":true},"typeAcquisition":{"enable":false,"include":false,"exclude":false},"extends":false,"files":false,"include":false,"exclude":false,"compileOnSave":false,"configFileName":"tsconfig.json","projectType":"configured","languageServiceEnabled":true,"version":"FakeVersion"}}} -Info 39 [00:01:06.000] event: +Info 38 [00:01:05.000] event: {"seq":0,"type":"event","event":"configFileDiag","body":{"triggerFile":"/user/username/projects/myproject/src/fileA.ts","configFile":"/user/username/projects/myproject/src/tsconfig.json","diagnostics":[]}} -Info 40 [00:01:07.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) -Info 40 [00:01:08.000] Files (3) +Info 39 [00:01:06.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) +Info 39 [00:01:07.000] Files (3) -Info 40 [00:01:09.000] ----------------------------------------------- -Info 40 [00:01:10.000] Open files: -Info 40 [00:01:11.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined -Info 40 [00:01:12.000] Projects: /user/username/projects/myproject/src/tsconfig.json +Info 39 [00:01:08.000] ----------------------------------------------- +Info 39 [00:01:09.000] Open files: +Info 39 [00:01:10.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined +Info 39 [00:01:11.000] Projects: /user/username/projects/myproject/src/tsconfig.json After request PolledWatches:: @@ -144,16 +143,16 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 40 [00:01:13.000] response: +Info 39 [00:01:12.000] response: { "responseRequired": false } -Info 41 [00:01:14.000] Modify package json file to remove type module -Info 42 [00:01:18.000] FileWatcher:: Triggered with /user/username/projects/myproject/package.json 1:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution -Info 43 [00:01:19.000] Scheduled: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation -Info 44 [00:01:20.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/package.json 1:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution -Info 45 [00:01:21.000] FileWatcher:: Triggered with /user/username/projects/myproject/package.json 1:: WatchInfo: /user/username/projects/myproject/package.json 250 undefined WatchType: package.json file -Info 46 [00:01:22.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/package.json 1:: WatchInfo: /user/username/projects/myproject/package.json 250 undefined WatchType: package.json file +Info 40 [00:01:13.000] Modify package json file to remove type module +Info 41 [00:01:17.000] FileWatcher:: Triggered with /user/username/projects/myproject/package.json 1:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution +Info 42 [00:01:18.000] Scheduled: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation +Info 43 [00:01:19.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/package.json 1:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution +Info 44 [00:01:20.000] FileWatcher:: Triggered with /user/username/projects/myproject/package.json 1:: WatchInfo: /user/username/projects/myproject/package.json 250 undefined WatchType: package.json file +Info 45 [00:01:21.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/package.json 1:: WatchInfo: /user/username/projects/myproject/package.json 250 undefined WatchType: package.json file Before running timeout callbacks //// [/user/username/projects/myproject/package.json] {"name":"app","version":"1.0.0"} @@ -181,9 +180,9 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 47 [00:01:23.000] Running: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation -Info 48 [00:01:24.000] Scheduled: /user/username/projects/myproject/src/tsconfig.json -Info 49 [00:01:25.000] Scheduled: *ensureProjectForOpenFiles* +Info 46 [00:01:22.000] Running: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation +Info 47 [00:01:23.000] Scheduled: /user/username/projects/myproject/src/tsconfig.json +Info 48 [00:01:24.000] Scheduled: *ensureProjectForOpenFiles* After running timeout callbacks PolledWatches:: @@ -232,47 +231,46 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 50 [00:01:26.000] Running: /user/username/projects/myproject/src/tsconfig.json -Info 51 [00:01:27.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json -Info 52 [00:01:28.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. -Info 53 [00:01:29.000] File '/a/package.json' does not exist according to earlier cached lookups. -Info 54 [00:01:30.000] File '/package.json' does not exist according to earlier cached lookups. -Info 55 [00:01:31.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. -Info 56 [00:01:32.000] Found 'package.json' at '/user/username/projects/myproject/package.json'. -Info 57 [00:01:33.000] 'package.json' does not have a 'typesVersions' field. -Info 58 [00:01:34.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. -Info 59 [00:01:35.000] File '/user/username/projects/myproject/package.json' exists according to earlier cached lookups. -Info 60 [00:01:36.000] ======== Resolving module './fileB.mjs' from '/user/username/projects/myproject/src/fileA.ts'. ======== -Info 61 [00:01:37.000] Module resolution kind is not specified, using 'Node16'. -Info 62 [00:01:38.000] Resolving in CJS mode with conditions 'node', 'require', 'types'. -Info 63 [00:01:39.000] Loading module as file / folder, candidate module location '/user/username/projects/myproject/src/fileB.mjs', target file types: TypeScript, JavaScript, Declaration. -Info 64 [00:01:40.000] File name '/user/username/projects/myproject/src/fileB.mjs' has a '.mjs' extension - stripping it. -Info 65 [00:01:41.000] File '/user/username/projects/myproject/src/fileB.mts' exist - use it as a name resolution result. -Info 66 [00:01:42.000] ======== Module name './fileB.mjs' was successfully resolved to '/user/username/projects/myproject/src/fileB.mts'. ======== -Info 67 [00:01:43.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. -Info 68 [00:01:44.000] File '/a/package.json' does not exist according to earlier cached lookups. -Info 69 [00:01:45.000] File '/package.json' does not exist according to earlier cached lookups. -Info 70 [00:01:46.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json Version: 2 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms -Info 71 [00:01:47.000] Different program with same set of files -Info 72 [00:01:48.000] Running: *ensureProjectForOpenFiles* -Info 73 [00:01:49.000] Before ensureProjectForOpenFiles: -Info 74 [00:01:50.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) -Info 74 [00:01:51.000] Files (3) - -Info 74 [00:01:52.000] ----------------------------------------------- -Info 74 [00:01:53.000] Open files: -Info 74 [00:01:54.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined -Info 74 [00:01:55.000] Projects: /user/username/projects/myproject/src/tsconfig.json -Info 74 [00:01:56.000] After ensureProjectForOpenFiles: -Info 75 [00:01:57.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) -Info 75 [00:01:58.000] Files (3) - -Info 75 [00:01:59.000] ----------------------------------------------- -Info 75 [00:02:00.000] Open files: -Info 75 [00:02:01.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined -Info 75 [00:02:02.000] Projects: /user/username/projects/myproject/src/tsconfig.json -Info 75 [00:02:03.000] got projects updated in background, updating diagnostics for /user/username/projects/myproject/src/fileA.ts -Info 76 [00:02:04.000] event: +Info 49 [00:01:25.000] Running: /user/username/projects/myproject/src/tsconfig.json +Info 50 [00:01:26.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json +Info 51 [00:01:27.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 52 [00:01:28.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 53 [00:01:29.000] File '/package.json' does not exist according to earlier cached lookups. +Info 54 [00:01:30.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. +Info 55 [00:01:31.000] Found 'package.json' at '/user/username/projects/myproject/package.json'. +Info 56 [00:01:32.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. +Info 57 [00:01:33.000] File '/user/username/projects/myproject/package.json' exists according to earlier cached lookups. +Info 58 [00:01:34.000] ======== Resolving module './fileB.mjs' from '/user/username/projects/myproject/src/fileA.ts'. ======== +Info 59 [00:01:35.000] Module resolution kind is not specified, using 'Node16'. +Info 60 [00:01:36.000] Resolving in CJS mode with conditions 'node', 'require', 'types'. +Info 61 [00:01:37.000] Loading module as file / folder, candidate module location '/user/username/projects/myproject/src/fileB.mjs', target file types: TypeScript, JavaScript, Declaration. +Info 62 [00:01:38.000] File name '/user/username/projects/myproject/src/fileB.mjs' has a '.mjs' extension - stripping it. +Info 63 [00:01:39.000] File '/user/username/projects/myproject/src/fileB.mts' exist - use it as a name resolution result. +Info 64 [00:01:40.000] ======== Module name './fileB.mjs' was successfully resolved to '/user/username/projects/myproject/src/fileB.mts'. ======== +Info 65 [00:01:41.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 66 [00:01:42.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 67 [00:01:43.000] File '/package.json' does not exist according to earlier cached lookups. +Info 68 [00:01:44.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json Version: 2 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info 69 [00:01:45.000] Different program with same set of files +Info 70 [00:01:46.000] Running: *ensureProjectForOpenFiles* +Info 71 [00:01:47.000] Before ensureProjectForOpenFiles: +Info 72 [00:01:48.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) +Info 72 [00:01:49.000] Files (3) + +Info 72 [00:01:50.000] ----------------------------------------------- +Info 72 [00:01:51.000] Open files: +Info 72 [00:01:52.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined +Info 72 [00:01:53.000] Projects: /user/username/projects/myproject/src/tsconfig.json +Info 72 [00:01:54.000] After ensureProjectForOpenFiles: +Info 73 [00:01:55.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) +Info 73 [00:01:56.000] Files (3) + +Info 73 [00:01:57.000] ----------------------------------------------- +Info 73 [00:01:58.000] Open files: +Info 73 [00:01:59.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined +Info 73 [00:02:00.000] Projects: /user/username/projects/myproject/src/tsconfig.json +Info 73 [00:02:01.000] got projects updated in background, updating diagnostics for /user/username/projects/myproject/src/fileA.ts +Info 74 [00:02:02.000] event: {"seq":0,"type":"event","event":"projectsUpdatedInBackground","body":{"openFiles":["/user/username/projects/myproject/src/fileA.ts"]}} After running timeout callbacks @@ -298,7 +296,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 77 [00:02:05.000] request: +Info 75 [00:02:03.000] request: { "command": "geterr", "arguments": { @@ -358,7 +356,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 78 [00:02:06.000] response: +Info 76 [00:02:04.000] response: { "responseRequired": false } @@ -386,7 +384,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 79 [00:02:07.000] event: +Info 77 [00:02:05.000] event: {"seq":0,"type":"event","event":"syntaxDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}} After checking timeout queue length (1) and running @@ -436,7 +434,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 80 [00:02:08.000] event: +Info 78 [00:02:06.000] event: {"seq":0,"type":"event","event":"semanticDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[{"start":{"line":1,"offset":21},"end":{"line":1,"offset":34},"text":"The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import(\"./fileB.mjs\")' call instead.\n To convert this file to an ECMAScript module, change its file extension to '.mts', or add the field `\"type\": \"module\"` to '/user/username/projects/myproject/package.json'.","code":1479,"category":"error"}]}} Before running immediate callbacks and checking length (1) @@ -486,9 +484,9 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 81 [00:02:09.000] event: +Info 79 [00:02:07.000] event: {"seq":0,"type":"event","event":"suggestionDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}} -Info 82 [00:02:10.000] event: +Info 80 [00:02:08.000] event: {"seq":0,"type":"event","event":"requestCompleted","body":{"request_seq":2}} Before running immediate callbacks and checking length (1) @@ -514,12 +512,12 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 83 [00:02:11.000] Modify package json file to add type module -Info 84 [00:02:15.000] FileWatcher:: Triggered with /user/username/projects/myproject/package.json 1:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution -Info 85 [00:02:16.000] Scheduled: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation -Info 86 [00:02:17.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/package.json 1:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution -Info 87 [00:02:18.000] FileWatcher:: Triggered with /user/username/projects/myproject/package.json 1:: WatchInfo: /user/username/projects/myproject/package.json 250 undefined WatchType: package.json file -Info 88 [00:02:19.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/package.json 1:: WatchInfo: /user/username/projects/myproject/package.json 250 undefined WatchType: package.json file +Info 81 [00:02:09.000] Modify package json file to add type module +Info 82 [00:02:13.000] FileWatcher:: Triggered with /user/username/projects/myproject/package.json 1:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution +Info 83 [00:02:14.000] Scheduled: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation +Info 84 [00:02:15.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/package.json 1:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution +Info 85 [00:02:16.000] FileWatcher:: Triggered with /user/username/projects/myproject/package.json 1:: WatchInfo: /user/username/projects/myproject/package.json 250 undefined WatchType: package.json file +Info 86 [00:02:17.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/package.json 1:: WatchInfo: /user/username/projects/myproject/package.json 250 undefined WatchType: package.json file Before running timeout callbacks //// [/user/username/projects/myproject/package.json] {"name":"app","version":"1.0.0","type":"module"} @@ -547,9 +545,9 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 89 [00:02:20.000] Running: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation -Info 90 [00:02:21.000] Scheduled: /user/username/projects/myproject/src/tsconfig.json -Info 91 [00:02:22.000] Scheduled: *ensureProjectForOpenFiles* +Info 87 [00:02:18.000] Running: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation +Info 88 [00:02:19.000] Scheduled: /user/username/projects/myproject/src/tsconfig.json +Info 89 [00:02:20.000] Scheduled: *ensureProjectForOpenFiles* After running timeout callbacks PolledWatches:: @@ -598,47 +596,46 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 92 [00:02:23.000] Running: /user/username/projects/myproject/src/tsconfig.json -Info 93 [00:02:24.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json -Info 94 [00:02:25.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. -Info 95 [00:02:26.000] File '/a/package.json' does not exist according to earlier cached lookups. -Info 96 [00:02:27.000] File '/package.json' does not exist according to earlier cached lookups. +Info 90 [00:02:21.000] Running: /user/username/projects/myproject/src/tsconfig.json +Info 91 [00:02:22.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json +Info 92 [00:02:23.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 93 [00:02:24.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 94 [00:02:25.000] File '/package.json' does not exist according to earlier cached lookups. +Info 95 [00:02:26.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. +Info 96 [00:02:27.000] Found 'package.json' at '/user/username/projects/myproject/package.json'. Info 97 [00:02:28.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. -Info 98 [00:02:29.000] Found 'package.json' at '/user/username/projects/myproject/package.json'. -Info 99 [00:02:30.000] 'package.json' does not have a 'typesVersions' field. -Info 100 [00:02:31.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. -Info 101 [00:02:32.000] File '/user/username/projects/myproject/package.json' exists according to earlier cached lookups. -Info 102 [00:02:33.000] ======== Resolving module './fileB.mjs' from '/user/username/projects/myproject/src/fileA.ts'. ======== -Info 103 [00:02:34.000] Module resolution kind is not specified, using 'Node16'. -Info 104 [00:02:35.000] Resolving in ESM mode with conditions 'node', 'import', 'types'. -Info 105 [00:02:36.000] Loading module as file / folder, candidate module location '/user/username/projects/myproject/src/fileB.mjs', target file types: TypeScript, JavaScript, Declaration. -Info 106 [00:02:37.000] File name '/user/username/projects/myproject/src/fileB.mjs' has a '.mjs' extension - stripping it. -Info 107 [00:02:38.000] File '/user/username/projects/myproject/src/fileB.mts' exist - use it as a name resolution result. -Info 108 [00:02:39.000] ======== Module name './fileB.mjs' was successfully resolved to '/user/username/projects/myproject/src/fileB.mts'. ======== -Info 109 [00:02:40.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. -Info 110 [00:02:41.000] File '/a/package.json' does not exist according to earlier cached lookups. -Info 111 [00:02:42.000] File '/package.json' does not exist according to earlier cached lookups. -Info 112 [00:02:43.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json Version: 3 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms -Info 113 [00:02:44.000] Different program with same set of files -Info 114 [00:02:45.000] Running: *ensureProjectForOpenFiles* -Info 115 [00:02:46.000] Before ensureProjectForOpenFiles: -Info 116 [00:02:47.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) -Info 116 [00:02:48.000] Files (3) - -Info 116 [00:02:49.000] ----------------------------------------------- -Info 116 [00:02:50.000] Open files: -Info 116 [00:02:51.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined -Info 116 [00:02:52.000] Projects: /user/username/projects/myproject/src/tsconfig.json -Info 116 [00:02:53.000] After ensureProjectForOpenFiles: -Info 117 [00:02:54.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) -Info 117 [00:02:55.000] Files (3) - -Info 117 [00:02:56.000] ----------------------------------------------- -Info 117 [00:02:57.000] Open files: -Info 117 [00:02:58.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined -Info 117 [00:02:59.000] Projects: /user/username/projects/myproject/src/tsconfig.json -Info 117 [00:03:00.000] got projects updated in background, updating diagnostics for /user/username/projects/myproject/src/fileA.ts -Info 118 [00:03:01.000] event: +Info 98 [00:02:29.000] File '/user/username/projects/myproject/package.json' exists according to earlier cached lookups. +Info 99 [00:02:30.000] ======== Resolving module './fileB.mjs' from '/user/username/projects/myproject/src/fileA.ts'. ======== +Info 100 [00:02:31.000] Module resolution kind is not specified, using 'Node16'. +Info 101 [00:02:32.000] Resolving in ESM mode with conditions 'node', 'import', 'types'. +Info 102 [00:02:33.000] Loading module as file / folder, candidate module location '/user/username/projects/myproject/src/fileB.mjs', target file types: TypeScript, JavaScript, Declaration. +Info 103 [00:02:34.000] File name '/user/username/projects/myproject/src/fileB.mjs' has a '.mjs' extension - stripping it. +Info 104 [00:02:35.000] File '/user/username/projects/myproject/src/fileB.mts' exist - use it as a name resolution result. +Info 105 [00:02:36.000] ======== Module name './fileB.mjs' was successfully resolved to '/user/username/projects/myproject/src/fileB.mts'. ======== +Info 106 [00:02:37.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 107 [00:02:38.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 108 [00:02:39.000] File '/package.json' does not exist according to earlier cached lookups. +Info 109 [00:02:40.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json Version: 3 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info 110 [00:02:41.000] Different program with same set of files +Info 111 [00:02:42.000] Running: *ensureProjectForOpenFiles* +Info 112 [00:02:43.000] Before ensureProjectForOpenFiles: +Info 113 [00:02:44.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) +Info 113 [00:02:45.000] Files (3) + +Info 113 [00:02:46.000] ----------------------------------------------- +Info 113 [00:02:47.000] Open files: +Info 113 [00:02:48.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined +Info 113 [00:02:49.000] Projects: /user/username/projects/myproject/src/tsconfig.json +Info 113 [00:02:50.000] After ensureProjectForOpenFiles: +Info 114 [00:02:51.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) +Info 114 [00:02:52.000] Files (3) + +Info 114 [00:02:53.000] ----------------------------------------------- +Info 114 [00:02:54.000] Open files: +Info 114 [00:02:55.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined +Info 114 [00:02:56.000] Projects: /user/username/projects/myproject/src/tsconfig.json +Info 114 [00:02:57.000] got projects updated in background, updating diagnostics for /user/username/projects/myproject/src/fileA.ts +Info 115 [00:02:58.000] event: {"seq":0,"type":"event","event":"projectsUpdatedInBackground","body":{"openFiles":["/user/username/projects/myproject/src/fileA.ts"]}} After running timeout callbacks @@ -664,7 +661,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 119 [00:03:02.000] request: +Info 116 [00:02:59.000] request: { "command": "geterr", "arguments": { @@ -724,7 +721,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 120 [00:03:03.000] response: +Info 117 [00:03:00.000] response: { "responseRequired": false } @@ -752,7 +749,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 121 [00:03:04.000] event: +Info 118 [00:03:01.000] event: {"seq":0,"type":"event","event":"syntaxDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}} After checking timeout queue length (1) and running @@ -802,7 +799,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 122 [00:03:05.000] event: +Info 119 [00:03:02.000] event: {"seq":0,"type":"event","event":"semanticDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}} Before running immediate callbacks and checking length (1) @@ -852,9 +849,9 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 123 [00:03:06.000] event: +Info 120 [00:03:03.000] event: {"seq":0,"type":"event","event":"suggestionDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}} -Info 124 [00:03:07.000] event: +Info 121 [00:03:04.000] event: {"seq":0,"type":"event","event":"requestCompleted","body":{"request_seq":3}} Before running immediate callbacks and checking length (1) @@ -880,13 +877,13 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 125 [00:03:08.000] Delete package.json -Info 126 [00:03:10.000] FileWatcher:: Triggered with /user/username/projects/myproject/package.json 2:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution -Info 127 [00:03:11.000] Scheduled: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation -Info 128 [00:03:12.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/package.json 2:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution -Info 129 [00:03:13.000] FileWatcher:: Triggered with /user/username/projects/myproject/package.json 2:: WatchInfo: /user/username/projects/myproject/package.json 250 undefined WatchType: package.json file -Info 130 [00:03:14.000] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/package.json 250 undefined WatchType: package.json file -Info 131 [00:03:15.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/package.json 2:: WatchInfo: /user/username/projects/myproject/package.json 250 undefined WatchType: package.json file +Info 122 [00:03:05.000] Delete package.json +Info 123 [00:03:07.000] FileWatcher:: Triggered with /user/username/projects/myproject/package.json 2:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution +Info 124 [00:03:08.000] Scheduled: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation +Info 125 [00:03:09.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/package.json 2:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution +Info 126 [00:03:10.000] FileWatcher:: Triggered with /user/username/projects/myproject/package.json 2:: WatchInfo: /user/username/projects/myproject/package.json 250 undefined WatchType: package.json file +Info 127 [00:03:11.000] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/package.json 250 undefined WatchType: package.json file +Info 128 [00:03:12.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/package.json 2:: WatchInfo: /user/username/projects/myproject/package.json 250 undefined WatchType: package.json file Before running timeout callbacks //// [/user/username/projects/myproject/package.json] deleted @@ -912,9 +909,9 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 132 [00:03:16.000] Running: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation -Info 133 [00:03:17.000] Scheduled: /user/username/projects/myproject/src/tsconfig.json -Info 134 [00:03:18.000] Scheduled: *ensureProjectForOpenFiles* +Info 129 [00:03:13.000] Running: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation +Info 130 [00:03:14.000] Scheduled: /user/username/projects/myproject/src/tsconfig.json +Info 131 [00:03:15.000] Scheduled: *ensureProjectForOpenFiles* After running timeout callbacks PolledWatches:: @@ -963,48 +960,48 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 135 [00:03:19.000] Running: /user/username/projects/myproject/src/tsconfig.json -Info 136 [00:03:20.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json -Info 137 [00:03:21.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. -Info 138 [00:03:22.000] File '/a/package.json' does not exist according to earlier cached lookups. -Info 139 [00:03:23.000] File '/package.json' does not exist according to earlier cached lookups. -Info 140 [00:03:24.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. -Info 141 [00:03:25.000] File '/user/username/projects/myproject/package.json' does not exist. -Info 142 [00:03:26.000] File '/user/username/projects/package.json' does not exist. -Info 143 [00:03:27.000] File '/user/username/package.json' does not exist. -Info 144 [00:03:28.000] File '/user/package.json' does not exist. -Info 145 [00:03:29.000] File '/package.json' does not exist according to earlier cached lookups. -Info 146 [00:03:30.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. -Info 147 [00:03:31.000] File '/user/username/projects/myproject/package.json' does not exist according to earlier cached lookups. -Info 148 [00:03:32.000] File '/user/username/projects/package.json' does not exist according to earlier cached lookups. -Info 149 [00:03:33.000] File '/user/username/package.json' does not exist according to earlier cached lookups. -Info 150 [00:03:34.000] File '/user/package.json' does not exist according to earlier cached lookups. +Info 132 [00:03:16.000] Running: /user/username/projects/myproject/src/tsconfig.json +Info 133 [00:03:17.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json +Info 134 [00:03:18.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 135 [00:03:19.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 136 [00:03:20.000] File '/package.json' does not exist according to earlier cached lookups. +Info 137 [00:03:21.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. +Info 138 [00:03:22.000] File '/user/username/projects/myproject/package.json' does not exist. +Info 139 [00:03:23.000] File '/user/username/projects/package.json' does not exist. +Info 140 [00:03:24.000] File '/user/username/package.json' does not exist. +Info 141 [00:03:25.000] File '/user/package.json' does not exist. +Info 142 [00:03:26.000] File '/package.json' does not exist according to earlier cached lookups. +Info 143 [00:03:27.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. +Info 144 [00:03:28.000] File '/user/username/projects/myproject/package.json' does not exist according to earlier cached lookups. +Info 145 [00:03:29.000] File '/user/username/projects/package.json' does not exist according to earlier cached lookups. +Info 146 [00:03:30.000] File '/user/username/package.json' does not exist according to earlier cached lookups. +Info 147 [00:03:31.000] File '/user/package.json' does not exist according to earlier cached lookups. +Info 148 [00:03:32.000] File '/package.json' does not exist according to earlier cached lookups. +Info 149 [00:03:33.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 150 [00:03:34.000] File '/a/package.json' does not exist according to earlier cached lookups. Info 151 [00:03:35.000] File '/package.json' does not exist according to earlier cached lookups. -Info 152 [00:03:36.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. -Info 153 [00:03:37.000] File '/a/package.json' does not exist according to earlier cached lookups. -Info 154 [00:03:38.000] File '/package.json' does not exist according to earlier cached lookups. -Info 155 [00:03:39.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution -Info 156 [00:03:40.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json Version: 4 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms -Info 157 [00:03:41.000] Different program with same set of files -Info 158 [00:03:42.000] Running: *ensureProjectForOpenFiles* -Info 159 [00:03:43.000] Before ensureProjectForOpenFiles: -Info 160 [00:03:44.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) -Info 160 [00:03:45.000] Files (3) - -Info 160 [00:03:46.000] ----------------------------------------------- -Info 160 [00:03:47.000] Open files: -Info 160 [00:03:48.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined -Info 160 [00:03:49.000] Projects: /user/username/projects/myproject/src/tsconfig.json -Info 160 [00:03:50.000] After ensureProjectForOpenFiles: -Info 161 [00:03:51.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) -Info 161 [00:03:52.000] Files (3) - -Info 161 [00:03:53.000] ----------------------------------------------- -Info 161 [00:03:54.000] Open files: -Info 161 [00:03:55.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined -Info 161 [00:03:56.000] Projects: /user/username/projects/myproject/src/tsconfig.json -Info 161 [00:03:57.000] got projects updated in background, updating diagnostics for /user/username/projects/myproject/src/fileA.ts -Info 162 [00:03:58.000] event: +Info 152 [00:03:36.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution +Info 153 [00:03:37.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json Version: 4 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info 154 [00:03:38.000] Different program with same set of files +Info 155 [00:03:39.000] Running: *ensureProjectForOpenFiles* +Info 156 [00:03:40.000] Before ensureProjectForOpenFiles: +Info 157 [00:03:41.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) +Info 157 [00:03:42.000] Files (3) + +Info 157 [00:03:43.000] ----------------------------------------------- +Info 157 [00:03:44.000] Open files: +Info 157 [00:03:45.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined +Info 157 [00:03:46.000] Projects: /user/username/projects/myproject/src/tsconfig.json +Info 157 [00:03:47.000] After ensureProjectForOpenFiles: +Info 158 [00:03:48.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) +Info 158 [00:03:49.000] Files (3) + +Info 158 [00:03:50.000] ----------------------------------------------- +Info 158 [00:03:51.000] Open files: +Info 158 [00:03:52.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined +Info 158 [00:03:53.000] Projects: /user/username/projects/myproject/src/tsconfig.json +Info 158 [00:03:54.000] got projects updated in background, updating diagnostics for /user/username/projects/myproject/src/fileA.ts +Info 159 [00:03:55.000] event: {"seq":0,"type":"event","event":"projectsUpdatedInBackground","body":{"openFiles":["/user/username/projects/myproject/src/fileA.ts"]}} After running timeout callbacks @@ -1032,7 +1029,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 163 [00:03:59.000] request: +Info 160 [00:03:56.000] request: { "command": "geterr", "arguments": { @@ -1096,7 +1093,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 164 [00:04:00.000] response: +Info 161 [00:03:57.000] response: { "responseRequired": false } @@ -1126,7 +1123,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 165 [00:04:01.000] event: +Info 162 [00:03:58.000] event: {"seq":0,"type":"event","event":"syntaxDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}} After checking timeout queue length (1) and running @@ -1180,7 +1177,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 166 [00:04:02.000] event: +Info 163 [00:03:59.000] event: {"seq":0,"type":"event","event":"semanticDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[{"start":{"line":1,"offset":21},"end":{"line":1,"offset":34},"text":"The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import(\"./fileB.mjs\")' call instead.\n To convert this file to an ECMAScript module, change its file extension to '.mts' or create a local package.json file with `{ \"type\": \"module\" }`.","code":1479,"category":"error"}]}} Before running immediate callbacks and checking length (1) @@ -1234,9 +1231,9 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 167 [00:04:03.000] event: +Info 164 [00:04:00.000] event: {"seq":0,"type":"event","event":"suggestionDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}} -Info 168 [00:04:04.000] event: +Info 165 [00:04:01.000] event: {"seq":0,"type":"event","event":"requestCompleted","body":{"request_seq":4}} Before running immediate callbacks and checking length (1) @@ -1264,10 +1261,10 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 169 [00:04:05.000] Modify package json file to without type module -Info 170 [00:04:08.000] FileWatcher:: Triggered with /user/username/projects/myproject/package.json 0:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution -Info 171 [00:04:09.000] Scheduled: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation -Info 172 [00:04:10.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/package.json 0:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution +Info 166 [00:04:02.000] Modify package json file to without type module +Info 167 [00:04:05.000] FileWatcher:: Triggered with /user/username/projects/myproject/package.json 0:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution +Info 168 [00:04:06.000] Scheduled: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation +Info 169 [00:04:07.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/package.json 0:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution Before running timeout callbacks //// [/user/username/projects/myproject/package.json] {"name":"app","version":"1.0.0"} @@ -1297,9 +1294,9 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 173 [00:04:11.000] Running: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation -Info 174 [00:04:12.000] Scheduled: /user/username/projects/myproject/src/tsconfig.json -Info 175 [00:04:13.000] Scheduled: *ensureProjectForOpenFiles* +Info 170 [00:04:08.000] Running: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation +Info 171 [00:04:09.000] Scheduled: /user/username/projects/myproject/src/tsconfig.json +Info 172 [00:04:10.000] Scheduled: *ensureProjectForOpenFiles* After running timeout callbacks PolledWatches:: @@ -1352,48 +1349,47 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 176 [00:04:14.000] Running: /user/username/projects/myproject/src/tsconfig.json -Info 177 [00:04:15.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json -Info 178 [00:04:16.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. -Info 179 [00:04:17.000] File '/a/package.json' does not exist according to earlier cached lookups. -Info 180 [00:04:18.000] File '/package.json' does not exist according to earlier cached lookups. -Info 181 [00:04:19.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. -Info 182 [00:04:20.000] Found 'package.json' at '/user/username/projects/myproject/package.json'. -Info 183 [00:04:21.000] 'package.json' does not have a 'typesVersions' field. -Info 184 [00:04:22.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. -Info 185 [00:04:23.000] File '/user/username/projects/myproject/package.json' exists according to earlier cached lookups. -Info 186 [00:04:24.000] ======== Resolving module './fileB.mjs' from '/user/username/projects/myproject/src/fileA.ts'. ======== -Info 187 [00:04:25.000] Module resolution kind is not specified, using 'Node16'. -Info 188 [00:04:26.000] Resolving in CJS mode with conditions 'node', 'require', 'types'. -Info 189 [00:04:27.000] Loading module as file / folder, candidate module location '/user/username/projects/myproject/src/fileB.mjs', target file types: TypeScript, JavaScript, Declaration. -Info 190 [00:04:28.000] File name '/user/username/projects/myproject/src/fileB.mjs' has a '.mjs' extension - stripping it. -Info 191 [00:04:29.000] File '/user/username/projects/myproject/src/fileB.mts' exist - use it as a name resolution result. -Info 192 [00:04:30.000] ======== Module name './fileB.mjs' was successfully resolved to '/user/username/projects/myproject/src/fileB.mts'. ======== -Info 193 [00:04:31.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. -Info 194 [00:04:32.000] File '/a/package.json' does not exist according to earlier cached lookups. -Info 195 [00:04:33.000] File '/package.json' does not exist according to earlier cached lookups. -Info 196 [00:04:34.000] FileWatcher:: Close:: WatchInfo: /user/username/projects/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution -Info 197 [00:04:35.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json Version: 5 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms -Info 198 [00:04:36.000] Different program with same set of files -Info 199 [00:04:37.000] Running: *ensureProjectForOpenFiles* -Info 200 [00:04:38.000] Before ensureProjectForOpenFiles: -Info 201 [00:04:39.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) -Info 201 [00:04:40.000] Files (3) - -Info 201 [00:04:41.000] ----------------------------------------------- -Info 201 [00:04:42.000] Open files: -Info 201 [00:04:43.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined -Info 201 [00:04:44.000] Projects: /user/username/projects/myproject/src/tsconfig.json -Info 201 [00:04:45.000] After ensureProjectForOpenFiles: -Info 202 [00:04:46.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) -Info 202 [00:04:47.000] Files (3) - -Info 202 [00:04:48.000] ----------------------------------------------- -Info 202 [00:04:49.000] Open files: -Info 202 [00:04:50.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined -Info 202 [00:04:51.000] Projects: /user/username/projects/myproject/src/tsconfig.json -Info 202 [00:04:52.000] got projects updated in background, updating diagnostics for /user/username/projects/myproject/src/fileA.ts -Info 203 [00:04:53.000] event: +Info 173 [00:04:11.000] Running: /user/username/projects/myproject/src/tsconfig.json +Info 174 [00:04:12.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json +Info 175 [00:04:13.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 176 [00:04:14.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 177 [00:04:15.000] File '/package.json' does not exist according to earlier cached lookups. +Info 178 [00:04:16.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. +Info 179 [00:04:17.000] Found 'package.json' at '/user/username/projects/myproject/package.json'. +Info 180 [00:04:18.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. +Info 181 [00:04:19.000] File '/user/username/projects/myproject/package.json' exists according to earlier cached lookups. +Info 182 [00:04:20.000] ======== Resolving module './fileB.mjs' from '/user/username/projects/myproject/src/fileA.ts'. ======== +Info 183 [00:04:21.000] Module resolution kind is not specified, using 'Node16'. +Info 184 [00:04:22.000] Resolving in CJS mode with conditions 'node', 'require', 'types'. +Info 185 [00:04:23.000] Loading module as file / folder, candidate module location '/user/username/projects/myproject/src/fileB.mjs', target file types: TypeScript, JavaScript, Declaration. +Info 186 [00:04:24.000] File name '/user/username/projects/myproject/src/fileB.mjs' has a '.mjs' extension - stripping it. +Info 187 [00:04:25.000] File '/user/username/projects/myproject/src/fileB.mts' exist - use it as a name resolution result. +Info 188 [00:04:26.000] ======== Module name './fileB.mjs' was successfully resolved to '/user/username/projects/myproject/src/fileB.mts'. ======== +Info 189 [00:04:27.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 190 [00:04:28.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 191 [00:04:29.000] File '/package.json' does not exist according to earlier cached lookups. +Info 192 [00:04:30.000] FileWatcher:: Close:: WatchInfo: /user/username/projects/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution +Info 193 [00:04:31.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json Version: 5 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info 194 [00:04:32.000] Different program with same set of files +Info 195 [00:04:33.000] Running: *ensureProjectForOpenFiles* +Info 196 [00:04:34.000] Before ensureProjectForOpenFiles: +Info 197 [00:04:35.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) +Info 197 [00:04:36.000] Files (3) + +Info 197 [00:04:37.000] ----------------------------------------------- +Info 197 [00:04:38.000] Open files: +Info 197 [00:04:39.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined +Info 197 [00:04:40.000] Projects: /user/username/projects/myproject/src/tsconfig.json +Info 197 [00:04:41.000] After ensureProjectForOpenFiles: +Info 198 [00:04:42.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) +Info 198 [00:04:43.000] Files (3) + +Info 198 [00:04:44.000] ----------------------------------------------- +Info 198 [00:04:45.000] Open files: +Info 198 [00:04:46.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined +Info 198 [00:04:47.000] Projects: /user/username/projects/myproject/src/tsconfig.json +Info 198 [00:04:48.000] got projects updated in background, updating diagnostics for /user/username/projects/myproject/src/fileA.ts +Info 199 [00:04:49.000] event: {"seq":0,"type":"event","event":"projectsUpdatedInBackground","body":{"openFiles":["/user/username/projects/myproject/src/fileA.ts"]}} After running timeout callbacks @@ -1419,7 +1415,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 204 [00:04:54.000] request: +Info 200 [00:04:50.000] request: { "command": "geterr", "arguments": { @@ -1479,7 +1475,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 205 [00:04:55.000] response: +Info 201 [00:04:51.000] response: { "responseRequired": false } @@ -1507,7 +1503,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 206 [00:04:56.000] event: +Info 202 [00:04:52.000] event: {"seq":0,"type":"event","event":"syntaxDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}} After checking timeout queue length (1) and running @@ -1557,7 +1553,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 207 [00:04:57.000] event: +Info 203 [00:04:53.000] event: {"seq":0,"type":"event","event":"semanticDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[{"start":{"line":1,"offset":21},"end":{"line":1,"offset":34},"text":"The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import(\"./fileB.mjs\")' call instead.\n To convert this file to an ECMAScript module, change its file extension to '.mts', or add the field `\"type\": \"module\"` to '/user/username/projects/myproject/package.json'.","code":1479,"category":"error"}]}} Before running immediate callbacks and checking length (1) @@ -1607,9 +1603,9 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 208 [00:04:58.000] event: +Info 204 [00:04:54.000] event: {"seq":0,"type":"event","event":"suggestionDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}} -Info 209 [00:04:59.000] event: +Info 205 [00:04:55.000] event: {"seq":0,"type":"event","event":"requestCompleted","body":{"request_seq":5}} Before running immediate callbacks and checking length (1) @@ -1635,10 +1631,10 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 210 [00:05:00.000] Delete package.json -Info 211 [00:05:02.000] FileWatcher:: Triggered with /user/username/projects/myproject/package.json 2:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution -Info 212 [00:05:03.000] Scheduled: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation -Info 213 [00:05:04.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/package.json 2:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution +Info 206 [00:04:56.000] Delete package.json +Info 207 [00:04:58.000] FileWatcher:: Triggered with /user/username/projects/myproject/package.json 2:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution +Info 208 [00:04:59.000] Scheduled: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation +Info 209 [00:05:00.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/package.json 2:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution Before running timeout callbacks //// [/user/username/projects/myproject/package.json] deleted @@ -1664,9 +1660,9 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 214 [00:05:05.000] Running: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation -Info 215 [00:05:06.000] Scheduled: /user/username/projects/myproject/src/tsconfig.json -Info 216 [00:05:07.000] Scheduled: *ensureProjectForOpenFiles* +Info 210 [00:05:01.000] Running: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation +Info 211 [00:05:02.000] Scheduled: /user/username/projects/myproject/src/tsconfig.json +Info 212 [00:05:03.000] Scheduled: *ensureProjectForOpenFiles* After running timeout callbacks PolledWatches:: @@ -1715,49 +1711,49 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 217 [00:05:08.000] Running: /user/username/projects/myproject/src/tsconfig.json -Info 218 [00:05:09.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json -Info 219 [00:05:10.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. -Info 220 [00:05:11.000] File '/a/package.json' does not exist according to earlier cached lookups. -Info 221 [00:05:12.000] File '/package.json' does not exist according to earlier cached lookups. -Info 222 [00:05:13.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. -Info 223 [00:05:14.000] File '/user/username/projects/myproject/package.json' does not exist. -Info 224 [00:05:15.000] File '/user/username/projects/package.json' does not exist according to earlier cached lookups. -Info 225 [00:05:16.000] File '/user/username/package.json' does not exist according to earlier cached lookups. -Info 226 [00:05:17.000] File '/user/package.json' does not exist according to earlier cached lookups. -Info 227 [00:05:18.000] File '/package.json' does not exist according to earlier cached lookups. -Info 228 [00:05:19.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. -Info 229 [00:05:20.000] File '/user/username/projects/myproject/package.json' does not exist according to earlier cached lookups. -Info 230 [00:05:21.000] File '/user/username/projects/package.json' does not exist according to earlier cached lookups. -Info 231 [00:05:22.000] File '/user/username/package.json' does not exist according to earlier cached lookups. -Info 232 [00:05:23.000] File '/user/package.json' does not exist according to earlier cached lookups. +Info 213 [00:05:04.000] Running: /user/username/projects/myproject/src/tsconfig.json +Info 214 [00:05:05.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json +Info 215 [00:05:06.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 216 [00:05:07.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 217 [00:05:08.000] File '/package.json' does not exist according to earlier cached lookups. +Info 218 [00:05:09.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. +Info 219 [00:05:10.000] File '/user/username/projects/myproject/package.json' does not exist. +Info 220 [00:05:11.000] File '/user/username/projects/package.json' does not exist according to earlier cached lookups. +Info 221 [00:05:12.000] File '/user/username/package.json' does not exist according to earlier cached lookups. +Info 222 [00:05:13.000] File '/user/package.json' does not exist according to earlier cached lookups. +Info 223 [00:05:14.000] File '/package.json' does not exist according to earlier cached lookups. +Info 224 [00:05:15.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. +Info 225 [00:05:16.000] File '/user/username/projects/myproject/package.json' does not exist according to earlier cached lookups. +Info 226 [00:05:17.000] File '/user/username/projects/package.json' does not exist according to earlier cached lookups. +Info 227 [00:05:18.000] File '/user/username/package.json' does not exist according to earlier cached lookups. +Info 228 [00:05:19.000] File '/user/package.json' does not exist according to earlier cached lookups. +Info 229 [00:05:20.000] File '/package.json' does not exist according to earlier cached lookups. +Info 230 [00:05:21.000] Reusing resolution of module './fileB.mjs' from '/user/username/projects/myproject/src/fileA.ts' of old program, it was successfully resolved to '/user/username/projects/myproject/src/fileB.mts'. +Info 231 [00:05:22.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 232 [00:05:23.000] File '/a/package.json' does not exist according to earlier cached lookups. Info 233 [00:05:24.000] File '/package.json' does not exist according to earlier cached lookups. -Info 234 [00:05:25.000] Reusing resolution of module './fileB.mjs' from '/user/username/projects/myproject/src/fileA.ts' of old program, it was successfully resolved to '/user/username/projects/myproject/src/fileB.mts'. -Info 235 [00:05:26.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. -Info 236 [00:05:27.000] File '/a/package.json' does not exist according to earlier cached lookups. -Info 237 [00:05:28.000] File '/package.json' does not exist according to earlier cached lookups. -Info 238 [00:05:29.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution -Info 239 [00:05:30.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json Version: 6 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms -Info 240 [00:05:31.000] Different program with same set of files -Info 241 [00:05:32.000] Running: *ensureProjectForOpenFiles* -Info 242 [00:05:33.000] Before ensureProjectForOpenFiles: -Info 243 [00:05:34.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) -Info 243 [00:05:35.000] Files (3) - -Info 243 [00:05:36.000] ----------------------------------------------- -Info 243 [00:05:37.000] Open files: -Info 243 [00:05:38.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined -Info 243 [00:05:39.000] Projects: /user/username/projects/myproject/src/tsconfig.json -Info 243 [00:05:40.000] After ensureProjectForOpenFiles: -Info 244 [00:05:41.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) -Info 244 [00:05:42.000] Files (3) - -Info 244 [00:05:43.000] ----------------------------------------------- -Info 244 [00:05:44.000] Open files: -Info 244 [00:05:45.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined -Info 244 [00:05:46.000] Projects: /user/username/projects/myproject/src/tsconfig.json -Info 244 [00:05:47.000] got projects updated in background, updating diagnostics for /user/username/projects/myproject/src/fileA.ts -Info 245 [00:05:48.000] event: +Info 234 [00:05:25.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution +Info 235 [00:05:26.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json Version: 6 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info 236 [00:05:27.000] Different program with same set of files +Info 237 [00:05:28.000] Running: *ensureProjectForOpenFiles* +Info 238 [00:05:29.000] Before ensureProjectForOpenFiles: +Info 239 [00:05:30.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) +Info 239 [00:05:31.000] Files (3) + +Info 239 [00:05:32.000] ----------------------------------------------- +Info 239 [00:05:33.000] Open files: +Info 239 [00:05:34.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined +Info 239 [00:05:35.000] Projects: /user/username/projects/myproject/src/tsconfig.json +Info 239 [00:05:36.000] After ensureProjectForOpenFiles: +Info 240 [00:05:37.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) +Info 240 [00:05:38.000] Files (3) + +Info 240 [00:05:39.000] ----------------------------------------------- +Info 240 [00:05:40.000] Open files: +Info 240 [00:05:41.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined +Info 240 [00:05:42.000] Projects: /user/username/projects/myproject/src/tsconfig.json +Info 240 [00:05:43.000] got projects updated in background, updating diagnostics for /user/username/projects/myproject/src/fileA.ts +Info 241 [00:05:44.000] event: {"seq":0,"type":"event","event":"projectsUpdatedInBackground","body":{"openFiles":["/user/username/projects/myproject/src/fileA.ts"]}} After running timeout callbacks @@ -1785,7 +1781,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 246 [00:05:49.000] request: +Info 242 [00:05:45.000] request: { "command": "geterr", "arguments": { @@ -1849,7 +1845,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 247 [00:05:50.000] response: +Info 243 [00:05:46.000] response: { "responseRequired": false } @@ -1879,7 +1875,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 248 [00:05:51.000] event: +Info 244 [00:05:47.000] event: {"seq":0,"type":"event","event":"syntaxDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}} After checking timeout queue length (1) and running @@ -1933,7 +1929,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 249 [00:05:52.000] event: +Info 245 [00:05:48.000] event: {"seq":0,"type":"event","event":"semanticDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[{"start":{"line":1,"offset":21},"end":{"line":1,"offset":34},"text":"The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import(\"./fileB.mjs\")' call instead.\n To convert this file to an ECMAScript module, change its file extension to '.mts' or create a local package.json file with `{ \"type\": \"module\" }`.","code":1479,"category":"error"}]}} Before running immediate callbacks and checking length (1) @@ -1987,9 +1983,9 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 250 [00:05:53.000] event: +Info 246 [00:05:49.000] event: {"seq":0,"type":"event","event":"suggestionDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}} -Info 251 [00:05:54.000] event: +Info 247 [00:05:50.000] event: {"seq":0,"type":"event","event":"requestCompleted","body":{"request_seq":6}} Before running immediate callbacks and checking length (1) diff --git a/tests/baselines/reference/tsserver/moduleResolution/package-json-file-is-edited.js b/tests/baselines/reference/tsserver/moduleResolution/package-json-file-is-edited.js index 4dc6dc3ad31fc..03d58c40a6327 100644 --- a/tests/baselines/reference/tsserver/moduleResolution/package-json-file-is-edited.js +++ b/tests/baselines/reference/tsserver/moduleResolution/package-json-file-is-edited.js @@ -70,27 +70,26 @@ Info 10 [00:00:37.000] FileWatcher:: Added:: WatchInfo: /user/username/project Info 11 [00:00:38.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json Info 12 [00:00:39.000] File '/user/username/projects/myproject/src/package.json' does not exist. Info 13 [00:00:40.000] Found 'package.json' at '/user/username/projects/myproject/package.json'. -Info 14 [00:00:41.000] 'package.json' does not have a 'typesVersions' field. -Info 15 [00:00:42.000] ======== Resolving module './fileB.mjs' from '/user/username/projects/myproject/src/fileA.ts'. ======== -Info 16 [00:00:43.000] Module resolution kind is not specified, using 'Node16'. -Info 17 [00:00:44.000] Resolving in CJS mode with conditions 'node', 'require', 'types'. -Info 18 [00:00:45.000] Loading module as file / folder, candidate module location '/user/username/projects/myproject/src/fileB.mjs', target file types: TypeScript, JavaScript, Declaration. -Info 19 [00:00:46.000] File name '/user/username/projects/myproject/src/fileB.mjs' has a '.mjs' extension - stripping it. -Info 20 [00:00:47.000] File '/user/username/projects/myproject/src/fileB.mts' exist - use it as a name resolution result. -Info 21 [00:00:48.000] ======== Module name './fileB.mjs' was successfully resolved to '/user/username/projects/myproject/src/fileB.mts'. ======== -Info 22 [00:00:49.000] File '/a/lib/package.json' does not exist. -Info 23 [00:00:50.000] File '/a/package.json' does not exist. -Info 24 [00:00:51.000] File '/package.json' does not exist. -Info 25 [00:00:52.000] FileWatcher:: Added:: WatchInfo: /a/lib/lib.es2016.full.d.ts 500 undefined WatchType: Closed Script info -Info 26 [00:00:53.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution -Info 27 [00:00:54.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution -Info 28 [00:00:55.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/node_modules/@types 1 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: Type roots -Info 29 [00:00:56.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/node_modules/@types 1 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: Type roots -Info 30 [00:00:57.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: Type roots -Info 31 [00:00:58.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: Type roots -Info 32 [00:00:59.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info 33 [00:01:00.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) -Info 34 [00:01:01.000] Files (3) +Info 14 [00:00:41.000] ======== Resolving module './fileB.mjs' from '/user/username/projects/myproject/src/fileA.ts'. ======== +Info 15 [00:00:42.000] Module resolution kind is not specified, using 'Node16'. +Info 16 [00:00:43.000] Resolving in CJS mode with conditions 'node', 'require', 'types'. +Info 17 [00:00:44.000] Loading module as file / folder, candidate module location '/user/username/projects/myproject/src/fileB.mjs', target file types: TypeScript, JavaScript, Declaration. +Info 18 [00:00:45.000] File name '/user/username/projects/myproject/src/fileB.mjs' has a '.mjs' extension - stripping it. +Info 19 [00:00:46.000] File '/user/username/projects/myproject/src/fileB.mts' exist - use it as a name resolution result. +Info 20 [00:00:47.000] ======== Module name './fileB.mjs' was successfully resolved to '/user/username/projects/myproject/src/fileB.mts'. ======== +Info 21 [00:00:48.000] File '/a/lib/package.json' does not exist. +Info 22 [00:00:49.000] File '/a/package.json' does not exist. +Info 23 [00:00:50.000] File '/package.json' does not exist. +Info 24 [00:00:51.000] FileWatcher:: Added:: WatchInfo: /a/lib/lib.es2016.full.d.ts 500 undefined WatchType: Closed Script info +Info 25 [00:00:52.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution +Info 26 [00:00:53.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution +Info 27 [00:00:54.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/node_modules/@types 1 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: Type roots +Info 28 [00:00:55.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/node_modules/@types 1 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: Type roots +Info 29 [00:00:56.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: Type roots +Info 30 [00:00:57.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: Type roots +Info 31 [00:00:58.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 32 [00:00:59.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) +Info 33 [00:01:00.000] Files (3) /a/lib/lib.es2016.full.d.ts /user/username/projects/myproject/src/fileB.mts /user/username/projects/myproject/src/fileA.ts @@ -105,21 +104,21 @@ Info 34 [00:01:01.000] Files (3) Matched by default include pattern '**/*' File is CommonJS module because '../package.json' does not have field "type" -Info 35 [00:01:02.000] ----------------------------------------------- -Info 36 [00:01:03.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/package.json 250 undefined WatchType: package.json file -Info 37 [00:01:04.000] event: +Info 34 [00:01:01.000] ----------------------------------------------- +Info 35 [00:01:02.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/package.json 250 undefined WatchType: package.json file +Info 36 [00:01:03.000] event: {"seq":0,"type":"event","event":"projectLoadingFinish","body":{"projectName":"/user/username/projects/myproject/src/tsconfig.json"}} -Info 38 [00:01:05.000] event: +Info 37 [00:01:04.000] event: {"seq":0,"type":"event","event":"telemetry","body":{"telemetryEventName":"projectInfo","payload":{"projectId":"f026568af42c61ce0537de8ee0fa07c9359a76dcfb046248ed49dc76c91e4a37","fileStats":{"js":0,"jsSize":0,"jsx":0,"jsxSize":0,"ts":2,"tsSize":68,"tsx":0,"tsxSize":0,"dts":1,"dtsSize":334,"deferred":0,"deferredSize":0},"compilerOptions":{"target":"es2016","module":"node16","outDir":"","traceResolution":true},"typeAcquisition":{"enable":false,"include":false,"exclude":false},"extends":false,"files":false,"include":false,"exclude":false,"compileOnSave":false,"configFileName":"tsconfig.json","projectType":"configured","languageServiceEnabled":true,"version":"FakeVersion"}}} -Info 39 [00:01:06.000] event: +Info 38 [00:01:05.000] event: {"seq":0,"type":"event","event":"configFileDiag","body":{"triggerFile":"/user/username/projects/myproject/src/fileA.ts","configFile":"/user/username/projects/myproject/src/tsconfig.json","diagnostics":[]}} -Info 40 [00:01:07.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) -Info 40 [00:01:08.000] Files (3) +Info 39 [00:01:06.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) +Info 39 [00:01:07.000] Files (3) -Info 40 [00:01:09.000] ----------------------------------------------- -Info 40 [00:01:10.000] Open files: -Info 40 [00:01:11.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined -Info 40 [00:01:12.000] Projects: /user/username/projects/myproject/src/tsconfig.json +Info 39 [00:01:08.000] ----------------------------------------------- +Info 39 [00:01:09.000] Open files: +Info 39 [00:01:10.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined +Info 39 [00:01:11.000] Projects: /user/username/projects/myproject/src/tsconfig.json After request PolledWatches:: @@ -144,16 +143,16 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 40 [00:01:13.000] response: +Info 39 [00:01:12.000] response: { "responseRequired": false } -Info 41 [00:01:14.000] Modify package json file to add type module -Info 42 [00:01:18.000] FileWatcher:: Triggered with /user/username/projects/myproject/package.json 1:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution -Info 43 [00:01:19.000] Scheduled: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation -Info 44 [00:01:20.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/package.json 1:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution -Info 45 [00:01:21.000] FileWatcher:: Triggered with /user/username/projects/myproject/package.json 1:: WatchInfo: /user/username/projects/myproject/package.json 250 undefined WatchType: package.json file -Info 46 [00:01:22.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/package.json 1:: WatchInfo: /user/username/projects/myproject/package.json 250 undefined WatchType: package.json file +Info 40 [00:01:13.000] Modify package json file to add type module +Info 41 [00:01:17.000] FileWatcher:: Triggered with /user/username/projects/myproject/package.json 1:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution +Info 42 [00:01:18.000] Scheduled: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation +Info 43 [00:01:19.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/package.json 1:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution +Info 44 [00:01:20.000] FileWatcher:: Triggered with /user/username/projects/myproject/package.json 1:: WatchInfo: /user/username/projects/myproject/package.json 250 undefined WatchType: package.json file +Info 45 [00:01:21.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/package.json 1:: WatchInfo: /user/username/projects/myproject/package.json 250 undefined WatchType: package.json file Before running timeout callbacks //// [/user/username/projects/myproject/package.json] {"name":"app","version":"1.0.0","type":"module"} @@ -181,9 +180,9 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 47 [00:01:23.000] Running: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation -Info 48 [00:01:24.000] Scheduled: /user/username/projects/myproject/src/tsconfig.json -Info 49 [00:01:25.000] Scheduled: *ensureProjectForOpenFiles* +Info 46 [00:01:22.000] Running: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation +Info 47 [00:01:23.000] Scheduled: /user/username/projects/myproject/src/tsconfig.json +Info 48 [00:01:24.000] Scheduled: *ensureProjectForOpenFiles* After running timeout callbacks PolledWatches:: @@ -232,47 +231,46 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 50 [00:01:26.000] Running: /user/username/projects/myproject/src/tsconfig.json -Info 51 [00:01:27.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json -Info 52 [00:01:28.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. -Info 53 [00:01:29.000] File '/a/package.json' does not exist according to earlier cached lookups. -Info 54 [00:01:30.000] File '/package.json' does not exist according to earlier cached lookups. -Info 55 [00:01:31.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. -Info 56 [00:01:32.000] Found 'package.json' at '/user/username/projects/myproject/package.json'. -Info 57 [00:01:33.000] 'package.json' does not have a 'typesVersions' field. -Info 58 [00:01:34.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. -Info 59 [00:01:35.000] File '/user/username/projects/myproject/package.json' exists according to earlier cached lookups. -Info 60 [00:01:36.000] ======== Resolving module './fileB.mjs' from '/user/username/projects/myproject/src/fileA.ts'. ======== -Info 61 [00:01:37.000] Module resolution kind is not specified, using 'Node16'. -Info 62 [00:01:38.000] Resolving in ESM mode with conditions 'node', 'import', 'types'. -Info 63 [00:01:39.000] Loading module as file / folder, candidate module location '/user/username/projects/myproject/src/fileB.mjs', target file types: TypeScript, JavaScript, Declaration. -Info 64 [00:01:40.000] File name '/user/username/projects/myproject/src/fileB.mjs' has a '.mjs' extension - stripping it. -Info 65 [00:01:41.000] File '/user/username/projects/myproject/src/fileB.mts' exist - use it as a name resolution result. -Info 66 [00:01:42.000] ======== Module name './fileB.mjs' was successfully resolved to '/user/username/projects/myproject/src/fileB.mts'. ======== -Info 67 [00:01:43.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. -Info 68 [00:01:44.000] File '/a/package.json' does not exist according to earlier cached lookups. -Info 69 [00:01:45.000] File '/package.json' does not exist according to earlier cached lookups. -Info 70 [00:01:46.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json Version: 2 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms -Info 71 [00:01:47.000] Different program with same set of files -Info 72 [00:01:48.000] Running: *ensureProjectForOpenFiles* -Info 73 [00:01:49.000] Before ensureProjectForOpenFiles: -Info 74 [00:01:50.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) -Info 74 [00:01:51.000] Files (3) - -Info 74 [00:01:52.000] ----------------------------------------------- -Info 74 [00:01:53.000] Open files: -Info 74 [00:01:54.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined -Info 74 [00:01:55.000] Projects: /user/username/projects/myproject/src/tsconfig.json -Info 74 [00:01:56.000] After ensureProjectForOpenFiles: -Info 75 [00:01:57.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) -Info 75 [00:01:58.000] Files (3) - -Info 75 [00:01:59.000] ----------------------------------------------- -Info 75 [00:02:00.000] Open files: -Info 75 [00:02:01.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined -Info 75 [00:02:02.000] Projects: /user/username/projects/myproject/src/tsconfig.json -Info 75 [00:02:03.000] got projects updated in background, updating diagnostics for /user/username/projects/myproject/src/fileA.ts -Info 76 [00:02:04.000] event: +Info 49 [00:01:25.000] Running: /user/username/projects/myproject/src/tsconfig.json +Info 50 [00:01:26.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json +Info 51 [00:01:27.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 52 [00:01:28.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 53 [00:01:29.000] File '/package.json' does not exist according to earlier cached lookups. +Info 54 [00:01:30.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. +Info 55 [00:01:31.000] Found 'package.json' at '/user/username/projects/myproject/package.json'. +Info 56 [00:01:32.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. +Info 57 [00:01:33.000] File '/user/username/projects/myproject/package.json' exists according to earlier cached lookups. +Info 58 [00:01:34.000] ======== Resolving module './fileB.mjs' from '/user/username/projects/myproject/src/fileA.ts'. ======== +Info 59 [00:01:35.000] Module resolution kind is not specified, using 'Node16'. +Info 60 [00:01:36.000] Resolving in ESM mode with conditions 'node', 'import', 'types'. +Info 61 [00:01:37.000] Loading module as file / folder, candidate module location '/user/username/projects/myproject/src/fileB.mjs', target file types: TypeScript, JavaScript, Declaration. +Info 62 [00:01:38.000] File name '/user/username/projects/myproject/src/fileB.mjs' has a '.mjs' extension - stripping it. +Info 63 [00:01:39.000] File '/user/username/projects/myproject/src/fileB.mts' exist - use it as a name resolution result. +Info 64 [00:01:40.000] ======== Module name './fileB.mjs' was successfully resolved to '/user/username/projects/myproject/src/fileB.mts'. ======== +Info 65 [00:01:41.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 66 [00:01:42.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 67 [00:01:43.000] File '/package.json' does not exist according to earlier cached lookups. +Info 68 [00:01:44.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json Version: 2 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info 69 [00:01:45.000] Different program with same set of files +Info 70 [00:01:46.000] Running: *ensureProjectForOpenFiles* +Info 71 [00:01:47.000] Before ensureProjectForOpenFiles: +Info 72 [00:01:48.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) +Info 72 [00:01:49.000] Files (3) + +Info 72 [00:01:50.000] ----------------------------------------------- +Info 72 [00:01:51.000] Open files: +Info 72 [00:01:52.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined +Info 72 [00:01:53.000] Projects: /user/username/projects/myproject/src/tsconfig.json +Info 72 [00:01:54.000] After ensureProjectForOpenFiles: +Info 73 [00:01:55.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) +Info 73 [00:01:56.000] Files (3) + +Info 73 [00:01:57.000] ----------------------------------------------- +Info 73 [00:01:58.000] Open files: +Info 73 [00:01:59.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined +Info 73 [00:02:00.000] Projects: /user/username/projects/myproject/src/tsconfig.json +Info 73 [00:02:01.000] got projects updated in background, updating diagnostics for /user/username/projects/myproject/src/fileA.ts +Info 74 [00:02:02.000] event: {"seq":0,"type":"event","event":"projectsUpdatedInBackground","body":{"openFiles":["/user/username/projects/myproject/src/fileA.ts"]}} After running timeout callbacks @@ -298,7 +296,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 77 [00:02:05.000] request: +Info 75 [00:02:03.000] request: { "command": "geterr", "arguments": { @@ -358,7 +356,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 78 [00:02:06.000] response: +Info 76 [00:02:04.000] response: { "responseRequired": false } @@ -386,7 +384,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 79 [00:02:07.000] event: +Info 77 [00:02:05.000] event: {"seq":0,"type":"event","event":"syntaxDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}} After checking timeout queue length (1) and running @@ -436,7 +434,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 80 [00:02:08.000] event: +Info 78 [00:02:06.000] event: {"seq":0,"type":"event","event":"semanticDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}} Before running immediate callbacks and checking length (1) @@ -486,9 +484,9 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 81 [00:02:09.000] event: +Info 79 [00:02:07.000] event: {"seq":0,"type":"event","event":"suggestionDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}} -Info 82 [00:02:10.000] event: +Info 80 [00:02:08.000] event: {"seq":0,"type":"event","event":"requestCompleted","body":{"request_seq":2}} Before running immediate callbacks and checking length (1) @@ -514,12 +512,12 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 83 [00:02:11.000] Modify package json file to remove type module -Info 84 [00:02:15.000] FileWatcher:: Triggered with /user/username/projects/myproject/package.json 1:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution -Info 85 [00:02:16.000] Scheduled: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation -Info 86 [00:02:17.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/package.json 1:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution -Info 87 [00:02:18.000] FileWatcher:: Triggered with /user/username/projects/myproject/package.json 1:: WatchInfo: /user/username/projects/myproject/package.json 250 undefined WatchType: package.json file -Info 88 [00:02:19.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/package.json 1:: WatchInfo: /user/username/projects/myproject/package.json 250 undefined WatchType: package.json file +Info 81 [00:02:09.000] Modify package json file to remove type module +Info 82 [00:02:13.000] FileWatcher:: Triggered with /user/username/projects/myproject/package.json 1:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution +Info 83 [00:02:14.000] Scheduled: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation +Info 84 [00:02:15.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/package.json 1:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution +Info 85 [00:02:16.000] FileWatcher:: Triggered with /user/username/projects/myproject/package.json 1:: WatchInfo: /user/username/projects/myproject/package.json 250 undefined WatchType: package.json file +Info 86 [00:02:17.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/package.json 1:: WatchInfo: /user/username/projects/myproject/package.json 250 undefined WatchType: package.json file Before running timeout callbacks //// [/user/username/projects/myproject/package.json] {"name":"app","version":"1.0.0"} @@ -547,9 +545,9 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 89 [00:02:20.000] Running: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation -Info 90 [00:02:21.000] Scheduled: /user/username/projects/myproject/src/tsconfig.json -Info 91 [00:02:22.000] Scheduled: *ensureProjectForOpenFiles* +Info 87 [00:02:18.000] Running: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation +Info 88 [00:02:19.000] Scheduled: /user/username/projects/myproject/src/tsconfig.json +Info 89 [00:02:20.000] Scheduled: *ensureProjectForOpenFiles* After running timeout callbacks PolledWatches:: @@ -598,47 +596,46 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 92 [00:02:23.000] Running: /user/username/projects/myproject/src/tsconfig.json -Info 93 [00:02:24.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json -Info 94 [00:02:25.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. -Info 95 [00:02:26.000] File '/a/package.json' does not exist according to earlier cached lookups. -Info 96 [00:02:27.000] File '/package.json' does not exist according to earlier cached lookups. +Info 90 [00:02:21.000] Running: /user/username/projects/myproject/src/tsconfig.json +Info 91 [00:02:22.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json +Info 92 [00:02:23.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 93 [00:02:24.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 94 [00:02:25.000] File '/package.json' does not exist according to earlier cached lookups. +Info 95 [00:02:26.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. +Info 96 [00:02:27.000] Found 'package.json' at '/user/username/projects/myproject/package.json'. Info 97 [00:02:28.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. -Info 98 [00:02:29.000] Found 'package.json' at '/user/username/projects/myproject/package.json'. -Info 99 [00:02:30.000] 'package.json' does not have a 'typesVersions' field. -Info 100 [00:02:31.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. -Info 101 [00:02:32.000] File '/user/username/projects/myproject/package.json' exists according to earlier cached lookups. -Info 102 [00:02:33.000] ======== Resolving module './fileB.mjs' from '/user/username/projects/myproject/src/fileA.ts'. ======== -Info 103 [00:02:34.000] Module resolution kind is not specified, using 'Node16'. -Info 104 [00:02:35.000] Resolving in CJS mode with conditions 'node', 'require', 'types'. -Info 105 [00:02:36.000] Loading module as file / folder, candidate module location '/user/username/projects/myproject/src/fileB.mjs', target file types: TypeScript, JavaScript, Declaration. -Info 106 [00:02:37.000] File name '/user/username/projects/myproject/src/fileB.mjs' has a '.mjs' extension - stripping it. -Info 107 [00:02:38.000] File '/user/username/projects/myproject/src/fileB.mts' exist - use it as a name resolution result. -Info 108 [00:02:39.000] ======== Module name './fileB.mjs' was successfully resolved to '/user/username/projects/myproject/src/fileB.mts'. ======== -Info 109 [00:02:40.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. -Info 110 [00:02:41.000] File '/a/package.json' does not exist according to earlier cached lookups. -Info 111 [00:02:42.000] File '/package.json' does not exist according to earlier cached lookups. -Info 112 [00:02:43.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json Version: 3 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms -Info 113 [00:02:44.000] Different program with same set of files -Info 114 [00:02:45.000] Running: *ensureProjectForOpenFiles* -Info 115 [00:02:46.000] Before ensureProjectForOpenFiles: -Info 116 [00:02:47.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) -Info 116 [00:02:48.000] Files (3) - -Info 116 [00:02:49.000] ----------------------------------------------- -Info 116 [00:02:50.000] Open files: -Info 116 [00:02:51.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined -Info 116 [00:02:52.000] Projects: /user/username/projects/myproject/src/tsconfig.json -Info 116 [00:02:53.000] After ensureProjectForOpenFiles: -Info 117 [00:02:54.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) -Info 117 [00:02:55.000] Files (3) - -Info 117 [00:02:56.000] ----------------------------------------------- -Info 117 [00:02:57.000] Open files: -Info 117 [00:02:58.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined -Info 117 [00:02:59.000] Projects: /user/username/projects/myproject/src/tsconfig.json -Info 117 [00:03:00.000] got projects updated in background, updating diagnostics for /user/username/projects/myproject/src/fileA.ts -Info 118 [00:03:01.000] event: +Info 98 [00:02:29.000] File '/user/username/projects/myproject/package.json' exists according to earlier cached lookups. +Info 99 [00:02:30.000] ======== Resolving module './fileB.mjs' from '/user/username/projects/myproject/src/fileA.ts'. ======== +Info 100 [00:02:31.000] Module resolution kind is not specified, using 'Node16'. +Info 101 [00:02:32.000] Resolving in CJS mode with conditions 'node', 'require', 'types'. +Info 102 [00:02:33.000] Loading module as file / folder, candidate module location '/user/username/projects/myproject/src/fileB.mjs', target file types: TypeScript, JavaScript, Declaration. +Info 103 [00:02:34.000] File name '/user/username/projects/myproject/src/fileB.mjs' has a '.mjs' extension - stripping it. +Info 104 [00:02:35.000] File '/user/username/projects/myproject/src/fileB.mts' exist - use it as a name resolution result. +Info 105 [00:02:36.000] ======== Module name './fileB.mjs' was successfully resolved to '/user/username/projects/myproject/src/fileB.mts'. ======== +Info 106 [00:02:37.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 107 [00:02:38.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 108 [00:02:39.000] File '/package.json' does not exist according to earlier cached lookups. +Info 109 [00:02:40.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json Version: 3 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info 110 [00:02:41.000] Different program with same set of files +Info 111 [00:02:42.000] Running: *ensureProjectForOpenFiles* +Info 112 [00:02:43.000] Before ensureProjectForOpenFiles: +Info 113 [00:02:44.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) +Info 113 [00:02:45.000] Files (3) + +Info 113 [00:02:46.000] ----------------------------------------------- +Info 113 [00:02:47.000] Open files: +Info 113 [00:02:48.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined +Info 113 [00:02:49.000] Projects: /user/username/projects/myproject/src/tsconfig.json +Info 113 [00:02:50.000] After ensureProjectForOpenFiles: +Info 114 [00:02:51.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) +Info 114 [00:02:52.000] Files (3) + +Info 114 [00:02:53.000] ----------------------------------------------- +Info 114 [00:02:54.000] Open files: +Info 114 [00:02:55.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined +Info 114 [00:02:56.000] Projects: /user/username/projects/myproject/src/tsconfig.json +Info 114 [00:02:57.000] got projects updated in background, updating diagnostics for /user/username/projects/myproject/src/fileA.ts +Info 115 [00:02:58.000] event: {"seq":0,"type":"event","event":"projectsUpdatedInBackground","body":{"openFiles":["/user/username/projects/myproject/src/fileA.ts"]}} After running timeout callbacks @@ -664,7 +661,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 119 [00:03:02.000] request: +Info 116 [00:02:59.000] request: { "command": "geterr", "arguments": { @@ -724,7 +721,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 120 [00:03:03.000] response: +Info 117 [00:03:00.000] response: { "responseRequired": false } @@ -752,7 +749,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 121 [00:03:04.000] event: +Info 118 [00:03:01.000] event: {"seq":0,"type":"event","event":"syntaxDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}} After checking timeout queue length (1) and running @@ -802,7 +799,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 122 [00:03:05.000] event: +Info 119 [00:03:02.000] event: {"seq":0,"type":"event","event":"semanticDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[{"start":{"line":1,"offset":21},"end":{"line":1,"offset":34},"text":"The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import(\"./fileB.mjs\")' call instead.\n To convert this file to an ECMAScript module, change its file extension to '.mts', or add the field `\"type\": \"module\"` to '/user/username/projects/myproject/package.json'.","code":1479,"category":"error"}]}} Before running immediate callbacks and checking length (1) @@ -852,9 +849,9 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 123 [00:03:06.000] event: +Info 120 [00:03:03.000] event: {"seq":0,"type":"event","event":"suggestionDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}} -Info 124 [00:03:07.000] event: +Info 121 [00:03:04.000] event: {"seq":0,"type":"event","event":"requestCompleted","body":{"request_seq":3}} Before running immediate callbacks and checking length (1) @@ -880,13 +877,13 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 125 [00:03:08.000] Delete package.json -Info 126 [00:03:10.000] FileWatcher:: Triggered with /user/username/projects/myproject/package.json 2:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution -Info 127 [00:03:11.000] Scheduled: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation -Info 128 [00:03:12.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/package.json 2:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution -Info 129 [00:03:13.000] FileWatcher:: Triggered with /user/username/projects/myproject/package.json 2:: WatchInfo: /user/username/projects/myproject/package.json 250 undefined WatchType: package.json file -Info 130 [00:03:14.000] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/package.json 250 undefined WatchType: package.json file -Info 131 [00:03:15.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/package.json 2:: WatchInfo: /user/username/projects/myproject/package.json 250 undefined WatchType: package.json file +Info 122 [00:03:05.000] Delete package.json +Info 123 [00:03:07.000] FileWatcher:: Triggered with /user/username/projects/myproject/package.json 2:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution +Info 124 [00:03:08.000] Scheduled: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation +Info 125 [00:03:09.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/package.json 2:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution +Info 126 [00:03:10.000] FileWatcher:: Triggered with /user/username/projects/myproject/package.json 2:: WatchInfo: /user/username/projects/myproject/package.json 250 undefined WatchType: package.json file +Info 127 [00:03:11.000] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/package.json 250 undefined WatchType: package.json file +Info 128 [00:03:12.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/package.json 2:: WatchInfo: /user/username/projects/myproject/package.json 250 undefined WatchType: package.json file Before running timeout callbacks //// [/user/username/projects/myproject/package.json] deleted @@ -912,9 +909,9 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 132 [00:03:16.000] Running: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation -Info 133 [00:03:17.000] Scheduled: /user/username/projects/myproject/src/tsconfig.json -Info 134 [00:03:18.000] Scheduled: *ensureProjectForOpenFiles* +Info 129 [00:03:13.000] Running: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation +Info 130 [00:03:14.000] Scheduled: /user/username/projects/myproject/src/tsconfig.json +Info 131 [00:03:15.000] Scheduled: *ensureProjectForOpenFiles* After running timeout callbacks PolledWatches:: @@ -963,49 +960,49 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 135 [00:03:19.000] Running: /user/username/projects/myproject/src/tsconfig.json -Info 136 [00:03:20.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json -Info 137 [00:03:21.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. -Info 138 [00:03:22.000] File '/a/package.json' does not exist according to earlier cached lookups. -Info 139 [00:03:23.000] File '/package.json' does not exist according to earlier cached lookups. -Info 140 [00:03:24.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. -Info 141 [00:03:25.000] File '/user/username/projects/myproject/package.json' does not exist. -Info 142 [00:03:26.000] File '/user/username/projects/package.json' does not exist. -Info 143 [00:03:27.000] File '/user/username/package.json' does not exist. -Info 144 [00:03:28.000] File '/user/package.json' does not exist. -Info 145 [00:03:29.000] File '/package.json' does not exist according to earlier cached lookups. -Info 146 [00:03:30.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. -Info 147 [00:03:31.000] File '/user/username/projects/myproject/package.json' does not exist according to earlier cached lookups. -Info 148 [00:03:32.000] File '/user/username/projects/package.json' does not exist according to earlier cached lookups. -Info 149 [00:03:33.000] File '/user/username/package.json' does not exist according to earlier cached lookups. -Info 150 [00:03:34.000] File '/user/package.json' does not exist according to earlier cached lookups. -Info 151 [00:03:35.000] File '/package.json' does not exist according to earlier cached lookups. -Info 152 [00:03:36.000] Reusing resolution of module './fileB.mjs' from '/user/username/projects/myproject/src/fileA.ts' of old program, it was successfully resolved to '/user/username/projects/myproject/src/fileB.mts'. -Info 153 [00:03:37.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. -Info 154 [00:03:38.000] File '/a/package.json' does not exist according to earlier cached lookups. -Info 155 [00:03:39.000] File '/package.json' does not exist according to earlier cached lookups. -Info 156 [00:03:40.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution -Info 157 [00:03:41.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json Version: 4 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms -Info 158 [00:03:42.000] Different program with same set of files -Info 159 [00:03:43.000] Running: *ensureProjectForOpenFiles* -Info 160 [00:03:44.000] Before ensureProjectForOpenFiles: -Info 161 [00:03:45.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) -Info 161 [00:03:46.000] Files (3) - -Info 161 [00:03:47.000] ----------------------------------------------- -Info 161 [00:03:48.000] Open files: -Info 161 [00:03:49.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined -Info 161 [00:03:50.000] Projects: /user/username/projects/myproject/src/tsconfig.json -Info 161 [00:03:51.000] After ensureProjectForOpenFiles: -Info 162 [00:03:52.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) -Info 162 [00:03:53.000] Files (3) - -Info 162 [00:03:54.000] ----------------------------------------------- -Info 162 [00:03:55.000] Open files: -Info 162 [00:03:56.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined -Info 162 [00:03:57.000] Projects: /user/username/projects/myproject/src/tsconfig.json -Info 162 [00:03:58.000] got projects updated in background, updating diagnostics for /user/username/projects/myproject/src/fileA.ts -Info 163 [00:03:59.000] event: +Info 132 [00:03:16.000] Running: /user/username/projects/myproject/src/tsconfig.json +Info 133 [00:03:17.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json +Info 134 [00:03:18.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 135 [00:03:19.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 136 [00:03:20.000] File '/package.json' does not exist according to earlier cached lookups. +Info 137 [00:03:21.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. +Info 138 [00:03:22.000] File '/user/username/projects/myproject/package.json' does not exist. +Info 139 [00:03:23.000] File '/user/username/projects/package.json' does not exist. +Info 140 [00:03:24.000] File '/user/username/package.json' does not exist. +Info 141 [00:03:25.000] File '/user/package.json' does not exist. +Info 142 [00:03:26.000] File '/package.json' does not exist according to earlier cached lookups. +Info 143 [00:03:27.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. +Info 144 [00:03:28.000] File '/user/username/projects/myproject/package.json' does not exist according to earlier cached lookups. +Info 145 [00:03:29.000] File '/user/username/projects/package.json' does not exist according to earlier cached lookups. +Info 146 [00:03:30.000] File '/user/username/package.json' does not exist according to earlier cached lookups. +Info 147 [00:03:31.000] File '/user/package.json' does not exist according to earlier cached lookups. +Info 148 [00:03:32.000] File '/package.json' does not exist according to earlier cached lookups. +Info 149 [00:03:33.000] Reusing resolution of module './fileB.mjs' from '/user/username/projects/myproject/src/fileA.ts' of old program, it was successfully resolved to '/user/username/projects/myproject/src/fileB.mts'. +Info 150 [00:03:34.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 151 [00:03:35.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 152 [00:03:36.000] File '/package.json' does not exist according to earlier cached lookups. +Info 153 [00:03:37.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution +Info 154 [00:03:38.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json Version: 4 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info 155 [00:03:39.000] Different program with same set of files +Info 156 [00:03:40.000] Running: *ensureProjectForOpenFiles* +Info 157 [00:03:41.000] Before ensureProjectForOpenFiles: +Info 158 [00:03:42.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) +Info 158 [00:03:43.000] Files (3) + +Info 158 [00:03:44.000] ----------------------------------------------- +Info 158 [00:03:45.000] Open files: +Info 158 [00:03:46.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined +Info 158 [00:03:47.000] Projects: /user/username/projects/myproject/src/tsconfig.json +Info 158 [00:03:48.000] After ensureProjectForOpenFiles: +Info 159 [00:03:49.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) +Info 159 [00:03:50.000] Files (3) + +Info 159 [00:03:51.000] ----------------------------------------------- +Info 159 [00:03:52.000] Open files: +Info 159 [00:03:53.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined +Info 159 [00:03:54.000] Projects: /user/username/projects/myproject/src/tsconfig.json +Info 159 [00:03:55.000] got projects updated in background, updating diagnostics for /user/username/projects/myproject/src/fileA.ts +Info 160 [00:03:56.000] event: {"seq":0,"type":"event","event":"projectsUpdatedInBackground","body":{"openFiles":["/user/username/projects/myproject/src/fileA.ts"]}} After running timeout callbacks @@ -1033,7 +1030,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 164 [00:04:00.000] request: +Info 161 [00:03:57.000] request: { "command": "geterr", "arguments": { @@ -1097,7 +1094,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 165 [00:04:01.000] response: +Info 162 [00:03:58.000] response: { "responseRequired": false } @@ -1127,7 +1124,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 166 [00:04:02.000] event: +Info 163 [00:03:59.000] event: {"seq":0,"type":"event","event":"syntaxDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}} After checking timeout queue length (1) and running @@ -1181,7 +1178,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 167 [00:04:03.000] event: +Info 164 [00:04:00.000] event: {"seq":0,"type":"event","event":"semanticDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[{"start":{"line":1,"offset":21},"end":{"line":1,"offset":34},"text":"The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import(\"./fileB.mjs\")' call instead.\n To convert this file to an ECMAScript module, change its file extension to '.mts' or create a local package.json file with `{ \"type\": \"module\" }`.","code":1479,"category":"error"}]}} Before running immediate callbacks and checking length (1) @@ -1235,9 +1232,9 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 168 [00:04:04.000] event: +Info 165 [00:04:01.000] event: {"seq":0,"type":"event","event":"suggestionDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}} -Info 169 [00:04:05.000] event: +Info 166 [00:04:02.000] event: {"seq":0,"type":"event","event":"requestCompleted","body":{"request_seq":4}} Before running immediate callbacks and checking length (1) @@ -1265,10 +1262,10 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 170 [00:04:06.000] Modify package json file to add type module -Info 171 [00:04:09.000] FileWatcher:: Triggered with /user/username/projects/myproject/package.json 0:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution -Info 172 [00:04:10.000] Scheduled: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation -Info 173 [00:04:11.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/package.json 0:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution +Info 167 [00:04:03.000] Modify package json file to add type module +Info 168 [00:04:06.000] FileWatcher:: Triggered with /user/username/projects/myproject/package.json 0:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution +Info 169 [00:04:07.000] Scheduled: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation +Info 170 [00:04:08.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/package.json 0:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution Before running timeout callbacks //// [/user/username/projects/myproject/package.json] {"name":"app","version":"1.0.0","type":"module"} @@ -1298,9 +1295,9 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 174 [00:04:12.000] Running: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation -Info 175 [00:04:13.000] Scheduled: /user/username/projects/myproject/src/tsconfig.json -Info 176 [00:04:14.000] Scheduled: *ensureProjectForOpenFiles* +Info 171 [00:04:09.000] Running: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation +Info 172 [00:04:10.000] Scheduled: /user/username/projects/myproject/src/tsconfig.json +Info 173 [00:04:11.000] Scheduled: *ensureProjectForOpenFiles* After running timeout callbacks PolledWatches:: @@ -1353,41 +1350,40 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 177 [00:04:15.000] Running: /user/username/projects/myproject/src/tsconfig.json -Info 178 [00:04:16.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json -Info 179 [00:04:17.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. -Info 180 [00:04:18.000] File '/a/package.json' does not exist according to earlier cached lookups. -Info 181 [00:04:19.000] File '/package.json' does not exist according to earlier cached lookups. -Info 182 [00:04:20.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. -Info 183 [00:04:21.000] Found 'package.json' at '/user/username/projects/myproject/package.json'. -Info 184 [00:04:22.000] 'package.json' does not have a 'typesVersions' field. -Info 185 [00:04:23.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. -Info 186 [00:04:24.000] File '/user/username/projects/myproject/package.json' exists according to earlier cached lookups. -Info 187 [00:04:25.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. -Info 188 [00:04:26.000] File '/a/package.json' does not exist according to earlier cached lookups. -Info 189 [00:04:27.000] File '/package.json' does not exist according to earlier cached lookups. -Info 190 [00:04:28.000] FileWatcher:: Close:: WatchInfo: /user/username/projects/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution -Info 191 [00:04:29.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json Version: 5 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms -Info 192 [00:04:30.000] Different program with same set of files -Info 193 [00:04:31.000] Running: *ensureProjectForOpenFiles* -Info 194 [00:04:32.000] Before ensureProjectForOpenFiles: -Info 195 [00:04:33.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) -Info 195 [00:04:34.000] Files (3) - -Info 195 [00:04:35.000] ----------------------------------------------- -Info 195 [00:04:36.000] Open files: -Info 195 [00:04:37.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined -Info 195 [00:04:38.000] Projects: /user/username/projects/myproject/src/tsconfig.json -Info 195 [00:04:39.000] After ensureProjectForOpenFiles: -Info 196 [00:04:40.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) -Info 196 [00:04:41.000] Files (3) - -Info 196 [00:04:42.000] ----------------------------------------------- -Info 196 [00:04:43.000] Open files: -Info 196 [00:04:44.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined -Info 196 [00:04:45.000] Projects: /user/username/projects/myproject/src/tsconfig.json -Info 196 [00:04:46.000] got projects updated in background, updating diagnostics for /user/username/projects/myproject/src/fileA.ts -Info 197 [00:04:47.000] event: +Info 174 [00:04:12.000] Running: /user/username/projects/myproject/src/tsconfig.json +Info 175 [00:04:13.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json +Info 176 [00:04:14.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 177 [00:04:15.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 178 [00:04:16.000] File '/package.json' does not exist according to earlier cached lookups. +Info 179 [00:04:17.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. +Info 180 [00:04:18.000] Found 'package.json' at '/user/username/projects/myproject/package.json'. +Info 181 [00:04:19.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. +Info 182 [00:04:20.000] File '/user/username/projects/myproject/package.json' exists according to earlier cached lookups. +Info 183 [00:04:21.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 184 [00:04:22.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 185 [00:04:23.000] File '/package.json' does not exist according to earlier cached lookups. +Info 186 [00:04:24.000] FileWatcher:: Close:: WatchInfo: /user/username/projects/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution +Info 187 [00:04:25.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json Version: 5 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info 188 [00:04:26.000] Different program with same set of files +Info 189 [00:04:27.000] Running: *ensureProjectForOpenFiles* +Info 190 [00:04:28.000] Before ensureProjectForOpenFiles: +Info 191 [00:04:29.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) +Info 191 [00:04:30.000] Files (3) + +Info 191 [00:04:31.000] ----------------------------------------------- +Info 191 [00:04:32.000] Open files: +Info 191 [00:04:33.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined +Info 191 [00:04:34.000] Projects: /user/username/projects/myproject/src/tsconfig.json +Info 191 [00:04:35.000] After ensureProjectForOpenFiles: +Info 192 [00:04:36.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) +Info 192 [00:04:37.000] Files (3) + +Info 192 [00:04:38.000] ----------------------------------------------- +Info 192 [00:04:39.000] Open files: +Info 192 [00:04:40.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined +Info 192 [00:04:41.000] Projects: /user/username/projects/myproject/src/tsconfig.json +Info 192 [00:04:42.000] got projects updated in background, updating diagnostics for /user/username/projects/myproject/src/fileA.ts +Info 193 [00:04:43.000] event: {"seq":0,"type":"event","event":"projectsUpdatedInBackground","body":{"openFiles":["/user/username/projects/myproject/src/fileA.ts"]}} After running timeout callbacks @@ -1413,7 +1409,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 198 [00:04:48.000] request: +Info 194 [00:04:44.000] request: { "command": "geterr", "arguments": { @@ -1473,7 +1469,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 199 [00:04:49.000] response: +Info 195 [00:04:45.000] response: { "responseRequired": false } @@ -1501,7 +1497,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 200 [00:04:50.000] event: +Info 196 [00:04:46.000] event: {"seq":0,"type":"event","event":"syntaxDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}} After checking timeout queue length (1) and running @@ -1551,7 +1547,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 201 [00:04:51.000] event: +Info 197 [00:04:47.000] event: {"seq":0,"type":"event","event":"semanticDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}} Before running immediate callbacks and checking length (1) @@ -1601,9 +1597,9 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 202 [00:04:52.000] event: +Info 198 [00:04:48.000] event: {"seq":0,"type":"event","event":"suggestionDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}} -Info 203 [00:04:53.000] event: +Info 199 [00:04:49.000] event: {"seq":0,"type":"event","event":"requestCompleted","body":{"request_seq":5}} Before running immediate callbacks and checking length (1) @@ -1629,10 +1625,10 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 204 [00:04:54.000] Delete package.json -Info 205 [00:04:56.000] FileWatcher:: Triggered with /user/username/projects/myproject/package.json 2:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution -Info 206 [00:04:57.000] Scheduled: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation -Info 207 [00:04:58.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/package.json 2:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution +Info 200 [00:04:50.000] Delete package.json +Info 201 [00:04:52.000] FileWatcher:: Triggered with /user/username/projects/myproject/package.json 2:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution +Info 202 [00:04:53.000] Scheduled: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation +Info 203 [00:04:54.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/package.json 2:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution Before running timeout callbacks //// [/user/username/projects/myproject/package.json] deleted @@ -1658,9 +1654,9 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 208 [00:04:59.000] Running: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation -Info 209 [00:05:00.000] Scheduled: /user/username/projects/myproject/src/tsconfig.json -Info 210 [00:05:01.000] Scheduled: *ensureProjectForOpenFiles* +Info 204 [00:04:55.000] Running: /user/username/projects/myproject/src/tsconfig.jsonFailedLookupInvalidation +Info 205 [00:04:56.000] Scheduled: /user/username/projects/myproject/src/tsconfig.json +Info 206 [00:04:57.000] Scheduled: *ensureProjectForOpenFiles* After running timeout callbacks PolledWatches:: @@ -1709,48 +1705,48 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 211 [00:05:02.000] Running: /user/username/projects/myproject/src/tsconfig.json -Info 212 [00:05:03.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json -Info 213 [00:05:04.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. -Info 214 [00:05:05.000] File '/a/package.json' does not exist according to earlier cached lookups. -Info 215 [00:05:06.000] File '/package.json' does not exist according to earlier cached lookups. -Info 216 [00:05:07.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. -Info 217 [00:05:08.000] File '/user/username/projects/myproject/package.json' does not exist. -Info 218 [00:05:09.000] File '/user/username/projects/package.json' does not exist according to earlier cached lookups. -Info 219 [00:05:10.000] File '/user/username/package.json' does not exist according to earlier cached lookups. -Info 220 [00:05:11.000] File '/user/package.json' does not exist according to earlier cached lookups. -Info 221 [00:05:12.000] File '/package.json' does not exist according to earlier cached lookups. -Info 222 [00:05:13.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. -Info 223 [00:05:14.000] File '/user/username/projects/myproject/package.json' does not exist according to earlier cached lookups. -Info 224 [00:05:15.000] File '/user/username/projects/package.json' does not exist according to earlier cached lookups. -Info 225 [00:05:16.000] File '/user/username/package.json' does not exist according to earlier cached lookups. -Info 226 [00:05:17.000] File '/user/package.json' does not exist according to earlier cached lookups. -Info 227 [00:05:18.000] File '/package.json' does not exist according to earlier cached lookups. -Info 228 [00:05:19.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. -Info 229 [00:05:20.000] File '/a/package.json' does not exist according to earlier cached lookups. -Info 230 [00:05:21.000] File '/package.json' does not exist according to earlier cached lookups. -Info 231 [00:05:22.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution -Info 232 [00:05:23.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json Version: 6 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms -Info 233 [00:05:24.000] Different program with same set of files -Info 234 [00:05:25.000] Running: *ensureProjectForOpenFiles* -Info 235 [00:05:26.000] Before ensureProjectForOpenFiles: -Info 236 [00:05:27.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) -Info 236 [00:05:28.000] Files (3) - -Info 236 [00:05:29.000] ----------------------------------------------- -Info 236 [00:05:30.000] Open files: -Info 236 [00:05:31.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined -Info 236 [00:05:32.000] Projects: /user/username/projects/myproject/src/tsconfig.json -Info 236 [00:05:33.000] After ensureProjectForOpenFiles: -Info 237 [00:05:34.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) -Info 237 [00:05:35.000] Files (3) - -Info 237 [00:05:36.000] ----------------------------------------------- -Info 237 [00:05:37.000] Open files: -Info 237 [00:05:38.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined -Info 237 [00:05:39.000] Projects: /user/username/projects/myproject/src/tsconfig.json -Info 237 [00:05:40.000] got projects updated in background, updating diagnostics for /user/username/projects/myproject/src/fileA.ts -Info 238 [00:05:41.000] event: +Info 207 [00:04:58.000] Running: /user/username/projects/myproject/src/tsconfig.json +Info 208 [00:04:59.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json +Info 209 [00:05:00.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 210 [00:05:01.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 211 [00:05:02.000] File '/package.json' does not exist according to earlier cached lookups. +Info 212 [00:05:03.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. +Info 213 [00:05:04.000] File '/user/username/projects/myproject/package.json' does not exist. +Info 214 [00:05:05.000] File '/user/username/projects/package.json' does not exist according to earlier cached lookups. +Info 215 [00:05:06.000] File '/user/username/package.json' does not exist according to earlier cached lookups. +Info 216 [00:05:07.000] File '/user/package.json' does not exist according to earlier cached lookups. +Info 217 [00:05:08.000] File '/package.json' does not exist according to earlier cached lookups. +Info 218 [00:05:09.000] File '/user/username/projects/myproject/src/package.json' does not exist according to earlier cached lookups. +Info 219 [00:05:10.000] File '/user/username/projects/myproject/package.json' does not exist according to earlier cached lookups. +Info 220 [00:05:11.000] File '/user/username/projects/package.json' does not exist according to earlier cached lookups. +Info 221 [00:05:12.000] File '/user/username/package.json' does not exist according to earlier cached lookups. +Info 222 [00:05:13.000] File '/user/package.json' does not exist according to earlier cached lookups. +Info 223 [00:05:14.000] File '/package.json' does not exist according to earlier cached lookups. +Info 224 [00:05:15.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. +Info 225 [00:05:16.000] File '/a/package.json' does not exist according to earlier cached lookups. +Info 226 [00:05:17.000] File '/package.json' does not exist according to earlier cached lookups. +Info 227 [00:05:18.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/package.json 2000 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: File location affecting resolution +Info 228 [00:05:19.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json Version: 6 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info 229 [00:05:20.000] Different program with same set of files +Info 230 [00:05:21.000] Running: *ensureProjectForOpenFiles* +Info 231 [00:05:22.000] Before ensureProjectForOpenFiles: +Info 232 [00:05:23.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) +Info 232 [00:05:24.000] Files (3) + +Info 232 [00:05:25.000] ----------------------------------------------- +Info 232 [00:05:26.000] Open files: +Info 232 [00:05:27.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined +Info 232 [00:05:28.000] Projects: /user/username/projects/myproject/src/tsconfig.json +Info 232 [00:05:29.000] After ensureProjectForOpenFiles: +Info 233 [00:05:30.000] Project '/user/username/projects/myproject/src/tsconfig.json' (Configured) +Info 233 [00:05:31.000] Files (3) + +Info 233 [00:05:32.000] ----------------------------------------------- +Info 233 [00:05:33.000] Open files: +Info 233 [00:05:34.000] FileName: /user/username/projects/myproject/src/fileA.ts ProjectRootPath: undefined +Info 233 [00:05:35.000] Projects: /user/username/projects/myproject/src/tsconfig.json +Info 233 [00:05:36.000] got projects updated in background, updating diagnostics for /user/username/projects/myproject/src/fileA.ts +Info 234 [00:05:37.000] event: {"seq":0,"type":"event","event":"projectsUpdatedInBackground","body":{"openFiles":["/user/username/projects/myproject/src/fileA.ts"]}} After running timeout callbacks @@ -1778,7 +1774,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 239 [00:05:42.000] request: +Info 235 [00:05:38.000] request: { "command": "geterr", "arguments": { @@ -1842,7 +1838,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 240 [00:05:43.000] response: +Info 236 [00:05:39.000] response: { "responseRequired": false } @@ -1872,7 +1868,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 241 [00:05:44.000] event: +Info 237 [00:05:40.000] event: {"seq":0,"type":"event","event":"syntaxDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}} After checking timeout queue length (1) and running @@ -1926,7 +1922,7 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 242 [00:05:45.000] event: +Info 238 [00:05:41.000] event: {"seq":0,"type":"event","event":"semanticDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[{"start":{"line":1,"offset":21},"end":{"line":1,"offset":34},"text":"The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import(\"./fileB.mjs\")' call instead.\n To convert this file to an ECMAScript module, change its file extension to '.mts' or create a local package.json file with `{ \"type\": \"module\" }`.","code":1479,"category":"error"}]}} Before running immediate callbacks and checking length (1) @@ -1980,9 +1976,9 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} -Info 243 [00:05:46.000] event: +Info 239 [00:05:42.000] event: {"seq":0,"type":"event","event":"suggestionDiag","body":{"file":"/user/username/projects/myproject/src/fileA.ts","diagnostics":[]}} -Info 244 [00:05:47.000] event: +Info 240 [00:05:43.000] event: {"seq":0,"type":"event","event":"requestCompleted","body":{"request_seq":6}} Before running immediate callbacks and checking length (1) diff --git a/tests/baselines/reference/typesVersions.ambientModules.trace.json b/tests/baselines/reference/typesVersions.ambientModules.trace.json index 9fb62da4c4b93..5822e87dda5ad 100644 --- a/tests/baselines/reference/typesVersions.ambientModules.trace.json +++ b/tests/baselines/reference/typesVersions.ambientModules.trace.json @@ -3,10 +3,10 @@ "Module resolution kind is not specified, using 'NodeJs'.", "Loading module 'ext' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Found 'package.json' at 'tests/cases/conformance/moduleResolution/node_modules/ext/package.json'.", - "'package.json' has a 'typesVersions' field with version-specific path mappings.", "File 'tests/cases/conformance/moduleResolution/node_modules/ext.ts' does not exist.", "File 'tests/cases/conformance/moduleResolution/node_modules/ext.tsx' does not exist.", "File 'tests/cases/conformance/moduleResolution/node_modules/ext.d.ts' does not exist.", + "'package.json' has a 'typesVersions' field with version-specific path mappings.", "'package.json' does not have a 'typings' field.", "'package.json' has 'types' field 'index' that references 'tests/cases/conformance/moduleResolution/node_modules/ext/index'.", "'package.json' has a 'typesVersions' entry '>=3.1.0-0' that matches compiler version '3.1.0-dev', looking for a pattern to match module name 'index'.", diff --git a/tests/baselines/reference/typesVersions.multiFile.trace.json b/tests/baselines/reference/typesVersions.multiFile.trace.json index 3f1bb17771930..c5bc431405bc5 100644 --- a/tests/baselines/reference/typesVersions.multiFile.trace.json +++ b/tests/baselines/reference/typesVersions.multiFile.trace.json @@ -3,10 +3,10 @@ "Module resolution kind is not specified, using 'NodeJs'.", "Loading module 'ext' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Found 'package.json' at 'tests/cases/conformance/moduleResolution/node_modules/ext/package.json'.", - "'package.json' has a 'typesVersions' field with version-specific path mappings.", "File 'tests/cases/conformance/moduleResolution/node_modules/ext.ts' does not exist.", "File 'tests/cases/conformance/moduleResolution/node_modules/ext.tsx' does not exist.", "File 'tests/cases/conformance/moduleResolution/node_modules/ext.d.ts' does not exist.", + "'package.json' has a 'typesVersions' field with version-specific path mappings.", "'package.json' does not have a 'typings' field.", "'package.json' has 'types' field 'index' that references 'tests/cases/conformance/moduleResolution/node_modules/ext/index'.", "'package.json' has a 'typesVersions' entry '>=3.1.0-0' that matches compiler version '3.1.0-dev', looking for a pattern to match module name 'index'.", diff --git a/tests/baselines/reference/typesVersionsDeclarationEmit.ambient.trace.json b/tests/baselines/reference/typesVersionsDeclarationEmit.ambient.trace.json index 4f61bb9906663..4f58ad8cbb1a8 100644 --- a/tests/baselines/reference/typesVersionsDeclarationEmit.ambient.trace.json +++ b/tests/baselines/reference/typesVersionsDeclarationEmit.ambient.trace.json @@ -3,10 +3,10 @@ "Module resolution kind is not specified, using 'NodeJs'.", "Loading module 'ext' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Found 'package.json' at 'tests/cases/conformance/declarationEmit/node_modules/ext/package.json'.", - "'package.json' has a 'typesVersions' field with version-specific path mappings.", "File 'tests/cases/conformance/declarationEmit/node_modules/ext.ts' does not exist.", "File 'tests/cases/conformance/declarationEmit/node_modules/ext.tsx' does not exist.", "File 'tests/cases/conformance/declarationEmit/node_modules/ext.d.ts' does not exist.", + "'package.json' has a 'typesVersions' field with version-specific path mappings.", "'package.json' does not have a 'typings' field.", "'package.json' has 'types' field 'index' that references 'tests/cases/conformance/declarationEmit/node_modules/ext/index'.", "'package.json' has a 'typesVersions' entry '>=3.1.0-0' that matches compiler version '3.1.0-dev', looking for a pattern to match module name 'index'.", diff --git a/tests/baselines/reference/typesVersionsDeclarationEmit.multiFile.trace.json b/tests/baselines/reference/typesVersionsDeclarationEmit.multiFile.trace.json index d178f7d9e7686..90fb4f4bcd635 100644 --- a/tests/baselines/reference/typesVersionsDeclarationEmit.multiFile.trace.json +++ b/tests/baselines/reference/typesVersionsDeclarationEmit.multiFile.trace.json @@ -3,10 +3,10 @@ "Module resolution kind is not specified, using 'NodeJs'.", "Loading module 'ext' from 'node_modules' folder, target file types: TypeScript, Declaration.", "Found 'package.json' at 'tests/cases/conformance/declarationEmit/node_modules/ext/package.json'.", - "'package.json' has a 'typesVersions' field with version-specific path mappings.", "File 'tests/cases/conformance/declarationEmit/node_modules/ext.ts' does not exist.", "File 'tests/cases/conformance/declarationEmit/node_modules/ext.tsx' does not exist.", "File 'tests/cases/conformance/declarationEmit/node_modules/ext.d.ts' does not exist.", + "'package.json' has a 'typesVersions' field with version-specific path mappings.", "'package.json' does not have a 'typings' field.", "'package.json' has 'types' field 'index' that references 'tests/cases/conformance/declarationEmit/node_modules/ext/index'.", "'package.json' has a 'typesVersions' entry '>=3.1.0-0' that matches compiler version '3.1.0-dev', looking for a pattern to match module name 'index'.", diff --git a/tests/baselines/reference/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.trace.json b/tests/baselines/reference/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.trace.json index 9ef935090529a..4df7dc944eeb1 100644 --- a/tests/baselines/reference/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.trace.json +++ b/tests/baselines/reference/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.trace.json @@ -6,7 +6,6 @@ "File 'tests/cases/conformance/declarationEmit/node_modules/ext/other.tsx' does not exist.", "File 'tests/cases/conformance/declarationEmit/node_modules/ext/other.d.ts' exist - use it as a name resolution result.", "Found 'package.json' at 'tests/cases/conformance/declarationEmit/node_modules/ext/package.json'.", - "'package.json' has a 'typesVersions' field with version-specific path mappings.", "======== Module name '../other' was successfully resolved to 'tests/cases/conformance/declarationEmit/node_modules/ext/other.d.ts' with Package ID 'ext/other.d.ts@1.0.0'. ========", "======== Resolving module 'ext' from 'tests/cases/conformance/declarationEmit/main.ts'. ========", "Module resolution kind is not specified, using 'NodeJs'.", @@ -15,6 +14,7 @@ "File 'tests/cases/conformance/declarationEmit/node_modules/ext.ts' does not exist.", "File 'tests/cases/conformance/declarationEmit/node_modules/ext.tsx' does not exist.", "File 'tests/cases/conformance/declarationEmit/node_modules/ext.d.ts' does not exist.", + "'package.json' has a 'typesVersions' field with version-specific path mappings.", "'package.json' does not have a 'typings' field.", "'package.json' has 'types' field 'index' that references 'tests/cases/conformance/declarationEmit/node_modules/ext/index'.", "'package.json' has a 'typesVersions' entry '>=3.1.0-0' that matches compiler version '3.1.0-dev', looking for a pattern to match module name 'index'.", diff --git a/tests/baselines/reference/typingsLookup4.trace.json b/tests/baselines/reference/typingsLookup4.trace.json index cc7c9b824dbd3..1f482d4e02062 100644 --- a/tests/baselines/reference/typingsLookup4.trace.json +++ b/tests/baselines/reference/typingsLookup4.trace.json @@ -6,8 +6,8 @@ "File '/node_modules/jquery.tsx' does not exist.", "File '/node_modules/jquery.d.ts' does not exist.", "Found 'package.json' at '/node_modules/@types/jquery/package.json'.", - "'package.json' does not have a 'typesVersions' field.", "File '/node_modules/@types/jquery.d.ts' does not exist.", + "'package.json' does not have a 'typesVersions' field.", "'package.json' has 'typings' field 'jquery.d.ts' that references '/node_modules/@types/jquery/jquery.d.ts'.", "File '/node_modules/@types/jquery/jquery.d.ts' exist - use it as a name resolution result.", "Resolving real path for '/node_modules/@types/jquery/jquery.d.ts', result '/node_modules/@types/jquery/jquery.d.ts'.", @@ -19,8 +19,8 @@ "File '/node_modules/kquery.tsx' does not exist.", "File '/node_modules/kquery.d.ts' does not exist.", "Found 'package.json' at '/node_modules/@types/kquery/package.json'.", - "'package.json' does not have a 'typesVersions' field.", "File '/node_modules/@types/kquery.d.ts' does not exist.", + "'package.json' does not have a 'typesVersions' field.", "'package.json' has 'typings' field 'kquery' that references '/node_modules/@types/kquery/kquery'.", "File '/node_modules/@types/kquery/kquery' does not exist.", "Loading module as file / folder, candidate module location '/node_modules/@types/kquery/kquery', target file types: TypeScript, Declaration.", @@ -36,8 +36,8 @@ "File '/node_modules/lquery.tsx' does not exist.", "File '/node_modules/lquery.d.ts' does not exist.", "Found 'package.json' at '/node_modules/@types/lquery/package.json'.", - "'package.json' does not have a 'typesVersions' field.", "File '/node_modules/@types/lquery.d.ts' does not exist.", + "'package.json' does not have a 'typesVersions' field.", "'package.json' has 'typings' field 'lquery' that references '/node_modules/@types/lquery/lquery'.", "File '/node_modules/@types/lquery/lquery' does not exist.", "Loading module as file / folder, candidate module location '/node_modules/@types/lquery/lquery', target file types: TypeScript, Declaration.", @@ -51,8 +51,8 @@ "File '/node_modules/mquery.tsx' does not exist.", "File '/node_modules/mquery.d.ts' does not exist.", "Found 'package.json' at '/node_modules/@types/mquery/package.json'.", - "'package.json' does not have a 'typesVersions' field.", "File '/node_modules/@types/mquery.d.ts' does not exist.", + "'package.json' does not have a 'typesVersions' field.", "'package.json' has 'typings' field 'mquery' that references '/node_modules/@types/mquery/mquery'.", "File '/node_modules/@types/mquery/mquery' does not exist.", "Loading module as file / folder, candidate module location '/node_modules/@types/mquery/mquery', target file types: TypeScript, Declaration.",