diff --git a/src/compiler/moduleNameResolver.ts b/src/compiler/moduleNameResolver.ts index 75dd9a5465764..76b77dec3f1a1 100644 --- a/src/compiler/moduleNameResolver.ts +++ b/src/compiler/moduleNameResolver.ts @@ -2618,8 +2618,8 @@ function loadModuleFromExports(scope: PackageJsonInfo, extensions: Extensions, s mainExport = (scope.contents.packageJsonContent.exports as MapLike)["."]; } if (mainExport) { - const loadModuleFromTargetImportOrExport = getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, subpath, scope, /*isImports*/ false); - return loadModuleFromTargetImportOrExport(mainExport, "", /*pattern*/ false, "."); + const loadModuleFromTargetExportOrImport = getLoadModuleFromTargetExportOrImport(extensions, state, cache, redirectedReference, subpath, scope, /*isImports*/ false); + return loadModuleFromTargetExportOrImport(mainExport, "", /*pattern*/ false, "."); } } else if (allKeysStartWithDot(scope.contents.packageJsonContent.exports as MapLike)) { @@ -2629,7 +2629,7 @@ function loadModuleFromExports(scope: PackageJsonInfo, extensions: Extensions, s } return toSearchResult(/*value*/ undefined); } - const result = loadModuleFromImportsOrExports(extensions, state, cache, redirectedReference, subpath, scope.contents.packageJsonContent.exports, scope, /*isImports*/ false); + const result = loadModuleFromExportsOrImports(extensions, state, cache, redirectedReference, subpath, scope.contents.packageJsonContent.exports, scope, /*isImports*/ false); if (result) { return result; } @@ -2663,7 +2663,7 @@ function loadModuleFromImports(extensions: Extensions, moduleName: string, direc return toSearchResult(/*value*/ undefined); } - const result = loadModuleFromImportsOrExports(extensions, state, cache, redirectedReference, moduleName, scope.contents.packageJsonContent.imports, scope, /*isImports*/ true); + const result = loadModuleFromExportsOrImports(extensions, state, cache, redirectedReference, moduleName, scope.contents.packageJsonContent.imports, scope, /*isImports*/ true); if (result) { return result; } @@ -2693,30 +2693,30 @@ export function comparePatternKeys(a: string, b: string): Comparison { return Comparison.EqualTo; } -function loadModuleFromImportsOrExports(extensions: Extensions, state: ModuleResolutionState, cache: ModuleResolutionCache | undefined, redirectedReference: ResolvedProjectReference | undefined, moduleName: string, lookupTable: object, scope: PackageJsonInfo, isImports: boolean): SearchResult | undefined { - const loadModuleFromTargetImportOrExport = getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, moduleName, scope, isImports); +function loadModuleFromExportsOrImports(extensions: Extensions, state: ModuleResolutionState, cache: ModuleResolutionCache | undefined, redirectedReference: ResolvedProjectReference | undefined, moduleName: string, lookupTable: object, scope: PackageJsonInfo, isImports: boolean): SearchResult | undefined { + const loadModuleFromTargetExportOrImport = getLoadModuleFromTargetExportOrImport(extensions, state, cache, redirectedReference, moduleName, scope, isImports); if (!endsWith(moduleName, directorySeparator) && !moduleName.includes("*") && hasProperty(lookupTable, moduleName)) { - const target = (lookupTable as { [idx: string]: unknown; })[moduleName]; - return loadModuleFromTargetImportOrExport(target, /*subpath*/ "", /*pattern*/ false, moduleName); + const target = (lookupTable as MapLike)[moduleName]; + return loadModuleFromTargetExportOrImport(target, /*subpath*/ "", /*pattern*/ false, moduleName); } const expandingKeys = toSorted(filter(getOwnKeys(lookupTable as MapLike), k => hasOneAsterisk(k) || endsWith(k, "/")), comparePatternKeys); for (const potentialTarget of expandingKeys) { if (state.features & NodeResolutionFeatures.ExportsPatternTrailers && matchesPatternWithTrailer(potentialTarget, moduleName)) { - const target = (lookupTable as { [idx: string]: unknown; })[potentialTarget]; + const target = (lookupTable as MapLike)[potentialTarget]; const starPos = potentialTarget.indexOf("*"); const subpath = moduleName.substring(potentialTarget.substring(0, starPos).length, moduleName.length - (potentialTarget.length - 1 - starPos)); - return loadModuleFromTargetImportOrExport(target, subpath, /*pattern*/ true, potentialTarget); + return loadModuleFromTargetExportOrImport(target, subpath, /*pattern*/ true, potentialTarget); } else if (endsWith(potentialTarget, "*") && startsWith(moduleName, potentialTarget.substring(0, potentialTarget.length - 1))) { - const target = (lookupTable as { [idx: string]: unknown; })[potentialTarget]; + const target = (lookupTable as MapLike)[potentialTarget]; const subpath = moduleName.substring(potentialTarget.length - 1); - return loadModuleFromTargetImportOrExport(target, subpath, /*pattern*/ true, potentialTarget); + return loadModuleFromTargetExportOrImport(target, subpath, /*pattern*/ true, potentialTarget); } else if (startsWith(moduleName, potentialTarget)) { - const target = (lookupTable as { [idx: string]: unknown; })[potentialTarget]; + const target = (lookupTable as MapLike)[potentialTarget]; const subpath = moduleName.substring(potentialTarget.length); - return loadModuleFromTargetImportOrExport(target, subpath, /*pattern*/ false, potentialTarget); + return loadModuleFromTargetExportOrImport(target, subpath, /*pattern*/ false, potentialTarget); } } @@ -2736,9 +2736,9 @@ function hasOneAsterisk(patternKey: string): boolean { /** * Gets the self-recursive function specialized to retrieving the targeted import/export element for the given resolution configuration */ -function getLoadModuleFromTargetImportOrExport(extensions: Extensions, state: ModuleResolutionState, cache: ModuleResolutionCache | undefined, redirectedReference: ResolvedProjectReference | undefined, moduleName: string, scope: PackageJsonInfo, isImports: boolean) { - return loadModuleFromTargetImportOrExport; - function loadModuleFromTargetImportOrExport(target: unknown, subpath: string, pattern: boolean, key: string): SearchResult | undefined { +function getLoadModuleFromTargetExportOrImport(extensions: Extensions, state: ModuleResolutionState, cache: ModuleResolutionCache | undefined, redirectedReference: ResolvedProjectReference | undefined, moduleName: string, scope: PackageJsonInfo, isImports: boolean) { + return loadModuleFromTargetExportOrImport; + function loadModuleFromTargetExportOrImport(target: unknown, subpath: string, pattern: boolean, key: string): SearchResult | undefined { if (typeof target === "string") { if (!pattern && subpath.length > 0 && !endsWith(target, "/")) { if (state.traceEnabled) { @@ -2801,7 +2801,7 @@ function getLoadModuleFromTargetImportOrExport(extensions: Extensions, state: Mo if (condition === "default" || state.conditions.includes(condition) || isApplicableVersionedTypesKey(state.conditions, condition)) { traceIfEnabled(state, Diagnostics.Matched_0_condition_1, isImports ? "imports" : "exports", condition); const subTarget = (target as MapLike)[condition]; - const result = loadModuleFromTargetImportOrExport(subTarget, subpath, pattern, key); + const result = loadModuleFromTargetExportOrImport(subTarget, subpath, pattern, key); if (result) { traceIfEnabled(state, Diagnostics.Resolved_under_condition_0, condition); traceIfEnabled(state, Diagnostics.Exiting_conditional_exports); @@ -2826,7 +2826,7 @@ function getLoadModuleFromTargetImportOrExport(extensions: Extensions, state: Mo return toSearchResult(/*value*/ undefined); } for (const elem of target) { - const result = loadModuleFromTargetImportOrExport(elem, subpath, pattern, key); + const result = loadModuleFromTargetExportOrImport(elem, subpath, pattern, key); if (result) { return result; } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index bca500343b4fd..3a9c7c32685a4 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -201,6 +201,7 @@ import { getParseTreeNode, getPathComponents, getPathFromPathComponents, + getRelativePathFromDirectory, getRelativePathToDirectoryOrUrl, getResolutionModeOverride, getRootLength, @@ -496,6 +497,7 @@ import { ResolvedModuleWithFailedLookupLocations, ResolvedTypeReferenceDirective, ResolvedTypeReferenceDirectiveWithFailedLookupLocations, + resolvePath, returnFalse, ReturnStatement, returnUndefined, @@ -6493,6 +6495,21 @@ export function getPossibleOriginalInputExtensionForExtension(path: string): Ext [Extension.Tsx, Extension.Ts, Extension.Jsx, Extension.Js]; } +/** @internal */ +export function getPossibleOriginalInputPathWithoutChangingExt( + filePath: string, + ignoreCase: boolean, + outputDir: string | undefined, + getCommonSourceDirectory: () => string, +): string { + return outputDir ? + resolvePath( + getCommonSourceDirectory(), + getRelativePathFromDirectory(outputDir, filePath, ignoreCase), + ) : + filePath; +} + /** * Returns 'undefined' if and only if 'options.paths' is undefined. * diff --git a/src/harness/vfsUtil.ts b/src/harness/vfsUtil.ts index 1995d79ab6da0..4799927a70a14 100644 --- a/src/harness/vfsUtil.ts +++ b/src/harness/vfsUtil.ts @@ -1148,7 +1148,7 @@ export class FileSystem { for (const key of Object.keys(files)) { const value = normalizeFileSetEntry(files[key]); const path = dirname ? vpath.resolve(dirname, key) : key; - vpath.validate(path, vpath.ValidationFlags.Absolute); + vpath.validate(path, vpath.ValidationFlags.Absolute | vpath.ValidationFlags.AllowWildcard); // eslint-disable-next-line no-restricted-syntax if (value === null || value === undefined || value instanceof Rmdir || value instanceof Unlink) { diff --git a/src/services/stringCompletions.ts b/src/services/stringCompletions.ts index 7c41dd5e103cf..9a9e108c20fc8 100644 --- a/src/services/stringCompletions.ts +++ b/src/services/stringCompletions.ts @@ -27,9 +27,11 @@ import { CompletionEntry, CompletionEntryDetails, CompletionInfo, + concatenate, contains, containsPath, ContextFlags, + createModuleSpecifierResolutionHost, createSortedArray, createTextSpan, createTextSpanFromStringLiteralLikeContent, @@ -66,8 +68,11 @@ import { getPackageJsonTypesVersionsPaths, getPathComponents, getPathsBasePath, + getPossibleOriginalInputExtensionForExtension, + getPossibleOriginalInputPathWithoutChangingExt, getReplacementSpanForContextToken, getResolvePackageJsonExports, + getResolvePackageJsonImports, getSupportedExtensions, getSupportedExtensionsWithJsonIfResolveJsonModule, getTextOfJsxAttributeName, @@ -77,6 +82,7 @@ import { hasProperty, hasTrailingDirectorySeparator, hostGetCanonicalFileName, + hostUsesCaseSensitiveFileNames, ImportOrExportSpecifier, IndexedAccessTypeNode, InternalSymbolName, @@ -109,6 +115,7 @@ import { moduleExportNameTextEscaped, moduleResolutionUsesNodeModules, ModuleSpecifierEnding, + ModuleSpecifierResolutionHost, moduleSpecifiers, newCaseClauseTracker, Node, @@ -200,7 +207,7 @@ export function getStringLiteralCompletions( includeSymbol: boolean, ): CompletionInfo | undefined { if (isInReferenceComment(sourceFile, position)) { - const entries = getTripleSlashReferenceCompletion(sourceFile, position, program, host); + const entries = getTripleSlashReferenceCompletion(sourceFile, position, program, host, createModuleSpecifierResolutionHost(program, host)); return entries && convertPathCompletions(entries); } if (isInString(sourceFile, position, contextToken)) { @@ -641,11 +648,12 @@ function getStringLiteralCompletionsFromModuleNamesWorker(sourceFile: SourceFile const scriptDirectory = getDirectoryPath(scriptPath); const compilerOptions = program.getCompilerOptions(); const typeChecker = program.getTypeChecker(); + const moduleSpecifierResolutionHost = createModuleSpecifierResolutionHost(program, host); const extensionOptions = getExtensionOptions(compilerOptions, ReferenceKind.ModuleSpecifier, sourceFile, typeChecker, preferences, mode); return isPathRelativeToScript(literalValue) || !compilerOptions.baseUrl && !compilerOptions.paths && (isRootedDiskPath(literalValue) || isUrl(literalValue)) - ? getCompletionEntriesForRelativeModules(literalValue, scriptDirectory, program, host, scriptPath, extensionOptions) - : getCompletionEntriesForNonRelativeModules(literalValue, scriptDirectory, mode, program, host, extensionOptions); + ? getCompletionEntriesForRelativeModules(literalValue, scriptDirectory, program, host, moduleSpecifierResolutionHost, scriptPath, extensionOptions) + : getCompletionEntriesForNonRelativeModules(literalValue, scriptDirectory, mode, program, host, moduleSpecifierResolutionHost, extensionOptions); } interface ExtensionOptions { @@ -665,7 +673,7 @@ function getExtensionOptions(compilerOptions: CompilerOptions, referenceKind: Re resolutionMode, }; } -function getCompletionEntriesForRelativeModules(literalValue: string, scriptDirectory: string, program: Program, host: LanguageServiceHost, scriptPath: Path, extensionOptions: ExtensionOptions) { +function getCompletionEntriesForRelativeModules(literalValue: string, scriptDirectory: string, program: Program, host: LanguageServiceHost, moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost, scriptPath: Path, extensionOptions: ExtensionOptions) { const compilerOptions = program.getCompilerOptions(); if (compilerOptions.rootDirs) { return getCompletionEntriesForDirectoryFragmentWithRootDirs( @@ -675,11 +683,12 @@ function getCompletionEntriesForRelativeModules(literalValue: string, scriptDire extensionOptions, program, host, + moduleSpecifierResolutionHost, scriptPath, ); } else { - return arrayFrom(getCompletionEntriesForDirectoryFragment(literalValue, scriptDirectory, extensionOptions, program, host, /*moduleSpecifierIsRelative*/ true, scriptPath).values()); + return arrayFrom(getCompletionEntriesForDirectoryFragment(literalValue, scriptDirectory, extensionOptions, program, host, moduleSpecifierResolutionHost, /*moduleSpecifierIsRelative*/ true, scriptPath).values()); } } @@ -717,13 +726,13 @@ function getBaseDirectoriesFromRootDirs(rootDirs: string[], basePath: string, sc ); } -function getCompletionEntriesForDirectoryFragmentWithRootDirs(rootDirs: string[], fragment: string, scriptDirectory: string, extensionOptions: ExtensionOptions, program: Program, host: LanguageServiceHost, exclude: string): readonly NameAndKind[] { +function getCompletionEntriesForDirectoryFragmentWithRootDirs(rootDirs: string[], fragment: string, scriptDirectory: string, extensionOptions: ExtensionOptions, program: Program, host: LanguageServiceHost, moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost, exclude: string): readonly NameAndKind[] { const compilerOptions = program.getCompilerOptions(); const basePath = compilerOptions.project || host.getCurrentDirectory(); const ignoreCase = !(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames()); const baseDirectories = getBaseDirectoriesFromRootDirs(rootDirs, basePath, scriptDirectory, ignoreCase); return deduplicate( - flatMap(baseDirectories, baseDirectory => arrayFrom(getCompletionEntriesForDirectoryFragment(fragment, baseDirectory, extensionOptions, program, host, /*moduleSpecifierIsRelative*/ true, exclude).values())), + flatMap(baseDirectories, baseDirectory => arrayFrom(getCompletionEntriesForDirectoryFragment(fragment, baseDirectory, extensionOptions, program, host, moduleSpecifierResolutionHost, /*moduleSpecifierIsRelative*/ true, exclude).values())), (itemA, itemB) => itemA.name === itemB.name && itemA.kind === itemB.kind && itemA.extension === itemB.extension, ); } @@ -741,6 +750,7 @@ function getCompletionEntriesForDirectoryFragment( extensionOptions: ExtensionOptions, program: Program, host: LanguageServiceHost, + moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost, moduleSpecifierIsRelative: boolean, exclude?: string, result = createNameAndKindSet(), @@ -779,7 +789,7 @@ function getCompletionEntriesForDirectoryFragment( if (versionPaths) { const packageDirectory = getDirectoryPath(packageJsonPath); const pathInPackage = absolutePath.slice(ensureTrailingDirectorySeparator(packageDirectory).length); - if (addCompletionEntriesFromPaths(result, pathInPackage, packageDirectory, extensionOptions, program, host, versionPaths)) { + if (addCompletionEntriesFromPaths(result, pathInPackage, packageDirectory, extensionOptions, program, host, moduleSpecifierResolutionHost, versionPaths)) { // A true result means one of the `versionPaths` was matched, which will block relative resolution // to files and folders from here. All reachable paths given the pattern match are already added. return result; @@ -802,7 +812,7 @@ function getCompletionEntriesForDirectoryFragment( continue; } - const { name, extension } = getFilenameWithExtensionOption(getBaseFileName(filePath), program, extensionOptions, /*isExportsWildcard*/ false); + const { name, extension } = getFilenameWithExtensionOption(getBaseFileName(filePath), program, extensionOptions, /*isExportsOrImportsWildcard*/ false); result.add(nameAndKind(name, ScriptElementKind.scriptElement, extension)); } } @@ -822,7 +832,7 @@ function getCompletionEntriesForDirectoryFragment( return result; } -function getFilenameWithExtensionOption(name: string, program: Program, extensionOptions: ExtensionOptions, isExportsWildcard: boolean): { name: string; extension: Extension | undefined; } { +function getFilenameWithExtensionOption(name: string, program: Program, extensionOptions: ExtensionOptions, isExportsOrImportsWildcard: boolean): { name: string; extension: Extension | undefined; } { const nonJsResult = moduleSpecifiers.tryGetRealFileNameForNonJsDeclarationFileName(name); if (nonJsResult) { return { name: nonJsResult, extension: tryGetExtensionFromPath(nonJsResult) }; @@ -838,7 +848,7 @@ function getFilenameWithExtensionOption(name: string, program: Program, extensio extensionOptions.importingSourceFile, ).getAllowedEndingsInPreferredOrder(extensionOptions.resolutionMode); - if (isExportsWildcard) { + if (isExportsOrImportsWildcard) { // If we're completing `import {} from "foo/|"` and subpaths are available via `"exports": { "./*": "./src/*" }`, // the completion must be a (potentially extension-swapped) file name. Dropping extensions and index files is not allowed. allowedEndings = allowedEndings.filter(e => e !== ModuleSpecifierEnding.Minimal && e !== ModuleSpecifierEnding.Index); @@ -855,7 +865,7 @@ function getFilenameWithExtensionOption(name: string, program: Program, extensio } if ( - !isExportsWildcard && + !isExportsOrImportsWildcard && (allowedEndings[0] === ModuleSpecifierEnding.Minimal || allowedEndings[0] === ModuleSpecifierEnding.Index) && fileExtensionIsOneOf(name, [Extension.Js, Extension.Jsx, Extension.Ts, Extension.Tsx, Extension.Dts]) ) { @@ -876,6 +886,7 @@ function addCompletionEntriesFromPaths( extensionOptions: ExtensionOptions, program: Program, host: LanguageServiceHost, + moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost, paths: MapLike, ) { const getPatternsForKey = (key: string) => paths[key]; @@ -886,18 +897,20 @@ function addCompletionEntriesFromPaths( const lengthB = typeof patternB === "object" ? patternB.prefix.length : b.length; return compareValues(lengthB, lengthA); }; - return addCompletionEntriesFromPathsOrExports(result, /*isExports*/ false, fragment, baseDirectory, extensionOptions, program, host, getOwnKeys(paths), getPatternsForKey, comparePaths); + return addCompletionEntriesFromPathsOrExportsOrImports(result, /*isExports*/ false, /*isImports*/ false, fragment, baseDirectory, extensionOptions, program, host, moduleSpecifierResolutionHost, getOwnKeys(paths), getPatternsForKey, comparePaths); } /** @returns whether `fragment` was a match for any `paths` (which should indicate whether any other path completions should be offered) */ -function addCompletionEntriesFromPathsOrExports( +function addCompletionEntriesFromPathsOrExportsOrImports( result: NameAndKindSet, isExports: boolean, + isImports: boolean, fragment: string, baseDirectory: string, extensionOptions: ExtensionOptions, program: Program, host: LanguageServiceHost, + moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost, keys: readonly string[], getPatternsForKey: (key: string) => string[] | undefined, comparePaths: (a: string, b: string) => Comparison, @@ -906,13 +919,15 @@ function addCompletionEntriesFromPathsOrExports( let matchedPath: string | undefined; for (const key of keys) { if (key === ".") continue; - const keyWithoutLeadingDotSlash = key.replace(/^\.\//, ""); // remove leading "./" + const keyWithoutLeadingDotSlash = key + .replace(/^\.\//, "") // remove leading "./" + + ((isExports || isImports) && endsWith(key, "/") ? "*" : ""); // normalize trailing `/` to `/*` const patterns = getPatternsForKey(key); if (patterns) { const pathPattern = tryParsePattern(keyWithoutLeadingDotSlash); if (!pathPattern) continue; const isMatch = typeof pathPattern === "object" && isPatternMatch(pathPattern, fragment); - const isLongestMatch = isMatch && (matchedPath === undefined || comparePaths(key, matchedPath) === Comparison.LessThan); + const isLongestMatch = isMatch && (matchedPath === undefined || comparePaths(keyWithoutLeadingDotSlash, matchedPath) === Comparison.LessThan); if (isLongestMatch) { // If this is a higher priority match than anything we've seen so far, previous results from matches are invalid, e.g. // for `import {} from "some-package/|"` with a typesVersions: @@ -925,13 +940,13 @@ function addCompletionEntriesFromPathsOrExports( // added by the '*' match, after typing `"some-package/foo/|"` we would get file results from both // ./dist/foo and ./foo, when only the latter will actually be resolvable. // See pathCompletionsTypesVersionsWildcard6.ts. - matchedPath = key; + matchedPath = keyWithoutLeadingDotSlash; pathResults = pathResults.filter(r => !r.matchedPattern); } - if (typeof pathPattern === "string" || matchedPath === undefined || comparePaths(key, matchedPath) !== Comparison.GreaterThan) { + if (typeof pathPattern === "string" || matchedPath === undefined || comparePaths(keyWithoutLeadingDotSlash, matchedPath) !== Comparison.GreaterThan) { pathResults.push({ matchedPattern: isMatch, - results: getCompletionsForPathMapping(keyWithoutLeadingDotSlash, patterns, fragment, baseDirectory, extensionOptions, isExports && isMatch, program, host) + results: getCompletionsForPathMapping(keyWithoutLeadingDotSlash, patterns, fragment, baseDirectory, extensionOptions, isExports, isImports, program, host, moduleSpecifierResolutionHost) .map(({ name, kind, extension }) => nameAndKind(name, kind, extension)), }); } @@ -955,6 +970,7 @@ function getCompletionEntriesForNonRelativeModules( mode: ResolutionMode, program: Program, host: LanguageServiceHost, + moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost, extensionOptions: ExtensionOptions, ): readonly NameAndKind[] { const typeChecker = program.getTypeChecker(); @@ -966,12 +982,12 @@ function getCompletionEntriesForNonRelativeModules( if (baseUrl) { const absolute = normalizePath(combinePaths(host.getCurrentDirectory(), baseUrl)); - getCompletionEntriesForDirectoryFragment(fragment, absolute, extensionOptions, program, host, /*moduleSpecifierIsRelative*/ false, /*exclude*/ undefined, result); + getCompletionEntriesForDirectoryFragment(fragment, absolute, extensionOptions, program, host, moduleSpecifierResolutionHost, /*moduleSpecifierIsRelative*/ false, /*exclude*/ undefined, result); } if (paths) { const absolute = getPathsBasePath(compilerOptions, host)!; - addCompletionEntriesFromPaths(result, fragment, absolute, extensionOptions, program, host, paths); + addCompletionEntriesFromPaths(result, fragment, absolute, extensionOptions, program, host, moduleSpecifierResolutionHost, paths); } const fragmentDirectory = getFragmentDirectory(fragment); @@ -979,7 +995,7 @@ function getCompletionEntriesForNonRelativeModules( result.add(nameAndKind(ambientName, ScriptElementKind.externalModuleName, /*extension*/ undefined)); } - getCompletionEntriesFromTypings(host, program, scriptPath, fragmentDirectory, extensionOptions, result); + getCompletionEntriesFromTypings(program, host, moduleSpecifierResolutionHost, scriptPath, fragmentDirectory, extensionOptions, result); if (moduleResolutionUsesNodeModules(moduleResolution)) { // If looking for a global package name, don't just include everything in `node_modules` because that includes dependencies' own dependencies. @@ -995,56 +1011,55 @@ function getCompletionEntriesForNonRelativeModules( } } if (!foundGlobal) { + const resolvePackageJsonExports = getResolvePackageJsonExports(compilerOptions); + const resolvePackageJsonImports = getResolvePackageJsonImports(compilerOptions); + let seenPackageScope = false; + + const importsLookup = (directory: string) => { + if (resolvePackageJsonImports && !seenPackageScope) { + const packageFile = combinePaths(directory, "package.json"); + if (seenPackageScope = tryFileExists(host, packageFile)) { + const packageJson = readJson(packageFile, host); + exportsOrImportsLookup((packageJson as MapLike).imports, fragment, directory, /*isExports*/ false, /*isImports*/ true); + } + } + }; + let ancestorLookup: (directory: string) => void | undefined = ancestor => { const nodeModules = combinePaths(ancestor, "node_modules"); if (tryDirectoryExists(host, nodeModules)) { - getCompletionEntriesForDirectoryFragment(fragment, nodeModules, extensionOptions, program, host, /*moduleSpecifierIsRelative*/ false, /*exclude*/ undefined, result); + getCompletionEntriesForDirectoryFragment(fragment, nodeModules, extensionOptions, program, host, moduleSpecifierResolutionHost, /*moduleSpecifierIsRelative*/ false, /*exclude*/ undefined, result); } + importsLookup(ancestor); }; - if (fragmentDirectory && getResolvePackageJsonExports(compilerOptions)) { - const nodeModulesDirectoryLookup = ancestorLookup; + if (fragmentDirectory && resolvePackageJsonExports) { + const nodeModulesDirectoryOrImportsLookup = ancestorLookup; ancestorLookup = ancestor => { const components = getPathComponents(fragment); components.shift(); // shift off empty root let packagePath = components.shift(); if (!packagePath) { - return nodeModulesDirectoryLookup(ancestor); + return nodeModulesDirectoryOrImportsLookup(ancestor); } if (startsWith(packagePath, "@")) { const subName = components.shift(); if (!subName) { - return nodeModulesDirectoryLookup(ancestor); + return nodeModulesDirectoryOrImportsLookup(ancestor); } packagePath = combinePaths(packagePath, subName); } + if (resolvePackageJsonImports && startsWith(packagePath, "#")) { + return importsLookup(ancestor); + } const packageDirectory = combinePaths(ancestor, "node_modules", packagePath); const packageFile = combinePaths(packageDirectory, "package.json"); if (tryFileExists(host, packageFile)) { const packageJson = readJson(packageFile, host); - const exports = (packageJson as any).exports; - if (exports) { - if (typeof exports !== "object" || exports === null) { // eslint-disable-line no-restricted-syntax - return; // null exports or entrypoint only, no sub-modules available - } - const keys = getOwnKeys(exports); - const fragmentSubpath = components.join("/") + (components.length && hasTrailingDirectorySeparator(fragment) ? "/" : ""); - const conditions = getConditions(compilerOptions, mode); - addCompletionEntriesFromPathsOrExports( - result, - /*isExports*/ true, - fragmentSubpath, - packageDirectory, - extensionOptions, - program, - host, - keys, - key => singleElementArray(getPatternFromFirstMatchingCondition(exports[key], conditions)), - comparePatternKeys, - ); - return; - } + const fragmentSubpath = components.join("/") + (components.length && hasTrailingDirectorySeparator(fragment) ? "/" : ""); + exportsOrImportsLookup((packageJson as MapLike).exports, fragmentSubpath, packageDirectory, /*isExports*/ true, /*isImports*/ false); + return; } - return nodeModulesDirectoryLookup(ancestor); + return nodeModulesDirectoryOrImportsLookup(ancestor); }; } forEachAncestorDirectoryStoppingAtGlobalCache(host, scriptPath, ancestorLookup); @@ -1052,6 +1067,34 @@ function getCompletionEntriesForNonRelativeModules( } return arrayFrom(result.values()); + + function exportsOrImportsLookup(lookupTable: unknown, fragment: string, baseDirectory: string, isExports: boolean, isImports: boolean) { + if (typeof lookupTable !== "object" || lookupTable === null) { // eslint-disable-line no-restricted-syntax + return; // null lookupTable or entrypoint only + } + const keys = getOwnKeys(lookupTable as MapLike); + const conditions = getConditions(compilerOptions, mode); + addCompletionEntriesFromPathsOrExportsOrImports( + result, + isExports, + isImports, + fragment, + baseDirectory, + extensionOptions, + program, + host, + moduleSpecifierResolutionHost, + keys, + key => { + const pattern = getPatternFromFirstMatchingCondition((lookupTable as MapLike)[key], conditions); + if (pattern === undefined) { + return undefined; + } + return singleElementArray(endsWith(key, "/") && endsWith(pattern, "/") ? pattern + "*" : pattern); + }, + comparePatternKeys, + ); + } } function getPatternFromFirstMatchingCondition(target: unknown, conditions: readonly string[]): string | undefined { @@ -1078,22 +1121,27 @@ function getCompletionsForPathMapping( fragment: string, packageDirectory: string, extensionOptions: ExtensionOptions, - isExportsWildcard: boolean, + isExports: boolean, + isImports: boolean, program: Program, host: LanguageServiceHost, + moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost, ): readonly NameAndKind[] { - if (!endsWith(path, "*")) { + const parsedPath = tryParsePattern(path); + if (!parsedPath) { + return emptyArray; + } + // no stars in the pattern + if (typeof parsedPath === "string") { // For a path mapping "foo": ["/x/y/z.ts"], add "foo" itself as a completion. - return !path.includes("*") ? justPathMappingName(path, ScriptElementKind.scriptElement) : emptyArray; + return justPathMappingName(path, ScriptElementKind.scriptElement); } - - const pathPrefix = path.slice(0, path.length - 1); - const remainingFragment = tryRemovePrefix(fragment, pathPrefix); + const remainingFragment = tryRemovePrefix(fragment, parsedPath.prefix); if (remainingFragment === undefined) { - const starIsFullPathComponent = path[path.length - 2] === "/"; - return starIsFullPathComponent ? justPathMappingName(pathPrefix, ScriptElementKind.directory) : flatMap(patterns, pattern => getModulesForPathsPattern("", packageDirectory, pattern, extensionOptions, isExportsWildcard, program, host)?.map(({ name, ...rest }) => ({ name: pathPrefix + name, ...rest }))); + const starIsFullPathComponent = endsWith(path, "/*"); + return starIsFullPathComponent ? justPathMappingName(parsedPath.prefix, ScriptElementKind.directory) : flatMap(patterns, pattern => getModulesForPathsPattern("", packageDirectory, pattern, extensionOptions, isExports, isImports, program, host, moduleSpecifierResolutionHost)?.map(({ name, ...rest }) => ({ name: parsedPath.prefix + name + parsedPath.suffix, ...rest }))); } - return flatMap(patterns, pattern => getModulesForPathsPattern(remainingFragment, packageDirectory, pattern, extensionOptions, isExportsWildcard, program, host)); + return flatMap(patterns, pattern => getModulesForPathsPattern(remainingFragment, packageDirectory, pattern, extensionOptions, isExports, isImports, program, host, moduleSpecifierResolutionHost)); function justPathMappingName(name: string, kind: ScriptElementKind.directory | ScriptElementKind.scriptElement): readonly NameAndKind[] { return startsWith(name, fragment) ? [{ name: removeTrailingDirectorySeparator(name), kind, extension: undefined }] : emptyArray; @@ -1105,9 +1153,11 @@ function getModulesForPathsPattern( packageDirectory: string, pattern: string, extensionOptions: ExtensionOptions, - isExportsWildcard: boolean, + isExports: boolean, + isImports: boolean, program: Program, host: LanguageServiceHost, + moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost, ): readonly NameAndKind[] | undefined { if (!host.readDirectory) { return undefined; @@ -1127,15 +1177,25 @@ function getModulesForPathsPattern( const fragmentHasPath = containsSlash(fragment); const fragmentDirectory = fragmentHasPath ? hasTrailingDirectorySeparator(fragment) ? fragment : getDirectoryPath(fragment) : undefined; + const getCommonSourceDirectory = () => moduleSpecifierResolutionHost.getCommonSourceDirectory(); + const ignoreCase = !hostUsesCaseSensitiveFileNames(moduleSpecifierResolutionHost); + const outDir = program.getCompilerOptions().outDir; + const declarationDir = program.getCompilerOptions().declarationDir; + // Try and expand the prefix to include any path from the fragment so that we can limit the readDirectory call const expandedPrefixDirectory = fragmentHasPath ? combinePaths(normalizedPrefixDirectory, normalizedPrefixBase + fragmentDirectory) : normalizedPrefixDirectory; - - const normalizedSuffix = normalizePath(parsed.suffix); - const declarationExtension = normalizedSuffix && getDeclarationEmitExtensionForPath("_" + normalizedSuffix); - const matchingSuffixes = declarationExtension ? [changeExtension(normalizedSuffix, declarationExtension), normalizedSuffix] : [normalizedSuffix]; // Need to normalize after combining: If we combinePaths("a", "../b"), we want "b" and not "a/../b". const baseDirectory = normalizePath(combinePaths(packageDirectory, expandedPrefixDirectory)); - const completePrefix = fragmentHasPath ? baseDirectory : ensureTrailingDirectorySeparator(baseDirectory) + normalizedPrefixBase; + const possibleInputBaseDirectoryForOutDir = isImports && outDir && getPossibleOriginalInputPathWithoutChangingExt(baseDirectory, ignoreCase, outDir, getCommonSourceDirectory); + const possibleInputBaseDirectoryForDeclarationDir = isImports && declarationDir && getPossibleOriginalInputPathWithoutChangingExt(baseDirectory, ignoreCase, declarationDir, getCommonSourceDirectory); + const normalizedSuffix = normalizePath(parsed.suffix); + const declarationExtension = normalizedSuffix && getDeclarationEmitExtensionForPath("_" + normalizedSuffix); + const inputExtension = normalizedSuffix ? getPossibleOriginalInputExtensionForExtension("_" + normalizedSuffix) : undefined; + const matchingSuffixes = [ + declarationExtension && changeExtension(normalizedSuffix, declarationExtension), + ...(inputExtension ? inputExtension.map(ext => changeExtension(normalizedSuffix, ext)) : []), + normalizedSuffix, + ].filter(isString); // If we have a suffix, then we read the directory all the way down to avoid returning completions for // directories that don't contain files that would match the suffix. A previous comment here was concerned @@ -1149,28 +1209,53 @@ function getModulesForPathsPattern( ? matchingSuffixes.map(suffix => "**/*" + suffix) : ["./*"]; - const matches = mapDefined(tryReadDirectory(host, baseDirectory, extensionOptions.extensionsToSearch, /*exclude*/ undefined, includeGlobs), match => { - const trimmedWithPattern = trimPrefixAndSuffix(match); - if (trimmedWithPattern) { - if (containsSlash(trimmedWithPattern)) { - return directoryResult(getPathComponents(removeLeadingDirectorySeparator(trimmedWithPattern))[1]); - } - const { name, extension } = getFilenameWithExtensionOption(trimmedWithPattern, program, extensionOptions, isExportsWildcard); - return nameAndKind(name, ScriptElementKind.scriptElement, extension); - } - }); + const isExportsOrImportsWildcard = (isExports || isImports) && endsWith(pattern, "/*"); + + let matches = getMatchesWithPrefix(baseDirectory); + + if (possibleInputBaseDirectoryForOutDir) { + matches = concatenate(matches, getMatchesWithPrefix(possibleInputBaseDirectoryForOutDir)); + } + if (possibleInputBaseDirectoryForDeclarationDir) { + matches = concatenate(matches, getMatchesWithPrefix(possibleInputBaseDirectoryForDeclarationDir)); + } // If we had a suffix, we already recursively searched for all possible files that could match // it and returned the directories leading to those files. Otherwise, assume any directory could // have something valid to import. - const directories = normalizedSuffix - ? emptyArray - : mapDefined(tryGetDirectories(host, baseDirectory), dir => dir === "node_modules" ? undefined : directoryResult(dir)); - return [...matches, ...directories]; + if (!normalizedSuffix) { + matches = concatenate(matches, getDirectoryMatches(baseDirectory)); + if (possibleInputBaseDirectoryForOutDir) { + matches = concatenate(matches, getDirectoryMatches(possibleInputBaseDirectoryForOutDir)); + } + if (possibleInputBaseDirectoryForDeclarationDir) { + matches = concatenate(matches, getDirectoryMatches(possibleInputBaseDirectoryForDeclarationDir)); + } + } + + return matches; + + function getMatchesWithPrefix(directory: string) { + const completePrefix = fragmentHasPath ? directory : ensureTrailingDirectorySeparator(directory) + normalizedPrefixBase; + return mapDefined(tryReadDirectory(host, directory, extensionOptions.extensionsToSearch, /*exclude*/ undefined, includeGlobs), match => { + const trimmedWithPattern = trimPrefixAndSuffix(match, completePrefix); + if (trimmedWithPattern) { + if (containsSlash(trimmedWithPattern)) { + return directoryResult(getPathComponents(removeLeadingDirectorySeparator(trimmedWithPattern))[1]); + } + const { name, extension } = getFilenameWithExtensionOption(trimmedWithPattern, program, extensionOptions, isExportsOrImportsWildcard); + return nameAndKind(name, ScriptElementKind.scriptElement, extension); + } + }); + } + + function getDirectoryMatches(directoryName: string) { + return mapDefined(tryGetDirectories(host, directoryName), dir => dir === "node_modules" ? undefined : directoryResult(dir)); + } - function trimPrefixAndSuffix(path: string): string | undefined { + function trimPrefixAndSuffix(path: string, prefix: string): string | undefined { return firstDefined(matchingSuffixes, suffix => { - const inner = withoutStartAndEnd(normalizePath(path), completePrefix, suffix); + const inner = withoutStartAndEnd(normalizePath(path), prefix, suffix); return inner === undefined ? undefined : removeLeadingDirectorySeparator(inner); }); } @@ -1199,7 +1284,7 @@ function getAmbientModuleCompletions(fragment: string, fragmentDirectory: string return nonRelativeModuleNames; } -function getTripleSlashReferenceCompletion(sourceFile: SourceFile, position: number, program: Program, host: LanguageServiceHost): readonly PathCompletion[] | undefined { +function getTripleSlashReferenceCompletion(sourceFile: SourceFile, position: number, program: Program, host: LanguageServiceHost, moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost): readonly PathCompletion[] | undefined { const compilerOptions = program.getCompilerOptions(); const token = getTokenAtPosition(sourceFile, position); const commentRanges = getLeadingCommentRanges(sourceFile.text, token.pos); @@ -1215,13 +1300,13 @@ function getTripleSlashReferenceCompletion(sourceFile: SourceFile, position: num const [, prefix, kind, toComplete] = match; const scriptPath = getDirectoryPath(sourceFile.path); - const names = kind === "path" ? getCompletionEntriesForDirectoryFragment(toComplete, scriptPath, getExtensionOptions(compilerOptions, ReferenceKind.Filename, sourceFile), program, host, /*moduleSpecifierIsRelative*/ true, sourceFile.path) - : kind === "types" ? getCompletionEntriesFromTypings(host, program, scriptPath, getFragmentDirectory(toComplete), getExtensionOptions(compilerOptions, ReferenceKind.ModuleSpecifier, sourceFile)) + const names = kind === "path" ? getCompletionEntriesForDirectoryFragment(toComplete, scriptPath, getExtensionOptions(compilerOptions, ReferenceKind.Filename, sourceFile), program, host, moduleSpecifierResolutionHost, /*moduleSpecifierIsRelative*/ true, sourceFile.path) + : kind === "types" ? getCompletionEntriesFromTypings(program, host, moduleSpecifierResolutionHost, scriptPath, getFragmentDirectory(toComplete), getExtensionOptions(compilerOptions, ReferenceKind.ModuleSpecifier, sourceFile)) : Debug.fail(); return addReplacementSpans(toComplete, range.pos + prefix.length, arrayFrom(names.values())); } -function getCompletionEntriesFromTypings(host: LanguageServiceHost, program: Program, scriptPath: string, fragmentDirectory: string | undefined, extensionOptions: ExtensionOptions, result = createNameAndKindSet()): NameAndKindSet { +function getCompletionEntriesFromTypings(program: Program, host: LanguageServiceHost, moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost, scriptPath: string, fragmentDirectory: string | undefined, extensionOptions: ExtensionOptions, result = createNameAndKindSet()): NameAndKindSet { const options = program.getCompilerOptions(); // Check for typings specified in compiler options const seen = new Map(); @@ -1257,7 +1342,7 @@ function getCompletionEntriesFromTypings(host: LanguageServiceHost, program: Pro const baseDirectory = combinePaths(directory, typeDirectoryName); const remainingFragment = tryRemoveDirectoryPrefix(fragmentDirectory, packageName, hostGetCanonicalFileName(host)); if (remainingFragment !== undefined) { - getCompletionEntriesForDirectoryFragment(remainingFragment, baseDirectory, extensionOptions, program, host, /*moduleSpecifierIsRelative*/ false, /*exclude*/ undefined, result); + getCompletionEntriesForDirectoryFragment(remainingFragment, baseDirectory, extensionOptions, program, host, moduleSpecifierResolutionHost, /*moduleSpecifierIsRelative*/ false, /*exclude*/ undefined, result); } } } diff --git a/tests/baselines/reference/tsserver/fourslashServer/importCompletions_importsMap1.js b/tests/baselines/reference/tsserver/fourslashServer/importCompletions_importsMap1.js new file mode 100644 index 0000000000000..20790f3d8c3cf --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/importCompletions_importsMap1.js @@ -0,0 +1,483 @@ +Info seq [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false +Info seq [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib +Info seq [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript +Info seq [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist +//// [/home/src/tslibs/TS/Lib/lib.d.ts] +lib.d.ts-Text + +//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/home/src/workspaces/project/package.json] +{ + "type": "module", + "imports": { + "#is-browser": { + "browser": "./dist/env/browser.js", + "default": "./dist/env/node.js" + } + } +} + +//// [/home/src/workspaces/project/src/a.ts] +import {} from ""; + +//// [/home/src/workspaces/project/src/env/browser.ts] +export const isBrowser = true; + +//// [/home/src/workspaces/project/src/env/node.ts] +export const isBrowser = false; + +//// [/home/src/workspaces/project/tsconfig.json] +{ + "compilerOptions": { + "module": "nodenext", + "rootDir": "src", + "outDir": "dist" + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : { + "rootNames": [ + "/home/src/workspaces/project/src/a.ts", + "/home/src/workspaces/project/src/env/browser.ts", + "/home/src/workspaces/project/src/env/node.ts" + ], + "options": { + "module": 199, + "rootDir": "/home/src/workspaces/project/src", + "outDir": "/home/src/workspaces/project/dist", + "configFilePath": "/home/src/workspaces/project/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/home/src/workspaces/project/tsconfig.json", + "reason": "Creating possible configured project for /home/src/workspaces/project/tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/env/browser.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/env/node.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/env/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts 500 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Missing file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + /home/src/workspaces/project/src/a.ts Text-1 "import {} from \"\";" + /home/src/workspaces/project/src/env/browser.ts Text-1 "export const isBrowser = true;" + /home/src/workspaces/project/src/env/node.ts Text-1 "export const isBrowser = false;" + + + src/a.ts + Matched by default include pattern '**/*' + File is ECMAScript module because 'package.json' has field "type" with value "module" + src/env/browser.ts + Matched by default include pattern '**/*' + File is ECMAScript module because 'package.json' has field "type" with value "module" + src/env/node.ts + Matched by default include pattern '**/*' + File is ECMAScript module because 'package.json' has field "type" with value "module" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/home/src/workspaces/project/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/home/src/workspaces/project/tsconfig.json", + "configFile": "/home/src/workspaces/project/tsconfig.json", + "diagnostics": [ + { + "text": "File '/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts' not found.\n The file is in the program because:\n Default library for target 'esnext'", + "code": 6053, + "category": "error" + }, + { + "text": "Cannot find global type 'Array'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Boolean'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Function'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'IArguments'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Number'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Object'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'RegExp'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'String'.", + "code": 2318, + "category": "error" + } + ] + } + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: undefined +Info seq [hh:mm:ss:mss] Creating InferredProject: /dev/null/inferredProject1*, currentDirectory: /home/src/workspaces/project +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text + /home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"nodenext\",\n \"rootDir\": \"src\",\n \"outDir\": \"dist\"\n }\n}" + + + ../../tslibs/TS/Lib/lib.d.ts + Default library for target 'es5' + ../../tslibs/TS/Lib/lib.decorators.d.ts + Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts' + ../../tslibs/TS/Lib/lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 0, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + } + } +After Request +watchedFiles:: +/home/src/tslibs/TS/Lib/lib.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/jsconfig.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/package.json: *new* + {"pollingInterval":2000} + {"pollingInterval":250} +/home/src/workspaces/project/src/a.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/env/browser.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/env/node.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/env/package.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/src/package.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/home/src/workspaces/node_modules: *new* + {} +/home/src/workspaces/node_modules/@types: *new* + {} + {} +/home/src/workspaces/project: *new* + {} +/home/src/workspaces/project/node_modules: *new* + {} +/home/src/workspaces/project/node_modules/@types: *new* + {} + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + noOpenRef: true + +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/a.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/env/browser.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/env/node.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) *new* + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/workspaces/project/src/a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/src/a.ts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/src/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 1, + "success": true + } +After Request +watchedFiles:: +/home/src/tslibs/TS/Lib/lib.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: + {"pollingInterval":500} +/home/src/workspaces/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/workspaces/project/package.json: + {"pollingInterval":2000} + {"pollingInterval":250} +/home/src/workspaces/project/src/env/browser.ts: + {"pollingInterval":500} +/home/src/workspaces/project/src/env/node.ts: + {"pollingInterval":500} +/home/src/workspaces/project/src/env/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/src/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/home/src/workspaces/project/src/a.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/home/src/workspaces/node_modules: + {} +/home/src/workspaces/node_modules/@types: + {} + {} +/home/src/workspaces/project: + {} +/home/src/workspaces/project/node_modules: + {} +/home/src/workspaces/project/node_modules/@types: + {} + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *changed* + projectStateVersion: 1 + projectProgramVersion: 1 + noOpenRef: false *changed* + +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/a.ts (Open) *changed* + open: true *changed* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/env/browser.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/env/node.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 17 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": true, + "entries": [ + { + "name": "#is-browser", + "kind": "script", + "kindModifiers": "", + "sortText": "11" + } + ], + "defaultCommitCharacters": [] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/importCompletions_importsMap2.js b/tests/baselines/reference/tsserver/fourslashServer/importCompletions_importsMap2.js new file mode 100644 index 0000000000000..46de407066c78 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/importCompletions_importsMap2.js @@ -0,0 +1,524 @@ +Info seq [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false +Info seq [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib +Info seq [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript +Info seq [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist +//// [/home/src/tslibs/TS/Lib/lib.d.ts] +lib.d.ts-Text + +//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/home/src/workspaces/project/package.json] +{ + "type": "module", + "imports": { + "#internal/*": "./dist/internal/*" + } +} + +//// [/home/src/workspaces/project/src/a.ts] +import {} from ""; +import {} from "#internal/"; + +//// [/home/src/workspaces/project/src/internal/foo.ts] +export function something(name: string) {} + +//// [/home/src/workspaces/project/tsconfig.json] +{ + "compilerOptions": { + "module": "nodenext", + "rootDir": "src", + "outDir": "dist" + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : { + "rootNames": [ + "/home/src/workspaces/project/src/a.ts", + "/home/src/workspaces/project/src/internal/foo.ts" + ], + "options": { + "module": 199, + "rootDir": "/home/src/workspaces/project/src", + "outDir": "/home/src/workspaces/project/dist", + "configFilePath": "/home/src/workspaces/project/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/home/src/workspaces/project/tsconfig.json", + "reason": "Creating possible configured project for /home/src/workspaces/project/tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/internal/foo.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/internal/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts 500 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Missing file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + /home/src/workspaces/project/src/a.ts Text-1 "import {} from \"\";\nimport {} from \"#internal/\";" + /home/src/workspaces/project/src/internal/foo.ts Text-1 "export function something(name: string) {}" + + + src/a.ts + Matched by default include pattern '**/*' + File is ECMAScript module because 'package.json' has field "type" with value "module" + src/internal/foo.ts + Matched by default include pattern '**/*' + File is ECMAScript module because 'package.json' has field "type" with value "module" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/home/src/workspaces/project/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/home/src/workspaces/project/tsconfig.json", + "configFile": "/home/src/workspaces/project/tsconfig.json", + "diagnostics": [ + { + "text": "File '/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts' not found.\n The file is in the program because:\n Default library for target 'esnext'", + "code": 6053, + "category": "error" + }, + { + "text": "Cannot find global type 'Array'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Boolean'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Function'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'IArguments'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Number'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Object'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'RegExp'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'String'.", + "code": 2318, + "category": "error" + } + ] + } + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: undefined +Info seq [hh:mm:ss:mss] Creating InferredProject: /dev/null/inferredProject1*, currentDirectory: /home/src/workspaces/project +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text + /home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"nodenext\",\n \"rootDir\": \"src\",\n \"outDir\": \"dist\"\n }\n}" + + + ../../tslibs/TS/Lib/lib.d.ts + Default library for target 'es5' + ../../tslibs/TS/Lib/lib.decorators.d.ts + Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts' + ../../tslibs/TS/Lib/lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 0, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + } + } +After Request +watchedFiles:: +/home/src/tslibs/TS/Lib/lib.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/jsconfig.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/package.json: *new* + {"pollingInterval":2000} + {"pollingInterval":250} +/home/src/workspaces/project/src/a.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/internal/foo.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/internal/package.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/src/package.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/home/src/workspaces/node_modules: *new* + {} + {} +/home/src/workspaces/node_modules/@types: *new* + {} + {} +/home/src/workspaces/project: *new* + {} +/home/src/workspaces/project/node_modules: *new* + {} + {} +/home/src/workspaces/project/node_modules/@types: *new* + {} + {} +/home/src/workspaces/project/src: *new* + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + noOpenRef: true + +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/a.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/internal/foo.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) *new* + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/workspaces/project/src/a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/src/a.ts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/src/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 1, + "success": true + } +After Request +watchedFiles:: +/home/src/tslibs/TS/Lib/lib.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: + {"pollingInterval":500} +/home/src/workspaces/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/workspaces/project/package.json: + {"pollingInterval":2000} + {"pollingInterval":250} +/home/src/workspaces/project/src/internal/foo.ts: + {"pollingInterval":500} +/home/src/workspaces/project/src/internal/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/src/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/home/src/workspaces/project/src/a.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/home/src/workspaces/node_modules: + {} + {} +/home/src/workspaces/node_modules/@types: + {} + {} +/home/src/workspaces/project: + {} +/home/src/workspaces/project/node_modules: + {} + {} +/home/src/workspaces/project/node_modules/@types: + {} + {} +/home/src/workspaces/project/src: + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *changed* + projectStateVersion: 1 + projectProgramVersion: 1 + noOpenRef: false *changed* + +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/a.ts (Open) *changed* + open: true *changed* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/internal/foo.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 17 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": true, + "entries": [ + { + "name": "#internal", + "kind": "directory", + "kindModifiers": "", + "sortText": "11" + } + ], + "defaultCommitCharacters": [] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 4, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 2, + "offset": 27 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 5, + "success": true, + "body": { + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": true, + "entries": [ + { + "name": "foo.js", + "kind": "script", + "kindModifiers": ".js", + "sortText": "11" + } + ], + "defaultCommitCharacters": [] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/importCompletions_importsMap3.js b/tests/baselines/reference/tsserver/fourslashServer/importCompletions_importsMap3.js new file mode 100644 index 0000000000000..108703f1404c6 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/importCompletions_importsMap3.js @@ -0,0 +1,524 @@ +Info seq [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false +Info seq [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib +Info seq [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript +Info seq [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist +//// [/home/src/tslibs/TS/Lib/lib.d.ts] +lib.d.ts-Text + +//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/home/src/workspaces/project/package.json] +{ + "type": "module", + "imports": { + "#internal/": "./dist/internal/" + } +} + +//// [/home/src/workspaces/project/src/a.ts] +import {} from ""; +import {} from "#internal/"; + +//// [/home/src/workspaces/project/src/internal/foo.ts] +export function something(name: string) {} + +//// [/home/src/workspaces/project/tsconfig.json] +{ + "compilerOptions": { + "module": "nodenext", + "rootDir": "src", + "outDir": "dist" + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : { + "rootNames": [ + "/home/src/workspaces/project/src/a.ts", + "/home/src/workspaces/project/src/internal/foo.ts" + ], + "options": { + "module": 199, + "rootDir": "/home/src/workspaces/project/src", + "outDir": "/home/src/workspaces/project/dist", + "configFilePath": "/home/src/workspaces/project/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/home/src/workspaces/project/tsconfig.json", + "reason": "Creating possible configured project for /home/src/workspaces/project/tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/internal/foo.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/internal/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts 500 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Missing file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + /home/src/workspaces/project/src/a.ts Text-1 "import {} from \"\";\nimport {} from \"#internal/\";" + /home/src/workspaces/project/src/internal/foo.ts Text-1 "export function something(name: string) {}" + + + src/a.ts + Matched by default include pattern '**/*' + File is ECMAScript module because 'package.json' has field "type" with value "module" + src/internal/foo.ts + Matched by default include pattern '**/*' + File is ECMAScript module because 'package.json' has field "type" with value "module" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/home/src/workspaces/project/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/home/src/workspaces/project/tsconfig.json", + "configFile": "/home/src/workspaces/project/tsconfig.json", + "diagnostics": [ + { + "text": "File '/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts' not found.\n The file is in the program because:\n Default library for target 'esnext'", + "code": 6053, + "category": "error" + }, + { + "text": "Cannot find global type 'Array'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Boolean'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Function'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'IArguments'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Number'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Object'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'RegExp'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'String'.", + "code": 2318, + "category": "error" + } + ] + } + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: undefined +Info seq [hh:mm:ss:mss] Creating InferredProject: /dev/null/inferredProject1*, currentDirectory: /home/src/workspaces/project +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text + /home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"nodenext\",\n \"rootDir\": \"src\",\n \"outDir\": \"dist\"\n }\n}" + + + ../../tslibs/TS/Lib/lib.d.ts + Default library for target 'es5' + ../../tslibs/TS/Lib/lib.decorators.d.ts + Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts' + ../../tslibs/TS/Lib/lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 0, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + } + } +After Request +watchedFiles:: +/home/src/tslibs/TS/Lib/lib.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/jsconfig.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/package.json: *new* + {"pollingInterval":2000} + {"pollingInterval":250} +/home/src/workspaces/project/src/a.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/internal/foo.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/internal/package.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/src/package.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/home/src/workspaces/node_modules: *new* + {} + {} +/home/src/workspaces/node_modules/@types: *new* + {} + {} +/home/src/workspaces/project: *new* + {} +/home/src/workspaces/project/node_modules: *new* + {} + {} +/home/src/workspaces/project/node_modules/@types: *new* + {} + {} +/home/src/workspaces/project/src: *new* + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + noOpenRef: true + +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/a.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/internal/foo.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) *new* + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/workspaces/project/src/a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/src/a.ts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/src/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 1, + "success": true + } +After Request +watchedFiles:: +/home/src/tslibs/TS/Lib/lib.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: + {"pollingInterval":500} +/home/src/workspaces/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/workspaces/project/package.json: + {"pollingInterval":2000} + {"pollingInterval":250} +/home/src/workspaces/project/src/internal/foo.ts: + {"pollingInterval":500} +/home/src/workspaces/project/src/internal/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/src/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/home/src/workspaces/project/src/a.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/home/src/workspaces/node_modules: + {} + {} +/home/src/workspaces/node_modules/@types: + {} + {} +/home/src/workspaces/project: + {} +/home/src/workspaces/project/node_modules: + {} + {} +/home/src/workspaces/project/node_modules/@types: + {} + {} +/home/src/workspaces/project/src: + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *changed* + projectStateVersion: 1 + projectProgramVersion: 1 + noOpenRef: false *changed* + +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/a.ts (Open) *changed* + open: true *changed* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/internal/foo.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 17 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": true, + "entries": [ + { + "name": "#internal", + "kind": "directory", + "kindModifiers": "", + "sortText": "11" + } + ], + "defaultCommitCharacters": [] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 4, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 2, + "offset": 27 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 5, + "success": true, + "body": { + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": true, + "entries": [ + { + "name": "foo.js", + "kind": "script", + "kindModifiers": ".js", + "sortText": "11" + } + ], + "defaultCommitCharacters": [] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/importCompletions_importsMap4.js b/tests/baselines/reference/tsserver/fourslashServer/importCompletions_importsMap4.js new file mode 100644 index 0000000000000..63feb5500973e --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/importCompletions_importsMap4.js @@ -0,0 +1,462 @@ +Info seq [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false +Info seq [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib +Info seq [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript +Info seq [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist +//// [/home/src/tslibs/TS/Lib/lib.d.ts] +lib.d.ts-Text + +//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/home/src/workspaces/project/package.json] +{ + "type": "module", + "imports": { + "#is-browser": { + "types": "./dist/env/browser.d.ts", + "default": "./dist/env/browser.js" + } + } +} + +//// [/home/src/workspaces/project/src/a.ts] +import {} from ""; + +//// [/home/src/workspaces/project/src/env/browser.ts] +export const isBrowser = true; + +//// [/home/src/workspaces/project/tsconfig.json] +{ + "compilerOptions": { + "module": "nodenext", + "rootDir": "src", + "outDir": "dist" + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : { + "rootNames": [ + "/home/src/workspaces/project/src/a.ts", + "/home/src/workspaces/project/src/env/browser.ts" + ], + "options": { + "module": 199, + "rootDir": "/home/src/workspaces/project/src", + "outDir": "/home/src/workspaces/project/dist", + "configFilePath": "/home/src/workspaces/project/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/home/src/workspaces/project/tsconfig.json", + "reason": "Creating possible configured project for /home/src/workspaces/project/tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/env/browser.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/env/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts 500 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Missing file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + /home/src/workspaces/project/src/a.ts Text-1 "import {} from \"\";" + /home/src/workspaces/project/src/env/browser.ts Text-1 "export const isBrowser = true;" + + + src/a.ts + Matched by default include pattern '**/*' + File is ECMAScript module because 'package.json' has field "type" with value "module" + src/env/browser.ts + Matched by default include pattern '**/*' + File is ECMAScript module because 'package.json' has field "type" with value "module" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/home/src/workspaces/project/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/home/src/workspaces/project/tsconfig.json", + "configFile": "/home/src/workspaces/project/tsconfig.json", + "diagnostics": [ + { + "text": "File '/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts' not found.\n The file is in the program because:\n Default library for target 'esnext'", + "code": 6053, + "category": "error" + }, + { + "text": "Cannot find global type 'Array'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Boolean'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Function'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'IArguments'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Number'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Object'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'RegExp'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'String'.", + "code": 2318, + "category": "error" + } + ] + } + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: undefined +Info seq [hh:mm:ss:mss] Creating InferredProject: /dev/null/inferredProject1*, currentDirectory: /home/src/workspaces/project +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text + /home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"nodenext\",\n \"rootDir\": \"src\",\n \"outDir\": \"dist\"\n }\n}" + + + ../../tslibs/TS/Lib/lib.d.ts + Default library for target 'es5' + ../../tslibs/TS/Lib/lib.decorators.d.ts + Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts' + ../../tslibs/TS/Lib/lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 0, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + } + } +After Request +watchedFiles:: +/home/src/tslibs/TS/Lib/lib.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/jsconfig.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/package.json: *new* + {"pollingInterval":2000} + {"pollingInterval":250} +/home/src/workspaces/project/src/a.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/env/browser.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/env/package.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/src/package.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/home/src/workspaces/node_modules: *new* + {} +/home/src/workspaces/node_modules/@types: *new* + {} + {} +/home/src/workspaces/project: *new* + {} +/home/src/workspaces/project/node_modules: *new* + {} +/home/src/workspaces/project/node_modules/@types: *new* + {} + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + noOpenRef: true + +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/a.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/env/browser.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) *new* + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/workspaces/project/src/a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/src/a.ts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/src/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 1, + "success": true + } +After Request +watchedFiles:: +/home/src/tslibs/TS/Lib/lib.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: + {"pollingInterval":500} +/home/src/workspaces/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/workspaces/project/package.json: + {"pollingInterval":2000} + {"pollingInterval":250} +/home/src/workspaces/project/src/env/browser.ts: + {"pollingInterval":500} +/home/src/workspaces/project/src/env/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/src/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/home/src/workspaces/project/src/a.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/home/src/workspaces/node_modules: + {} +/home/src/workspaces/node_modules/@types: + {} + {} +/home/src/workspaces/project: + {} +/home/src/workspaces/project/node_modules: + {} +/home/src/workspaces/project/node_modules/@types: + {} + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *changed* + projectStateVersion: 1 + projectProgramVersion: 1 + noOpenRef: false *changed* + +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/a.ts (Open) *changed* + open: true *changed* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/env/browser.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 17 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": true, + "entries": [ + { + "name": "#is-browser", + "kind": "script", + "kindModifiers": "", + "sortText": "11" + } + ], + "defaultCommitCharacters": [] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/importCompletions_importsMap5.js b/tests/baselines/reference/tsserver/fourslashServer/importCompletions_importsMap5.js new file mode 100644 index 0000000000000..8c218da0a58d9 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/importCompletions_importsMap5.js @@ -0,0 +1,478 @@ +Info seq [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false +Info seq [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib +Info seq [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript +Info seq [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist +//// [/home/src/tslibs/TS/Lib/lib.d.ts] +lib.d.ts-Text + +//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/home/src/workspaces/project/package.json] +{ + "type": "module", + "imports": { + "#is-browser": { + "types": "./types/env/browser.d.ts", + "default": "./not-dist-on-purpose/env/browser.js" + } + } +} + +//// [/home/src/workspaces/project/src/a.ts] +import {} from ""; + +//// [/home/src/workspaces/project/src/env/browser.ts] +export const isBrowser = true; + +//// [/home/src/workspaces/project/tsconfig.json] +{ + "compilerOptions": { + "module": "nodenext", + "rootDir": "src", + "outDir": "dist", + "declarationDir": "types", + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : { + "rootNames": [ + "/home/src/workspaces/project/src/a.ts", + "/home/src/workspaces/project/src/env/browser.ts" + ], + "options": { + "module": 199, + "rootDir": "/home/src/workspaces/project/src", + "outDir": "/home/src/workspaces/project/dist", + "declarationDir": "/home/src/workspaces/project/types", + "configFilePath": "/home/src/workspaces/project/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/home/src/workspaces/project/tsconfig.json", + "reason": "Creating possible configured project for /home/src/workspaces/project/tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/env/browser.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/env/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts 500 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Missing file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + /home/src/workspaces/project/src/a.ts Text-1 "import {} from \"\";" + /home/src/workspaces/project/src/env/browser.ts Text-1 "export const isBrowser = true;" + + + src/a.ts + Matched by default include pattern '**/*' + File is ECMAScript module because 'package.json' has field "type" with value "module" + src/env/browser.ts + Matched by default include pattern '**/*' + File is ECMAScript module because 'package.json' has field "type" with value "module" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/home/src/workspaces/project/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/home/src/workspaces/project/tsconfig.json", + "configFile": "/home/src/workspaces/project/tsconfig.json", + "diagnostics": [ + { + "text": "File '/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts' not found.\n The file is in the program because:\n Default library for target 'esnext'", + "code": 6053, + "category": "error" + }, + { + "start": { + "line": 6, + "offset": 5 + }, + "end": { + "line": 6, + "offset": 21 + }, + "text": "Option 'declarationDir' cannot be specified without specifying option 'declaration' or option 'composite'.", + "code": 5069, + "category": "error", + "fileName": "/home/src/workspaces/project/tsconfig.json" + }, + { + "text": "Cannot find global type 'Array'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Boolean'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Function'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'IArguments'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Number'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Object'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'RegExp'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'String'.", + "code": 2318, + "category": "error" + } + ] + } + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: undefined +Info seq [hh:mm:ss:mss] Creating InferredProject: /dev/null/inferredProject1*, currentDirectory: /home/src/workspaces/project +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text + /home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"nodenext\",\n \"rootDir\": \"src\",\n \"outDir\": \"dist\",\n \"declarationDir\": \"types\",\n }\n}" + + + ../../tslibs/TS/Lib/lib.d.ts + Default library for target 'es5' + ../../tslibs/TS/Lib/lib.decorators.d.ts + Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts' + ../../tslibs/TS/Lib/lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 0, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + } + } +After Request +watchedFiles:: +/home/src/tslibs/TS/Lib/lib.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/jsconfig.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/package.json: *new* + {"pollingInterval":2000} + {"pollingInterval":250} +/home/src/workspaces/project/src/a.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/env/browser.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/env/package.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/src/package.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/home/src/workspaces/node_modules: *new* + {} +/home/src/workspaces/node_modules/@types: *new* + {} + {} +/home/src/workspaces/project: *new* + {} +/home/src/workspaces/project/node_modules: *new* + {} +/home/src/workspaces/project/node_modules/@types: *new* + {} + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + noOpenRef: true + +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/a.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/env/browser.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) *new* + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/workspaces/project/src/a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/src/a.ts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/src/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 1, + "success": true + } +After Request +watchedFiles:: +/home/src/tslibs/TS/Lib/lib.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: + {"pollingInterval":500} +/home/src/workspaces/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/workspaces/project/package.json: + {"pollingInterval":2000} + {"pollingInterval":250} +/home/src/workspaces/project/src/env/browser.ts: + {"pollingInterval":500} +/home/src/workspaces/project/src/env/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/src/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/home/src/workspaces/project/src/a.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/home/src/workspaces/node_modules: + {} +/home/src/workspaces/node_modules/@types: + {} + {} +/home/src/workspaces/project: + {} +/home/src/workspaces/project/node_modules: + {} +/home/src/workspaces/project/node_modules/@types: + {} + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *changed* + projectStateVersion: 1 + projectProgramVersion: 1 + noOpenRef: false *changed* + +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/a.ts (Open) *changed* + open: true *changed* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/env/browser.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 17 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": true, + "entries": [ + { + "name": "#is-browser", + "kind": "script", + "kindModifiers": "", + "sortText": "11" + } + ], + "defaultCommitCharacters": [] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard1.js b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard1.js new file mode 100644 index 0000000000000..afab97fce62d7 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard1.js @@ -0,0 +1,524 @@ +Info seq [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false +Info seq [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib +Info seq [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript +Info seq [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist +//// [/home/src/tslibs/TS/Lib/lib.d.ts] +lib.d.ts-Text + +//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/home/src/workspaces/project/package.json] +{ + "name": "foo", + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "imports": { + "#*": { + "types": "./dist/*.d.ts", + "import": "./dist/*.mjs", + "default": "./dist/*.js" + }, + "#arguments": { + "types": "./dist/arguments/index.d.ts", + "import": "./dist/arguments/index.mjs", + "default": "./dist/arguments/index.js" + } + } +} + +//// [/home/src/workspaces/project/src/arguments/index.ts] +export const arguments = 0; + +//// [/home/src/workspaces/project/src/blah.ts] +export const blah = 0; + +//// [/home/src/workspaces/project/src/index.ts] +export const index = 0; + +//// [/home/src/workspaces/project/src/m.mts] +import { } from ""; + +//// [/home/src/workspaces/project/tsconfig.json] +{ + "compilerOptions": { + "module": "nodenext", + "rootDir": "src", + "outDir": "dist" + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : { + "rootNames": [ + "/home/src/workspaces/project/src/blah.ts", + "/home/src/workspaces/project/src/index.ts", + "/home/src/workspaces/project/src/m.mts", + "/home/src/workspaces/project/src/arguments/index.ts" + ], + "options": { + "module": 199, + "rootDir": "/home/src/workspaces/project/src", + "outDir": "/home/src/workspaces/project/dist", + "configFilePath": "/home/src/workspaces/project/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/home/src/workspaces/project/tsconfig.json", + "reason": "Creating possible configured project for /home/src/workspaces/project/tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/blah.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/m.mts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/arguments/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/arguments/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts 500 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Missing file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /home/src/workspaces/project/src/blah.ts Text-1 "export const blah = 0;" + /home/src/workspaces/project/src/index.ts Text-1 "export const index = 0;" + /home/src/workspaces/project/src/m.mts Text-1 "import { } from \"\";" + /home/src/workspaces/project/src/arguments/index.ts Text-1 "export const arguments = 0;" + + + src/blah.ts + Matched by default include pattern '**/*' + File is CommonJS module because 'package.json' does not have field "type" + src/index.ts + Matched by default include pattern '**/*' + File is CommonJS module because 'package.json' does not have field "type" + src/m.mts + Matched by default include pattern '**/*' + src/arguments/index.ts + Matched by default include pattern '**/*' + File is CommonJS module because 'package.json' does not have field "type" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/home/src/workspaces/project/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/home/src/workspaces/project/tsconfig.json", + "configFile": "/home/src/workspaces/project/tsconfig.json", + "diagnostics": [ + { + "text": "File '/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts' not found.\n The file is in the program because:\n Default library for target 'esnext'", + "code": 6053, + "category": "error" + }, + { + "text": "Cannot find global type 'Array'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Boolean'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Function'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'IArguments'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Number'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Object'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'RegExp'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'String'.", + "code": 2318, + "category": "error" + } + ] + } + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: undefined +Info seq [hh:mm:ss:mss] Creating InferredProject: /dev/null/inferredProject1*, currentDirectory: /home/src/workspaces/project +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text + /home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"nodenext\",\n \"rootDir\": \"src\",\n \"outDir\": \"dist\"\n }\n}" + + + ../../tslibs/TS/Lib/lib.d.ts + Default library for target 'es5' + ../../tslibs/TS/Lib/lib.decorators.d.ts + Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts' + ../../tslibs/TS/Lib/lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 0, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + } + } +After Request +watchedFiles:: +/home/src/tslibs/TS/Lib/lib.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/jsconfig.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/package.json: *new* + {"pollingInterval":2000} + {"pollingInterval":250} +/home/src/workspaces/project/src/arguments/index.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/arguments/package.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/src/blah.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/index.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/m.mts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/package.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/home/src/workspaces/node_modules: *new* + {} +/home/src/workspaces/node_modules/@types: *new* + {} + {} +/home/src/workspaces/project: *new* + {} +/home/src/workspaces/project/node_modules: *new* + {} +/home/src/workspaces/project/node_modules/@types: *new* + {} + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + noOpenRef: true + +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/arguments/index.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/blah.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/m.mts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) *new* + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/m.mts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/workspaces/project/src/m.mts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/src/m.mts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/src/m.mts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 1, + "success": true + } +After Request +watchedFiles:: +/home/src/tslibs/TS/Lib/lib.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: + {"pollingInterval":500} +/home/src/workspaces/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/workspaces/project/package.json: + {"pollingInterval":2000} + {"pollingInterval":250} +/home/src/workspaces/project/src/arguments/index.ts: + {"pollingInterval":500} +/home/src/workspaces/project/src/arguments/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/src/blah.ts: + {"pollingInterval":500} +/home/src/workspaces/project/src/index.ts: + {"pollingInterval":500} +/home/src/workspaces/project/src/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/home/src/workspaces/project/src/m.mts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/home/src/workspaces/node_modules: + {} +/home/src/workspaces/node_modules/@types: + {} + {} +/home/src/workspaces/project: + {} +/home/src/workspaces/project/node_modules: + {} +/home/src/workspaces/project/node_modules/@types: + {} + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *changed* + projectStateVersion: 1 + projectProgramVersion: 1 + noOpenRef: false *changed* + +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/arguments/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/m.mts (Open) *changed* + open: true *changed* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/m.mts", + "line": 1, + "offset": 18 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": true, + "entries": [ + { + "name": "#blah", + "kind": "script", + "kindModifiers": "", + "sortText": "11" + }, + { + "name": "#index", + "kind": "script", + "kindModifiers": "", + "sortText": "11" + }, + { + "name": "#arguments", + "kind": "script", + "kindModifiers": "", + "sortText": "11" + } + ], + "defaultCommitCharacters": [] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard2.js b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard2.js new file mode 100644 index 0000000000000..90fe6d8133481 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard2.js @@ -0,0 +1,2182 @@ +Info seq [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false +Info seq [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib +Info seq [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript +Info seq [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist +//// [/home/src/tslibs/TS/Lib/lib.d.ts] +lib.d.ts-Text + +//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/home/src/workspaces/project/package.json] +{ + "name": "salesforce-pageobjects", + "version": "1.0.0", + "imports": { + "#*": { + "types": "./dist/*.d.ts", + "import": "./dist/*.mjs", + "default": "./dist/*.js" + } + } +} + +//// [/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts] +export const actionRenderer = 0; + +//// [/home/src/workspaces/project/src/index.mts] +import { } from ""; + +//// [/home/src/workspaces/project/tsconfig.json] +{ + "compilerOptions": { + "module": "nodenext", + "rootDir": "src", + "outDir": "dist" + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : { + "rootNames": [ + "/home/src/workspaces/project/src/index.mts", + "/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts" + ], + "options": { + "module": 199, + "rootDir": "/home/src/workspaces/project/src", + "outDir": "/home/src/workspaces/project/dist", + "configFilePath": "/home/src/workspaces/project/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/home/src/workspaces/project/tsconfig.json", + "reason": "Creating possible configured project for /home/src/workspaces/project/tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/index.mts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/action/pageObjects/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/action/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts 500 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Missing file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + /home/src/workspaces/project/src/index.mts Text-1 "import { } from \"\";" + /home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts Text-1 "export const actionRenderer = 0;" + + + src/index.mts + Matched by default include pattern '**/*' + src/action/pageObjects/actionRenderer.ts + Matched by default include pattern '**/*' + File is CommonJS module because 'package.json' does not have field "type" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/home/src/workspaces/project/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/home/src/workspaces/project/tsconfig.json", + "configFile": "/home/src/workspaces/project/tsconfig.json", + "diagnostics": [ + { + "text": "File '/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts' not found.\n The file is in the program because:\n Default library for target 'esnext'", + "code": 6053, + "category": "error" + }, + { + "text": "Cannot find global type 'Array'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Boolean'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Function'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'IArguments'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Number'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Object'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'RegExp'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'String'.", + "code": 2318, + "category": "error" + } + ] + } + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: undefined +Info seq [hh:mm:ss:mss] Creating InferredProject: /dev/null/inferredProject1*, currentDirectory: /home/src/workspaces/project +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text + /home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"nodenext\",\n \"rootDir\": \"src\",\n \"outDir\": \"dist\"\n }\n}" + + + ../../tslibs/TS/Lib/lib.d.ts + Default library for target 'es5' + ../../tslibs/TS/Lib/lib.decorators.d.ts + Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts' + ../../tslibs/TS/Lib/lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 0, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + } + } +After Request +watchedFiles:: +/home/src/tslibs/TS/Lib/lib.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/jsconfig.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/package.json: *new* + {"pollingInterval":2000} + {"pollingInterval":250} +/home/src/workspaces/project/src/action/package.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/action/pageObjects/package.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/src/index.mts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/package.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/home/src/workspaces/node_modules: *new* + {} +/home/src/workspaces/node_modules/@types: *new* + {} + {} +/home/src/workspaces/project: *new* + {} +/home/src/workspaces/project/node_modules: *new* + {} +/home/src/workspaces/project/node_modules/@types: *new* + {} + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + noOpenRef: true + +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.mts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) *new* + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/workspaces/project/src/index.mts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/src/index.mts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/src/index.mts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 1, + "success": true + } +After Request +watchedFiles:: +/home/src/tslibs/TS/Lib/lib.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: + {"pollingInterval":500} +/home/src/workspaces/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/workspaces/project/package.json: + {"pollingInterval":2000} + {"pollingInterval":250} +/home/src/workspaces/project/src/action/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts: + {"pollingInterval":500} +/home/src/workspaces/project/src/action/pageObjects/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/src/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/home/src/workspaces/project/src/index.mts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/home/src/workspaces/node_modules: + {} +/home/src/workspaces/node_modules/@types: + {} + {} +/home/src/workspaces/project: + {} +/home/src/workspaces/project/node_modules: + {} +/home/src/workspaces/project/node_modules/@types: + {} + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *changed* + projectStateVersion: 1 + projectProgramVersion: 1 + noOpenRef: false *changed* + +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.mts (Open) *changed* + open: true *changed* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 18 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": true, + "entries": [ + { + "name": "#action", + "kind": "directory", + "kindModifiers": "", + "sortText": "11" + } + ], + "defaultCommitCharacters": [] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 18, + "endLine": 1, + "endOffset": 18, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 4, + "success": true + } +After Request +Projects:: +/dev/null/inferredProject1* (Inferred) + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *changed* + projectStateVersion: 2 *changed* + projectProgramVersion: 1 + dirty: true *changed* + +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.mts (Open) *changed* + version: SVC-2-1 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 18, + "endLine": 1, + "endOffset": 18, + "insertString": "#" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 5, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.mts (Open) *changed* + version: SVC-2-2 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 19, + "key": "#" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 6, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 19, + "endLine": 1, + "endOffset": 19, + "insertString": "a" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 7, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.mts (Open) *changed* + version: SVC-2-3 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 20, + "key": "a" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 8, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 20, + "endLine": 1, + "endOffset": 20, + "insertString": "c" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 9, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.mts (Open) *changed* + version: SVC-2-4 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 10, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 21, + "key": "c" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 10, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 11, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 21, + "endLine": 1, + "endOffset": 21, + "insertString": "t" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 11, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.mts (Open) *changed* + version: SVC-2-5 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 12, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 22, + "key": "t" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 12, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 13, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 22, + "endLine": 1, + "endOffset": 22, + "insertString": "i" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 13, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.mts (Open) *changed* + version: SVC-2-6 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 14, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 23, + "key": "i" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 14, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 15, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 23, + "endLine": 1, + "endOffset": 23, + "insertString": "o" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 15, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.mts (Open) *changed* + version: SVC-2-7 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 16, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 24, + "key": "o" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 16, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 17, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 24, + "endLine": 1, + "endOffset": 24, + "insertString": "n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 17, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.mts (Open) *changed* + version: SVC-2-8 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 18, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 25, + "key": "n" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 18, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 19, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 25, + "endLine": 1, + "endOffset": 25, + "insertString": "/" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 19, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.mts (Open) *changed* + version: SVC-2-9 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 20, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 26, + "key": "/" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 20, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 21, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 21, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 22, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 26 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/dist 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/dist 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + /home/src/workspaces/project/src/index.mts SVC-2-9 "import { } from \"#action/\";" + /home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts Text-1 "export const actionRenderer = 0;" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 22, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": { + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": true, + "entries": [ + { + "name": "pageObjects", + "kind": "directory", + "kindModifiers": "", + "sortText": "11" + } + ], + "defaultCommitCharacters": [] + } + } +After Request +watchedFiles:: +/home/src/tslibs/TS/Lib/lib.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: + {"pollingInterval":500} +/home/src/workspaces/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/workspaces/project/package.json: + {"pollingInterval":2000} + {"pollingInterval":250} +/home/src/workspaces/project/src/action/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts: + {"pollingInterval":500} +/home/src/workspaces/project/src/action/pageObjects/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/src/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/home/src/workspaces/node_modules: + {} + {} *new* +/home/src/workspaces/node_modules/@types: + {} + {} +/home/src/workspaces/project: + {} +/home/src/workspaces/project/dist: *new* + {} +/home/src/workspaces/project/node_modules: + {} + {} *new* +/home/src/workspaces/project/node_modules/@types: + {} + {} +/home/src/workspaces/project/src: *new* + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *changed* + projectStateVersion: 2 + projectProgramVersion: 2 *changed* + dirty: false *changed* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 23, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 26, + "endLine": 1, + "endOffset": 26, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 23, + "success": true + } +After Request +Projects:: +/dev/null/inferredProject1* (Inferred) + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *changed* + projectStateVersion: 3 *changed* + projectProgramVersion: 2 + dirty: true *changed* + +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.mts (Open) *changed* + version: SVC-2-10 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 24, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 26, + "endLine": 1, + "endOffset": 26, + "insertString": "p" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 24, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.mts (Open) *changed* + version: SVC-2-11 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 25, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 27, + "key": "p" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 25, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 26, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 27, + "endLine": 1, + "endOffset": 27, + "insertString": "a" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 26, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.mts (Open) *changed* + version: SVC-2-12 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 27, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 28, + "key": "a" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 27, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 28, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 28, + "endLine": 1, + "endOffset": 28, + "insertString": "g" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 28, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.mts (Open) *changed* + version: SVC-2-13 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 29, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 29, + "key": "g" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 29, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 30, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 29, + "endLine": 1, + "endOffset": 29, + "insertString": "e" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 30, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.mts (Open) *changed* + version: SVC-2-14 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 31, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 30, + "key": "e" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 31, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 32, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 30, + "endLine": 1, + "endOffset": 30, + "insertString": "O" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 32, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.mts (Open) *changed* + version: SVC-2-15 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 33, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 31, + "key": "O" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 33, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 34, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 31, + "endLine": 1, + "endOffset": 31, + "insertString": "b" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 34, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.mts (Open) *changed* + version: SVC-2-16 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 35, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 32, + "key": "b" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 35, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 36, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 32, + "endLine": 1, + "endOffset": 32, + "insertString": "j" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 36, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.mts (Open) *changed* + version: SVC-2-17 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 37, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 33, + "key": "j" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 37, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 38, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 33, + "endLine": 1, + "endOffset": 33, + "insertString": "e" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 38, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.mts (Open) *changed* + version: SVC-2-18 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 39, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 34, + "key": "e" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 39, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 40, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 34, + "endLine": 1, + "endOffset": 34, + "insertString": "c" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 40, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.mts (Open) *changed* + version: SVC-2-19 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 41, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 35, + "key": "c" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 41, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 42, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 35, + "endLine": 1, + "endOffset": 35, + "insertString": "t" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 42, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.mts (Open) *changed* + version: SVC-2-20 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 43, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 36, + "key": "t" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 43, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 44, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 36, + "endLine": 1, + "endOffset": 36, + "insertString": "s" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 44, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.mts (Open) *changed* + version: SVC-2-21 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 45, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 37, + "key": "s" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 45, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 46, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 37, + "endLine": 1, + "endOffset": 37, + "insertString": "/" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 46, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.mts (Open) *changed* + version: SVC-2-22 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 47, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 38, + "key": "/" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 47, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 48, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 48, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 49, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 38 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 3 projectProgramVersion: 2 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + /home/src/workspaces/project/src/index.mts SVC-2-22 "import { } from \"#action/pageObjects/\";" + /home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts Text-1 "export const actionRenderer = 0;" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 49, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": { + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": true, + "entries": [ + { + "name": "actionRenderer", + "kind": "script", + "kindModifiers": "", + "sortText": "11" + } + ], + "defaultCommitCharacters": [] + } + } +After Request +Projects:: +/dev/null/inferredProject1* (Inferred) + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *changed* + projectStateVersion: 3 + projectProgramVersion: 3 *changed* + dirty: false *changed* diff --git a/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard3.js b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard3.js new file mode 100644 index 0000000000000..1a110a97b2ad2 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard3.js @@ -0,0 +1,2484 @@ +Info seq [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false +Info seq [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib +Info seq [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript +Info seq [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist +//// [/home/src/tslibs/TS/Lib/lib.d.ts] +lib.d.ts-Text + +//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/home/src/workspaces/project/nope.ts] +export const nope = 0; + +//// [/home/src/workspaces/project/package.json] +{ + "types": "index.d.ts", + "imports": { + "#component-*": { + "types@>=4.3.5": "types/components/*.d.ts" + } + } +} + +//// [/home/src/workspaces/project/src/a.ts] +import { } from ""; + +//// [/home/src/workspaces/project/src/components/blah.ts] +export const blah = 0; + +//// [/home/src/workspaces/project/src/components/index.ts] +export const index = 0; + +//// [/home/src/workspaces/project/src/components/subfolder/one.ts] +export const one = 0; + +//// [/home/src/workspaces/project/tsconfig.json] +{ + "compilerOptions": { + "module": "nodenext", + "rootDir": "src", + "outDir": "dist", + "declarationDir": "types" + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : { + "rootNames": [ + "/home/src/workspaces/project/nope.ts", + "/home/src/workspaces/project/src/a.ts", + "/home/src/workspaces/project/src/components/blah.ts", + "/home/src/workspaces/project/src/components/index.ts", + "/home/src/workspaces/project/src/components/subfolder/one.ts" + ], + "options": { + "module": 199, + "rootDir": "/home/src/workspaces/project/src", + "outDir": "/home/src/workspaces/project/dist", + "declarationDir": "/home/src/workspaces/project/types", + "configFilePath": "/home/src/workspaces/project/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/home/src/workspaces/project/tsconfig.json", + "reason": "Creating possible configured project for /home/src/workspaces/project/tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/nope.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/components/blah.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/components/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/components/subfolder/one.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/components/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/components/subfolder/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts 500 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Missing file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /home/src/workspaces/project/nope.ts Text-1 "export const nope = 0;" + /home/src/workspaces/project/src/a.ts Text-1 "import { } from \"\";" + /home/src/workspaces/project/src/components/blah.ts Text-1 "export const blah = 0;" + /home/src/workspaces/project/src/components/index.ts Text-1 "export const index = 0;" + /home/src/workspaces/project/src/components/subfolder/one.ts Text-1 "export const one = 0;" + + + nope.ts + Matched by default include pattern '**/*' + File is CommonJS module because 'package.json' does not have field "type" + src/a.ts + Matched by default include pattern '**/*' + File is CommonJS module because 'package.json' does not have field "type" + src/components/blah.ts + Matched by default include pattern '**/*' + File is CommonJS module because 'package.json' does not have field "type" + src/components/index.ts + Matched by default include pattern '**/*' + File is CommonJS module because 'package.json' does not have field "type" + src/components/subfolder/one.ts + Matched by default include pattern '**/*' + File is CommonJS module because 'package.json' does not have field "type" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/home/src/workspaces/project/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/home/src/workspaces/project/tsconfig.json", + "configFile": "/home/src/workspaces/project/tsconfig.json", + "diagnostics": [ + { + "text": "File '/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts' not found.\n The file is in the program because:\n Default library for target 'esnext'", + "code": 6053, + "category": "error" + }, + { + "text": "File '/home/src/workspaces/project/nope.ts' is not under 'rootDir' '/home/src/workspaces/project/src'. 'rootDir' is expected to contain all source files.\n The file is in the program because:\n Matched by default include pattern '**/*'\n File is CommonJS module because '/home/src/workspaces/project/package.json' does not have field \"type\"", + "code": 6059, + "category": "error" + }, + { + "start": { + "line": 6, + "offset": 5 + }, + "end": { + "line": 6, + "offset": 21 + }, + "text": "Option 'declarationDir' cannot be specified without specifying option 'declaration' or option 'composite'.", + "code": 5069, + "category": "error", + "fileName": "/home/src/workspaces/project/tsconfig.json" + }, + { + "text": "Cannot find global type 'Array'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Boolean'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Function'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'IArguments'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Number'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Object'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'RegExp'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'String'.", + "code": 2318, + "category": "error" + } + ] + } + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: undefined +Info seq [hh:mm:ss:mss] Creating InferredProject: /dev/null/inferredProject1*, currentDirectory: /home/src/workspaces/project +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text + /home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"nodenext\",\n \"rootDir\": \"src\",\n \"outDir\": \"dist\",\n \"declarationDir\": \"types\"\n }\n}" + + + ../../tslibs/TS/Lib/lib.d.ts + Default library for target 'es5' + ../../tslibs/TS/Lib/lib.decorators.d.ts + Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts' + ../../tslibs/TS/Lib/lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 0, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + } + } +After Request +watchedFiles:: +/home/src/tslibs/TS/Lib/lib.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/jsconfig.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/nope.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/package.json: *new* + {"pollingInterval":2000} + {"pollingInterval":250} +/home/src/workspaces/project/src/a.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/components/blah.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/components/index.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/components/package.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/src/components/subfolder/one.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/components/subfolder/package.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/src/package.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/home/src/workspaces/node_modules: *new* + {} +/home/src/workspaces/node_modules/@types: *new* + {} + {} +/home/src/workspaces/project: *new* + {} +/home/src/workspaces/project/node_modules: *new* + {} +/home/src/workspaces/project/node_modules/@types: *new* + {} + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + noOpenRef: true + +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/blah.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/index.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/subfolder/one.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) *new* + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/workspaces/project/src/a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/src/a.ts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/src/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 1, + "success": true + } +After Request +watchedFiles:: +/home/src/tslibs/TS/Lib/lib.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: + {"pollingInterval":500} +/home/src/workspaces/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/workspaces/project/nope.ts: + {"pollingInterval":500} +/home/src/workspaces/project/package.json: + {"pollingInterval":2000} + {"pollingInterval":250} +/home/src/workspaces/project/src/components/blah.ts: + {"pollingInterval":500} +/home/src/workspaces/project/src/components/index.ts: + {"pollingInterval":500} +/home/src/workspaces/project/src/components/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/src/components/subfolder/one.ts: + {"pollingInterval":500} +/home/src/workspaces/project/src/components/subfolder/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/src/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/home/src/workspaces/project/src/a.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/home/src/workspaces/node_modules: + {} +/home/src/workspaces/node_modules/@types: + {} + {} +/home/src/workspaces/project: + {} +/home/src/workspaces/project/node_modules: + {} +/home/src/workspaces/project/node_modules/@types: + {} + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *changed* + projectStateVersion: 1 + projectProgramVersion: 1 + noOpenRef: false *changed* + +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.ts (Open) *changed* + open: true *changed* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/components/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 18 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": true, + "entries": [ + { + "name": "#component-blah", + "kind": "script", + "kindModifiers": "", + "sortText": "11" + }, + { + "name": "#component-index", + "kind": "script", + "kindModifiers": "", + "sortText": "11" + }, + { + "name": "#component-subfolder", + "kind": "directory", + "kindModifiers": "", + "sortText": "11" + } + ], + "defaultCommitCharacters": [] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 18, + "endLine": 1, + "endOffset": 18, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 4, + "success": true + } +After Request +Projects:: +/dev/null/inferredProject1* (Inferred) + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *changed* + projectStateVersion: 2 *changed* + projectProgramVersion: 1 + dirty: true *changed* + +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.ts (Open) *changed* + version: SVC-2-1 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/components/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 18, + "endLine": 1, + "endOffset": 18, + "insertString": "#" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 5, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.ts (Open) *changed* + version: SVC-2-2 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/components/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 19, + "key": "#" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 6, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 19, + "endLine": 1, + "endOffset": 19, + "insertString": "c" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 7, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.ts (Open) *changed* + version: SVC-2-3 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/components/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 20, + "key": "c" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 8, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 20, + "endLine": 1, + "endOffset": 20, + "insertString": "o" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 9, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.ts (Open) *changed* + version: SVC-2-4 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/components/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 10, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 21, + "key": "o" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 10, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 11, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 21, + "endLine": 1, + "endOffset": 21, + "insertString": "m" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 11, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.ts (Open) *changed* + version: SVC-2-5 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/components/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 12, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 22, + "key": "m" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 12, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 13, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 22, + "endLine": 1, + "endOffset": 22, + "insertString": "p" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 13, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.ts (Open) *changed* + version: SVC-2-6 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/components/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 14, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 23, + "key": "p" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 14, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 15, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 23, + "endLine": 1, + "endOffset": 23, + "insertString": "o" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 15, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.ts (Open) *changed* + version: SVC-2-7 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/components/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 16, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 24, + "key": "o" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 16, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 17, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 24, + "endLine": 1, + "endOffset": 24, + "insertString": "n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 17, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.ts (Open) *changed* + version: SVC-2-8 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/components/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 18, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 25, + "key": "n" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 18, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 19, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 25, + "endLine": 1, + "endOffset": 25, + "insertString": "e" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 19, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.ts (Open) *changed* + version: SVC-2-9 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/components/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 20, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 26, + "key": "e" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 20, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 21, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 26, + "endLine": 1, + "endOffset": 26, + "insertString": "n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 21, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.ts (Open) *changed* + version: SVC-2-10 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/components/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 22, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 27, + "key": "n" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 22, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 23, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 27, + "endLine": 1, + "endOffset": 27, + "insertString": "t" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 23, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.ts (Open) *changed* + version: SVC-2-11 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/components/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 24, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 28, + "key": "t" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 24, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 25, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 28, + "endLine": 1, + "endOffset": 28, + "insertString": "-" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 25, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.ts (Open) *changed* + version: SVC-2-12 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/components/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 26, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 29, + "key": "-" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 26, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 27, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 29, + "endLine": 1, + "endOffset": 29, + "insertString": "s" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 27, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.ts (Open) *changed* + version: SVC-2-13 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/components/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 28, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 30, + "key": "s" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 28, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 29, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 30, + "endLine": 1, + "endOffset": 30, + "insertString": "u" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 29, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.ts (Open) *changed* + version: SVC-2-14 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/components/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 30, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 31, + "key": "u" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 30, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 31, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 31, + "endLine": 1, + "endOffset": 31, + "insertString": "b" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 31, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.ts (Open) *changed* + version: SVC-2-15 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/components/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 32, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 32, + "key": "b" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 32, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 33, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 32, + "endLine": 1, + "endOffset": 32, + "insertString": "f" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 33, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.ts (Open) *changed* + version: SVC-2-16 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/components/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 34, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 33, + "key": "f" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 34, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 35, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 33, + "endLine": 1, + "endOffset": 33, + "insertString": "o" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 35, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.ts (Open) *changed* + version: SVC-2-17 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/components/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 36, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 34, + "key": "o" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 36, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 37, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 34, + "endLine": 1, + "endOffset": 34, + "insertString": "l" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 37, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.ts (Open) *changed* + version: SVC-2-18 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/components/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 38, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 35, + "key": "l" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 38, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 39, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 35, + "endLine": 1, + "endOffset": 35, + "insertString": "d" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 39, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.ts (Open) *changed* + version: SVC-2-19 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/components/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 40, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 36, + "key": "d" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 40, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 41, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 36, + "endLine": 1, + "endOffset": 36, + "insertString": "e" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 41, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.ts (Open) *changed* + version: SVC-2-20 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/components/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 42, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 37, + "key": "e" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 42, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 43, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 37, + "endLine": 1, + "endOffset": 37, + "insertString": "r" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 43, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.ts (Open) *changed* + version: SVC-2-21 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/components/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 44, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 38, + "key": "r" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 44, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 45, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 38, + "endLine": 1, + "endOffset": 38, + "insertString": "/" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 45, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.ts (Open) *changed* + version: SVC-2-22 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/components/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/components/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 46, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 39, + "key": "/" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 46, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 47, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 47, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 48, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.ts", + "line": 1, + "offset": 39 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /home/src/workspaces/project/nope.ts Text-1 "export const nope = 0;" + /home/src/workspaces/project/src/a.ts SVC-2-22 "import { } from \"#component-subfolder/\";" + /home/src/workspaces/project/src/components/blah.ts Text-1 "export const blah = 0;" + /home/src/workspaces/project/src/components/index.ts Text-1 "export const index = 0;" + /home/src/workspaces/project/src/components/subfolder/one.ts Text-1 "export const one = 0;" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 48, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": { + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": true, + "entries": [ + { + "name": "one", + "kind": "script", + "kindModifiers": "", + "sortText": "11" + } + ], + "defaultCommitCharacters": [] + } + } +After Request +watchedFiles:: +/home/src/tslibs/TS/Lib/lib.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: + {"pollingInterval":500} +/home/src/workspaces/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/workspaces/project/nope.ts: + {"pollingInterval":500} +/home/src/workspaces/project/package.json: + {"pollingInterval":2000} + {"pollingInterval":250} +/home/src/workspaces/project/src/components/blah.ts: + {"pollingInterval":500} +/home/src/workspaces/project/src/components/index.ts: + {"pollingInterval":500} +/home/src/workspaces/project/src/components/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/src/components/subfolder/one.ts: + {"pollingInterval":500} +/home/src/workspaces/project/src/components/subfolder/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/src/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/home/src/workspaces/node_modules: + {} + {} *new* +/home/src/workspaces/node_modules/@types: + {} + {} +/home/src/workspaces/project: + {} +/home/src/workspaces/project/node_modules: + {} + {} *new* +/home/src/workspaces/project/node_modules/@types: + {} + {} +/home/src/workspaces/project/src: *new* + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *changed* + projectStateVersion: 2 + projectProgramVersion: 2 *changed* + dirty: false *changed* diff --git a/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard4.js b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard4.js new file mode 100644 index 0000000000000..63b86885267c4 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard4.js @@ -0,0 +1,1747 @@ +Info seq [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false +Info seq [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib +Info seq [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript +Info seq [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist +//// [/home/src/tslibs/TS/Lib/lib.d.ts] +lib.d.ts-Text + +//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/home/src/workspaces/project/nope.ts] +export const nope = 0; + +//// [/home/src/workspaces/project/package.json] +{ + "types": "index.d.ts", + "imports": { + "#*": "dist/*", + "#foo/*": "dist/*", + "#bar/*": "dist/*", + "#exact-match": "dist/index.d.ts" + } +} + +//// [/home/src/workspaces/project/src/a.mts] +import { } from ""; + +//// [/home/src/workspaces/project/src/blah.ts] +export const blah = 0; + +//// [/home/src/workspaces/project/src/foo/onlyInFooFolder.ts] +export const foo = 0; + +//// [/home/src/workspaces/project/src/index.ts] +export const index = 0; + +//// [/home/src/workspaces/project/src/subfolder/one.ts] +export const one = 0; + +//// [/home/src/workspaces/project/tsconfig.json] +{ + "compilerOptions": { + "module": "nodenext", + "rootDir": "src", + "outDir": "dist" + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : { + "rootNames": [ + "/home/src/workspaces/project/nope.ts", + "/home/src/workspaces/project/src/a.mts", + "/home/src/workspaces/project/src/blah.ts", + "/home/src/workspaces/project/src/index.ts", + "/home/src/workspaces/project/src/foo/onlyInFooFolder.ts", + "/home/src/workspaces/project/src/subfolder/one.ts" + ], + "options": { + "module": 199, + "rootDir": "/home/src/workspaces/project/src", + "outDir": "/home/src/workspaces/project/dist", + "configFilePath": "/home/src/workspaces/project/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/home/src/workspaces/project/tsconfig.json", + "reason": "Creating possible configured project for /home/src/workspaces/project/tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/nope.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/a.mts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/blah.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/foo/onlyInFooFolder.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/subfolder/one.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/foo/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/subfolder/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts 500 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Missing file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + /home/src/workspaces/project/nope.ts Text-1 "export const nope = 0;" + /home/src/workspaces/project/src/a.mts Text-1 "import { } from \"\";" + /home/src/workspaces/project/src/blah.ts Text-1 "export const blah = 0;" + /home/src/workspaces/project/src/index.ts Text-1 "export const index = 0;" + /home/src/workspaces/project/src/foo/onlyInFooFolder.ts Text-1 "export const foo = 0;" + /home/src/workspaces/project/src/subfolder/one.ts Text-1 "export const one = 0;" + + + nope.ts + Matched by default include pattern '**/*' + File is CommonJS module because 'package.json' does not have field "type" + src/a.mts + Matched by default include pattern '**/*' + src/blah.ts + Matched by default include pattern '**/*' + File is CommonJS module because 'package.json' does not have field "type" + src/index.ts + Matched by default include pattern '**/*' + File is CommonJS module because 'package.json' does not have field "type" + src/foo/onlyInFooFolder.ts + Matched by default include pattern '**/*' + File is CommonJS module because 'package.json' does not have field "type" + src/subfolder/one.ts + Matched by default include pattern '**/*' + File is CommonJS module because 'package.json' does not have field "type" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/home/src/workspaces/project/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/home/src/workspaces/project/tsconfig.json", + "configFile": "/home/src/workspaces/project/tsconfig.json", + "diagnostics": [ + { + "text": "File '/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts' not found.\n The file is in the program because:\n Default library for target 'esnext'", + "code": 6053, + "category": "error" + }, + { + "text": "File '/home/src/workspaces/project/nope.ts' is not under 'rootDir' '/home/src/workspaces/project/src'. 'rootDir' is expected to contain all source files.\n The file is in the program because:\n Matched by default include pattern '**/*'\n File is CommonJS module because '/home/src/workspaces/project/package.json' does not have field \"type\"", + "code": 6059, + "category": "error" + }, + { + "text": "Cannot find global type 'Array'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Boolean'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Function'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'IArguments'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Number'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Object'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'RegExp'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'String'.", + "code": 2318, + "category": "error" + } + ] + } + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: undefined +Info seq [hh:mm:ss:mss] Creating InferredProject: /dev/null/inferredProject1*, currentDirectory: /home/src/workspaces/project +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text + /home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"nodenext\",\n \"rootDir\": \"src\",\n \"outDir\": \"dist\"\n }\n}" + + + ../../tslibs/TS/Lib/lib.d.ts + Default library for target 'es5' + ../../tslibs/TS/Lib/lib.decorators.d.ts + Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts' + ../../tslibs/TS/Lib/lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 0, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + } + } +After Request +watchedFiles:: +/home/src/tslibs/TS/Lib/lib.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/jsconfig.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/nope.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/package.json: *new* + {"pollingInterval":2000} + {"pollingInterval":250} +/home/src/workspaces/project/src/a.mts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/blah.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/foo/onlyInFooFolder.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/foo/package.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/src/index.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/package.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/src/subfolder/one.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/subfolder/package.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/home/src/workspaces/node_modules: *new* + {} +/home/src/workspaces/node_modules/@types: *new* + {} + {} +/home/src/workspaces/project: *new* + {} +/home/src/workspaces/project/node_modules: *new* + {} +/home/src/workspaces/project/node_modules/@types: *new* + {} + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + noOpenRef: true + +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.mts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/blah.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/foo/onlyInFooFolder.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/subfolder/one.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) *new* + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.mts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/workspaces/project/src/a.mts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/src/a.mts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/src/a.mts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 1, + "success": true + } +After Request +watchedFiles:: +/home/src/tslibs/TS/Lib/lib.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: + {"pollingInterval":500} +/home/src/workspaces/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/workspaces/project/nope.ts: + {"pollingInterval":500} +/home/src/workspaces/project/package.json: + {"pollingInterval":2000} + {"pollingInterval":250} +/home/src/workspaces/project/src/blah.ts: + {"pollingInterval":500} +/home/src/workspaces/project/src/foo/onlyInFooFolder.ts: + {"pollingInterval":500} +/home/src/workspaces/project/src/foo/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/src/index.ts: + {"pollingInterval":500} +/home/src/workspaces/project/src/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/src/subfolder/one.ts: + {"pollingInterval":500} +/home/src/workspaces/project/src/subfolder/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/home/src/workspaces/project/src/a.mts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/home/src/workspaces/node_modules: + {} +/home/src/workspaces/node_modules/@types: + {} + {} +/home/src/workspaces/project: + {} +/home/src/workspaces/project/node_modules: + {} +/home/src/workspaces/project/node_modules/@types: + {} + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *changed* + projectStateVersion: 1 + projectProgramVersion: 1 + noOpenRef: false *changed* + +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.mts (Open) *changed* + open: true *changed* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/foo/onlyInFooFolder.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.mts", + "line": 1, + "offset": 18 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": true, + "entries": [ + { + "name": "#a.mjs", + "kind": "script", + "kindModifiers": ".mjs", + "sortText": "11" + }, + { + "name": "#blah.js", + "kind": "script", + "kindModifiers": ".js", + "sortText": "11" + }, + { + "name": "#index.js", + "kind": "script", + "kindModifiers": ".js", + "sortText": "11" + }, + { + "name": "#foo", + "kind": "directory", + "kindModifiers": "", + "sortText": "11" + }, + { + "name": "#subfolder", + "kind": "directory", + "kindModifiers": "", + "sortText": "11" + }, + { + "name": "#bar", + "kind": "directory", + "kindModifiers": "", + "sortText": "11" + }, + { + "name": "#exact-match", + "kind": "script", + "kindModifiers": "", + "sortText": "11" + } + ], + "defaultCommitCharacters": [] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.mts", + "line": 1, + "offset": 18, + "endLine": 1, + "endOffset": 18, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 4, + "success": true + } +After Request +Projects:: +/dev/null/inferredProject1* (Inferred) + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *changed* + projectStateVersion: 2 *changed* + projectProgramVersion: 1 + dirty: true *changed* + +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.mts (Open) *changed* + version: SVC-2-1 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/foo/onlyInFooFolder.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.mts", + "line": 1, + "offset": 18, + "endLine": 1, + "endOffset": 18, + "insertString": "#" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 5, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.mts (Open) *changed* + version: SVC-2-2 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/foo/onlyInFooFolder.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.mts", + "line": 1, + "offset": 19, + "key": "#" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 6, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.mts", + "line": 1, + "offset": 19, + "endLine": 1, + "endOffset": 19, + "insertString": "f" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 7, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.mts (Open) *changed* + version: SVC-2-3 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/foo/onlyInFooFolder.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.mts", + "line": 1, + "offset": 20, + "key": "f" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 8, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.mts", + "line": 1, + "offset": 20, + "endLine": 1, + "endOffset": 20, + "insertString": "o" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 9, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.mts (Open) *changed* + version: SVC-2-4 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/foo/onlyInFooFolder.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 10, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.mts", + "line": 1, + "offset": 21, + "key": "o" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 10, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 11, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.mts", + "line": 1, + "offset": 21, + "endLine": 1, + "endOffset": 21, + "insertString": "o" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 11, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.mts (Open) *changed* + version: SVC-2-5 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/foo/onlyInFooFolder.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 12, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.mts", + "line": 1, + "offset": 22, + "key": "o" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 12, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 13, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.mts", + "line": 1, + "offset": 22, + "endLine": 1, + "endOffset": 22, + "insertString": "/" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 13, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.mts (Open) *changed* + version: SVC-2-6 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/foo/onlyInFooFolder.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 14, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.mts", + "line": 1, + "offset": 23, + "key": "/" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 14, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 15, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 15, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 16, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.mts", + "line": 1, + "offset": 23 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + /home/src/workspaces/project/nope.ts Text-1 "export const nope = 0;" + /home/src/workspaces/project/src/a.mts SVC-2-6 "import { } from \"#foo/\";" + /home/src/workspaces/project/src/blah.ts Text-1 "export const blah = 0;" + /home/src/workspaces/project/src/index.ts Text-1 "export const index = 0;" + /home/src/workspaces/project/src/foo/onlyInFooFolder.ts Text-1 "export const foo = 0;" + /home/src/workspaces/project/src/subfolder/one.ts Text-1 "export const one = 0;" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 16, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": { + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": true, + "entries": [ + { + "name": "a.mjs", + "kind": "script", + "kindModifiers": ".mjs", + "sortText": "11" + }, + { + "name": "blah.js", + "kind": "script", + "kindModifiers": ".js", + "sortText": "11" + }, + { + "name": "index.js", + "kind": "script", + "kindModifiers": ".js", + "sortText": "11" + }, + { + "name": "foo", + "kind": "directory", + "kindModifiers": "", + "sortText": "11" + }, + { + "name": "subfolder", + "kind": "directory", + "kindModifiers": "", + "sortText": "11" + } + ], + "defaultCommitCharacters": [] + } + } +After Request +watchedFiles:: +/home/src/tslibs/TS/Lib/lib.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: + {"pollingInterval":500} +/home/src/workspaces/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/workspaces/project/nope.ts: + {"pollingInterval":500} +/home/src/workspaces/project/package.json: + {"pollingInterval":2000} + {"pollingInterval":250} +/home/src/workspaces/project/src/blah.ts: + {"pollingInterval":500} +/home/src/workspaces/project/src/foo/onlyInFooFolder.ts: + {"pollingInterval":500} +/home/src/workspaces/project/src/foo/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/src/index.ts: + {"pollingInterval":500} +/home/src/workspaces/project/src/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/src/subfolder/one.ts: + {"pollingInterval":500} +/home/src/workspaces/project/src/subfolder/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/home/src/workspaces/node_modules: + {} + {} *new* +/home/src/workspaces/node_modules/@types: + {} + {} +/home/src/workspaces/project: + {} +/home/src/workspaces/project/node_modules: + {} + {} *new* +/home/src/workspaces/project/node_modules/@types: + {} + {} +/home/src/workspaces/project/src: *new* + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *changed* + projectStateVersion: 2 + projectProgramVersion: 2 *changed* + dirty: false *changed* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 17, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.mts", + "line": 1, + "offset": 23, + "endLine": 1, + "endOffset": 23, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 17, + "success": true + } +After Request +Projects:: +/dev/null/inferredProject1* (Inferred) + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *changed* + projectStateVersion: 3 *changed* + projectProgramVersion: 2 + dirty: true *changed* + +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.mts (Open) *changed* + version: SVC-2-7 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/foo/onlyInFooFolder.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 18, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.mts", + "line": 1, + "offset": 23, + "endLine": 1, + "endOffset": 23, + "insertString": "f" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 18, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.mts (Open) *changed* + version: SVC-2-8 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/foo/onlyInFooFolder.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 19, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.mts", + "line": 1, + "offset": 24, + "key": "f" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 19, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 20, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.mts", + "line": 1, + "offset": 24, + "endLine": 1, + "endOffset": 24, + "insertString": "o" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 20, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.mts (Open) *changed* + version: SVC-2-9 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/foo/onlyInFooFolder.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 21, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.mts", + "line": 1, + "offset": 25, + "key": "o" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 21, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 22, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.mts", + "line": 1, + "offset": 25, + "endLine": 1, + "endOffset": 25, + "insertString": "o" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 22, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.mts (Open) *changed* + version: SVC-2-10 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/foo/onlyInFooFolder.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 23, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.mts", + "line": 1, + "offset": 26, + "key": "o" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 23, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 24, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.mts", + "line": 1, + "offset": 26, + "endLine": 1, + "endOffset": 26, + "insertString": "/" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 24, + "success": true + } +After Request +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/nope.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/a.mts (Open) *changed* + version: SVC-2-11 *changed* + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/foo/onlyInFooFolder.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/subfolder/one.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 25, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.mts", + "line": 1, + "offset": 27, + "key": "/" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 25, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 26, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 26, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 27, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/a.mts", + "line": 1, + "offset": 27 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 3 projectProgramVersion: 2 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + /home/src/workspaces/project/nope.ts Text-1 "export const nope = 0;" + /home/src/workspaces/project/src/a.mts SVC-2-11 "import { } from \"#foo/foo/\";" + /home/src/workspaces/project/src/blah.ts Text-1 "export const blah = 0;" + /home/src/workspaces/project/src/index.ts Text-1 "export const index = 0;" + /home/src/workspaces/project/src/foo/onlyInFooFolder.ts Text-1 "export const foo = 0;" + /home/src/workspaces/project/src/subfolder/one.ts Text-1 "export const one = 0;" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 27, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": { + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": true, + "entries": [ + { + "name": "onlyInFooFolder.js", + "kind": "script", + "kindModifiers": ".js", + "sortText": "11" + } + ], + "defaultCommitCharacters": [] + } + } +After Request +Projects:: +/dev/null/inferredProject1* (Inferred) + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *changed* + projectStateVersion: 3 + projectProgramVersion: 3 *changed* + dirty: false *changed* diff --git a/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard5.js b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard5.js new file mode 100644 index 0000000000000..27f4085657a32 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard5.js @@ -0,0 +1,560 @@ +Info seq [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false +Info seq [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib +Info seq [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript +Info seq [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist +//// [/home/src/tslibs/TS/Lib/lib.d.ts] +lib.d.ts-Text + +//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/home/src/workspaces/project/package.json] +{ + "name": "foo", + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "imports": { + "#*": { + "import": { + "types": "./dist/types/*.d.mts", + "default": "./dist/esm/*.mjs" + }, + "default": { + "types": "./dist/types/*.d.ts", + "default": "./dist/cjs/*.js" + } + }, + "#only-in-cjs": { + "require": { + "types": "./dist/types/only-in-cjs/index.d.ts", + "default": "./dist/cjs/only-in-cjs/index.js" + } + } + } +} + +//// [/home/src/workspaces/project/src/blah.mts] +export const blah = 0; + +//// [/home/src/workspaces/project/src/blah.ts] +export const blah = 0; + +//// [/home/src/workspaces/project/src/index.mts] +import { } from ""; + +//// [/home/src/workspaces/project/src/index.ts] +export const index = 0; + +//// [/home/src/workspaces/project/src/only-in-cjs/index.ts] +export const onlyInCjs = 0; + +//// [/home/src/workspaces/project/tsconfig.json] +{ + "compilerOptions": { + "module": "nodenext", + "rootDir": "src", + "outDir": "dist/esm", + "declarationDir": "dist/types" + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : { + "rootNames": [ + "/home/src/workspaces/project/src/blah.mts", + "/home/src/workspaces/project/src/blah.ts", + "/home/src/workspaces/project/src/index.mts", + "/home/src/workspaces/project/src/index.ts", + "/home/src/workspaces/project/src/only-in-cjs/index.ts" + ], + "options": { + "module": 199, + "rootDir": "/home/src/workspaces/project/src", + "outDir": "/home/src/workspaces/project/dist/esm", + "declarationDir": "/home/src/workspaces/project/dist/types", + "configFilePath": "/home/src/workspaces/project/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/home/src/workspaces/project/tsconfig.json", + "reason": "Creating possible configured project for /home/src/workspaces/project/tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/blah.mts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/blah.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/index.mts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/only-in-cjs/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/only-in-cjs/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts 500 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Missing file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /home/src/workspaces/project/src/blah.mts Text-1 "export const blah = 0;" + /home/src/workspaces/project/src/blah.ts Text-1 "export const blah = 0;" + /home/src/workspaces/project/src/index.mts Text-1 "import { } from \"\";" + /home/src/workspaces/project/src/index.ts Text-1 "export const index = 0;" + /home/src/workspaces/project/src/only-in-cjs/index.ts Text-1 "export const onlyInCjs = 0;" + + + src/blah.mts + Matched by default include pattern '**/*' + src/blah.ts + Matched by default include pattern '**/*' + File is CommonJS module because 'package.json' does not have field "type" + src/index.mts + Matched by default include pattern '**/*' + src/index.ts + Matched by default include pattern '**/*' + File is CommonJS module because 'package.json' does not have field "type" + src/only-in-cjs/index.ts + Matched by default include pattern '**/*' + File is CommonJS module because 'package.json' does not have field "type" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/home/src/workspaces/project/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/home/src/workspaces/project/tsconfig.json", + "configFile": "/home/src/workspaces/project/tsconfig.json", + "diagnostics": [ + { + "text": "File '/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts' not found.\n The file is in the program because:\n Default library for target 'esnext'", + "code": 6053, + "category": "error" + }, + { + "start": { + "line": 6, + "offset": 5 + }, + "end": { + "line": 6, + "offset": 21 + }, + "text": "Option 'declarationDir' cannot be specified without specifying option 'declaration' or option 'composite'.", + "code": 5069, + "category": "error", + "fileName": "/home/src/workspaces/project/tsconfig.json" + }, + { + "text": "Cannot find global type 'Array'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Boolean'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Function'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'IArguments'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Number'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Object'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'RegExp'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'String'.", + "code": 2318, + "category": "error" + } + ] + } + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: undefined +Info seq [hh:mm:ss:mss] Creating InferredProject: /dev/null/inferredProject1*, currentDirectory: /home/src/workspaces/project +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text + /home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"nodenext\",\n \"rootDir\": \"src\",\n \"outDir\": \"dist/esm\",\n \"declarationDir\": \"dist/types\"\n }\n}" + + + ../../tslibs/TS/Lib/lib.d.ts + Default library for target 'es5' + ../../tslibs/TS/Lib/lib.decorators.d.ts + Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts' + ../../tslibs/TS/Lib/lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 0, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + } + } +After Request +watchedFiles:: +/home/src/tslibs/TS/Lib/lib.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/jsconfig.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/package.json: *new* + {"pollingInterval":2000} + {"pollingInterval":250} +/home/src/workspaces/project/src/blah.mts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/blah.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/index.mts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/index.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/only-in-cjs/index.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/only-in-cjs/package.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/src/package.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/home/src/workspaces/node_modules: *new* + {} +/home/src/workspaces/node_modules/@types: *new* + {} + {} +/home/src/workspaces/project: *new* + {} +/home/src/workspaces/project/node_modules: *new* + {} +/home/src/workspaces/project/node_modules/@types: *new* + {} + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + noOpenRef: true + +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/blah.mts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/blah.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.mts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/only-in-cjs/index.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) *new* + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/workspaces/project/src/index.mts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/src/index.mts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/src/index.mts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 1, + "success": true + } +After Request +watchedFiles:: +/home/src/tslibs/TS/Lib/lib.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: + {"pollingInterval":500} +/home/src/workspaces/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/workspaces/project/package.json: + {"pollingInterval":2000} + {"pollingInterval":250} +/home/src/workspaces/project/src/blah.mts: + {"pollingInterval":500} +/home/src/workspaces/project/src/blah.ts: + {"pollingInterval":500} +/home/src/workspaces/project/src/index.ts: + {"pollingInterval":500} +/home/src/workspaces/project/src/only-in-cjs/index.ts: + {"pollingInterval":500} +/home/src/workspaces/project/src/only-in-cjs/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/src/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/home/src/workspaces/project/src/index.mts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/home/src/workspaces/node_modules: + {} +/home/src/workspaces/node_modules/@types: + {} + {} +/home/src/workspaces/project: + {} +/home/src/workspaces/project/node_modules: + {} +/home/src/workspaces/project/node_modules/@types: + {} + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *changed* + projectStateVersion: 1 + projectProgramVersion: 1 + noOpenRef: false *changed* + +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/blah.mts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.mts (Open) *changed* + open: true *changed* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/src/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/only-in-cjs/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 18 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": true, + "entries": [ + { + "name": "#blah", + "kind": "script", + "kindModifiers": "", + "sortText": "11" + }, + { + "name": "#index", + "kind": "script", + "kindModifiers": "", + "sortText": "11" + } + ], + "defaultCommitCharacters": [] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard6.js b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard6.js new file mode 100644 index 0000000000000..fb284dcc7a04b --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard6.js @@ -0,0 +1,477 @@ +Info seq [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false +Info seq [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib +Info seq [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript +Info seq [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist +//// [/home/src/tslibs/TS/Lib/lib.d.ts] +lib.d.ts-Text + +//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/home/src/workspaces/project/package.json] +{ + "name": "foo", + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "imports": { + "#*": "./dist/*?.d.ts" + } +} + +//// [/home/src/workspaces/project/src/blah?.ts] +export const blah = 0; + +//// [/home/src/workspaces/project/src/index.ts] +export const index = 0; + +//// [/home/src/workspaces/project/src/m.mts] +import { } from ""; + +//// [/home/src/workspaces/project/tsconfig.json] +{ + "compilerOptions": { + "module": "nodenext", + "rootDir": "src", + "outDir": "dist" + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : { + "rootNames": [ + "/home/src/workspaces/project/src/blah?.ts", + "/home/src/workspaces/project/src/index.ts", + "/home/src/workspaces/project/src/m.mts" + ], + "options": { + "module": 199, + "rootDir": "/home/src/workspaces/project/src", + "outDir": "/home/src/workspaces/project/dist", + "configFilePath": "/home/src/workspaces/project/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/home/src/workspaces/project/tsconfig.json", + "reason": "Creating possible configured project for /home/src/workspaces/project/tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/blah?.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/m.mts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts 500 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Missing file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + /home/src/workspaces/project/src/blah?.ts Text-1 "export const blah = 0;" + /home/src/workspaces/project/src/index.ts Text-1 "export const index = 0;" + /home/src/workspaces/project/src/m.mts Text-1 "import { } from \"\";" + + + src/blah?.ts + Matched by default include pattern '**/*' + File is CommonJS module because 'package.json' does not have field "type" + src/index.ts + Matched by default include pattern '**/*' + File is CommonJS module because 'package.json' does not have field "type" + src/m.mts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/home/src/workspaces/project/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/home/src/workspaces/project/tsconfig.json", + "configFile": "/home/src/workspaces/project/tsconfig.json", + "diagnostics": [ + { + "text": "File '/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts' not found.\n The file is in the program because:\n Default library for target 'esnext'", + "code": 6053, + "category": "error" + }, + { + "text": "Cannot find global type 'Array'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Boolean'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Function'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'IArguments'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Number'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Object'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'RegExp'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'String'.", + "code": 2318, + "category": "error" + } + ] + } + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: undefined +Info seq [hh:mm:ss:mss] Creating InferredProject: /dev/null/inferredProject1*, currentDirectory: /home/src/workspaces/project +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text + /home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"nodenext\",\n \"rootDir\": \"src\",\n \"outDir\": \"dist\"\n }\n}" + + + ../../tslibs/TS/Lib/lib.d.ts + Default library for target 'es5' + ../../tslibs/TS/Lib/lib.decorators.d.ts + Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts' + ../../tslibs/TS/Lib/lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 0, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + } + } +After Request +watchedFiles:: +/home/src/tslibs/TS/Lib/lib.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/jsconfig.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/package.json: *new* + {"pollingInterval":2000} + {"pollingInterval":250} +/home/src/workspaces/project/src/blah?.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/index.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/m.mts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/package.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/home/src/workspaces/node_modules: *new* + {} +/home/src/workspaces/node_modules/@types: *new* + {} + {} +/home/src/workspaces/project: *new* + {} +/home/src/workspaces/project/node_modules: *new* + {} +/home/src/workspaces/project/node_modules/@types: *new* + {} + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + noOpenRef: true + +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/blah?.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/m.mts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) *new* + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/m.mts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/workspaces/project/src/m.mts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/src/m.mts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/src/m.mts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 1, + "success": true + } +After Request +watchedFiles:: +/home/src/tslibs/TS/Lib/lib.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: + {"pollingInterval":500} +/home/src/workspaces/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/workspaces/project/package.json: + {"pollingInterval":2000} + {"pollingInterval":250} +/home/src/workspaces/project/src/blah?.ts: + {"pollingInterval":500} +/home/src/workspaces/project/src/index.ts: + {"pollingInterval":500} +/home/src/workspaces/project/src/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/home/src/workspaces/project/src/m.mts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/home/src/workspaces/node_modules: + {} +/home/src/workspaces/node_modules/@types: + {} + {} +/home/src/workspaces/project: + {} +/home/src/workspaces/project/node_modules: + {} +/home/src/workspaces/project/node_modules/@types: + {} + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *changed* + projectStateVersion: 1 + projectProgramVersion: 1 + noOpenRef: false *changed* + +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/blah?.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/m.mts (Open) *changed* + open: true *changed* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/m.mts", + "line": 1, + "offset": 18 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": true, + "entries": [ + { + "name": "#blah", + "kind": "script", + "kindModifiers": "", + "sortText": "11" + } + ], + "defaultCommitCharacters": [] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard7.js b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard7.js new file mode 100644 index 0000000000000..e8b921a29c1b2 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard7.js @@ -0,0 +1,453 @@ +Info seq [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false +Info seq [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib +Info seq [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript +Info seq [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist +//// [/home/src/tslibs/TS/Lib/lib.d.ts] +lib.d.ts-Text + +//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/home/src/workspaces/project/package.json] +{ + "name": "foo", + "imports": { + "#*": "./dist/*.js" + } +} + +//// [/home/src/workspaces/project/src/blah.ts] +export const blah = 0; + +//// [/home/src/workspaces/project/src/index.mts] +import { } from ""; + +//// [/home/src/workspaces/project/tsconfig.json] +{ + "compilerOptions": { + "module": "nodenext", + "rootDir": "src", + "outDir": "dist" + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : { + "rootNames": [ + "/home/src/workspaces/project/src/blah.ts", + "/home/src/workspaces/project/src/index.mts" + ], + "options": { + "module": 199, + "rootDir": "/home/src/workspaces/project/src", + "outDir": "/home/src/workspaces/project/dist", + "configFilePath": "/home/src/workspaces/project/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/home/src/workspaces/project/tsconfig.json", + "reason": "Creating possible configured project for /home/src/workspaces/project/tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/blah.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/index.mts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts 500 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Missing file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + /home/src/workspaces/project/src/blah.ts Text-1 "export const blah = 0;" + /home/src/workspaces/project/src/index.mts Text-1 "import { } from \"\";" + + + src/blah.ts + Matched by default include pattern '**/*' + File is CommonJS module because 'package.json' does not have field "type" + src/index.mts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/home/src/workspaces/project/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/home/src/workspaces/project/tsconfig.json", + "configFile": "/home/src/workspaces/project/tsconfig.json", + "diagnostics": [ + { + "text": "File '/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts' not found.\n The file is in the program because:\n Default library for target 'esnext'", + "code": 6053, + "category": "error" + }, + { + "text": "Cannot find global type 'Array'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Boolean'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Function'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'IArguments'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Number'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Object'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'RegExp'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'String'.", + "code": 2318, + "category": "error" + } + ] + } + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: undefined +Info seq [hh:mm:ss:mss] Creating InferredProject: /dev/null/inferredProject1*, currentDirectory: /home/src/workspaces/project +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text + /home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"nodenext\",\n \"rootDir\": \"src\",\n \"outDir\": \"dist\"\n }\n}" + + + ../../tslibs/TS/Lib/lib.d.ts + Default library for target 'es5' + ../../tslibs/TS/Lib/lib.decorators.d.ts + Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts' + ../../tslibs/TS/Lib/lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 0, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + } + } +After Request +watchedFiles:: +/home/src/tslibs/TS/Lib/lib.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/jsconfig.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/package.json: *new* + {"pollingInterval":2000} + {"pollingInterval":250} +/home/src/workspaces/project/src/blah.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/index.mts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/package.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/home/src/workspaces/node_modules: *new* + {} +/home/src/workspaces/node_modules/@types: *new* + {} + {} +/home/src/workspaces/project: *new* + {} +/home/src/workspaces/project/node_modules: *new* + {} +/home/src/workspaces/project/node_modules/@types: *new* + {} + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + noOpenRef: true + +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/blah.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.mts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) *new* + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/workspaces/project/src/index.mts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/src/index.mts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/src/index.mts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 1, + "success": true + } +After Request +watchedFiles:: +/home/src/tslibs/TS/Lib/lib.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: + {"pollingInterval":500} +/home/src/workspaces/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/workspaces/project/package.json: + {"pollingInterval":2000} + {"pollingInterval":250} +/home/src/workspaces/project/src/blah.ts: + {"pollingInterval":500} +/home/src/workspaces/project/src/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/home/src/workspaces/project/src/index.mts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/home/src/workspaces/node_modules: + {} +/home/src/workspaces/node_modules/@types: + {} + {} +/home/src/workspaces/project: + {} +/home/src/workspaces/project/node_modules: + {} +/home/src/workspaces/project/node_modules/@types: + {} + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *changed* + projectStateVersion: 1 + projectProgramVersion: 1 + noOpenRef: false *changed* + +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.mts (Open) *changed* + open: true *changed* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 18 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": true, + "entries": [ + { + "name": "#blah", + "kind": "script", + "kindModifiers": "", + "sortText": "11" + } + ], + "defaultCommitCharacters": [] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard8.js b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard8.js new file mode 100644 index 0000000000000..e8b921a29c1b2 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard8.js @@ -0,0 +1,453 @@ +Info seq [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false +Info seq [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib +Info seq [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript +Info seq [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist +//// [/home/src/tslibs/TS/Lib/lib.d.ts] +lib.d.ts-Text + +//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/home/src/workspaces/project/package.json] +{ + "name": "foo", + "imports": { + "#*": "./dist/*.js" + } +} + +//// [/home/src/workspaces/project/src/blah.ts] +export const blah = 0; + +//// [/home/src/workspaces/project/src/index.mts] +import { } from ""; + +//// [/home/src/workspaces/project/tsconfig.json] +{ + "compilerOptions": { + "module": "nodenext", + "rootDir": "src", + "outDir": "dist" + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : { + "rootNames": [ + "/home/src/workspaces/project/src/blah.ts", + "/home/src/workspaces/project/src/index.mts" + ], + "options": { + "module": 199, + "rootDir": "/home/src/workspaces/project/src", + "outDir": "/home/src/workspaces/project/dist", + "configFilePath": "/home/src/workspaces/project/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/home/src/workspaces/project/tsconfig.json", + "reason": "Creating possible configured project for /home/src/workspaces/project/tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/blah.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/index.mts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts 500 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Missing file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + /home/src/workspaces/project/src/blah.ts Text-1 "export const blah = 0;" + /home/src/workspaces/project/src/index.mts Text-1 "import { } from \"\";" + + + src/blah.ts + Matched by default include pattern '**/*' + File is CommonJS module because 'package.json' does not have field "type" + src/index.mts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/home/src/workspaces/project/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/home/src/workspaces/project/tsconfig.json", + "configFile": "/home/src/workspaces/project/tsconfig.json", + "diagnostics": [ + { + "text": "File '/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts' not found.\n The file is in the program because:\n Default library for target 'esnext'", + "code": 6053, + "category": "error" + }, + { + "text": "Cannot find global type 'Array'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Boolean'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Function'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'IArguments'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Number'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Object'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'RegExp'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'String'.", + "code": 2318, + "category": "error" + } + ] + } + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: undefined +Info seq [hh:mm:ss:mss] Creating InferredProject: /dev/null/inferredProject1*, currentDirectory: /home/src/workspaces/project +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text + /home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"nodenext\",\n \"rootDir\": \"src\",\n \"outDir\": \"dist\"\n }\n}" + + + ../../tslibs/TS/Lib/lib.d.ts + Default library for target 'es5' + ../../tslibs/TS/Lib/lib.decorators.d.ts + Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts' + ../../tslibs/TS/Lib/lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 0, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + } + } +After Request +watchedFiles:: +/home/src/tslibs/TS/Lib/lib.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/jsconfig.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/package.json: *new* + {"pollingInterval":2000} + {"pollingInterval":250} +/home/src/workspaces/project/src/blah.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/index.mts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/package.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/home/src/workspaces/node_modules: *new* + {} +/home/src/workspaces/node_modules/@types: *new* + {} + {} +/home/src/workspaces/project: *new* + {} +/home/src/workspaces/project/node_modules: *new* + {} +/home/src/workspaces/project/node_modules/@types: *new* + {} + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + noOpenRef: true + +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/blah.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.mts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) *new* + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/workspaces/project/src/index.mts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/src/index.mts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/src/index.mts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 1, + "success": true + } +After Request +watchedFiles:: +/home/src/tslibs/TS/Lib/lib.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: + {"pollingInterval":500} +/home/src/workspaces/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/workspaces/project/package.json: + {"pollingInterval":2000} + {"pollingInterval":250} +/home/src/workspaces/project/src/blah.ts: + {"pollingInterval":500} +/home/src/workspaces/project/src/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/home/src/workspaces/project/src/index.mts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/home/src/workspaces/node_modules: + {} +/home/src/workspaces/node_modules/@types: + {} + {} +/home/src/workspaces/project: + {} +/home/src/workspaces/project/node_modules: + {} +/home/src/workspaces/project/node_modules/@types: + {} + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *changed* + projectStateVersion: 1 + projectProgramVersion: 1 + noOpenRef: false *changed* + +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/blah.ts + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.mts (Open) *changed* + open: true *changed* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 18 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": true, + "entries": [ + { + "name": "#blah", + "kind": "script", + "kindModifiers": "", + "sortText": "11" + } + ], + "defaultCommitCharacters": [] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard9.js b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard9.js new file mode 100644 index 0000000000000..a3e4748da892b --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/pathCompletionsPackageJsonImportsSrcNoDistWildcard9.js @@ -0,0 +1,455 @@ +Info seq [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false +Info seq [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib +Info seq [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript +Info seq [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist +//// [/home/src/tslibs/TS/Lib/lib.d.ts] +lib.d.ts-Text + +//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/home/src/workspaces/project/package.json] +{ + "name": "foo", + "imports": { + "#*": "./dist/*.js" + } +} + +//// [/home/src/workspaces/project/src/blah.js] +export const blah = 0; + +//// [/home/src/workspaces/project/src/index.mts] +import { } from ""; + +//// [/home/src/workspaces/project/tsconfig.json] +{ + "compilerOptions": { + "module": "nodenext", + "rootDir": "src", + "outDir": "dist", + "allowJs": true + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] Creating ConfiguredProject: /home/src/workspaces/project/tsconfig.json, currentDirectory: /home/src/workspaces/project +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/tsconfig.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : { + "rootNames": [ + "/home/src/workspaces/project/src/blah.js", + "/home/src/workspaces/project/src/index.mts" + ], + "options": { + "module": 199, + "rootDir": "/home/src/workspaces/project/src", + "outDir": "/home/src/workspaces/project/dist", + "allowJs": true, + "configFilePath": "/home/src/workspaces/project/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/home/src/workspaces/project/tsconfig.json", + "reason": "Creating possible configured project for /home/src/workspaces/project/tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project 1 undefined Config: /home/src/workspaces/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/blah.js 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/index.mts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/src/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 2000 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts 500 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Missing file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /home/src/workspaces/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/workspaces/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + /home/src/workspaces/project/src/blah.js Text-1 "export const blah = 0;" + /home/src/workspaces/project/src/index.mts Text-1 "import { } from \"\";" + + + src/blah.js + Matched by default include pattern '**/*' + File is CommonJS module because 'package.json' does not have field "type" + src/index.mts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/home/src/workspaces/project/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/home/src/workspaces/project/tsconfig.json", + "configFile": "/home/src/workspaces/project/tsconfig.json", + "diagnostics": [ + { + "text": "File '/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts' not found.\n The file is in the program because:\n Default library for target 'esnext'", + "code": 6053, + "category": "error" + }, + { + "text": "Cannot find global type 'Array'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Boolean'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Function'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'IArguments'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Number'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Object'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'RegExp'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'String'.", + "code": 2318, + "category": "error" + } + ] + } + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined:: Result: undefined +Info seq [hh:mm:ss:mss] Creating InferredProject: /dev/null/inferredProject1*, currentDirectory: /home/src/workspaces/project +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/workspaces/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text + /home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"nodenext\",\n \"rootDir\": \"src\",\n \"outDir\": \"dist\",\n \"allowJs\": true\n }\n}" + + + ../../tslibs/TS/Lib/lib.d.ts + Default library for target 'es5' + ../../tslibs/TS/Lib/lib.decorators.d.ts + Library referenced via 'decorators' from file '../../tslibs/TS/Lib/lib.d.ts' + ../../tslibs/TS/Lib/lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../tslibs/TS/Lib/lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/workspaces/project/package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 0, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + } + } +After Request +watchedFiles:: +/home/src/tslibs/TS/Lib/lib.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/jsconfig.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/package.json: *new* + {"pollingInterval":2000} + {"pollingInterval":250} +/home/src/workspaces/project/src/blah.js: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/index.mts: *new* + {"pollingInterval":500} +/home/src/workspaces/project/src/package.json: *new* + {"pollingInterval":2000} +/home/src/workspaces/project/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/home/src/workspaces/node_modules: *new* + {} +/home/src/workspaces/node_modules/@types: *new* + {} + {} +/home/src/workspaces/project: *new* + {} +/home/src/workspaces/project/node_modules: *new* + {} +/home/src/workspaces/project/node_modules/@types: *new* + {} + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + noOpenRef: true + +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/blah.js *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.mts *new* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/tsconfig.json (Open) *new* + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/workspaces/project/src/index.mts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/workspaces/project/src/index.mts ProjectRootPath: undefined:: Result: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/home/src/workspaces/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /home/src/workspaces/project/src/index.mts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /home/src/workspaces/project/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 1, + "success": true + } +After Request +watchedFiles:: +/home/src/tslibs/TS/Lib/lib.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts: + {"pollingInterval":500} +/home/src/workspaces/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/workspaces/project/package.json: + {"pollingInterval":2000} + {"pollingInterval":250} +/home/src/workspaces/project/src/blah.js: + {"pollingInterval":500} +/home/src/workspaces/project/src/package.json: + {"pollingInterval":2000} +/home/src/workspaces/project/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/home/src/workspaces/project/src/index.mts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/home/src/workspaces/node_modules: + {} +/home/src/workspaces/node_modules/@types: + {} + {} +/home/src/workspaces/project: + {} +/home/src/workspaces/project/node_modules: + {} +/home/src/workspaces/project/node_modules/@types: + {} + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) + projectStateVersion: 1 + projectProgramVersion: 1 + autoImportProviderHost: false +/home/src/workspaces/project/tsconfig.json (Configured) *changed* + projectStateVersion: 1 + projectProgramVersion: 1 + noOpenRef: false *changed* + +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/home/src/workspaces/project/src/blah.js + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json +/home/src/workspaces/project/src/index.mts (Open) *changed* + open: true *changed* + version: Text-1 + containingProjects: 1 + /home/src/workspaces/project/tsconfig.json *default* +/home/src/workspaces/project/tsconfig.json (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/home/src/workspaces/project/src/index.mts", + "line": 1, + "offset": 18 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": true, + "entries": [ + { + "name": "#blah", + "kind": "script", + "kindModifiers": "", + "sortText": "11" + } + ], + "defaultCommitCharacters": [] + } + } \ No newline at end of file diff --git a/tests/cases/fourslash/completionsPaths_pathMapping_nonTrailingWildcard1.ts b/tests/cases/fourslash/completionsPaths_pathMapping_nonTrailingWildcard1.ts new file mode 100644 index 0000000000000..65f8c7e59b5d7 --- /dev/null +++ b/tests/cases/fourslash/completionsPaths_pathMapping_nonTrailingWildcard1.ts @@ -0,0 +1,58 @@ +/// + +// @Filename: /src/b.ts +////export const x = 0; + +// @Filename: /src/dir/x.ts +/////export const x = 0; + +// @Filename: /src/a.ts +////import {} from "foo//*0*/"; +////import {} from "foo/dir//*1*/"; // invalid +////import {} from "foo/_/*2*/"; +////import {} from "foo/_dir//*3*/"; + +// @Filename: /tsconfig.json +////{ +//// "compilerOptions": { +//// "baseUrl": ".", +//// "paths": { +//// "foo/_*/suffix": ["src/*.ts"] +//// } +//// } +////} + +verify.completions( + { + marker: "0", + exact: [ + { name: "foo/_a/suffix", kind: "script" }, + { name: "foo/_b/suffix", kind: "script" }, + { name: "foo/_dir/suffix", kind: "directory" }, + ], + isNewIdentifierLocation: true, + }, + { + marker: "1", + exact: [ + { name: "foo/_a/suffix", kind: "script" }, + { name: "foo/_b/suffix", kind: "script" }, + { name: "foo/_dir/suffix", kind: "directory" }, + ], + isNewIdentifierLocation: true, + }, + { + marker: "2", + exact: [ + { name: "a", kind: "script" }, + { name: "b", kind: "script" }, + { name: "dir", kind: "directory" }, + ], + isNewIdentifierLocation: true, + }, + { + marker: "3", + exact: { name: "x", kind: "script" }, + isNewIdentifierLocation: true, + }, +); diff --git a/tests/cases/fourslash/importCompletionsPackageJsonExportsSpecifierEndsInTs.ts b/tests/cases/fourslash/importCompletionsPackageJsonExportsSpecifierEndsInTs.ts new file mode 100644 index 0000000000000..0549081b7ddeb --- /dev/null +++ b/tests/cases/fourslash/importCompletionsPackageJsonExportsSpecifierEndsInTs.ts @@ -0,0 +1,31 @@ +/// + +// @module: nodenext + +// @Filename: /node_modules/pkg/package.json +//// { +//// "name": "pkg", +//// "version": "1.0.0", +//// "exports": { +//// "./something.ts": "./a.js" +//// } +//// } + +// @Filename: /node_modules/pkg/a.d.ts +//// export function foo(): void; + +// @Filename: /package.json +//// { +//// "dependencies": { +//// "pkg": "*" +//// } +//// } + +// @Filename: /index.ts +//// import {} from "pkg//*1*/"; + +verify.completions({ + marker: ["1"], + exact: ["something.ts"], + isNewIdentifierLocation: true, +}); diff --git a/tests/cases/fourslash/importCompletionsPackageJsonExportsTrailingSlash1.ts b/tests/cases/fourslash/importCompletionsPackageJsonExportsTrailingSlash1.ts new file mode 100644 index 0000000000000..e381945b5d926 --- /dev/null +++ b/tests/cases/fourslash/importCompletionsPackageJsonExportsTrailingSlash1.ts @@ -0,0 +1,38 @@ +/// + +// @module: nodenext +// @moduleResolution: nodenext + +// @Filename: /node_modules/pkg/package.json +//// { +//// "name": "pkg", +//// "version": "1.0.0", +//// "exports": { +//// "./test/": "./" +//// } +//// } + +// @Filename: /node_modules/pkg/foo.d.ts +//// export function foo(): void; + +// @Filename: /package.json +//// { +//// "dependencies": { +//// "pkg": "*" +//// } +//// } + +// @Filename: /index.ts +//// import {} from "pkg//*1*/"; +//// import {} from "pkg/test//*2*/"; + +verify.completions({ + marker: ["1"], + exact: ["test"], + isNewIdentifierLocation: true, +}); +verify.completions({ + marker: ["2"], + exact: ["foo.js"], + isNewIdentifierLocation: true, +}); diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsConditions1.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsConditions1.ts new file mode 100644 index 0000000000000..9bac2d834dd42 --- /dev/null +++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsConditions1.ts @@ -0,0 +1,25 @@ +/// + +// @module: nodenext + +// @Filename: /package.json +//// { +//// "imports": { +//// "#thing": { +//// "types": { "import": "./types-esm/thing.d.mts", "require": "./types/thing.d.ts" }, +//// "default": { "import": "./esm/thing.mjs", "require": "./dist/thing.js" } +//// } +//// } +//// } + +// @Filename: /types/thing.d.ts +//// export function something(name: string): any; + +// @Filename: /src/foo.ts +//// import {} from "/*1*/"; + +verify.completions({ + marker: ["1"], + exact: ["#thing"], + isNewIdentifierLocation: true, +}); diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsLength1.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsLength1.ts new file mode 100644 index 0000000000000..36380677a29de --- /dev/null +++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsLength1.ts @@ -0,0 +1,46 @@ +/// + +// @module: nodenext + +// @Filename: /package.json +//// { +//// "imports": { +//// "#*": "./src/*.ts" +//// } +//// } + +// @Filename: /src/a/b/c/something.ts +//// export function something(name: string): any; + +// @Filename: /src/a/b/c/d.ts +//// import {} from "/*1*/"; +//// import {} from "#a//*2*/"; +//// import {} from "#a/b//*3*/"; +//// import {} from "#a/b/c//*4*/"; +//// import {} from "#a/b/c/something//*5*/"; + +verify.completions({ + marker: ["1"], + exact: ["#a"], + isNewIdentifierLocation: true, +}); +verify.completions({ + marker: ["2"], + exact: ["b"], + isNewIdentifierLocation: true, +}); +verify.completions({ + marker: ["3"], + exact: ["c"], + isNewIdentifierLocation: true, +}); +verify.completions({ + marker: ["4"], + exact: ["d", "something"], + isNewIdentifierLocation: true, +}); +verify.completions({ + marker: ["5"], + exact: [], + isNewIdentifierLocation: true, +}); diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsLength2.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsLength2.ts new file mode 100644 index 0000000000000..8dd812c00ef2c --- /dev/null +++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsLength2.ts @@ -0,0 +1,47 @@ +/// + +// @module: nodenext + +// @Filename: /package.json +//// { +//// "imports": { +//// "#*": "./src/*.ts" +//// } +//// } + +// @Filename: /src/a/b/c/something.ts +//// export function something(name: string): any; + +// @Filename: /a.ts +//// import {} from "/*1*/"; +//// import {} from "#a//*2*/"; +//// import {} from "#a/b//*3*/"; +//// import {} from "#a/b/c//*4*/"; +//// import {} from "#a/b/c/something//*5*/"; + +verify.completions({ + marker: ["1"], + exact: ["#a"], + isNewIdentifierLocation: true, +}); +verify.completions({ + marker: ["2"], + exact: ["b"], + isNewIdentifierLocation: true, +}); +verify.completions({ + marker: ["3"], + exact: ["c"], + isNewIdentifierLocation: true, +}); +verify.completions({ + marker: ["4"], + exact: ["something"], + isNewIdentifierLocation: true, +}); +verify.completions({ + marker: ["5"], + exact: [], + isNewIdentifierLocation: true, +}); + diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern.ts new file mode 100644 index 0000000000000..89b84c7b5bf47 --- /dev/null +++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern.ts @@ -0,0 +1,22 @@ +/// + +// @module: nodenext + +// @Filename: /package.json +//// { +//// "imports": { +//// "#*": "./src/*" +//// } +//// } + +// @Filename: /src/something.ts +//// export function something(name: string): any; + +// @Filename: /a.ts +//// import {} from "/*1*/"; + +verify.completions({ + marker: ["1"], + exact: ["#something.js"], + isNewIdentifierLocation: true, +}); diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern2.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern2.ts new file mode 100644 index 0000000000000..2cbea78b63351 --- /dev/null +++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern2.ts @@ -0,0 +1,23 @@ +/// + +// @module: nodenext +// @allowImportingTsExtensions: true + +// @Filename: /package.json +//// { +//// "imports": { +//// "#*": "./src/*" +//// } +//// } + +// @Filename: /src/something.ts +//// export function something(name: string): any; + +// @Filename: /a.ts +//// import {} from "/*1*/"; + +verify.completions({ + marker: ["1"], + exact: ["#something.ts"], + isNewIdentifierLocation: true, +}); diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_capsInPath1.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_capsInPath1.ts new file mode 100644 index 0000000000000..f75079c117361 --- /dev/null +++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_capsInPath1.ts @@ -0,0 +1,22 @@ +/// + +// @module: nodenext + +// @Filename: /Dev/package.json +//// { +//// "imports": { +//// "#thing": "./src/something.js" +//// } +//// } + +// @Filename: /Dev/src/something.ts +//// export function something(name: string): any; + +// @Filename: /Dev/a.ts +//// import {} from "/*1*/"; + +verify.completions({ + marker: ["1"], + exact: ["#thing"], + isNewIdentifierLocation: true, +}); diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_capsInPath2.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_capsInPath2.ts new file mode 100644 index 0000000000000..fcb66e518d0f4 --- /dev/null +++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_capsInPath2.ts @@ -0,0 +1,27 @@ +/// + +// @module: nodenext + +// @Filename: /Dev/package.json +//// { +//// "imports": { +//// "#thing/*": "./src/*.js" +//// } +//// } + +// @Filename: /Dev/src/something.ts +//// export function something(name: string): any; + +// @Filename: /Dev/a.ts +//// import {} from "#thing//*2*/"; + +// verify.completions({ +// marker: ["1"], +// exact: ["#thing"], +// isNewIdentifierLocation: true, +// }); +verify.completions({ + marker: ["2"], + exact: ["something"], + isNewIdentifierLocation: true, +}); diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_js.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_js.ts new file mode 100644 index 0000000000000..62c47e19cfb12 --- /dev/null +++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_js.ts @@ -0,0 +1,22 @@ +/// + +// @module: nodenext + +// @Filename: /package.json +//// { +//// "imports": { +//// "#*": "./src/*.js" +//// } +//// } + +// @Filename: /src/something.ts +//// export function something(name: string): any; + +// @Filename: /a.ts +//// import {} from "/*1*/"; + +verify.completions({ + marker: ["1"], + exact: ["#something"], + isNewIdentifierLocation: true, +}); diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_js_ts.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_js_ts.ts new file mode 100644 index 0000000000000..0b79cad7fbc52 --- /dev/null +++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_js_ts.ts @@ -0,0 +1,22 @@ +/// + +// @module: nodenext + +// @Filename: /package.json +//// { +//// "imports": { +//// "#*.js": "./src/*.ts" +//// } +//// } + +// @Filename: /src/something.ts +//// export function something(name: string): any; + +// @Filename: /a.ts +//// import {} from "/*1*/"; + +verify.completions({ + marker: ["1"], + exact: ["#something.js"], + isNewIdentifierLocation: true, +}); \ No newline at end of file diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_ts.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_ts.ts new file mode 100644 index 0000000000000..ef3ef47db4367 --- /dev/null +++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_ts.ts @@ -0,0 +1,22 @@ +/// + +// @module: nodenext + +// @Filename: /package.json +//// { +//// "imports": { +//// "#*": "./src/*.ts" +//// } +//// } + +// @Filename: /src/something.ts +//// export function something(name: string): any; + +// @Filename: /a.ts +//// import {} from "/*1*/"; + +verify.completions({ + marker: ["1"], + exact: ["#something"], + isNewIdentifierLocation: true, +}); diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_ts_js.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_ts_js.ts new file mode 100644 index 0000000000000..595d3b0a7194d --- /dev/null +++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_ts_js.ts @@ -0,0 +1,22 @@ +/// + +// @module: nodenext + +// @Filename: /package.json +//// { +//// "imports": { +//// "#*.ts": "./src/*.js" +//// } +//// } + +// @Filename: /src/something.ts +//// export function something(name: string): any; + +// @Filename: /a.ts +//// import {} from "/*1*/"; + +verify.completions({ + marker: ["1"], + exact: ["#something.ts"], + isNewIdentifierLocation: true, +}); diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_ts_ts.ts b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_ts_ts.ts new file mode 100644 index 0000000000000..e6dafdb1a3dc7 --- /dev/null +++ b/tests/cases/fourslash/importCompletionsPackageJsonImportsPattern_ts_ts.ts @@ -0,0 +1,22 @@ +/// + +// @module: nodenext + +// @Filename: /package.json +//// { +//// "imports": { +//// "#*.ts": "./src/*.ts" +//// } +//// } + +// @Filename: /src/something.ts +//// export function something(name: string): any; + +// @Filename: /a.ts +//// import {} from "/*1*/"; + +verify.completions({ + marker: ["1"], + exact: ["#something.ts"], + isNewIdentifierLocation: true, +}); diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImports_js.ts b/tests/cases/fourslash/importCompletionsPackageJsonImports_js.ts new file mode 100644 index 0000000000000..b650f213eaa89 --- /dev/null +++ b/tests/cases/fourslash/importCompletionsPackageJsonImports_js.ts @@ -0,0 +1,22 @@ +/// + +// @module: nodenext + +// @Filename: /package.json +//// { +//// "imports": { +//// "#thing": "./src/something.js" +//// } +//// } + +// @Filename: /src/something.ts +//// export function something(name: string): any; + +// @Filename: /a.ts +//// import {} from "/*1*/"; + +verify.completions({ + marker: ["1"], + exact: ["#thing"], + isNewIdentifierLocation: true, +}); diff --git a/tests/cases/fourslash/importCompletionsPackageJsonImports_ts.ts b/tests/cases/fourslash/importCompletionsPackageJsonImports_ts.ts new file mode 100644 index 0000000000000..0c8563e8665b3 --- /dev/null +++ b/tests/cases/fourslash/importCompletionsPackageJsonImports_ts.ts @@ -0,0 +1,22 @@ +/// + +// @module: nodenext + +// @Filename: /package.json +//// { +//// "imports": { +//// "#thing": "./src/something.ts" +//// } +//// } + +// @Filename: /src/something.ts +//// export function something(name: string): any; + +// @Filename: /a.ts +//// import {} from "/*1*/"; + +verify.completions({ + marker: ["1"], + exact: ["#thing"], + isNewIdentifierLocation: true, +}); diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard12.ts b/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard12.ts new file mode 100644 index 0000000000000..9b6dcd8ce31a7 --- /dev/null +++ b/tests/cases/fourslash/pathCompletionsPackageJsonExportsWildcard12.ts @@ -0,0 +1,55 @@ +/// + +// @module: nodenext + +// @Filename: /node_modules/foo/package.json +//// { +//// "name": "foo", +//// "exports": { +//// "./bar/_*/suffix": "./dist/*.js" +//// } +//// } + +// @Filename: /node_modules/foo/dist/b.d.ts +////export const x = 0; + +// @Filename: /node_modules/foo/dist/dir/x.d.ts +/////export const x = 0; + +// @Filename: /a.mts +////import {} from "foo/bar//*0*/"; +////import {} from "foo/bar/dir//*1*/"; // invalid +////import {} from "foo/bar/_/*2*/"; +////import {} from "foo/bar/_dir//*3*/"; + +verify.completions( + { + marker: "0", + exact: [ + { name: "bar/_b/suffix", kind: "script" }, + { name: "bar/_dir/suffix", kind: "directory" }, + ], + isNewIdentifierLocation: true, + }, + { + marker: "1", + exact: [ + { name: "bar/_b/suffix", kind: "script" }, + { name: "bar/_dir/suffix", kind: "directory" }, + ], + isNewIdentifierLocation: true, + }, + { + marker: "2", + exact: [ + { name: "b", kind: "script" }, + { name: "dir", kind: "directory" }, + ], + isNewIdentifierLocation: true, + }, + { + marker: "3", + exact: { name: "x", kind: "script" }, + isNewIdentifierLocation: true, + }, +); diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsBundlerNoNodeCondition.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsBundlerNoNodeCondition.ts new file mode 100644 index 0000000000000..324c51f0a696b --- /dev/null +++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsBundlerNoNodeCondition.ts @@ -0,0 +1,31 @@ +/// + +// @moduleResolution: bundler + +// @Filename: /package.json +//// { +//// "name": "foo", +//// "imports": { +//// "#only-for-node": { +//// "node": "./something.js" +//// }, +//// "#for-everywhere": "./other.js", +//// } +//// } + +// @Filename: /something.d.ts +//// export const index = 0; + +// @Filename: /other.d.ts +//// export const index = 0; + +// @Filename: /index.ts +//// import { } from "/**/"; + +verify.completions({ + marker: "", + isNewIdentifierLocation: true, + exact: [ + { name: "#for-everywhere", kind: "script", kindModifiers: "" }, + ] +}); diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsCustomConditions.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsCustomConditions.ts new file mode 100644 index 0000000000000..81a4da924773e --- /dev/null +++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsCustomConditions.ts @@ -0,0 +1,28 @@ +/// + +// @module: nodenext +// @customConditions: custom-condition + +// @Filename: /package.json +//// { +//// "name": "foo", +//// "imports": { +//// "#only-with-custom-conditions": { +//// "custom-condition": "./something.js" +//// }, +//// } +//// } + +// @Filename: /something.d.ts +//// export const index = 0; + +// @Filename: /index.ts +//// import { } from "/**/"; + +verify.completions({ + marker: "", + isNewIdentifierLocation: true, + exact: [ + { name: "#only-with-custom-conditions", kind: "script", kindModifiers: "" }, + ] +}); diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsIgnoreMatchingNodeModule1.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsIgnoreMatchingNodeModule1.ts new file mode 100644 index 0000000000000..c38db992d9a1f --- /dev/null +++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsIgnoreMatchingNodeModule1.ts @@ -0,0 +1,22 @@ +/// + +// @module: nodenext + +// @Filename: /src/node_modules/#internal/package.json +//// { +//// "imports": { +//// "#thing": "./dist/something.js" +//// } +//// } + +// @Filename: /src/node_modules/#internal/dist/something.d.ts +//// export function something(name: string): any; + +// @Filename: /src/a.ts +//// import {} from "#internal//*1*/"; + +verify.completions({ + marker: ["1"], + exact: [], + isNewIdentifierLocation: true, +}); diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsIgnoreMatchingNodeModule2.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsIgnoreMatchingNodeModule2.ts new file mode 100644 index 0000000000000..81616077fb03f --- /dev/null +++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsIgnoreMatchingNodeModule2.ts @@ -0,0 +1,25 @@ +/// + +// @module: nodenext + +// @Filename: /package.json +//// { +//// "imports": { +//// "#internal/*": "./src/*.ts" +//// } +//// } + +// @Filename: /src/something.ts +//// export function something(name: string): any; + +// @Filename: /src/node_modules/#internal/package.json +//// {} + +// @Filename: /src/a.ts +//// import {} from "#internal//*1*/"; + +verify.completions({ + marker: ["1"], + exact: ["a", "something"], + isNewIdentifierLocation: true, +}); diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsOnlyFromClosestScope1.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsOnlyFromClosestScope1.ts new file mode 100644 index 0000000000000..0c5e569b2a000 --- /dev/null +++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsOnlyFromClosestScope1.ts @@ -0,0 +1,34 @@ +/// + +// @module: nodenext + +// @Filename: /package.json +//// { +//// "imports": { +//// "#thing": "./src/something.ts" +//// } +//// } + +// @Filename: /src/package.json +//// {} + +// @Filename: /src/something.ts +//// export function something(name: string): any; + +// @Filename: /src/a.ts +//// import {} from "/*1*/"; + +// @Filename: /a.ts +//// import {} from "/*2*/"; + +verify.completions({ + marker: ["1"], + exact: [], + isNewIdentifierLocation: true, +}); + +verify.completions({ + marker: ["2"], + exact: ["#thing"], + isNewIdentifierLocation: true, +}); diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard1.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard1.ts new file mode 100644 index 0000000000000..274412a2fe8d5 --- /dev/null +++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard1.ts @@ -0,0 +1,45 @@ +/// + +// @module: nodenext + +// @Filename: /package.json +//// { +//// "name": "foo", +//// "main": "dist/index.js", +//// "module": "dist/index.mjs", +//// "types": "dist/index.d.ts", +//// "imports": { +//// "#*": { +//// "types": "./dist/*.d.ts", +//// "import": "./dist/*.mjs", +//// "default": "./dist/*.js" +//// }, +//// "#arguments": { +//// "types": "./dist/arguments/index.d.ts", +//// "import": "./dist/arguments/index.mjs", +//// "default": "./dist/arguments/index.js" +//// } +//// } +//// } + +// @Filename: /dist/index.d.ts +//// export const index = 0; + +// @Filename: /dist/blah.d.ts +//// export const blah = 0; + +// @Filename: /dist/arguments/index.d.ts +//// export const arguments = 0; + +// @Filename: /index.mts +//// import { } from "/**/"; + +verify.completions({ + marker: "", + isNewIdentifierLocation: true, + exact: [ + { name: "#blah", kind: "script", kindModifiers: "" }, + { name: "#index", kind: "script", kindModifiers: "" }, + { name: "#arguments", kind: "script", kindModifiers: "" }, + ] +}); diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard10.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard10.ts new file mode 100644 index 0000000000000..129e291e4c2ae --- /dev/null +++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard10.ts @@ -0,0 +1,28 @@ +/// + +// @module: preserve +// @moduleResolution: bundler +// @allowImportingTsExtensions: true +// @jsx: react + +// @Filename: /package.json +//// { +//// "name": "repo", +//// "imports": { +//// "#*": "./src/*" +//// } +//// } + +// @Filename: /src/card.tsx +//// export {}; + +// @Filename: /main.ts +//// import { } from "/**/"; + +verify.completions({ + marker: "", + isNewIdentifierLocation: true, + exact: [ + { name: "#card.tsx", kind: "script", kindModifiers: ".tsx" }, + ], +}); diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard11.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard11.ts new file mode 100644 index 0000000000000..a355b245eb908 --- /dev/null +++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard11.ts @@ -0,0 +1,27 @@ +/// + +// @module: preserve +// @moduleResolution: bundler +// @jsx: react + +// @Filename: /package.json +//// { +//// "name": "repo", +//// "imports": { +//// "#*": "./src/*" +//// } +//// } + +// @Filename: /src/card.tsx +//// export {}; + +// @Filename: /main.ts +//// import { } from "/**/"; + +verify.completions({ + marker: "", + isNewIdentifierLocation: true, + exact: [ + { name: "#card.js", kind: "script", kindModifiers: ".js" }, + ], +}); diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard12.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard12.ts new file mode 100644 index 0000000000000..d0fdfedbc1fa6 --- /dev/null +++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard12.ts @@ -0,0 +1,58 @@ +/// + +// @module: nodenext + +// @Filename: /package.json +//// { +//// "name": "repo", +//// "imports": { +//// "#foo/_*/suffix": "./src/*.ts" +//// } +//// } + +// @Filename: /src/b.ts +////export const x = 0; + +// @Filename: /src/dir/x.ts +/////export const x = 0; + +// @Filename: /src/a.ts +////import {} from "#foo//*0*/"; +////import {} from "#foo/dir//*1*/"; // invalid +////import {} from "#foo/_/*2*/"; +////import {} from "#foo/_dir//*3*/"; + +verify.completions( + { + marker: "0", + exact: [ + { name: "#foo/_a/suffix", kind: "script" }, + { name: "#foo/_b/suffix", kind: "script" }, + { name: "#foo/_dir/suffix", kind: "directory" }, + ], + isNewIdentifierLocation: true, + }, + { + marker: "1", + exact: [ + { name: "#foo/_a/suffix", kind: "script" }, + { name: "#foo/_b/suffix", kind: "script" }, + { name: "#foo/_dir/suffix", kind: "directory" }, + ], + isNewIdentifierLocation: true, + }, + { + marker: "2", + exact: [ + { name: "a", kind: "script" }, + { name: "b", kind: "script" }, + { name: "dir", kind: "directory" }, + ], + isNewIdentifierLocation: true, + }, + { + marker: "3", + exact: { name: "x", kind: "script" }, + isNewIdentifierLocation: true, + }, +); diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard2.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard2.ts new file mode 100644 index 0000000000000..0e53d02ecc378 --- /dev/null +++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard2.ts @@ -0,0 +1,42 @@ +/// + +// @module: nodenext + +// @Filename: /package.json +//// { +//// "name": "salesforce-pageobjects", +//// "version": "1.0.0", +//// "imports": { +//// "#*": { +//// "types": "./dist/*.d.ts", +//// "import": "./dist/*.mjs", +//// "default": "./dist/*.js" +//// } +//// } +//// } + +// @Filename: /dist/action/pageObjects/actionRenderer.d.ts +//// export const actionRenderer = 0; + +// @Filename: /index.mts +//// import { } from "/**/"; + +verify.completions({ + marker: "", + isNewIdentifierLocation: true, + exact: [{ name: "#action", kind: "directory" }] +}); + +edit.insert("#action/"); + +verify.completions({ + isNewIdentifierLocation: true, + exact: [{ name: "pageObjects", kind: "directory" }], +}); + +edit.insert("pageObjects/"); + +verify.completions({ + isNewIdentifierLocation: true, + exact: [{ name: "actionRenderer", kind: "script" }], +}); diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard3.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard3.ts new file mode 100644 index 0000000000000..e5ca68e643938 --- /dev/null +++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard3.ts @@ -0,0 +1,45 @@ +/// + +// @module: nodenext + +// @Filename: /package.json +//// { +//// "types": "index.d.ts", +//// "imports": { +//// "#component-*": { +//// "types@>=4.3.5": "types/components/*.d.ts" +//// } +//// } +//// } + +// @Filename: /nope.d.ts +//// export const nope = 0; + +// @Filename: /types/components/index.d.ts +//// export const index = 0; + +// @Filename: /types/components/blah.d.ts +//// export const blah = 0; + +// @Filename: /types/components/subfolder/one.d.ts +//// export const one = 0; + +// @Filename: /a.ts +//// import { } from "/**/"; + +verify.completions({ + marker: "", + isNewIdentifierLocation: true, + exact: [ + { name: "#component-blah", kind: "script" }, + { name: "#component-index", kind: "script" }, + { name: "#component-subfolder", kind: "directory" }, + ], +}); + +edit.insert("#component-subfolder/"); + +verify.completions({ + isNewIdentifierLocation: true, + exact: [{ name: "one", kind: "script" }], +}); diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard4.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard4.ts new file mode 100644 index 0000000000000..06ead3662e97b --- /dev/null +++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard4.ts @@ -0,0 +1,64 @@ +/// + +// @module: nodenext + +// @Filename: /package.json +//// { +//// "types": "index.d.ts", +//// "imports": { +//// "#*": "dist/*", +//// "#foo/*": "dist/*", +//// "#bar/*": "dist/*", +//// "#exact-match": "dist/index.d.ts" +//// } +//// } + +// @Filename: /nope.d.ts +//// export const nope = 0; + +// @Filename: /dist/index.d.ts +//// export const index = 0; + +// @Filename: /dist/blah.d.ts +//// export const blah = 0; + +// @Filename: /dist/foo/onlyInFooFolder.d.ts +//// export const foo = 0; + +// @Filename: /dist/subfolder/one.d.ts +//// export const one = 0; + +// @Filename: /a.mts +//// import { } from "/**/"; + +verify.completions({ + marker: "", + isNewIdentifierLocation: true, + exact: [ + { name: "#blah.js", kind: "script", kindModifiers: ".js" }, + { name: "#index.js", kind: "script", kindModifiers: ".js" }, + { name: "#foo", kind: "directory" }, + { name: "#subfolder", kind: "directory" }, + { name: "#bar", kind: "directory" }, + { name: "#exact-match", kind: "script" }, + ], +}); + +edit.insert("#foo/"); + +verify.completions({ + isNewIdentifierLocation: true, + exact: [ + { name: "blah.js", kind: "script", kindModifiers: ".js" }, + { name: "index.js", kind: "script", kindModifiers: ".js" }, + { name: "foo", kind: "directory" }, + { name: "subfolder", kind: "directory" }, + ], +}); + +edit.insert("foo/"); + +verify.completions({ + isNewIdentifierLocation: true, + exact: [{ name: "onlyInFooFolder.js", kind: "script", kindModifiers: ".js" }], +}); diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard5.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard5.ts new file mode 100644 index 0000000000000..4217ece6826c9 --- /dev/null +++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard5.ts @@ -0,0 +1,56 @@ +/// + +// @module: nodenext + +// @Filename: /package.json +//// { +//// "name": "foo", +//// "main": "dist/index.js", +//// "module": "dist/index.mjs", +//// "types": "dist/index.d.ts", +//// "imports": { +//// "#*": { +//// "import": { +//// "types": "./dist/types/*.d.mts", +//// "default": "./dist/esm/*.mjs" +//// }, +//// "default": { +//// "types": "./dist/types/*.d.ts", +//// "default": "./dist/cjs/*.js" +//// } +//// }, +//// "#only-in-cjs": { +//// "require": { +//// "types": "./dist/types/only-in-cjs/index.d.ts", +//// "default": "./dist/cjs/only-in-cjs/index.js" +//// } +//// } +//// } +//// } + +// @Filename: /dist/types/index.d.mts +//// export const index = 0; + +// @Filename: /dist/types/index.d.ts +//// export const index = 0; + +// @Filename: /dist/types/blah.d.mts +//// export const blah = 0; + +// @Filename: /dist/types/blah.d.ts +//// export const blah = 0; + +// @Filename: /dist/types/only-in-cjs/index.d.ts +//// export const onlyInCjs = 0; + +// @Filename: /index.mts +//// import { } from "/**/"; + +verify.completions({ + marker: "", + isNewIdentifierLocation: true, + exact: [ + { name: "#blah", kind: "script", kindModifiers: "" }, + { name: "#index", kind: "script", kindModifiers: "" }, + ] +}); diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard6.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard6.ts new file mode 100644 index 0000000000000..265fbe322404e --- /dev/null +++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard6.ts @@ -0,0 +1,31 @@ +/// + +// @module: nodenext + +// @Filename: /package.json +//// { +//// "name": "foo", +//// "main": "dist/index.js", +//// "module": "dist/index.mjs", +//// "types": "dist/index.d.ts", +//// "imports": { +//// "#*": "./dist/*?.d.ts" +//// } +//// } + +// @Filename: /dist/index.d.ts +//// export const index = 0; + +// @Filename: /dist/blah?.d.ts +//// export const blah = 0; + +// @Filename: /index.mts +//// import { } from "/**/"; + +verify.completions({ + marker: "", + isNewIdentifierLocation: true, + exact: [ + { name: "#blah", kind: "script", kindModifiers: "" }, + ] +}); diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard7.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard7.ts new file mode 100644 index 0000000000000..42446088f6586 --- /dev/null +++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard7.ts @@ -0,0 +1,25 @@ +/// + +// @module: nodenext + +// @Filename: /package.json +//// { +//// "name": "foo", +//// "imports": { +//// "#*": "./dist/*.js" +//// } +//// } + +// @Filename: /dist/blah.d.ts +//// export const blah = 0; + +// @Filename: /index.mts +//// import { } from "/**/"; + +verify.completions({ + marker: "", + isNewIdentifierLocation: true, + exact: [ + { name: "#blah", kind: "script", kindModifiers: "" }, + ] +}); diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard8.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard8.ts new file mode 100644 index 0000000000000..b66761c43257d --- /dev/null +++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard8.ts @@ -0,0 +1,28 @@ +/// + +// @module: nodenext + +// @Filename: /package.json +//// { +//// "name": "foo", +//// "imports": { +//// "#*": "./dist/*.js" +//// } +//// } + +// @Filename: /dist/blah.js +//// export const blah = 0; + +// @Filename: /dist/blah.d.ts +//// export declare const blah: 0; + +// @Filename: /index.mts +//// import { } from "/**/"; + +verify.completions({ + marker: "", + isNewIdentifierLocation: true, + exact: [ + { name: "#blah", kind: "script", kindModifiers: "" }, + ] +}); diff --git a/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard9.ts b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard9.ts new file mode 100644 index 0000000000000..5e3ba519e23c3 --- /dev/null +++ b/tests/cases/fourslash/pathCompletionsPackageJsonImportsWildcard9.ts @@ -0,0 +1,26 @@ +/// + +// @module: nodenext +// @allowJs: true + +// @Filename: /package.json +//// { +//// "name": "foo", +//// "imports": { +//// "#*": "./dist/*.js" +//// } +//// } + +// @Filename: /dist/blah.js +//// export const blah = 0; + +// @Filename: /index.mts +//// import { } from "/**/"; + +verify.completions({ + marker: "", + isNewIdentifierLocation: true, + exact: [ + { name: "#blah", kind: "script", kindModifiers: "" }, + ] +}); diff --git a/tests/cases/fourslash/server/importCompletions_importsMap1.ts b/tests/cases/fourslash/server/importCompletions_importsMap1.ts new file mode 100644 index 0000000000000..530704bfb5d74 --- /dev/null +++ b/tests/cases/fourslash/server/importCompletions_importsMap1.ts @@ -0,0 +1,36 @@ +/// + +// @Filename: /home/src/workspaces/project/tsconfig.json +//// { +//// "compilerOptions": { +//// "module": "nodenext", +//// "rootDir": "src", +//// "outDir": "dist" +//// } +//// } + +// @Filename: /home/src/workspaces/project/package.json +//// { +//// "type": "module", +//// "imports": { +//// "#is-browser": { +//// "browser": "./dist/env/browser.js", +//// "default": "./dist/env/node.js" +//// } +//// } +//// } + +// @Filename: /home/src/workspaces/project/src/env/browser.ts +//// export const isBrowser = true; + +// @Filename: /home/src/workspaces/project/src/env/node.ts +//// export const isBrowser = false; + +// @Filename: /home/src/workspaces/project/src/a.ts +//// import {} from "/*1*/"; + +verify.completions({ + marker: ["1"], + exact: ["#is-browser"], + isNewIdentifierLocation: true, +}); diff --git a/tests/cases/fourslash/server/importCompletions_importsMap2.ts b/tests/cases/fourslash/server/importCompletions_importsMap2.ts new file mode 100644 index 0000000000000..10ea87f0aca2d --- /dev/null +++ b/tests/cases/fourslash/server/importCompletions_importsMap2.ts @@ -0,0 +1,36 @@ +/// + +// @Filename: /home/src/workspaces/project/tsconfig.json +//// { +//// "compilerOptions": { +//// "module": "nodenext", +//// "rootDir": "src", +//// "outDir": "dist" +//// } +//// } + +// @Filename: /home/src/workspaces/project/package.json +//// { +//// "type": "module", +//// "imports": { +//// "#internal/*": "./dist/internal/*" +//// } +//// } + +// @Filename: /home/src/workspaces/project/src/internal/foo.ts +//// export function something(name: string) {} + +// @Filename: /home/src/workspaces/project/src/a.ts +//// import {} from "/*1*/"; +//// import {} from "#internal//*2*/"; + +verify.completions({ + marker: ["1"], + exact: ["#internal"], + isNewIdentifierLocation: true, +}); +verify.completions({ + marker: ["2"], + exact: ["foo.js"], + isNewIdentifierLocation: true, +}); diff --git a/tests/cases/fourslash/server/importCompletions_importsMap3.ts b/tests/cases/fourslash/server/importCompletions_importsMap3.ts new file mode 100644 index 0000000000000..01776d771a3db --- /dev/null +++ b/tests/cases/fourslash/server/importCompletions_importsMap3.ts @@ -0,0 +1,36 @@ +/// + +// @Filename: /home/src/workspaces/project/tsconfig.json +//// { +//// "compilerOptions": { +//// "module": "nodenext", +//// "rootDir": "src", +//// "outDir": "dist" +//// } +//// } + +// @Filename: /home/src/workspaces/project/package.json +//// { +//// "type": "module", +//// "imports": { +//// "#internal/": "./dist/internal/" +//// } +//// } + +// @Filename: /home/src/workspaces/project/src/internal/foo.ts +//// export function something(name: string) {} + +// @Filename: /home/src/workspaces/project/src/a.ts +//// import {} from "/*1*/"; +//// import {} from "#internal//*2*/"; + +verify.completions({ + marker: ["1"], + exact: ["#internal"], + isNewIdentifierLocation: true, +}); +verify.completions({ + marker: ["2"], + exact: ["foo.js"], + isNewIdentifierLocation: true, +}); diff --git a/tests/cases/fourslash/server/importCompletions_importsMap4.ts b/tests/cases/fourslash/server/importCompletions_importsMap4.ts new file mode 100644 index 0000000000000..3e15b253f4710 --- /dev/null +++ b/tests/cases/fourslash/server/importCompletions_importsMap4.ts @@ -0,0 +1,33 @@ +/// + +// @Filename: /home/src/workspaces/project/tsconfig.json +//// { +//// "compilerOptions": { +//// "module": "nodenext", +//// "rootDir": "src", +//// "outDir": "dist" +//// } +//// } + +// @Filename: /home/src/workspaces/project/package.json +//// { +//// "type": "module", +//// "imports": { +//// "#is-browser": { +//// "types": "./dist/env/browser.d.ts", +//// "default": "./dist/env/browser.js" +//// } +//// } +//// } + +// @Filename: /home/src/workspaces/project/src/env/browser.ts +//// export const isBrowser = true; + +// @Filename: /home/src/workspaces/project/src/a.ts +//// import {} from "/*1*/"; + +verify.completions({ + marker: ["1"], + exact: ["#is-browser"], + isNewIdentifierLocation: true, +}); diff --git a/tests/cases/fourslash/server/importCompletions_importsMap5.ts b/tests/cases/fourslash/server/importCompletions_importsMap5.ts new file mode 100644 index 0000000000000..0b240075a1e66 --- /dev/null +++ b/tests/cases/fourslash/server/importCompletions_importsMap5.ts @@ -0,0 +1,34 @@ +/// + +// @Filename: /home/src/workspaces/project/tsconfig.json +//// { +//// "compilerOptions": { +//// "module": "nodenext", +//// "rootDir": "src", +//// "outDir": "dist", +//// "declarationDir": "types", +//// } +//// } + +// @Filename: /home/src/workspaces/project/package.json +//// { +//// "type": "module", +//// "imports": { +//// "#is-browser": { +//// "types": "./types/env/browser.d.ts", +//// "default": "./not-dist-on-purpose/env/browser.js" +//// } +//// } +//// } + +// @Filename: /home/src/workspaces/project/src/env/browser.ts +//// export const isBrowser = true; + +// @Filename: /home/src/workspaces/project/src/a.ts +//// import {} from "/*1*/"; + +verify.completions({ + marker: ["1"], + exact: ["#is-browser"], + isNewIdentifierLocation: true, +}); diff --git a/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard1.ts b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard1.ts new file mode 100644 index 0000000000000..0bc1ad2dbdacc --- /dev/null +++ b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard1.ts @@ -0,0 +1,52 @@ +/// + +// @Filename: /home/src/workspaces/project/tsconfig.json +//// { +//// "compilerOptions": { +//// "module": "nodenext", +//// "rootDir": "src", +//// "outDir": "dist" +//// } +//// } + +// @Filename: /home/src/workspaces/project/package.json +//// { +//// "name": "foo", +//// "main": "dist/index.js", +//// "module": "dist/index.mjs", +//// "types": "dist/index.d.ts", +//// "imports": { +//// "#*": { +//// "types": "./dist/*.d.ts", +//// "import": "./dist/*.mjs", +//// "default": "./dist/*.js" +//// }, +//// "#arguments": { +//// "types": "./dist/arguments/index.d.ts", +//// "import": "./dist/arguments/index.mjs", +//// "default": "./dist/arguments/index.js" +//// } +//// } +//// } + +// @Filename: /home/src/workspaces/project/src/index.ts +//// export const index = 0; + +// @Filename: /home/src/workspaces/project/src/blah.ts +//// export const blah = 0; + +// @Filename: /home/src/workspaces/project/src/arguments/index.ts +//// export const arguments = 0; + +// @Filename: /home/src/workspaces/project/src/m.mts +//// import { } from "/**/"; + +verify.completions({ + marker: "", + isNewIdentifierLocation: true, + exact: [ + { name: "#blah", kind: "script", kindModifiers: "" }, + { name: "#index", kind: "script", kindModifiers: "" }, + { name: "#arguments", kind: "script", kindModifiers: "" }, + ] +}); diff --git a/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard2.ts b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard2.ts new file mode 100644 index 0000000000000..5dbbeba52d78c --- /dev/null +++ b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard2.ts @@ -0,0 +1,49 @@ +/// + +// @Filename: /home/src/workspaces/project/tsconfig.json +//// { +//// "compilerOptions": { +//// "module": "nodenext", +//// "rootDir": "src", +//// "outDir": "dist" +//// } +//// } + +// @Filename: /home/src/workspaces/project/package.json +//// { +//// "name": "salesforce-pageobjects", +//// "version": "1.0.0", +//// "imports": { +//// "#*": { +//// "types": "./dist/*.d.ts", +//// "import": "./dist/*.mjs", +//// "default": "./dist/*.js" +//// } +//// } +//// } + +// @Filename: /home/src/workspaces/project/src/action/pageObjects/actionRenderer.ts +//// export const actionRenderer = 0; + +// @Filename: /home/src/workspaces/project/src/index.mts +//// import { } from "/**/"; + +verify.completions({ + marker: "", + isNewIdentifierLocation: true, + exact: [{ name: "#action", kind: "directory" }] +}); + +edit.insert("#action/"); + +verify.completions({ + isNewIdentifierLocation: true, + exact: [{ name: "pageObjects", kind: "directory" }], +}); + +edit.insert("pageObjects/"); + +verify.completions({ + isNewIdentifierLocation: true, + exact: [{ name: "actionRenderer", kind: "script" }], +}); diff --git a/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard3.ts b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard3.ts new file mode 100644 index 0000000000000..443382bdf4811 --- /dev/null +++ b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard3.ts @@ -0,0 +1,53 @@ +/// + +// @Filename: /home/src/workspaces/project/tsconfig.json +//// { +//// "compilerOptions": { +//// "module": "nodenext", +//// "rootDir": "src", +//// "outDir": "dist", +//// "declarationDir": "types" +//// } +//// } + +// @Filename: /home/src/workspaces/project/package.json +//// { +//// "types": "index.d.ts", +//// "imports": { +//// "#component-*": { +//// "types@>=4.3.5": "types/components/*.d.ts" +//// } +//// } +//// } + +// @Filename: /home/src/workspaces/project/nope.ts +//// export const nope = 0; + +// @Filename: /home/src/workspaces/project/src/components/index.ts +//// export const index = 0; + +// @Filename: /home/src/workspaces/project/src/components/blah.ts +//// export const blah = 0; + +// @Filename: /home/src/workspaces/project/src/components/subfolder/one.ts +//// export const one = 0; + +// @Filename: /home/src/workspaces/project/src/a.ts +//// import { } from "/**/"; + +verify.completions({ + marker: "", + isNewIdentifierLocation: true, + exact: [ + { name: "#component-blah", kind: "script" }, + { name: "#component-index", kind: "script" }, + { name: "#component-subfolder", kind: "directory" }, + ], +}); + +edit.insert("#component-subfolder/"); + +verify.completions({ + isNewIdentifierLocation: true, + exact: [{ name: "one", kind: "script" }], +}); diff --git a/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard4.ts b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard4.ts new file mode 100644 index 0000000000000..ae393be7ce4d6 --- /dev/null +++ b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard4.ts @@ -0,0 +1,73 @@ +/// + +// @Filename: /home/src/workspaces/project/tsconfig.json +//// { +//// "compilerOptions": { +//// "module": "nodenext", +//// "rootDir": "src", +//// "outDir": "dist" +//// } +//// } + +// @Filename: /home/src/workspaces/project/package.json +//// { +//// "types": "index.d.ts", +//// "imports": { +//// "#*": "dist/*", +//// "#foo/*": "dist/*", +//// "#bar/*": "dist/*", +//// "#exact-match": "dist/index.d.ts" +//// } +//// } + +// @Filename: /home/src/workspaces/project/nope.ts +//// export const nope = 0; + +// @Filename: /home/src/workspaces/project/src/index.ts +//// export const index = 0; + +// @Filename: /home/src/workspaces/project/src/blah.ts +//// export const blah = 0; + +// @Filename: /home/src/workspaces/project/src/foo/onlyInFooFolder.ts +//// export const foo = 0; + +// @Filename: /home/src/workspaces/project/src/subfolder/one.ts +//// export const one = 0; + +// @Filename: /home/src/workspaces/project/src/a.mts +//// import { } from "/**/"; + +verify.completions({ + marker: "", + isNewIdentifierLocation: true, + exact: [ + { name: "#a.mjs", kind: "script", kindModifiers: ".mjs" }, + { name: "#blah.js", kind: "script", kindModifiers: ".js" }, + { name: "#index.js", kind: "script", kindModifiers: ".js" }, + { name: "#foo", kind: "directory" }, + { name: "#subfolder", kind: "directory" }, + { name: "#bar", kind: "directory" }, + { name: "#exact-match", kind: "script" }, + ], +}); + +edit.insert("#foo/"); + +verify.completions({ + isNewIdentifierLocation: true, + exact: [ + { name: "a.mjs", kind: "script", kindModifiers: ".mjs" }, + { name: "blah.js", kind: "script", kindModifiers: ".js" }, + { name: "index.js", kind: "script", kindModifiers: ".js" }, + { name: "foo", kind: "directory" }, + { name: "subfolder", kind: "directory" }, + ], +}); + +edit.insert("foo/"); + +verify.completions({ + isNewIdentifierLocation: true, + exact: [{ name: "onlyInFooFolder.js", kind: "script", kindModifiers: ".js" }], +}); diff --git a/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard5.ts b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard5.ts new file mode 100644 index 0000000000000..d63f313c1773e --- /dev/null +++ b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard5.ts @@ -0,0 +1,64 @@ +/// + +// @Filename: /home/src/workspaces/project/tsconfig.json +//// { +//// "compilerOptions": { +//// "module": "nodenext", +//// "rootDir": "src", +//// "outDir": "dist/esm", +//// "declarationDir": "dist/types" +//// } +//// } + +// @Filename: /home/src/workspaces/project/package.json +//// { +//// "name": "foo", +//// "main": "dist/index.js", +//// "module": "dist/index.mjs", +//// "types": "dist/index.d.ts", +//// "imports": { +//// "#*": { +//// "import": { +//// "types": "./dist/types/*.d.mts", +//// "default": "./dist/esm/*.mjs" +//// }, +//// "default": { +//// "types": "./dist/types/*.d.ts", +//// "default": "./dist/cjs/*.js" +//// } +//// }, +//// "#only-in-cjs": { +//// "require": { +//// "types": "./dist/types/only-in-cjs/index.d.ts", +//// "default": "./dist/cjs/only-in-cjs/index.js" +//// } +//// } +//// } +//// } + +// @Filename: /home/src/workspaces/project/src/index.mts +//// export const index = 0; + +// @Filename: /home/src/workspaces/project/src/index.ts +//// export const index = 0; + +// @Filename: /home/src/workspaces/project/src/blah.mts +//// export const blah = 0; + +// @Filename: /home/src/workspaces/project/src/blah.ts +//// export const blah = 0; + +// @Filename: /home/src/workspaces/project/src/only-in-cjs/index.ts +//// export const onlyInCjs = 0; + +// @Filename: /home/src/workspaces/project/src/index.mts +//// import { } from "/**/"; + +verify.completions({ + marker: "", + isNewIdentifierLocation: true, + exact: [ + { name: "#blah", kind: "script", kindModifiers: "" }, + { name: "#index", kind: "script", kindModifiers: "" }, + ] +}); diff --git a/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard6.ts b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard6.ts new file mode 100644 index 0000000000000..79026a3f7c2b3 --- /dev/null +++ b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard6.ts @@ -0,0 +1,38 @@ +/// + +// @Filename: /home/src/workspaces/project/tsconfig.json +//// { +//// "compilerOptions": { +//// "module": "nodenext", +//// "rootDir": "src", +//// "outDir": "dist" +//// } +//// } + +// @Filename: /home/src/workspaces/project/package.json +//// { +//// "name": "foo", +//// "main": "dist/index.js", +//// "module": "dist/index.mjs", +//// "types": "dist/index.d.ts", +//// "imports": { +//// "#*": "./dist/*?.d.ts" +//// } +//// } + +// @Filename: /home/src/workspaces/project/src/index.ts +//// export const index = 0; + +// @Filename: /home/src/workspaces/project/src/blah?.ts +//// export const blah = 0; + +// @Filename: /home/src/workspaces/project/src/m.mts +//// import { } from "/**/"; + +verify.completions({ + marker: "", + isNewIdentifierLocation: true, + exact: [ + { name: "#blah", kind: "script", kindModifiers: "" }, + ] +}); diff --git a/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard7.ts b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard7.ts new file mode 100644 index 0000000000000..c26da613c1304 --- /dev/null +++ b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard7.ts @@ -0,0 +1,32 @@ +/// + +// @Filename: /home/src/workspaces/project/tsconfig.json +//// { +//// "compilerOptions": { +//// "module": "nodenext", +//// "rootDir": "src", +//// "outDir": "dist" +//// } +//// } + +// @Filename: /home/src/workspaces/project/package.json +//// { +//// "name": "foo", +//// "imports": { +//// "#*": "./dist/*.js" +//// } +//// } + +// @Filename: /home/src/workspaces/project/src/blah.ts +//// export const blah = 0; + +// @Filename: /home/src/workspaces/project/src/index.mts +//// import { } from "/**/"; + +verify.completions({ + marker: "", + isNewIdentifierLocation: true, + exact: [ + { name: "#blah", kind: "script", kindModifiers: "" }, + ] +}); diff --git a/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard8.ts b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard8.ts new file mode 100644 index 0000000000000..c26da613c1304 --- /dev/null +++ b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard8.ts @@ -0,0 +1,32 @@ +/// + +// @Filename: /home/src/workspaces/project/tsconfig.json +//// { +//// "compilerOptions": { +//// "module": "nodenext", +//// "rootDir": "src", +//// "outDir": "dist" +//// } +//// } + +// @Filename: /home/src/workspaces/project/package.json +//// { +//// "name": "foo", +//// "imports": { +//// "#*": "./dist/*.js" +//// } +//// } + +// @Filename: /home/src/workspaces/project/src/blah.ts +//// export const blah = 0; + +// @Filename: /home/src/workspaces/project/src/index.mts +//// import { } from "/**/"; + +verify.completions({ + marker: "", + isNewIdentifierLocation: true, + exact: [ + { name: "#blah", kind: "script", kindModifiers: "" }, + ] +}); diff --git a/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard9.ts b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard9.ts new file mode 100644 index 0000000000000..fdbe7436f4d96 --- /dev/null +++ b/tests/cases/fourslash/server/pathCompletionsPackageJsonImportsSrcNoDistWildcard9.ts @@ -0,0 +1,33 @@ +/// + +// @Filename: /home/src/workspaces/project/tsconfig.json +//// { +//// "compilerOptions": { +//// "module": "nodenext", +//// "rootDir": "src", +//// "outDir": "dist", +//// "allowJs": true +//// } +//// } + +// @Filename: /home/src/workspaces/project/package.json +//// { +//// "name": "foo", +//// "imports": { +//// "#*": "./dist/*.js" +//// } +//// } + +// @Filename: /home/src/workspaces/project/src/blah.js +//// export const blah = 0; + +// @Filename: /home/src/workspaces/project/src/index.mts +//// import { } from "/**/"; + +verify.completions({ + marker: "", + isNewIdentifierLocation: true, + exact: [ + { name: "#blah", kind: "script", kindModifiers: "" }, + ] +});