From f659bec7649f9ecab61cd34e3beda9380469f744 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 12 Oct 2023 14:34:14 -0700 Subject: [PATCH] If typing installer is disabled invalidate all the resolutions from typings cache This change finally makes all tests pass incremental tests for matching resolutions and program structuture --- src/compiler/resolutionCache.ts | 67 +- src/compiler/types.ts | 2 + src/compiler/watchPublic.ts | 1 - src/harness/incrementalUtils.ts | 13 +- src/server/editorServices.ts | 6 +- src/server/project.ts | 41 +- ...ultiple-projects-with-shared-resolution.js | 529 ++++----------- ...abling-typeAquisition-multiple-projects.js | 603 ++++------------- .../change-after-enabling-typeAquisition.js | 605 +++++++----------- ...ultiple-projects-with-shared-resolution.js | 196 +++++- ...aller-installs-typing-multiple-projects.js | 224 ++++++- ...n-when-typing-installer-installs-typing.js | 207 +++++- ...ultiple-projects-with-shared-resolution.js | 197 +++++- ...lready-aquired-typing-multiple-projects.js | 221 ++++++- ...eAquisition-with-already-aquired-typing.js | 209 +++++- ...ultiple-projects-with-shared-resolution.js | 304 +++------ ...aller-installs-typing-multiple-projects.js | 306 +++------ ...n-when-typing-installer-installs-typing.js | 255 ++------ ...ultiple-projects-with-shared-resolution.js | 343 ++++------ ...after-project-changes-multiple-projects.js | 345 ++++------ ...update-of-typings-after-project-changes.js | 290 +++------ 21 files changed, 2250 insertions(+), 2714 deletions(-) diff --git a/src/compiler/resolutionCache.ts b/src/compiler/resolutionCache.ts index 902f34a39be..df2f8695790 100644 --- a/src/compiler/resolutionCache.ts +++ b/src/compiler/resolutionCache.ts @@ -99,6 +99,8 @@ export interface ResolutionCache { fileWatchesOfAffectingLocations: Map; packageDirWatchers: Map; dirPathToSymlinkPackageRefCount: Map; + countResolutionsResolvedWithGlobalCache(): number; + countResolutionsResolvedWithoutGlobalCache(): number; startRecordingFilesWithChangedResolutions(): void; finishRecordingFilesWithChangedResolutions(): Path[] | undefined; @@ -138,6 +140,8 @@ export interface ResolutionCache { ): ResolvedModuleWithFailedLookupLocations; invalidateResolutionsOfFailedLookupLocations(): boolean; + invalidateResolutionsWithGlobalCachePass(): void; + invalidateResolutionsWithoutGlobalCachePass(): void; invalidateResolutionOfFile(filePath: Path): void; removeResolutionsOfFile(filePath: Path): void; removeResolutionsFromProjectReferenceRedirects(filePath: Path): void; @@ -169,6 +173,7 @@ export interface ResolutionWithFailedLookupLocations { // Files that have this resolution using files?: Set; alternateResult?: string; + globalCacheResolution?: ResolvedModuleWithFailedLookupLocations | false; } /** @internal */ @@ -537,16 +542,20 @@ function resolveModuleNameUsingGlobalCache( const host = getModuleResolutionHost(resolutionHost); const primaryResult = ts_resolveModuleName(moduleName, containingFile, compilerOptions, host, moduleResolutionCache, redirectedReference, mode); // return result immediately only if global cache support is not enabled or if it is .ts, .tsx or .d.ts - if (!resolutionHost.getGlobalTypingsCacheLocation) { + if (!resolutionHost.getGlobalTypingsCacheLocation || primaryResult.globalCacheResolution !== undefined) { return primaryResult; } // otherwise try to load typings from @types const globalCache = resolutionHost.getGlobalTypingsCacheLocation(); - if (globalCache !== undefined && !isExternalModuleNameRelative(moduleName) && !(primaryResult.resolvedModule && extensionIsTS(primaryResult.resolvedModule.extension))) { + if (!isExternalModuleNameRelative(moduleName) && !(primaryResult.resolvedModule && extensionIsTS(primaryResult.resolvedModule.extension))) { + if (globalCache === undefined) { + primaryResult.globalCacheResolution = false; + return primaryResult; + } // create different collection of failed lookup locations for second pass // if it will fail and we've already found something during the first pass - we don't want to pollute its results - const { resolvedModule, failedLookupLocations, affectingLocations, resolutionDiagnostics } = loadModuleFromGlobalCache( + primaryResult.globalCacheResolution = loadModuleFromGlobalCache( Debug.checkDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName), resolutionHost.projectName, compilerOptions, @@ -554,12 +563,12 @@ function resolveModuleNameUsingGlobalCache( globalCache, moduleResolutionCache, ); - if (resolvedModule) { + if (primaryResult.globalCacheResolution.resolvedModule) { // Modify existing resolution so its saved in the directory cache as well - (primaryResult.resolvedModule as any) = resolvedModule; - primaryResult.failedLookupLocations = updateResolutionField(primaryResult.failedLookupLocations, failedLookupLocations); - primaryResult.affectingLocations = updateResolutionField(primaryResult.affectingLocations, affectingLocations); - primaryResult.resolutionDiagnostics = updateResolutionField(primaryResult.resolutionDiagnostics, resolutionDiagnostics); + (primaryResult.resolvedModule as any) = primaryResult.globalCacheResolution.resolvedModule; + primaryResult.failedLookupLocations = updateResolutionField(primaryResult.failedLookupLocations, primaryResult.globalCacheResolution.failedLookupLocations); + primaryResult.affectingLocations = updateResolutionField(primaryResult.affectingLocations, primaryResult.globalCacheResolution.affectingLocations); + primaryResult.resolutionDiagnostics = updateResolutionField(primaryResult.resolutionDiagnostics, primaryResult.globalCacheResolution.resolutionDiagnostics); return primaryResult; } } @@ -572,7 +581,10 @@ function resolveModuleNameUsingGlobalCache( export type GetResolutionWithResolvedFileName = (resolution: T) => R | undefined; /** @internal */ -export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootDirForResolution: string, logChangesWhenResolvingModule: boolean): ResolutionCache { +export function createResolutionCache( + resolutionHost: ResolutionCacheHost, + rootDirForResolution: string, +): ResolutionCache { let filesWithChangedSetOfUnresolvedImports: Path[] | undefined; let filesWithInvalidatedResolutions: Set | undefined; let filesWithInvalidatedNonRelativeUnresolvedImports: ReadonlyMap | undefined; @@ -590,6 +602,8 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD let startsWithPathChecks: Set | undefined; let isInDirectoryChecks: Set | undefined; let allModuleAndTypeResolutionsAreInvalidated = false; + let resolutionsWithGlobalCachePassAreInvalidated = false; + let resolutionsWithoutGlobalCachePassAreInvalidated = false; const getCurrentDirectory = memoize(() => resolutionHost.getCurrentDirectory!()); const cachedDirectoryStructureHost = resolutionHost.getCachedDirectoryStructureHost(); @@ -621,6 +635,9 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD moduleResolutionCache.getPackageJsonInfoCache(), ); + let resolutionsResolvedWithGlobalCache = 0; + let resolutionsResolvedWithoutGlobalCache = 0; + const directoryWatchesOfFailedLookups = new Map(); const fileWatchesOfAffectingLocations = new Map(); const rootDir = getRootDirectoryOfResolutionCache(rootDirForResolution, getCurrentDirectory); @@ -647,6 +664,8 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD fileWatchesOfAffectingLocations, packageDirWatchers, dirPathToSymlinkPackageRefCount, + countResolutionsResolvedWithGlobalCache: () => resolutionsResolvedWithGlobalCache, + countResolutionsResolvedWithoutGlobalCache: () => resolutionsResolvedWithoutGlobalCache, watchFailedLookupLocationsOfExternalModuleResolutions, getModuleResolutionCache: () => moduleResolutionCache, startRecordingFilesWithChangedResolutions, @@ -664,6 +683,8 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD hasChangedAutomaticTypeDirectiveNames: () => hasChangedAutomaticTypeDirectiveNames, invalidateResolutionOfFile, invalidateResolutionsOfFailedLookupLocations, + invalidateResolutionsWithGlobalCachePass, + invalidateResolutionsWithoutGlobalCachePass, setFilesWithInvalidatedNonRelativeUnresolvedImports, createHasInvalidatedResolutions, isFileWithInvalidatedNonRelativeUnresolvedImports, @@ -686,12 +707,16 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD resolvedFileToResolution.clear(); resolutionsWithFailedLookups.clear(); resolutionsWithOnlyAffectingLocations.clear(); + resolutionsResolvedWithGlobalCache = 0; + resolutionsResolvedWithoutGlobalCache = 0; failedLookupChecks = undefined; startsWithPathChecks = undefined; isInDirectoryChecks = undefined; affectingPathChecks = undefined; affectingPathChecksForFile = undefined; allModuleAndTypeResolutionsAreInvalidated = false; + resolutionsWithGlobalCachePassAreInvalidated = false; + resolutionsWithoutGlobalCachePassAreInvalidated = false; moduleResolutionCache.clear(); typeReferenceDirectiveResolutionCache.clear(); moduleResolutionCache.update(resolutionHost.getCompilationSettings()); @@ -1027,7 +1052,7 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD ), getResolutionWithResolvedFileName: getResolvedModuleFromResolution, shouldRetryResolution: resolution => !resolution.resolvedModule || !resolutionExtensionIsTSOrJson(resolution.resolvedModule.extension), - logChanges: logChangesWhenResolvingModule, + logChanges: !!resolutionHost.getGlobalTypingsCacheLocation, deferWatchingNonRelativeResolution: true, // Defer non relative resolution watch because we could be using ambient modules }); } @@ -1102,6 +1127,8 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD ) { (resolution.files ??= new Set()).add(filePath); if (resolution.files.size !== 1) return; + if (resolution.globalCacheResolution) resolutionsResolvedWithGlobalCache++; + else if (resolution.globalCacheResolution === false) resolutionsResolvedWithoutGlobalCache++; if (!deferWatchingNonRelativeResolution || isExternalModuleNameRelative(name)) { watchFailedLookupLocationOfResolution(resolution); } @@ -1378,6 +1405,8 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD Debug.checkDefined(resolution.files).delete(filePath); if (resolution.files!.size) return; resolution.files = undefined; + if (resolution.globalCacheResolution) resolutionsResolvedWithGlobalCache--; + if (resolution.globalCacheResolution === false) resolutionsResolvedWithoutGlobalCache--; const resolved = getResolutionWithResolvedFileName(resolution); if (resolved && resolved.resolvedFileName) { const key = resolutionHost.toPath(resolved.resolvedFileName); @@ -1558,6 +1587,13 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD } } + function invalidateResolutionsWithGlobalCachePass() { + if (resolutionsResolvedWithGlobalCache) resolutionsWithGlobalCachePassAreInvalidated = true; + } + function invalidateResolutionsWithoutGlobalCachePass() { + if (resolutionsResolvedWithoutGlobalCache) resolutionsWithoutGlobalCachePassAreInvalidated = true; + } + function invalidateResolutionsOfFailedLookupLocations() { if (allModuleAndTypeResolutionsAreInvalidated) { affectingPathChecksForFile = undefined; @@ -1569,6 +1605,8 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD startsWithPathChecks = undefined; isInDirectoryChecks = undefined; affectingPathChecks = undefined; + resolutionsWithGlobalCachePassAreInvalidated = false; + resolutionsWithoutGlobalCachePassAreInvalidated = false; return true; } let invalidated = false; @@ -1582,7 +1620,10 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD affectingPathChecksForFile = undefined; } - if (!failedLookupChecks && !startsWithPathChecks && !isInDirectoryChecks && !affectingPathChecks) { + if ( + !failedLookupChecks && !startsWithPathChecks && !isInDirectoryChecks && !affectingPathChecks && + !resolutionsWithGlobalCachePassAreInvalidated && !resolutionsWithoutGlobalCachePassAreInvalidated + ) { return invalidated; } @@ -1593,6 +1634,8 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD isInDirectoryChecks = undefined; invalidated = invalidateResolutions(resolutionsWithOnlyAffectingLocations, canInvalidatedFailedLookupResolutionWithAffectingLocation) || invalidated; affectingPathChecks = undefined; + resolutionsWithGlobalCachePassAreInvalidated = false; + resolutionsWithoutGlobalCachePassAreInvalidated = false; return invalidated; } @@ -1612,6 +1655,8 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD } function canInvalidatedFailedLookupResolutionWithAffectingLocation(resolution: ResolutionWithFailedLookupLocations) { + if (resolutionsWithGlobalCachePassAreInvalidated && resolution.globalCacheResolution) return true; + if (resolutionsWithoutGlobalCachePassAreInvalidated && resolution.globalCacheResolution === false) return true; return !!affectingPathChecks && resolution.affectingLocations?.some(location => affectingPathChecks!.has(location)); } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 232605341b5..c1fe132b0b9 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -8063,6 +8063,8 @@ export interface ResolvedModuleWithFailedLookupLocations { * have been resolvable under different module resolution settings. */ alternateResult?: string; + /** @internal */ + globalCacheResolution?: ResolvedModuleWithFailedLookupLocations | false; } export interface ResolvedTypeReferenceDirective { diff --git a/src/compiler/watchPublic.ts b/src/compiler/watchPublic.ts index 4bcedabb7eb..69e864af971 100644 --- a/src/compiler/watchPublic.ts +++ b/src/compiler/watchPublic.ts @@ -523,7 +523,6 @@ export function createWatchProgram(host: WatchCompiler configFileName ? getDirectoryPath(getNormalizedAbsolutePath(configFileName, currentDirectory)) : currentDirectory, - /*logChangesWhenResolvingModule*/ false, ); // Resolve module using host module resolution strategy if provided otherwise use resolution cache to resolve module names compilerHost.resolveModuleNameLiterals = maybeBind(host, host.resolveModuleNameLiterals); diff --git a/src/harness/incrementalUtils.ts b/src/harness/incrementalUtils.ts index 55301c7ec61..70b539cb5d2 100644 --- a/src/harness/incrementalUtils.ts +++ b/src/harness/incrementalUtils.ts @@ -206,7 +206,7 @@ export function verifyResolutionCache( projectName: string, ): void { const currentDirectory = resolutionHostCacheHost.getCurrentDirectory!(); - const expected = ts.createResolutionCache(resolutionHostCacheHost, actual.rootDirForResolution, /*logChangesWhenResolvingModule*/ false); + const expected = ts.createResolutionCache(resolutionHostCacheHost, actual.rootDirForResolution); expected.startCachingPerDirectoryResolution(); type ExpectedResolution = ts.CachedResolvedModuleWithFailedLookupLocations & ts.CachedResolvedTypeReferenceDirectiveWithFailedLookupLocations; @@ -269,6 +269,14 @@ export function verifyResolutionCache( verifyFileWatchesOfAffectingLocations(expected.fileWatchesOfAffectingLocations, actual.fileWatchesOfAffectingLocations); verifyPackageDirWatchers(expected.packageDirWatchers, actual.packageDirWatchers); verifyDirPathToSymlinkPackageRefCount(expected.dirPathToSymlinkPackageRefCount, actual.dirPathToSymlinkPackageRefCount); + ts.Debug.assert( + expected.countResolutionsResolvedWithGlobalCache() === actual.countResolutionsResolvedWithGlobalCache(), + `${projectName}:: Expected ResolutionsResolvedWithGlobalCache count ${expected.countResolutionsResolvedWithGlobalCache()} but got ${actual.countResolutionsResolvedWithGlobalCache()}`, + ); + ts.Debug.assert( + expected.countResolutionsResolvedWithoutGlobalCache() === actual.countResolutionsResolvedWithoutGlobalCache(), + `${projectName}:: Expected ResolutionsResolvedWithoutGlobalCache count ${expected.countResolutionsResolvedWithoutGlobalCache()} but got ${actual.countResolutionsResolvedWithoutGlobalCache()}`, + ); // Stop watching resolutions to verify everything gets closed. expected.startCachingPerDirectoryResolution(); @@ -284,6 +292,8 @@ export function verifyResolutionCache( ts.Debug.assert(expected.resolutionsWithOnlyAffectingLocations.size === 0, `${projectName}:: resolutionsWithOnlyAffectingLocations should be released`); ts.Debug.assert(expected.directoryWatchesOfFailedLookups.size === 0, `${projectName}:: directoryWatchesOfFailedLookups should be released`); ts.Debug.assert(expected.fileWatchesOfAffectingLocations.size === 0, `${projectName}:: fileWatchesOfAffectingLocations should be released`); + ts.Debug.assert(expected.countResolutionsResolvedWithGlobalCache() === 0, `${projectName}:: ResolutionsResolvedWithGlobalCache should be cleared`); + ts.Debug.assert(expected.countResolutionsResolvedWithoutGlobalCache() === 0, `${projectName}:: ResolutionsResolvedWithoutGlobalCache should be cleared`); function collectResolutionToRefFromCache( cacheType: string, @@ -329,6 +339,7 @@ export function verifyResolutionCache( failedLookupLocations: resolved.failedLookupLocations, affectingLocations: resolved.affectingLocations, alternateResult: resolved.alternateResult, + globalCacheResolution: resolved.globalCacheResolution, }; expectedToResolution.set(expectedResolution, resolved); resolutionToExpected.set(resolved, expectedResolution); diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index bbf48117eb6..7f63bc9ef28 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -1595,11 +1595,7 @@ export class ProjectService { switch (response.kind) { case ActionSet: // Update the typing files and update the project - project.updateTypingFiles( - response, - response.typings, - /*scheduleUpdate*/ true, - ); + project.updateTypingFiles(response); return; case ActionInvalidate: // Do not clear resolution cache, there was changes detected in typings, so enque typing request and let it get us correct results diff --git a/src/server/project.ts b/src/server/project.ts index a4261b9abd4..19e1009fb66 100644 --- a/src/server/project.ts +++ b/src/server/project.ts @@ -636,7 +636,6 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo this.resolutionCache = createResolutionCache( this, this.currentDirectory, - /*logChangesWhenResolvingModule*/ true, ); this.languageService = createLanguageService( this, @@ -1447,15 +1446,17 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo */ updateGraph(): boolean { tracing?.push(tracing.Phase.Session, "updateGraph", { name: this.projectName, kind: ProjectKind[this.projectKind] }); - const recordChangesToResolution = this.useTypingsFromGlobalCache(); - if (recordChangesToResolution && this.cachedUnresolvedImportsPerFile.size) this.resolutionCache.startRecordingFilesWithChangedResolutions(); + const useTypingsFromGlobalCache = this.useTypingsFromGlobalCache(); + if (!useTypingsFromGlobalCache) this.resolutionCache.invalidateResolutionsWithGlobalCachePass(); + else this.resolutionCache.invalidateResolutionsWithoutGlobalCachePass(); + if (useTypingsFromGlobalCache && this.cachedUnresolvedImportsPerFile.size) this.resolutionCache.startRecordingFilesWithChangedResolutions(); const hasNewProgram = this.updateGraphWorker(); const hasAddedorRemovedFiles = this.hasAddedorRemovedFiles; this.hasAddedorRemovedFiles = false; this.hasAddedOrRemovedSymlinks = false; - if (recordChangesToResolution) { + if (useTypingsFromGlobalCache) { const changedFiles: readonly Path[] = this.resolutionCache.finishRecordingFilesWithChangedResolutions() || emptyArray; for (const file of changedFiles) { // delete cached information for changed files @@ -1528,20 +1529,14 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo } /** @internal */ - updateTypingFiles( - setTypings: SetTypings | undefined, - newTypings: string[] | undefined, - scheduleUpdate: boolean, - ): void { - if (setTypings) { - if (!this.getTypeAcquisition().enable) return; - this.typingsCache = { - compilerOptions: setTypings.compilerOptions, - typeAcquisition: setTypings.typeAcquisition, - unresolvedImports: setTypings.unresolvedImports, - }; - } - const typingFiles = !newTypings?.length || !this.getTypeAcquisition().enable ? emptyArray : toSorted(newTypings); + updateTypingFiles({ compilerOptions, typeAcquisition, unresolvedImports, typings }: SetTypings): void { + if (!this.getTypeAcquisition().enable) return; + this.typingsCache = { + compilerOptions, + typeAcquisition, + unresolvedImports, + }; + const typingFiles = typings.length ? toSorted(typings) : emptyArray; // The typings files are result of types acquired based on unresolved imports and other structure // With respect to unresolved imports: // The first time we see unresolved import the TI will fetch the typing into cache and return it as part of typings file @@ -1563,7 +1558,7 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo this.typingFiles = typingFiles; // Invalidate files with unresolved imports this.resolutionCache.setFilesWithInvalidatedNonRelativeUnresolvedImports(this.cachedUnresolvedImportsPerFile); - if (scheduleUpdate) this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this); + this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this); } } @@ -2034,9 +2029,11 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo } // If the typeAcquition is disabled, dont use typing files as root and close existing watchers from TI if (!this.getTypeAcquisition().enable) { - const typingsCache = this.typingsCache; - this.updateTypingFiles(/*setTypings*/ undefined, /*newTypings*/ undefined, /*scheduleUpdate*/ false); - if (typingsCache) this.projectService.typingsInstaller.onProjectClosed(this); + this.typingFiles = emptyArray; + if (this.typingsCache) { + this.typingsCache = undefined; + this.projectService.typingsInstaller.onProjectClosed(this); + } } } diff --git a/tests/baselines/reference/tsserver/typeAquisition/change-after-enabling-typeAquisition-multiple-projects-with-shared-resolution.js b/tests/baselines/reference/tsserver/typeAquisition/change-after-enabling-typeAquisition-multiple-projects-with-shared-resolution.js index a0e35514ba5..97b4f254a9e 100644 --- a/tests/baselines/reference/tsserver/typeAquisition/change-after-enabling-typeAquisition-multiple-projects-with-shared-resolution.js +++ b/tests/baselines/reference/tsserver/typeAquisition/change-after-enabling-typeAquisition-multiple-projects-with-shared-resolution.js @@ -1253,19 +1253,70 @@ Info seq [hh:mm:ss:mss] File '/users/user/projects/package.json' does not exist Info seq [hh:mm:ss:mss] File '/users/user/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/users/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] ======== Resolving module 'bar' from '/users/user/projects/project1/app.js'. ======== +Info seq [hh:mm:ss:mss] Module resolution kind is not specified, using 'Node10'. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/project1/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.d.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/index.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/index.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/index.d.ts' does not exist. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/node_modules/@types' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/user/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: JavaScript. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for fallback extensions: JavaScript. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/project1/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.js' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.jsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/index.js' exists - use it as a name resolution result. +Info seq [hh:mm:ss:mss] Resolving real path for '/users/user/projects/node_modules/bar/index.js', result '/users/user/projects/node_modules/bar/index.js'. +Info seq [hh:mm:ss:mss] ======== Module name 'bar' was successfully resolved to '/users/user/projects/node_modules/bar/index.js'. ======== +Info seq [hh:mm:ss:mss] Auto discovery for typings is enabled in project '/users/user/projects/project1/jsconfig.json'. Running extra resolution pass for module 'bar' using cache location '/home/src/Library/Caches/typescript'. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/bar.d.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar/package.json' does not exist. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar.d.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts' exists - use it as a name resolution result. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/package.json' does not exist. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/package.json' does not exist. +Info seq [hh:mm:ss:mss] Found 'package.json' at '/home/src/Library/Caches/typescript/package.json'. +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/@types/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/@types/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/node_modules/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (3) /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" - /users/user/projects/node_modules/bar/index.js Text-1 "export const x = 1" + /home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts Text-1 "export const x = 1;" /users/user/projects/project1/app.js SVC-1-0 "var x = require('bar');" + + + ../../../../home/src/tslibs/TS/Lib/lib.d.ts + Default library for target 'es5' + ../../../../home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts + Imported via 'bar' from file 'app.js' + app.js + Matched by default include pattern '**/*' Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /home/src/tslibs/ts/lib/lib.d.ts:: [] -Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /users/user/projects/node_modules/bar/index.js:: [] -Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /users/user/projects/project1/app.js:: ["bar"] -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 Done: ["bar"] +Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /home/src/library/caches/typescript/node_modules/@types/bar/index.d.ts:: [] +Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /users/user/projects/project1/app.js:: [] +Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 Done: [] TI:: [hh:mm:ss:mss] Got install request { "projectName": "/users/user/projects/project1/jsconfig.json", @@ -1288,20 +1339,16 @@ TI:: [hh:mm:ss:mss] Got install request "include": [], "exclude": [] }, - "unresolvedImports": [ - "bar" - ], + "unresolvedImports": [], "projectRootPath": "/users/user/projects/project1", "kind": "discover" } TI:: [hh:mm:ss:mss] Explicitly included types: [] -TI:: [hh:mm:ss:mss] Inferred typings from unresolved imports: ["bar"] +TI:: [hh:mm:ss:mss] Inferred typings from unresolved imports: [] TI:: [hh:mm:ss:mss] Finished typings discovery: { "cachedTypingPaths": [], - "newTypingNames": [ - "bar" - ], + "newTypingNames": [], "filesToWatch": [ "/users/user/projects/project1/bower_components", "/users/user/projects/project1/node_modules" @@ -1320,27 +1367,56 @@ Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/proje Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/bower_components 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer -TI:: [hh:mm:ss:mss] Installing typings ["bar"] -TI:: [hh:mm:ss:mss] Npm config file: /home/src/Library/Caches/typescript/package.json TI:: [hh:mm:ss:mss] Sending response: { - "kind": "event::beginInstallTypes", - "eventId": 1, - "typingsInstallerVersion": "FakeVersion", - "projectName": "/users/user/projects/project1/jsconfig.json" + "projectName": "/users/user/projects/project1/jsconfig.json", + "typeAcquisition": { + "enable": true, + "include": [], + "exclude": [] + }, + "compilerOptions": { + "allowJs": true, + "maxNodeModuleJsDepth": 2, + "allowSyntheticDefaultImports": true, + "skipLibCheck": true, + "noEmit": true, + "traceResolution": true, + "configFilePath": "/users/user/projects/project1/jsconfig.json", + "allowNonTsExtensions": true + }, + "typings": [], + "unresolvedImports": [], + "kind": "action::set" } Info seq [hh:mm:ss:mss] event: { "seq": 0, "type": "event", - "event": "beginInstallTypes", + "event": "setTypings", "body": { - "eventId": 1 + "projectName": "/users/user/projects/project1/jsconfig.json", + "typeAcquisition": { + "enable": true, + "include": [], + "exclude": [] + }, + "compilerOptions": { + "allowJs": true, + "maxNodeModuleJsDepth": 2, + "allowSyntheticDefaultImports": true, + "skipLibCheck": true, + "noEmit": true, + "traceResolution": true, + "configFilePath": "/users/user/projects/project1/jsconfig.json", + "allowNonTsExtensions": true + }, + "typings": [], + "unresolvedImports": [], + "kind": "action::set" } } -TI:: [hh:mm:ss:mss] #1 with cwd: /home/src/Library/Caches/typescript arguments: [ - "@types/bar@tsFakeMajor.Minor" -] +TI:: [hh:mm:ss:mss] No new typings were requested as a result of typings discovery Info seq [hh:mm:ss:mss] event: { "seq": 0, @@ -1480,339 +1556,10 @@ FsWatchesRecursive:: /users/user/projects/project3: {} -PendingInstalls callback:: count: 1 -1: #1 with arguments:: [ - "@types/bar@tsFakeMajor.Minor" -] *new* - Projects:: /users/user/projects/project1/jsconfig.json (Configured) *changed* projectStateVersion: 2 - projectProgramVersion: 1 - dirty: false *changed* -/users/user/projects/project2/jsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 - autoImportProviderHost: false -/users/user/projects/project3/jsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 - autoImportProviderHost: false - -Before running Timeout callback:: count: 0 - -After running Timeout callback:: count: 0 - -Before running Timeout callback:: count: 0 - -After running Timeout callback:: count: 0 - -Before running PendingInstalls callback:: count: 1 -1: #1 with arguments:: [ - "@types/bar@tsFakeMajor.Minor" -] - -TI:: Installation #1 with arguments:: [ - "@types/bar@tsFakeMajor.Minor" -] complete with success::true - -TI:: [hh:mm:ss:mss] Installed typings ["@types/bar@tsFakeMajor.Minor"] -TI:: [hh:mm:ss:mss] Installed typing files ["/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts"] -TI:: [hh:mm:ss:mss] Sending response: - { - "projectName": "/users/user/projects/project1/jsconfig.json", - "typeAcquisition": { - "enable": true, - "include": [], - "exclude": [] - }, - "compilerOptions": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "traceResolution": true, - "configFilePath": "/users/user/projects/project1/jsconfig.json", - "allowNonTsExtensions": true - }, - "typings": [ - "/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts" - ], - "unresolvedImports": [ - "bar" - ], - "kind": "action::set" - } -Info seq [hh:mm:ss:mss] Scheduled: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "setTypings", - "body": { - "projectName": "/users/user/projects/project1/jsconfig.json", - "typeAcquisition": { - "enable": true, - "include": [], - "exclude": [] - }, - "compilerOptions": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "traceResolution": true, - "configFilePath": "/users/user/projects/project1/jsconfig.json", - "allowNonTsExtensions": true - }, - "typings": [ - "/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts" - ], - "unresolvedImports": [ - "bar" - ], - "kind": "action::set" - } - } -TI:: [hh:mm:ss:mss] Sending response: - { - "kind": "event::endInstallTypes", - "eventId": 1, - "projectName": "/users/user/projects/project1/jsconfig.json", - "packagesToInstall": [ - "@types/bar@tsFakeMajor.Minor" - ], - "installSuccess": true, - "typingsInstallerVersion": "FakeVersion" - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "endInstallTypes", - "body": { - "eventId": 1, - "packages": [ - "@types/bar@tsFakeMajor.Minor" - ], - "success": true - } - } -After running PendingInstalls callback:: count: 0 - -Timeout callback:: count: 2 -3: /users/user/projects/project1/jsconfig.json *new* -4: *ensureProjectForOpenFiles* *new* - -Projects:: -/users/user/projects/project1/jsconfig.json (Configured) *changed* - projectStateVersion: 3 *changed* - projectProgramVersion: 1 - dirty: true *changed* -/users/user/projects/project2/jsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 - autoImportProviderHost: false -/users/user/projects/project3/jsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 - autoImportProviderHost: false - -Before running Timeout callback:: count: 2 -3: /users/user/projects/project1/jsconfig.json -4: *ensureProjectForOpenFiles* - -Info seq [hh:mm:ss:mss] Running: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] ======== Resolving module 'bar' from '/users/user/projects/project1/app.js'. ======== -Info seq [hh:mm:ss:mss] Module resolution kind is not specified, using 'Node10'. -Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: TypeScript, Declaration. -Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. -Info seq [hh:mm:ss:mss] Directory '/users/user/projects/project1/node_modules' does not exist, skipping all lookups in it. -Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.ts' does not exist. -Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.tsx' does not exist. -Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.d.ts' does not exist. -Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/index.ts' does not exist. -Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/index.tsx' does not exist. -Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/index.d.ts' does not exist. -Info seq [hh:mm:ss:mss] Directory '/users/user/projects/node_modules/@types' does not exist, skipping all lookups in it. -Info seq [hh:mm:ss:mss] Directory '/users/user/node_modules' does not exist, skipping all lookups in it. -Info seq [hh:mm:ss:mss] Directory '/users/node_modules' does not exist, skipping all lookups in it. -Info seq [hh:mm:ss:mss] Directory '/node_modules' does not exist, skipping all lookups in it. -Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: JavaScript. -Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for fallback extensions: JavaScript. -Info seq [hh:mm:ss:mss] Directory '/users/user/projects/project1/node_modules' does not exist, skipping all lookups in it. -Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.js' does not exist. -Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.jsx' does not exist. -Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/index.js' exists - use it as a name resolution result. -Info seq [hh:mm:ss:mss] Resolving real path for '/users/user/projects/node_modules/bar/index.js', result '/users/user/projects/node_modules/bar/index.js'. -Info seq [hh:mm:ss:mss] ======== Module name 'bar' was successfully resolved to '/users/user/projects/node_modules/bar/index.js'. ======== -Info seq [hh:mm:ss:mss] Auto discovery for typings is enabled in project '/users/user/projects/project1/jsconfig.json'. Running extra resolution pass for module 'bar' using cache location '/home/src/Library/Caches/typescript'. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/bar.d.ts' does not exist. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar/package.json' does not exist. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar.d.ts' does not exist. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts' exists - use it as a name resolution result. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/package.json' does not exist. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/package.json' does not exist. -Info seq [hh:mm:ss:mss] Found 'package.json' at '/home/src/Library/Caches/typescript/package.json'. -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/@types/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/@types/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/node_modules/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 3 projectProgramVersion: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" - /home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts Text-1 "export const x = 1;" - /users/user/projects/project1/app.js SVC-1-0 "var x = require('bar');" - - - ../../../../home/src/tslibs/TS/Lib/lib.d.ts - Default library for target 'es5' - ../../../../home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts - Imported via 'bar' from file 'app.js' - Matched by default include pattern '**/*' - app.js - Matched by default include pattern '**/*' - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 -Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /home/src/library/caches/typescript/node_modules/@types/bar/index.d.ts:: [] -Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /users/user/projects/project1/app.js:: [] -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 Done: [] -TI:: [hh:mm:ss:mss] Got install request - { - "projectName": "/users/user/projects/project1/jsconfig.json", - "fileNames": [ - "/home/src/tslibs/TS/Lib/lib.d.ts", - "/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts", - "/users/user/projects/project1/app.js" - ], - "compilerOptions": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "traceResolution": true, - "configFilePath": "/users/user/projects/project1/jsconfig.json", - "allowNonTsExtensions": true - }, - "typeAcquisition": { - "enable": true, - "include": [], - "exclude": [] - }, - "unresolvedImports": [], - "projectRootPath": "/users/user/projects/project1", - "kind": "discover" - } -TI:: [hh:mm:ss:mss] Explicitly included types: [] -TI:: [hh:mm:ss:mss] Inferred typings from unresolved imports: [] -TI:: [hh:mm:ss:mss] Finished typings discovery: - { - "cachedTypingPaths": [], - "newTypingNames": [], - "filesToWatch": [ - "/users/user/projects/project1/bower_components", - "/users/user/projects/project1/node_modules" - ] - } -TI:: [hh:mm:ss:mss] Sending response: - { - "kind": "action::watchTypingLocations", - "projectName": "/users/user/projects/project1/jsconfig.json" - } -TI:: [hh:mm:ss:mss] Sending response: - { - "projectName": "/users/user/projects/project1/jsconfig.json", - "typeAcquisition": { - "enable": true, - "include": [], - "exclude": [] - }, - "compilerOptions": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "traceResolution": true, - "configFilePath": "/users/user/projects/project1/jsconfig.json", - "allowNonTsExtensions": true - }, - "typings": [], - "unresolvedImports": [], - "kind": "action::set" - } -Info seq [hh:mm:ss:mss] Scheduled: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "setTypings", - "body": { - "projectName": "/users/user/projects/project1/jsconfig.json", - "typeAcquisition": { - "enable": true, - "include": [], - "exclude": [] - }, - "compilerOptions": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "traceResolution": true, - "configFilePath": "/users/user/projects/project1/jsconfig.json", - "allowNonTsExtensions": true - }, - "typings": [], - "unresolvedImports": [], - "kind": "action::set" - } - } -TI:: [hh:mm:ss:mss] No new typings were requested as a result of typings discovery -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] Reusing resolution of module 'bar' from '/users/user/projects/project1/app.js' of old program, it was successfully resolved to '/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts'. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/package.json' exists according to earlier cached lookups. -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 4 projectProgramVersion: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" - /home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts Text-1 "export const x = 1;" - /users/user/projects/project1/app.js SVC-1-0 "var x = require('bar');" - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 Done: [] -After running Timeout callback:: count: 2 - -Timeout callback:: count: 2 -4: *ensureProjectForOpenFiles* *deleted* -5: /users/user/projects/project1/jsconfig.json *new* -6: *ensureProjectForOpenFiles* *new* - -Projects:: -/users/user/projects/project1/jsconfig.json (Configured) *changed* - projectStateVersion: 4 *changed* - projectProgramVersion: 3 *changed* + projectProgramVersion: 2 *changed* dirty: false *changed* /users/user/projects/project2/jsconfig.json (Configured) projectStateVersion: 1 @@ -1865,66 +1612,24 @@ ScriptInfos:: containingProjects: 1 /users/user/projects/project3/jsconfig.json -Before running Timeout callback:: count: 2 -5: /users/user/projects/project1/jsconfig.json -6: *ensureProjectForOpenFiles* +Before running Timeout callback:: count: 0 + +After running Timeout callback:: count: 0 + +Before running Timeout callback:: count: 0 + +After running Timeout callback:: count: 0 + +Before running PendingInstalls callback:: count: 0 + +After running PendingInstalls callback:: count: 0 + +Before running Timeout callback:: count: 0 + +After running Timeout callback:: count: 0 + +Before running Timeout callback:: count: 0 -Info seq [hh:mm:ss:mss] Running: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project2/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (5) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project3/jsconfig.json' (Configured) -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: /users/user/projects/project1/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project2/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project2/jsconfig.json -Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project3/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project3/jsconfig.json -Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project2/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (5) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project3/jsconfig.json' (Configured) -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: /users/user/projects/project1/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project2/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project2/jsconfig.json -Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project3/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project3/jsconfig.json -Info seq [hh:mm:ss:mss] got projects updated in background /users/user/projects/project1/app.js,/users/user/projects/project2/app.js,/users/user/projects/project3/app.js -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectsUpdatedInBackground", - "body": { - "openFiles": [ - "/users/user/projects/project1/app.js", - "/users/user/projects/project2/app.js", - "/users/user/projects/project3/app.js" - ] - } - } After running Timeout callback:: count: 0 Before running Timeout callback:: count: 0 diff --git a/tests/baselines/reference/tsserver/typeAquisition/change-after-enabling-typeAquisition-multiple-projects.js b/tests/baselines/reference/tsserver/typeAquisition/change-after-enabling-typeAquisition-multiple-projects.js index ca2d1e6e353..a96523662a4 100644 --- a/tests/baselines/reference/tsserver/typeAquisition/change-after-enabling-typeAquisition-multiple-projects.js +++ b/tests/baselines/reference/tsserver/typeAquisition/change-after-enabling-typeAquisition-multiple-projects.js @@ -1282,19 +1282,70 @@ Info seq [hh:mm:ss:mss] File '/users/user/projects/package.json' does not exist Info seq [hh:mm:ss:mss] File '/users/user/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/users/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] ======== Resolving module 'bar' from '/users/user/projects/project1/app.js'. ======== +Info seq [hh:mm:ss:mss] Module resolution kind is not specified, using 'Node10'. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.d.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.d.ts' does not exist. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/project1/node_modules/@types' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/user/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: JavaScript. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for fallback extensions: JavaScript. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.js' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.jsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.js' exists - use it as a name resolution result. +Info seq [hh:mm:ss:mss] Resolving real path for '/users/user/projects/project1/node_modules/bar/index.js', result '/users/user/projects/project1/node_modules/bar/index.js'. +Info seq [hh:mm:ss:mss] ======== Module name 'bar' was successfully resolved to '/users/user/projects/project1/node_modules/bar/index.js'. ======== +Info seq [hh:mm:ss:mss] Auto discovery for typings is enabled in project '/users/user/projects/project1/jsconfig.json'. Running extra resolution pass for module 'bar' using cache location '/home/src/Library/Caches/typescript'. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/bar.d.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar/package.json' does not exist. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar.d.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts' exists - use it as a name resolution result. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/package.json' does not exist. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/package.json' does not exist. +Info seq [hh:mm:ss:mss] Found 'package.json' at '/home/src/Library/Caches/typescript/package.json'. +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/@types/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/@types/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/project1/node_modules/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/project1/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/project1/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (3) /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" - /users/user/projects/project1/node_modules/bar/index.js Text-1 "export const x = 1" + /home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts Text-1 "export const x = 1;" /users/user/projects/project1/app.js SVC-1-0 "var x = require('bar');" + + + ../../../../home/src/tslibs/TS/Lib/lib.d.ts + Default library for target 'es5' + ../../../../home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts + Imported via 'bar' from file 'app.js' + app.js + Matched by default include pattern '**/*' Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /home/src/tslibs/ts/lib/lib.d.ts:: [] -Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /users/user/projects/project1/node_modules/bar/index.js:: [] -Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /users/user/projects/project1/app.js:: ["bar"] -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 Done: ["bar"] +Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /home/src/library/caches/typescript/node_modules/@types/bar/index.d.ts:: [] +Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /users/user/projects/project1/app.js:: [] +Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 Done: [] TI:: [hh:mm:ss:mss] Got install request { "projectName": "/users/user/projects/project1/jsconfig.json", @@ -1317,22 +1368,18 @@ TI:: [hh:mm:ss:mss] Got install request "include": [], "exclude": [] }, - "unresolvedImports": [ - "bar" - ], + "unresolvedImports": [], "projectRootPath": "/users/user/projects/project1", "kind": "discover" } TI:: [hh:mm:ss:mss] Explicitly included types: [] TI:: [hh:mm:ss:mss] Searching for typing names in /users/user/projects/project1/node_modules; all files: [] TI:: [hh:mm:ss:mss] Found package names: [] -TI:: [hh:mm:ss:mss] Inferred typings from unresolved imports: ["bar"] +TI:: [hh:mm:ss:mss] Inferred typings from unresolved imports: [] TI:: [hh:mm:ss:mss] Finished typings discovery: { "cachedTypingPaths": [], - "newTypingNames": [ - "bar" - ], + "newTypingNames": [], "filesToWatch": [ "/users/user/projects/project1/bower_components", "/users/user/projects/project1/node_modules" @@ -1351,27 +1398,56 @@ Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/proje Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/bower_components 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer -TI:: [hh:mm:ss:mss] Installing typings ["bar"] -TI:: [hh:mm:ss:mss] Npm config file: /home/src/Library/Caches/typescript/package.json TI:: [hh:mm:ss:mss] Sending response: { - "kind": "event::beginInstallTypes", - "eventId": 1, - "typingsInstallerVersion": "FakeVersion", - "projectName": "/users/user/projects/project1/jsconfig.json" + "projectName": "/users/user/projects/project1/jsconfig.json", + "typeAcquisition": { + "enable": true, + "include": [], + "exclude": [] + }, + "compilerOptions": { + "allowJs": true, + "maxNodeModuleJsDepth": 2, + "allowSyntheticDefaultImports": true, + "skipLibCheck": true, + "noEmit": true, + "traceResolution": true, + "configFilePath": "/users/user/projects/project1/jsconfig.json", + "allowNonTsExtensions": true + }, + "typings": [], + "unresolvedImports": [], + "kind": "action::set" } Info seq [hh:mm:ss:mss] event: { "seq": 0, "type": "event", - "event": "beginInstallTypes", + "event": "setTypings", "body": { - "eventId": 1 + "projectName": "/users/user/projects/project1/jsconfig.json", + "typeAcquisition": { + "enable": true, + "include": [], + "exclude": [] + }, + "compilerOptions": { + "allowJs": true, + "maxNodeModuleJsDepth": 2, + "allowSyntheticDefaultImports": true, + "skipLibCheck": true, + "noEmit": true, + "traceResolution": true, + "configFilePath": "/users/user/projects/project1/jsconfig.json", + "allowNonTsExtensions": true + }, + "typings": [], + "unresolvedImports": [], + "kind": "action::set" } } -TI:: [hh:mm:ss:mss] #1 with cwd: /home/src/Library/Caches/typescript arguments: [ - "@types/bar@tsFakeMajor.Minor" -] +TI:: [hh:mm:ss:mss] No new typings were requested as a result of typings discovery Info seq [hh:mm:ss:mss] event: { "seq": 0, @@ -1468,402 +1544,6 @@ PolledWatches:: {"pollingInterval":500} /users/user/projects/project1/node_modules/@types: {"pollingInterval":500} -/users/user/projects/project1/node_modules/bar/package.json: - {"pollingInterval":2000} -/users/user/projects/project1/node_modules/package.json: - {"pollingInterval":2000} -/users/user/projects/project1/package.json: - {"pollingInterval":2000} -/users/user/projects/project2/bower_components: - {"pollingInterval":500} -/users/user/projects/project2/node_modules/@types: - {"pollingInterval":500} -/users/user/projects/project3/node_modules/@types: - {"pollingInterval":500} -/users/user/projects/project3/node_modules/bar/package.json: - {"pollingInterval":2000} -/users/user/projects/project3/node_modules/package.json: - {"pollingInterval":2000} -/users/user/projects/project3/package.json: - {"pollingInterval":2000} - -FsWatches:: -/home/src/Library/Caches/typescript/package.json: - {} -/home/src/tslibs/TS/Lib/lib.d.ts: - {} -/users/user/projects/project1/jsconfig.json: - {} -/users/user/projects/project2/app2.js: - {} -/users/user/projects/project2/jsconfig.json: - {} -/users/user/projects/project3/app2.js: - {} -/users/user/projects/project3/jsconfig.json: - {} - -FsWatchesRecursive:: -/home/src/Library/Caches/typescript/node_modules: - {} -/users/user/projects/project1: - {} -/users/user/projects/project1/node_modules: - {} -/users/user/projects/project2: - {} -/users/user/projects/project2/node_modules: - {} -/users/user/projects/project3: - {} -/users/user/projects/project3/node_modules: - {} - -PendingInstalls callback:: count: 1 -1: #1 with arguments:: [ - "@types/bar@tsFakeMajor.Minor" -] *new* - -Projects:: -/users/user/projects/project1/jsconfig.json (Configured) *changed* - projectStateVersion: 2 - projectProgramVersion: 1 - dirty: false *changed* -/users/user/projects/project2/jsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 - autoImportProviderHost: false -/users/user/projects/project3/jsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 - autoImportProviderHost: false - -Before running Timeout callback:: count: 0 - -After running Timeout callback:: count: 0 - -Before running Timeout callback:: count: 0 - -After running Timeout callback:: count: 0 - -Before running PendingInstalls callback:: count: 1 -1: #1 with arguments:: [ - "@types/bar@tsFakeMajor.Minor" -] - -TI:: Installation #1 with arguments:: [ - "@types/bar@tsFakeMajor.Minor" -] complete with success::true - -TI:: [hh:mm:ss:mss] Installed typings ["@types/bar@tsFakeMajor.Minor"] -TI:: [hh:mm:ss:mss] Installed typing files ["/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts"] -TI:: [hh:mm:ss:mss] Sending response: - { - "projectName": "/users/user/projects/project1/jsconfig.json", - "typeAcquisition": { - "enable": true, - "include": [], - "exclude": [] - }, - "compilerOptions": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "traceResolution": true, - "configFilePath": "/users/user/projects/project1/jsconfig.json", - "allowNonTsExtensions": true - }, - "typings": [ - "/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts" - ], - "unresolvedImports": [ - "bar" - ], - "kind": "action::set" - } -Info seq [hh:mm:ss:mss] Scheduled: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "setTypings", - "body": { - "projectName": "/users/user/projects/project1/jsconfig.json", - "typeAcquisition": { - "enable": true, - "include": [], - "exclude": [] - }, - "compilerOptions": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "traceResolution": true, - "configFilePath": "/users/user/projects/project1/jsconfig.json", - "allowNonTsExtensions": true - }, - "typings": [ - "/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts" - ], - "unresolvedImports": [ - "bar" - ], - "kind": "action::set" - } - } -TI:: [hh:mm:ss:mss] Sending response: - { - "kind": "event::endInstallTypes", - "eventId": 1, - "projectName": "/users/user/projects/project1/jsconfig.json", - "packagesToInstall": [ - "@types/bar@tsFakeMajor.Minor" - ], - "installSuccess": true, - "typingsInstallerVersion": "FakeVersion" - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "endInstallTypes", - "body": { - "eventId": 1, - "packages": [ - "@types/bar@tsFakeMajor.Minor" - ], - "success": true - } - } -After running PendingInstalls callback:: count: 0 - -Timeout callback:: count: 2 -3: /users/user/projects/project1/jsconfig.json *new* -4: *ensureProjectForOpenFiles* *new* - -Projects:: -/users/user/projects/project1/jsconfig.json (Configured) *changed* - projectStateVersion: 3 *changed* - projectProgramVersion: 1 - dirty: true *changed* -/users/user/projects/project2/jsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 - autoImportProviderHost: false -/users/user/projects/project3/jsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 - autoImportProviderHost: false - -Before running Timeout callback:: count: 2 -3: /users/user/projects/project1/jsconfig.json -4: *ensureProjectForOpenFiles* - -Info seq [hh:mm:ss:mss] Running: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] ======== Resolving module 'bar' from '/users/user/projects/project1/app.js'. ======== -Info seq [hh:mm:ss:mss] Module resolution kind is not specified, using 'Node10'. -Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: TypeScript, Declaration. -Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. -Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.ts' does not exist. -Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.tsx' does not exist. -Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.d.ts' does not exist. -Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.ts' does not exist. -Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.tsx' does not exist. -Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.d.ts' does not exist. -Info seq [hh:mm:ss:mss] Directory '/users/user/projects/project1/node_modules/@types' does not exist, skipping all lookups in it. -Info seq [hh:mm:ss:mss] Directory '/users/user/projects/node_modules' does not exist, skipping all lookups in it. -Info seq [hh:mm:ss:mss] Directory '/users/user/node_modules' does not exist, skipping all lookups in it. -Info seq [hh:mm:ss:mss] Directory '/users/node_modules' does not exist, skipping all lookups in it. -Info seq [hh:mm:ss:mss] Directory '/node_modules' does not exist, skipping all lookups in it. -Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: JavaScript. -Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for fallback extensions: JavaScript. -Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.js' does not exist. -Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.jsx' does not exist. -Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.js' exists - use it as a name resolution result. -Info seq [hh:mm:ss:mss] Resolving real path for '/users/user/projects/project1/node_modules/bar/index.js', result '/users/user/projects/project1/node_modules/bar/index.js'. -Info seq [hh:mm:ss:mss] ======== Module name 'bar' was successfully resolved to '/users/user/projects/project1/node_modules/bar/index.js'. ======== -Info seq [hh:mm:ss:mss] Auto discovery for typings is enabled in project '/users/user/projects/project1/jsconfig.json'. Running extra resolution pass for module 'bar' using cache location '/home/src/Library/Caches/typescript'. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/bar.d.ts' does not exist. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar/package.json' does not exist. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar.d.ts' does not exist. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts' exists - use it as a name resolution result. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/package.json' does not exist. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/package.json' does not exist. -Info seq [hh:mm:ss:mss] Found 'package.json' at '/home/src/Library/Caches/typescript/package.json'. -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/@types/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/@types/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/project1/node_modules/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/project1/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/project1/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 3 projectProgramVersion: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" - /home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts Text-1 "export const x = 1;" - /users/user/projects/project1/app.js SVC-1-0 "var x = require('bar');" - - - ../../../../home/src/tslibs/TS/Lib/lib.d.ts - Default library for target 'es5' - ../../../../home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts - Imported via 'bar' from file 'app.js' - Matched by default include pattern '**/*' - app.js - Matched by default include pattern '**/*' - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 -Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /home/src/library/caches/typescript/node_modules/@types/bar/index.d.ts:: [] -Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /users/user/projects/project1/app.js:: [] -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 Done: [] -TI:: [hh:mm:ss:mss] Got install request - { - "projectName": "/users/user/projects/project1/jsconfig.json", - "fileNames": [ - "/home/src/tslibs/TS/Lib/lib.d.ts", - "/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts", - "/users/user/projects/project1/app.js" - ], - "compilerOptions": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "traceResolution": true, - "configFilePath": "/users/user/projects/project1/jsconfig.json", - "allowNonTsExtensions": true - }, - "typeAcquisition": { - "enable": true, - "include": [], - "exclude": [] - }, - "unresolvedImports": [], - "projectRootPath": "/users/user/projects/project1", - "kind": "discover" - } -TI:: [hh:mm:ss:mss] Explicitly included types: [] -TI:: [hh:mm:ss:mss] Searching for typing names in /users/user/projects/project1/node_modules; all files: [] -TI:: [hh:mm:ss:mss] Found package names: [] -TI:: [hh:mm:ss:mss] Inferred typings from unresolved imports: [] -TI:: [hh:mm:ss:mss] Finished typings discovery: - { - "cachedTypingPaths": [], - "newTypingNames": [], - "filesToWatch": [ - "/users/user/projects/project1/bower_components", - "/users/user/projects/project1/node_modules" - ] - } -TI:: [hh:mm:ss:mss] Sending response: - { - "kind": "action::watchTypingLocations", - "projectName": "/users/user/projects/project1/jsconfig.json" - } -TI:: [hh:mm:ss:mss] Sending response: - { - "projectName": "/users/user/projects/project1/jsconfig.json", - "typeAcquisition": { - "enable": true, - "include": [], - "exclude": [] - }, - "compilerOptions": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "traceResolution": true, - "configFilePath": "/users/user/projects/project1/jsconfig.json", - "allowNonTsExtensions": true - }, - "typings": [], - "unresolvedImports": [], - "kind": "action::set" - } -Info seq [hh:mm:ss:mss] Scheduled: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "setTypings", - "body": { - "projectName": "/users/user/projects/project1/jsconfig.json", - "typeAcquisition": { - "enable": true, - "include": [], - "exclude": [] - }, - "compilerOptions": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "traceResolution": true, - "configFilePath": "/users/user/projects/project1/jsconfig.json", - "allowNonTsExtensions": true - }, - "typings": [], - "unresolvedImports": [], - "kind": "action::set" - } - } -TI:: [hh:mm:ss:mss] No new typings were requested as a result of typings discovery -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] Reusing resolution of module 'bar' from '/users/user/projects/project1/app.js' of old program, it was successfully resolved to '/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts'. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/package.json' exists according to earlier cached lookups. -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 4 projectProgramVersion: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" - /home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts Text-1 "export const x = 1;" - /users/user/projects/project1/app.js SVC-1-0 "var x = require('bar');" - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 Done: [] -After running Timeout callback:: count: 2 - -PolledWatches:: -/home/src/Library/Caches/typescript/node_modules/@types/bar/package.json: - {"pollingInterval":2000} -/home/src/Library/Caches/typescript/node_modules/@types/foo/package.json: - {"pollingInterval":2000} -/home/src/Library/Caches/typescript/node_modules/@types/package.json: - {"pollingInterval":2000} -/home/src/Library/Caches/typescript/node_modules/package.json: - {"pollingInterval":2000} -/users/user/projects/node_modules: - {"pollingInterval":500} -/users/user/projects/node_modules/@types: - {"pollingInterval":500} -/users/user/projects/package.json: - {"pollingInterval":2000} -/users/user/projects/project1/bower_components: - {"pollingInterval":500} -/users/user/projects/project1/node_modules/@types: - {"pollingInterval":500} /users/user/projects/project2/bower_components: {"pollingInterval":500} /users/user/projects/project2/node_modules/@types: @@ -1917,15 +1597,10 @@ FsWatchesRecursive:: /users/user/projects/project3/node_modules: {} -Timeout callback:: count: 2 -4: *ensureProjectForOpenFiles* *deleted* -5: /users/user/projects/project1/jsconfig.json *new* -6: *ensureProjectForOpenFiles* *new* - Projects:: /users/user/projects/project1/jsconfig.json (Configured) *changed* - projectStateVersion: 4 *changed* - projectProgramVersion: 3 *changed* + projectStateVersion: 2 + projectProgramVersion: 2 *changed* dirty: false *changed* /users/user/projects/project2/jsconfig.json (Configured) projectStateVersion: 1 @@ -1981,66 +1656,24 @@ ScriptInfos:: containingProjects: 1 /users/user/projects/project3/jsconfig.json -Before running Timeout callback:: count: 2 -5: /users/user/projects/project1/jsconfig.json -6: *ensureProjectForOpenFiles* +Before running Timeout callback:: count: 0 + +After running Timeout callback:: count: 0 + +Before running Timeout callback:: count: 0 + +After running Timeout callback:: count: 0 + +Before running PendingInstalls callback:: count: 0 + +After running PendingInstalls callback:: count: 0 + +Before running Timeout callback:: count: 0 + +After running Timeout callback:: count: 0 + +Before running Timeout callback:: count: 0 -Info seq [hh:mm:ss:mss] Running: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project2/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (5) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project3/jsconfig.json' (Configured) -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: /users/user/projects/project1/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project2/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project2/jsconfig.json -Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project3/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project3/jsconfig.json -Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project2/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (5) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project3/jsconfig.json' (Configured) -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: /users/user/projects/project1/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project2/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project2/jsconfig.json -Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project3/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project3/jsconfig.json -Info seq [hh:mm:ss:mss] got projects updated in background /users/user/projects/project1/app.js,/users/user/projects/project2/app.js,/users/user/projects/project3/app.js -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectsUpdatedInBackground", - "body": { - "openFiles": [ - "/users/user/projects/project1/app.js", - "/users/user/projects/project2/app.js", - "/users/user/projects/project3/app.js" - ] - } - } After running Timeout callback:: count: 0 Before running Timeout callback:: count: 0 diff --git a/tests/baselines/reference/tsserver/typeAquisition/change-after-enabling-typeAquisition.js b/tests/baselines/reference/tsserver/typeAquisition/change-after-enabling-typeAquisition.js index 629b8d37517..0bcfc52128b 100644 --- a/tests/baselines/reference/tsserver/typeAquisition/change-after-enabling-typeAquisition.js +++ b/tests/baselines/reference/tsserver/typeAquisition/change-after-enabling-typeAquisition.js @@ -337,342 +337,6 @@ Info seq [hh:mm:ss:mss] File '/users/user/projects/package.json' does not exist Info seq [hh:mm:ss:mss] File '/users/user/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/users/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" - /users/user/projects/project1/node_modules/bar/index.js Text-1 "export const x = 1" - /users/user/projects/project1/app.js SVC-1-0 "var x = require('bar');" - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 -Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /home/src/tslibs/ts/lib/lib.d.ts:: [] -Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /users/user/projects/project1/node_modules/bar/index.js:: [] -Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /users/user/projects/project1/app.js:: ["bar"] -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 Done: ["bar"] -TI:: Creating typing installer - -Projects:: -/users/user/projects/project1/jsconfig.json (Configured) *changed* - projectStateVersion: 2 - projectProgramVersion: 1 - dirty: false *changed* - -TI:: [hh:mm:ss:mss] Global cache location '/home/src/Library/Caches/typescript', safe file path '/home/src/tslibs/TS/Lib/typingSafeList.json', types map path /home/src/tslibs/TS/Lib/typesMap.json -TI:: [hh:mm:ss:mss] Processing cache location '/home/src/Library/Caches/typescript' -TI:: [hh:mm:ss:mss] Trying to find '/home/src/Library/Caches/typescript/package.json'... -TI:: [hh:mm:ss:mss] Finished processing cache location '/home/src/Library/Caches/typescript' -TI:: [hh:mm:ss:mss] Npm config file: /home/src/Library/Caches/typescript/package.json -TI:: [hh:mm:ss:mss] Npm config file: '/home/src/Library/Caches/typescript/package.json' is missing, creating new one... -TI:: [hh:mm:ss:mss] Updating types-registry npm package... -TI:: [hh:mm:ss:mss] npm install --ignore-scripts types-registry@latest -TI:: [hh:mm:ss:mss] Updated types-registry npm package -TI:: typing installer creation complete -//// [/home/src/Library/Caches/typescript/package.json] -{ "private": true } - -//// [/home/src/Library/Caches/typescript/node_modules/types-registry/index.json] -{ - "entries": { - "bar": { - "latest": "1.3.0", - "ts2.0": "1.0.0", - "ts2.1": "1.0.0", - "ts2.2": "1.2.0", - "ts2.3": "1.3.0", - "ts2.4": "1.3.0", - "ts2.5": "1.3.0", - "ts2.6": "1.3.0", - "ts2.7": "1.3.0" - } - } -} - - -TI:: [hh:mm:ss:mss] Got install request - { - "projectName": "/users/user/projects/project1/jsconfig.json", - "fileNames": [ - "/home/src/tslibs/TS/Lib/lib.d.ts", - "/users/user/projects/project1/app.js" - ], - "compilerOptions": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "traceResolution": true, - "configFilePath": "/users/user/projects/project1/jsconfig.json", - "allowNonTsExtensions": true - }, - "typeAcquisition": { - "enable": true, - "include": [], - "exclude": [] - }, - "unresolvedImports": [ - "bar" - ], - "projectRootPath": "/users/user/projects/project1", - "kind": "discover" - } -TI:: [hh:mm:ss:mss] Failed to load safelist from types map file '/home/src/tslibs/TS/Lib/typesMap.json' -TI:: [hh:mm:ss:mss] Explicitly included types: [] -TI:: [hh:mm:ss:mss] Searching for typing names in /users/user/projects/project1/node_modules; all files: [] -TI:: [hh:mm:ss:mss] Found package names: [] -TI:: [hh:mm:ss:mss] Inferred typings from unresolved imports: ["bar"] -TI:: [hh:mm:ss:mss] Finished typings discovery: - { - "cachedTypingPaths": [], - "newTypingNames": [ - "bar" - ], - "filesToWatch": [ - "/users/user/projects/project1/bower_components", - "/users/user/projects/project1/node_modules" - ] - } -TI:: [hh:mm:ss:mss] Sending response: - { - "kind": "action::watchTypingLocations", - "projectName": "/users/user/projects/project1/jsconfig.json", - "files": [ - "/users/user/projects/project1/bower_components", - "/users/user/projects/project1/node_modules" - ] - } -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/bower_components 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/bower_components 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer -TI:: [hh:mm:ss:mss] Installing typings ["bar"] -TI:: [hh:mm:ss:mss] Npm config file: /home/src/Library/Caches/typescript/package.json -TI:: [hh:mm:ss:mss] Sending response: - { - "kind": "event::beginInstallTypes", - "eventId": 1, - "typingsInstallerVersion": "FakeVersion", - "projectName": "/users/user/projects/project1/jsconfig.json" - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "beginInstallTypes", - "body": { - "eventId": 1 - } - } -TI:: [hh:mm:ss:mss] #1 with cwd: /home/src/Library/Caches/typescript arguments: [ - "@types/bar@tsFakeMajor.Minor" -] -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/users/user/projects/project1/jsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/users/user/projects/project1/jsconfig.json", - "configFile": "/users/user/projects/project1/jsconfig.json", - "diagnostics": [] - } - } -Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Open files: -Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project1/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Open files: -Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project1/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] got projects updated in background /users/user/projects/project1/app.js -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectsUpdatedInBackground", - "body": { - "openFiles": [ - "/users/user/projects/project1/app.js" - ] - } - } -After running Timeout callback:: count: 0 - -PolledWatches:: -/users/user/projects/node_modules: - {"pollingInterval":500} -/users/user/projects/node_modules/@types: - {"pollingInterval":500} -/users/user/projects/package.json: - {"pollingInterval":2000} -/users/user/projects/project1/bower_components: *new* - {"pollingInterval":500} -/users/user/projects/project1/node_modules/@types: - {"pollingInterval":500} -/users/user/projects/project1/node_modules/bar/package.json: - {"pollingInterval":2000} -/users/user/projects/project1/node_modules/package.json: - {"pollingInterval":2000} -/users/user/projects/project1/package.json: - {"pollingInterval":2000} - -FsWatches:: -/home/src/tslibs/TS/Lib/lib.d.ts: - {} -/users/user/projects/project1/jsconfig.json: - {} - -FsWatchesRecursive:: -/users/user/projects/project1: - {} -/users/user/projects/project1/node_modules: - {} - -PendingInstalls callback:: count: 1 -1: #1 with arguments:: [ - "@types/bar@tsFakeMajor.Minor" -] *new* - -Before running Timeout callback:: count: 0 - -After running Timeout callback:: count: 0 - -Before running Timeout callback:: count: 0 - -After running Timeout callback:: count: 0 - -Before running PendingInstalls callback:: count: 1 -1: #1 with arguments:: [ - "@types/bar@tsFakeMajor.Minor" -] - -TI:: Installation #1 with arguments:: [ - "@types/bar@tsFakeMajor.Minor" -] complete with success::true - -TI:: [hh:mm:ss:mss] Installed typings ["@types/bar@tsFakeMajor.Minor"] -TI:: [hh:mm:ss:mss] Installed typing files ["/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts"] -TI:: [hh:mm:ss:mss] Sending response: - { - "projectName": "/users/user/projects/project1/jsconfig.json", - "typeAcquisition": { - "enable": true, - "include": [], - "exclude": [] - }, - "compilerOptions": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "traceResolution": true, - "configFilePath": "/users/user/projects/project1/jsconfig.json", - "allowNonTsExtensions": true - }, - "typings": [ - "/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts" - ], - "unresolvedImports": [ - "bar" - ], - "kind": "action::set" - } -Info seq [hh:mm:ss:mss] Scheduled: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "setTypings", - "body": { - "projectName": "/users/user/projects/project1/jsconfig.json", - "typeAcquisition": { - "enable": true, - "include": [], - "exclude": [] - }, - "compilerOptions": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "traceResolution": true, - "configFilePath": "/users/user/projects/project1/jsconfig.json", - "allowNonTsExtensions": true - }, - "typings": [ - "/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts" - ], - "unresolvedImports": [ - "bar" - ], - "kind": "action::set" - } - } -TI:: [hh:mm:ss:mss] Sending response: - { - "kind": "event::endInstallTypes", - "eventId": 1, - "projectName": "/users/user/projects/project1/jsconfig.json", - "packagesToInstall": [ - "@types/bar@tsFakeMajor.Minor" - ], - "installSuccess": true, - "typingsInstallerVersion": "FakeVersion" - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "endInstallTypes", - "body": { - "eventId": 1, - "packages": [ - "@types/bar@tsFakeMajor.Minor" - ], - "success": true - } - } -After running PendingInstalls callback:: count: 0 - -Timeout callback:: count: 2 -3: /users/user/projects/project1/jsconfig.json *new* -4: *ensureProjectForOpenFiles* *new* - -Projects:: -/users/user/projects/project1/jsconfig.json (Configured) *changed* - projectStateVersion: 3 *changed* - projectProgramVersion: 1 - dirty: true *changed* - -Before running Timeout callback:: count: 2 -3: /users/user/projects/project1/jsconfig.json -4: *ensureProjectForOpenFiles* - -Info seq [hh:mm:ss:mss] Running: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json Info seq [hh:mm:ss:mss] ======== Resolving module 'bar' from '/users/user/projects/project1/app.js'. ======== Info seq [hh:mm:ss:mss] Module resolution kind is not specified, using 'Node10'. Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: TypeScript, Declaration. @@ -705,7 +369,7 @@ Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/ Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/package.json' does not exist. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/package.json' does not exist. -Info seq [hh:mm:ss:mss] Found 'package.json' at '/home/src/Library/Caches/typescript/package.json'. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/package.json' does not exist. Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/@types/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution @@ -716,7 +380,7 @@ Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/p Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/project1/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/project1/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 3 projectProgramVersion: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (3) /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" @@ -728,21 +392,167 @@ Info seq [hh:mm:ss:mss] Files (3) Default library for target 'es5' ../../../../home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts Imported via 'bar' from file 'app.js' - Matched by default include pattern '**/*' app.js Matched by default include pattern '**/*' Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 +Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /home/src/tslibs/ts/lib/lib.d.ts:: [] Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /home/src/library/caches/typescript/node_modules/@types/bar/index.d.ts:: [] Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /users/user/projects/project1/app.js:: [] Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 Done: [] +TI:: Creating typing installer + +PolledWatches:: +/home/src/Library/Caches/typescript/node_modules/@types/bar/package.json: *new* + {"pollingInterval":2000} +/home/src/Library/Caches/typescript/node_modules/@types/package.json: *new* + {"pollingInterval":2000} +/home/src/Library/Caches/typescript/node_modules/package.json: *new* + {"pollingInterval":2000} +/home/src/Library/Caches/typescript/package.json: *new* + {"pollingInterval":2000} +/users/user/projects/node_modules: + {"pollingInterval":500} +/users/user/projects/node_modules/@types: + {"pollingInterval":500} +/users/user/projects/project1/node_modules/@types: + {"pollingInterval":500} + +PolledWatches *deleted*:: +/users/user/projects/package.json: + {"pollingInterval":2000} +/users/user/projects/project1/node_modules/bar/package.json: + {"pollingInterval":2000} +/users/user/projects/project1/node_modules/package.json: + {"pollingInterval":2000} +/users/user/projects/project1/package.json: + {"pollingInterval":2000} + +FsWatches:: +/home/src/tslibs/TS/Lib/lib.d.ts: + {} +/users/user/projects/project1/jsconfig.json: + {} + +FsWatchesRecursive:: +/home/src/Library/Caches/typescript/node_modules: *new* + {} +/users/user/projects/project1: + {} +/users/user/projects/project1/node_modules: + {} + +Projects:: +/users/user/projects/project1/jsconfig.json (Configured) *changed* + projectStateVersion: 2 + projectProgramVersion: 1 + dirty: false *changed* + +ScriptInfos:: +/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts *new* + version: Text-1 + containingProjects: 1 + /users/user/projects/project1/jsconfig.json +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /users/user/projects/project1/jsconfig.json +/users/user/projects/project1/app.js (Open) + version: SVC-1-0 + containingProjects: 1 + /users/user/projects/project1/jsconfig.json *default* +/users/user/projects/project1/node_modules/bar/index.js *changed* + version: Text-1 + containingProjects: 0 *changed* + /users/user/projects/project1/jsconfig.json *deleted* + +TI:: [hh:mm:ss:mss] Global cache location '/home/src/Library/Caches/typescript', safe file path '/home/src/tslibs/TS/Lib/typingSafeList.json', types map path /home/src/tslibs/TS/Lib/typesMap.json +TI:: [hh:mm:ss:mss] Processing cache location '/home/src/Library/Caches/typescript' +TI:: [hh:mm:ss:mss] Trying to find '/home/src/Library/Caches/typescript/package.json'... +TI:: [hh:mm:ss:mss] Finished processing cache location '/home/src/Library/Caches/typescript' +TI:: [hh:mm:ss:mss] Npm config file: /home/src/Library/Caches/typescript/package.json +TI:: [hh:mm:ss:mss] Npm config file: '/home/src/Library/Caches/typescript/package.json' is missing, creating new one... +Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/Library/Caches/typescript/package.json 0:: WatchInfo: /home/src/Library/Caches/typescript/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Scheduled: /users/user/projects/project1/jsconfig.jsonFailedLookupInvalidation +Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /home/src/Library/Caches/typescript/package.json 0:: WatchInfo: /home/src/Library/Caches/typescript/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/Library/Caches/typescript/package.json 0:: WatchInfo: /home/src/Library/Caches/typescript/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Scheduled: /users/user/projects/project1/jsconfig.jsonFailedLookupInvalidation, Cancelled earlier one +Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /home/src/Library/Caches/typescript/package.json 0:: WatchInfo: /home/src/Library/Caches/typescript/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +TI:: [hh:mm:ss:mss] Updating types-registry npm package... +TI:: [hh:mm:ss:mss] npm install --ignore-scripts types-registry@latest +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /home/src/Library/Caches/typescript/node_modules/types-registry :: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Scheduled: /users/user/projects/project1/jsconfig.jsonFailedLookupInvalidation, Cancelled earlier one +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/Library/Caches/typescript/node_modules/types-registry :: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /home/src/Library/Caches/typescript/node_modules/types-registry/index.json :: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Scheduled: /users/user/projects/project1/jsconfig.jsonFailedLookupInvalidation, Cancelled earlier one +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/Library/Caches/typescript/node_modules/types-registry/index.json :: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations +TI:: [hh:mm:ss:mss] Updated types-registry npm package +TI:: typing installer creation complete +//// [/home/src/Library/Caches/typescript/package.json] +{ "private": true } + +//// [/home/src/Library/Caches/typescript/node_modules/types-registry/index.json] +{ + "entries": { + "bar": { + "latest": "1.3.0", + "ts2.0": "1.0.0", + "ts2.1": "1.0.0", + "ts2.2": "1.2.0", + "ts2.3": "1.3.0", + "ts2.4": "1.3.0", + "ts2.5": "1.3.0", + "ts2.6": "1.3.0", + "ts2.7": "1.3.0" + } + } +} + + +PolledWatches:: +/home/src/Library/Caches/typescript/node_modules/@types/bar/package.json: + {"pollingInterval":2000} +/home/src/Library/Caches/typescript/node_modules/@types/package.json: + {"pollingInterval":2000} +/home/src/Library/Caches/typescript/node_modules/package.json: + {"pollingInterval":2000} +/users/user/projects/node_modules: + {"pollingInterval":500} +/users/user/projects/node_modules/@types: + {"pollingInterval":500} +/users/user/projects/project1/node_modules/@types: + {"pollingInterval":500} + +PolledWatches *deleted*:: +/home/src/Library/Caches/typescript/package.json: + {"pollingInterval":2000} + +FsWatches:: +/home/src/Library/Caches/typescript/package.json: *new* + {} +/home/src/tslibs/TS/Lib/lib.d.ts: + {} +/users/user/projects/project1/jsconfig.json: + {} + +FsWatchesRecursive:: +/home/src/Library/Caches/typescript/node_modules: + {} +/users/user/projects/project1: + {} +/users/user/projects/project1/node_modules: + {} + +Timeout callback:: count: 2 +2: *ensureProjectForOpenFiles* +6: /users/user/projects/project1/jsconfig.jsonFailedLookupInvalidation *new* + TI:: [hh:mm:ss:mss] Got install request { "projectName": "/users/user/projects/project1/jsconfig.json", "fileNames": [ "/home/src/tslibs/TS/Lib/lib.d.ts", - "/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts", "/users/user/projects/project1/app.js" ], "compilerOptions": { @@ -764,6 +574,7 @@ TI:: [hh:mm:ss:mss] Got install request "projectRootPath": "/users/user/projects/project1", "kind": "discover" } +TI:: [hh:mm:ss:mss] Failed to load safelist from types map file '/home/src/tslibs/TS/Lib/typesMap.json' TI:: [hh:mm:ss:mss] Explicitly included types: [] TI:: [hh:mm:ss:mss] Searching for typing names in /users/user/projects/project1/node_modules; all files: [] TI:: [hh:mm:ss:mss] Found package names: [] @@ -780,8 +591,16 @@ TI:: [hh:mm:ss:mss] Finished typings discovery: TI:: [hh:mm:ss:mss] Sending response: { "kind": "action::watchTypingLocations", - "projectName": "/users/user/projects/project1/jsconfig.json" + "projectName": "/users/user/projects/project1/jsconfig.json", + "files": [ + "/users/user/projects/project1/bower_components", + "/users/user/projects/project1/node_modules" + ] } +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/bower_components 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/bower_components 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer TI:: [hh:mm:ss:mss] Sending response: { "projectName": "/users/user/projects/project1/jsconfig.json", @@ -804,8 +623,6 @@ TI:: [hh:mm:ss:mss] Sending response: "unresolvedImports": [], "kind": "action::set" } -Info seq [hh:mm:ss:mss] Scheduled: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one Info seq [hh:mm:ss:mss] event: { "seq": 0, @@ -834,13 +651,27 @@ Info seq [hh:mm:ss:mss] event: } } TI:: [hh:mm:ss:mss] No new typings were requested as a result of typings discovery +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/users/user/projects/project1/jsconfig.json" + } + } +Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] Found 'package.json' at '/home/src/Library/Caches/typescript/package.json'. Info seq [hh:mm:ss:mss] Reusing resolution of module 'bar' from '/users/user/projects/project1/app.js' of old program, it was successfully resolved to '/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts'. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/package.json' exists according to earlier cached lookups. -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 4 projectProgramVersion: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 3 projectProgramVersion: 2 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (3) /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" @@ -850,36 +681,37 @@ Info seq [hh:mm:ss:mss] Files (3) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 Done: [] -After running Timeout callback:: count: 2 +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/users/user/projects/project1/jsconfig.json", + "configFile": "/users/user/projects/project1/jsconfig.json", + "diagnostics": [] + } + } +After running Timeout callback:: count: 1 PolledWatches:: -/home/src/Library/Caches/typescript/node_modules/@types/bar/package.json: *new* +/home/src/Library/Caches/typescript/node_modules/@types/bar/package.json: {"pollingInterval":2000} -/home/src/Library/Caches/typescript/node_modules/@types/package.json: *new* +/home/src/Library/Caches/typescript/node_modules/@types/package.json: {"pollingInterval":2000} -/home/src/Library/Caches/typescript/node_modules/package.json: *new* +/home/src/Library/Caches/typescript/node_modules/package.json: {"pollingInterval":2000} /users/user/projects/node_modules: {"pollingInterval":500} /users/user/projects/node_modules/@types: {"pollingInterval":500} -/users/user/projects/project1/bower_components: +/users/user/projects/project1/bower_components: *new* {"pollingInterval":500} /users/user/projects/project1/node_modules/@types: {"pollingInterval":500} -PolledWatches *deleted*:: -/users/user/projects/package.json: - {"pollingInterval":2000} -/users/user/projects/project1/node_modules/bar/package.json: - {"pollingInterval":2000} -/users/user/projects/project1/node_modules/package.json: - {"pollingInterval":2000} -/users/user/projects/project1/package.json: - {"pollingInterval":2000} - FsWatches:: -/home/src/Library/Caches/typescript/package.json: *new* +/home/src/Library/Caches/typescript/package.json: {} /home/src/tslibs/TS/Lib/lib.d.ts: {} @@ -887,47 +719,26 @@ FsWatches:: {} FsWatchesRecursive:: -/home/src/Library/Caches/typescript/node_modules: *new* +/home/src/Library/Caches/typescript/node_modules: {} /users/user/projects/project1: {} /users/user/projects/project1/node_modules: {} -Timeout callback:: count: 2 -4: *ensureProjectForOpenFiles* *deleted* -5: /users/user/projects/project1/jsconfig.json *new* -6: *ensureProjectForOpenFiles* *new* +Timeout callback:: count: 1 +2: *ensureProjectForOpenFiles* *deleted* +6: /users/user/projects/project1/jsconfig.jsonFailedLookupInvalidation *deleted* +7: *ensureProjectForOpenFiles* *new* Projects:: /users/user/projects/project1/jsconfig.json (Configured) *changed* - projectStateVersion: 4 *changed* + projectStateVersion: 3 *changed* projectProgramVersion: 3 *changed* - dirty: false *changed* -ScriptInfos:: -/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts *new* - version: Text-1 - containingProjects: 1 - /users/user/projects/project1/jsconfig.json -/home/src/tslibs/TS/Lib/lib.d.ts - version: Text-1 - containingProjects: 1 - /users/user/projects/project1/jsconfig.json -/users/user/projects/project1/app.js (Open) - version: SVC-1-0 - containingProjects: 1 - /users/user/projects/project1/jsconfig.json *default* -/users/user/projects/project1/node_modules/bar/index.js *changed* - version: Text-1 - containingProjects: 0 *changed* - /users/user/projects/project1/jsconfig.json *deleted* +Before running Timeout callback:: count: 1 +7: *ensureProjectForOpenFiles* -Before running Timeout callback:: count: 2 -5: /users/user/projects/project1/jsconfig.json -6: *ensureProjectForOpenFiles* - -Info seq [hh:mm:ss:mss] Running: /users/user/projects/project1/jsconfig.json Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) @@ -962,3 +773,19 @@ After running Timeout callback:: count: 0 Before running Timeout callback:: count: 0 After running Timeout callback:: count: 0 + +Before running PendingInstalls callback:: count: 0 + +After running PendingInstalls callback:: count: 0 + +Before running Timeout callback:: count: 0 + +After running Timeout callback:: count: 0 + +Before running Timeout callback:: count: 0 + +After running Timeout callback:: count: 0 + +Before running Timeout callback:: count: 0 + +After running Timeout callback:: count: 0 diff --git a/tests/baselines/reference/tsserver/typeAquisition/changes-to-typeAquisition-when-typing-installer-installs-typing-multiple-projects-with-shared-resolution.js b/tests/baselines/reference/tsserver/typeAquisition/changes-to-typeAquisition-when-typing-installer-installs-typing-multiple-projects-with-shared-resolution.js index f7479ba35da..44a97f424ec 100644 --- a/tests/baselines/reference/tsserver/typeAquisition/changes-to-typeAquisition-when-typing-installer-installs-typing-multiple-projects-with-shared-resolution.js +++ b/tests/baselines/reference/tsserver/typeAquisition/changes-to-typeAquisition-when-typing-installer-installs-typing-multiple-projects-with-shared-resolution.js @@ -2112,12 +2112,60 @@ Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/user/projec Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/package.json' exists according to earlier cached lookups. -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 4 projectProgramVersion: 3 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] ======== Resolving module 'bar' from '/users/user/projects/project1/app.js'. ======== +Info seq [hh:mm:ss:mss] Module resolution kind is not specified, using 'Node10'. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/project1/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.d.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/index.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/index.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/index.d.ts' does not exist. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/node_modules/@types' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/user/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: JavaScript. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for fallback extensions: JavaScript. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/project1/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.js' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.jsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/index.js' exists - use it as a name resolution result. +Info seq [hh:mm:ss:mss] Resolving real path for '/users/user/projects/node_modules/bar/index.js', result '/users/user/projects/node_modules/bar/index.js'. +Info seq [hh:mm:ss:mss] ======== Module name 'bar' was successfully resolved to '/users/user/projects/node_modules/bar/index.js'. ======== +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/user/projects/node_modules/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/user/projects/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/user/projects/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/@types/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/@types/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 4 projectProgramVersion: 3 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (3) /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" - /home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts Text-1 "export const x = 1;" + /users/user/projects/node_modules/bar/index.js Text-1 "export const x = 1" /users/user/projects/project1/app.js SVC-1-0 "var x = require('bar');" + + + ../../../../home/src/tslibs/TS/Lib/lib.d.ts + Default library for target 'es5' + ../node_modules/bar/index.js + Imported via 'bar' from file 'app.js' + app.js + Matched by default include pattern '**/*' Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] event: @@ -2264,7 +2312,7 @@ FsWatchesRecursive:: Projects:: /users/user/projects/project1/jsconfig.json (Configured) *changed* projectStateVersion: 4 - projectProgramVersion: 3 + projectProgramVersion: 4 *changed* dirty: false *changed* /users/user/projects/project2/jsconfig.json (Configured) projectStateVersion: 3 @@ -2274,6 +2322,48 @@ Projects:: projectProgramVersion: 1 autoImportProviderHost: false +ScriptInfos:: +/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts *changed* + version: Text-1 + containingProjects: 1 *changed* + /users/user/projects/project2/jsconfig.json + /users/user/projects/project1/jsconfig.json *deleted* +/home/src/Library/Caches/typescript/node_modules/@types/foo/index.d.ts + version: Text-1 + containingProjects: 1 + /users/user/projects/project2/jsconfig.json +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 3 + /users/user/projects/project1/jsconfig.json + /users/user/projects/project2/jsconfig.json + /users/user/projects/project3/jsconfig.json +/users/user/projects/node_modules/bar/index.js *changed* + version: Text-1 + containingProjects: 2 *changed* + /users/user/projects/project3/jsconfig.json + /users/user/projects/project1/jsconfig.json *new* +/users/user/projects/project1/app.js (Open) + version: SVC-1-0 + containingProjects: 1 + /users/user/projects/project1/jsconfig.json *default* +/users/user/projects/project2/app.js (Open) + version: SVC-1-0 + containingProjects: 1 + /users/user/projects/project2/jsconfig.json *default* +/users/user/projects/project2/app2.js + version: Text-1 + containingProjects: 1 + /users/user/projects/project2/jsconfig.json +/users/user/projects/project3/app.js (Open) + version: SVC-1-0 + containingProjects: 1 + /users/user/projects/project3/jsconfig.json *default* +/users/user/projects/project3/app2.js + version: Text-1 + containingProjects: 1 + /users/user/projects/project3/jsconfig.json + Before running Timeout callback:: count: 0 After running Timeout callback:: count: 0 @@ -2306,7 +2396,7 @@ Timeout callback:: count: 2 Projects:: /users/user/projects/project1/jsconfig.json (Configured) *changed* projectStateVersion: 5 *changed* - projectProgramVersion: 3 + projectProgramVersion: 4 dirty: true *changed* /users/user/projects/project2/jsconfig.json (Configured) projectStateVersion: 3 @@ -2342,15 +2432,67 @@ Info seq [hh:mm:ss:mss] Config: /users/user/projects/project1/jsconfig.json : { } } Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] ======== Resolving module 'bar' from '/users/user/projects/project1/app.js'. ======== +Info seq [hh:mm:ss:mss] Module resolution kind is not specified, using 'Node10'. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/project1/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.d.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/index.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/index.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/index.d.ts' does not exist. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/node_modules/@types' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/user/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: JavaScript. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for fallback extensions: JavaScript. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/project1/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.js' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.jsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/index.js' exists - use it as a name resolution result. +Info seq [hh:mm:ss:mss] Resolving real path for '/users/user/projects/node_modules/bar/index.js', result '/users/user/projects/node_modules/bar/index.js'. +Info seq [hh:mm:ss:mss] ======== Module name 'bar' was successfully resolved to '/users/user/projects/node_modules/bar/index.js'. ======== +Info seq [hh:mm:ss:mss] Auto discovery for typings is enabled in project '/users/user/projects/project1/jsconfig.json'. Running extra resolution pass for module 'bar' using cache location '/home/src/Library/Caches/typescript'. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/bar.d.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar.d.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts' exists - use it as a name resolution result. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/package.json' exists according to earlier cached lookups. -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 5 projectProgramVersion: 3 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/@types/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/@types/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/node_modules/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 5 projectProgramVersion: 4 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (3) /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" /home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts Text-1 "export const x = 1;" /users/user/projects/project1/app.js SVC-1-0 "var x = require('bar');" + + + ../../../../home/src/tslibs/TS/Lib/lib.d.ts + Default library for target 'es5' + ../../../../home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts + Imported via 'bar' from file 'app.js' + app.js + Matched by default include pattern '**/*' Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 @@ -2600,7 +2742,7 @@ FsWatchesRecursive:: Projects:: /users/user/projects/project1/jsconfig.json (Configured) *changed* projectStateVersion: 5 - projectProgramVersion: 3 + projectProgramVersion: 5 *changed* dirty: false *changed* /users/user/projects/project2/jsconfig.json (Configured) projectStateVersion: 3 @@ -2610,6 +2752,48 @@ Projects:: projectProgramVersion: 1 autoImportProviderHost: false +ScriptInfos:: +/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts *changed* + version: Text-1 + containingProjects: 2 *changed* + /users/user/projects/project2/jsconfig.json + /users/user/projects/project1/jsconfig.json *new* +/home/src/Library/Caches/typescript/node_modules/@types/foo/index.d.ts + version: Text-1 + containingProjects: 1 + /users/user/projects/project2/jsconfig.json +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 3 + /users/user/projects/project1/jsconfig.json + /users/user/projects/project2/jsconfig.json + /users/user/projects/project3/jsconfig.json +/users/user/projects/node_modules/bar/index.js *changed* + version: Text-1 + containingProjects: 1 *changed* + /users/user/projects/project3/jsconfig.json + /users/user/projects/project1/jsconfig.json *deleted* +/users/user/projects/project1/app.js (Open) + version: SVC-1-0 + containingProjects: 1 + /users/user/projects/project1/jsconfig.json *default* +/users/user/projects/project2/app.js (Open) + version: SVC-1-0 + containingProjects: 1 + /users/user/projects/project2/jsconfig.json *default* +/users/user/projects/project2/app2.js + version: Text-1 + containingProjects: 1 + /users/user/projects/project2/jsconfig.json +/users/user/projects/project3/app.js (Open) + version: SVC-1-0 + containingProjects: 1 + /users/user/projects/project3/jsconfig.json *default* +/users/user/projects/project3/app2.js + version: Text-1 + containingProjects: 1 + /users/user/projects/project3/jsconfig.json + Before running Timeout callback:: count: 0 After running Timeout callback:: count: 0 diff --git a/tests/baselines/reference/tsserver/typeAquisition/changes-to-typeAquisition-when-typing-installer-installs-typing-multiple-projects.js b/tests/baselines/reference/tsserver/typeAquisition/changes-to-typeAquisition-when-typing-installer-installs-typing-multiple-projects.js index 2842af6152f..47e48b4d60b 100644 --- a/tests/baselines/reference/tsserver/typeAquisition/changes-to-typeAquisition-when-typing-installer-installs-typing-multiple-projects.js +++ b/tests/baselines/reference/tsserver/typeAquisition/changes-to-typeAquisition-when-typing-installer-installs-typing-multiple-projects.js @@ -2190,12 +2190,61 @@ Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/user/projec Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/package.json' exists according to earlier cached lookups. -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 4 projectProgramVersion: 3 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] ======== Resolving module 'bar' from '/users/user/projects/project1/app.js'. ======== +Info seq [hh:mm:ss:mss] Module resolution kind is not specified, using 'Node10'. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.d.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.d.ts' does not exist. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/project1/node_modules/@types' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/user/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: JavaScript. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for fallback extensions: JavaScript. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.js' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.jsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.js' exists - use it as a name resolution result. +Info seq [hh:mm:ss:mss] Resolving real path for '/users/user/projects/project1/node_modules/bar/index.js', result '/users/user/projects/project1/node_modules/bar/index.js'. +Info seq [hh:mm:ss:mss] ======== Module name 'bar' was successfully resolved to '/users/user/projects/project1/node_modules/bar/index.js'. ======== +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/user/projects/project1/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/user/projects/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/@types/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/@types/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 4 projectProgramVersion: 3 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (3) /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" - /home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts Text-1 "export const x = 1;" + /users/user/projects/project1/node_modules/bar/index.js Text-1 "export const x = 1" /users/user/projects/project1/app.js SVC-1-0 "var x = require('bar');" + + + ../../../../home/src/tslibs/TS/Lib/lib.d.ts + Default library for target 'es5' + node_modules/bar/index.js + Imported via 'bar' from file 'app.js' + app.js + Matched by default include pattern '**/*' Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] event: @@ -2292,6 +2341,12 @@ PolledWatches:: {"pollingInterval":2000} /users/user/projects/project1/node_modules/@types: {"pollingInterval":500} +/users/user/projects/project1/node_modules/bar/package.json: *new* + {"pollingInterval":2000} +/users/user/projects/project1/node_modules/package.json: *new* + {"pollingInterval":2000} +/users/user/projects/project1/package.json: *new* + {"pollingInterval":2000} /users/user/projects/project2/bower_components: {"pollingInterval":500} /users/user/projects/project2/node_modules/@types: @@ -2344,7 +2399,7 @@ FsWatchesRecursive:: Projects:: /users/user/projects/project1/jsconfig.json (Configured) *changed* projectStateVersion: 4 - projectProgramVersion: 3 + projectProgramVersion: 4 *changed* dirty: false *changed* /users/user/projects/project2/jsconfig.json (Configured) projectStateVersion: 3 @@ -2354,6 +2409,54 @@ Projects:: projectProgramVersion: 1 autoImportProviderHost: false +ScriptInfos:: +/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts *changed* + version: Text-1 + containingProjects: 1 *changed* + /users/user/projects/project2/jsconfig.json + /users/user/projects/project1/jsconfig.json *deleted* +/home/src/Library/Caches/typescript/node_modules/@types/foo/index.d.ts + version: Text-1 + containingProjects: 1 + /users/user/projects/project2/jsconfig.json +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 3 + /users/user/projects/project1/jsconfig.json + /users/user/projects/project2/jsconfig.json + /users/user/projects/project3/jsconfig.json +/users/user/projects/project1/app.js (Open) + version: SVC-1-0 + containingProjects: 1 + /users/user/projects/project1/jsconfig.json *default* +/users/user/projects/project1/node_modules/bar/index.js *changed* + version: Text-1 + containingProjects: 1 *changed* + /users/user/projects/project1/jsconfig.json *new* +/users/user/projects/project2/app.js (Open) + version: SVC-1-0 + containingProjects: 1 + /users/user/projects/project2/jsconfig.json *default* +/users/user/projects/project2/app2.js + version: Text-1 + containingProjects: 1 + /users/user/projects/project2/jsconfig.json +/users/user/projects/project2/node_modules/bar/index.js + version: Text-1 + containingProjects: 0 +/users/user/projects/project3/app.js (Open) + version: SVC-1-0 + containingProjects: 1 + /users/user/projects/project3/jsconfig.json *default* +/users/user/projects/project3/app2.js + version: Text-1 + containingProjects: 1 + /users/user/projects/project3/jsconfig.json +/users/user/projects/project3/node_modules/bar/index.js + version: Text-1 + containingProjects: 1 + /users/user/projects/project3/jsconfig.json + Before running Timeout callback:: count: 0 After running Timeout callback:: count: 0 @@ -2386,7 +2489,7 @@ Timeout callback:: count: 2 Projects:: /users/user/projects/project1/jsconfig.json (Configured) *changed* projectStateVersion: 5 *changed* - projectProgramVersion: 3 + projectProgramVersion: 4 dirty: true *changed* /users/user/projects/project2/jsconfig.json (Configured) projectStateVersion: 3 @@ -2422,15 +2525,68 @@ Info seq [hh:mm:ss:mss] Config: /users/user/projects/project1/jsconfig.json : { } } Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] ======== Resolving module 'bar' from '/users/user/projects/project1/app.js'. ======== +Info seq [hh:mm:ss:mss] Module resolution kind is not specified, using 'Node10'. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.d.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.d.ts' does not exist. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/project1/node_modules/@types' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/user/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: JavaScript. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for fallback extensions: JavaScript. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.js' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.jsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.js' exists - use it as a name resolution result. +Info seq [hh:mm:ss:mss] Resolving real path for '/users/user/projects/project1/node_modules/bar/index.js', result '/users/user/projects/project1/node_modules/bar/index.js'. +Info seq [hh:mm:ss:mss] ======== Module name 'bar' was successfully resolved to '/users/user/projects/project1/node_modules/bar/index.js'. ======== +Info seq [hh:mm:ss:mss] Auto discovery for typings is enabled in project '/users/user/projects/project1/jsconfig.json'. Running extra resolution pass for module 'bar' using cache location '/home/src/Library/Caches/typescript'. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/bar.d.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar.d.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts' exists - use it as a name resolution result. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/package.json' exists according to earlier cached lookups. -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 5 projectProgramVersion: 3 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/@types/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/@types/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/project1/node_modules/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/project1/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/project1/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 5 projectProgramVersion: 4 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (3) /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" /home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts Text-1 "export const x = 1;" /users/user/projects/project1/app.js SVC-1-0 "var x = require('bar');" + + + ../../../../home/src/tslibs/TS/Lib/lib.d.ts + Default library for target 'es5' + ../../../../home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts + Imported via 'bar' from file 'app.js' + app.js + Matched by default include pattern '**/*' Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 @@ -2649,6 +2805,14 @@ PolledWatches:: /users/user/projects/project3/package.json: {"pollingInterval":2000} +PolledWatches *deleted*:: +/users/user/projects/project1/node_modules/bar/package.json: + {"pollingInterval":2000} +/users/user/projects/project1/node_modules/package.json: + {"pollingInterval":2000} +/users/user/projects/project1/package.json: + {"pollingInterval":2000} + FsWatches:: /home/src/Library/Caches/typescript/package.json: {} @@ -2684,7 +2848,7 @@ FsWatchesRecursive:: Projects:: /users/user/projects/project1/jsconfig.json (Configured) *changed* projectStateVersion: 5 - projectProgramVersion: 3 + projectProgramVersion: 5 *changed* dirty: false *changed* /users/user/projects/project2/jsconfig.json (Configured) projectStateVersion: 3 @@ -2694,6 +2858,54 @@ Projects:: projectProgramVersion: 1 autoImportProviderHost: false +ScriptInfos:: +/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts *changed* + version: Text-1 + containingProjects: 2 *changed* + /users/user/projects/project2/jsconfig.json + /users/user/projects/project1/jsconfig.json *new* +/home/src/Library/Caches/typescript/node_modules/@types/foo/index.d.ts + version: Text-1 + containingProjects: 1 + /users/user/projects/project2/jsconfig.json +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 3 + /users/user/projects/project1/jsconfig.json + /users/user/projects/project2/jsconfig.json + /users/user/projects/project3/jsconfig.json +/users/user/projects/project1/app.js (Open) + version: SVC-1-0 + containingProjects: 1 + /users/user/projects/project1/jsconfig.json *default* +/users/user/projects/project1/node_modules/bar/index.js *changed* + version: Text-1 + containingProjects: 0 *changed* + /users/user/projects/project1/jsconfig.json *deleted* +/users/user/projects/project2/app.js (Open) + version: SVC-1-0 + containingProjects: 1 + /users/user/projects/project2/jsconfig.json *default* +/users/user/projects/project2/app2.js + version: Text-1 + containingProjects: 1 + /users/user/projects/project2/jsconfig.json +/users/user/projects/project2/node_modules/bar/index.js + version: Text-1 + containingProjects: 0 +/users/user/projects/project3/app.js (Open) + version: SVC-1-0 + containingProjects: 1 + /users/user/projects/project3/jsconfig.json *default* +/users/user/projects/project3/app2.js + version: Text-1 + containingProjects: 1 + /users/user/projects/project3/jsconfig.json +/users/user/projects/project3/node_modules/bar/index.js + version: Text-1 + containingProjects: 1 + /users/user/projects/project3/jsconfig.json + Before running Timeout callback:: count: 0 After running Timeout callback:: count: 0 diff --git a/tests/baselines/reference/tsserver/typeAquisition/changes-to-typeAquisition-when-typing-installer-installs-typing.js b/tests/baselines/reference/tsserver/typeAquisition/changes-to-typeAquisition-when-typing-installer-installs-typing.js index b59949946e0..ffdccf55bef 100644 --- a/tests/baselines/reference/tsserver/typeAquisition/changes-to-typeAquisition-when-typing-installer-installs-typing.js +++ b/tests/baselines/reference/tsserver/typeAquisition/changes-to-typeAquisition-when-typing-installer-installs-typing.js @@ -907,12 +907,61 @@ Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/ Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/package.json' exists according to earlier cached lookups. -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 4 projectProgramVersion: 3 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] ======== Resolving module 'bar' from '/users/user/projects/project1/app.js'. ======== +Info seq [hh:mm:ss:mss] Module resolution kind is not specified, using 'Node10'. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.d.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.d.ts' does not exist. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/project1/node_modules/@types' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/user/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: JavaScript. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for fallback extensions: JavaScript. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.js' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.jsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.js' exists - use it as a name resolution result. +Info seq [hh:mm:ss:mss] Resolving real path for '/users/user/projects/project1/node_modules/bar/index.js', result '/users/user/projects/project1/node_modules/bar/index.js'. +Info seq [hh:mm:ss:mss] ======== Module name 'bar' was successfully resolved to '/users/user/projects/project1/node_modules/bar/index.js'. ======== +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/user/projects/project1/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/user/projects/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/@types/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/@types/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 4 projectProgramVersion: 3 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (3) /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" - /home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts Text-1 "export const x = 1;" + /users/user/projects/project1/node_modules/bar/index.js Text-1 "export const x = 1" /users/user/projects/project1/app.js SVC-1-0 "var x = require('bar');" + + + ../../../../home/src/tslibs/TS/Lib/lib.d.ts + Default library for target 'es5' + node_modules/bar/index.js + Imported via 'bar' from file 'app.js' + app.js + Matched by default include pattern '**/*' Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] event: @@ -967,45 +1016,75 @@ Info seq [hh:mm:ss:mss] event: After running Timeout callback:: count: 0 PolledWatches:: +/users/user/projects/node_modules: + {"pollingInterval":500} +/users/user/projects/node_modules/@types: + {"pollingInterval":500} +/users/user/projects/package.json: *new* + {"pollingInterval":2000} +/users/user/projects/project1/node_modules/@types: + {"pollingInterval":500} +/users/user/projects/project1/node_modules/bar/package.json: *new* + {"pollingInterval":2000} +/users/user/projects/project1/node_modules/package.json: *new* + {"pollingInterval":2000} +/users/user/projects/project1/package.json: *new* + {"pollingInterval":2000} + +PolledWatches *deleted*:: /home/src/Library/Caches/typescript/node_modules/@types/bar/package.json: {"pollingInterval":2000} /home/src/Library/Caches/typescript/node_modules/@types/package.json: {"pollingInterval":2000} /home/src/Library/Caches/typescript/node_modules/package.json: {"pollingInterval":2000} -/users/user/projects/node_modules: - {"pollingInterval":500} -/users/user/projects/node_modules/@types: - {"pollingInterval":500} -/users/user/projects/project1/node_modules/@types: - {"pollingInterval":500} - -PolledWatches *deleted*:: /users/user/projects/project1/bower_components: {"pollingInterval":500} FsWatches:: -/home/src/Library/Caches/typescript/package.json: - {} /home/src/tslibs/TS/Lib/lib.d.ts: {} /users/user/projects/project1/jsconfig.json: {} -FsWatchesRecursive:: -/home/src/Library/Caches/typescript/node_modules: +FsWatches *deleted*:: +/home/src/Library/Caches/typescript/package.json: {} + +FsWatchesRecursive:: /users/user/projects/project1: {} /users/user/projects/project1/node_modules: {} +FsWatchesRecursive *deleted*:: +/home/src/Library/Caches/typescript/node_modules: + {} + Projects:: /users/user/projects/project1/jsconfig.json (Configured) *changed* projectStateVersion: 4 - projectProgramVersion: 3 + projectProgramVersion: 4 *changed* dirty: false *changed* +ScriptInfos:: +/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts *changed* + version: Text-1 + containingProjects: 0 *changed* + /users/user/projects/project1/jsconfig.json *deleted* +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /users/user/projects/project1/jsconfig.json +/users/user/projects/project1/app.js (Open) + version: SVC-1-0 + containingProjects: 1 + /users/user/projects/project1/jsconfig.json *default* +/users/user/projects/project1/node_modules/bar/index.js *changed* + version: Text-1 + containingProjects: 1 *changed* + /users/user/projects/project1/jsconfig.json *new* + Before running Timeout callback:: count: 0 After running Timeout callback:: count: 0 @@ -1038,7 +1117,7 @@ Timeout callback:: count: 2 Projects:: /users/user/projects/project1/jsconfig.json (Configured) *changed* projectStateVersion: 5 *changed* - projectProgramVersion: 3 + projectProgramVersion: 4 dirty: true *changed* Info seq [hh:mm:ss:mss] Running: /users/user/projects/project1/jsconfig.json @@ -1067,16 +1146,70 @@ Info seq [hh:mm:ss:mss] Config: /users/user/projects/project1/jsconfig.json : { } } Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] ======== Resolving module 'bar' from '/users/user/projects/project1/app.js'. ======== +Info seq [hh:mm:ss:mss] Module resolution kind is not specified, using 'Node10'. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.d.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.d.ts' does not exist. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/project1/node_modules/@types' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/user/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: JavaScript. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for fallback extensions: JavaScript. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.js' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.jsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.js' exists - use it as a name resolution result. +Info seq [hh:mm:ss:mss] Resolving real path for '/users/user/projects/project1/node_modules/bar/index.js', result '/users/user/projects/project1/node_modules/bar/index.js'. +Info seq [hh:mm:ss:mss] ======== Module name 'bar' was successfully resolved to '/users/user/projects/project1/node_modules/bar/index.js'. ======== +Info seq [hh:mm:ss:mss] Auto discovery for typings is enabled in project '/users/user/projects/project1/jsconfig.json'. Running extra resolution pass for module 'bar' using cache location '/home/src/Library/Caches/typescript'. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/bar.d.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar.d.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts' exists - use it as a name resolution result. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/package.json' exists according to earlier cached lookups. -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 5 projectProgramVersion: 3 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/@types/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/@types/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/project1/node_modules/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/project1/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/project1/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 5 projectProgramVersion: 4 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (3) /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" /home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts Text-1 "export const x = 1;" /users/user/projects/project1/app.js SVC-1-0 "var x = require('bar');" + + + ../../../../home/src/tslibs/TS/Lib/lib.d.ts + Default library for target 'es5' + ../../../../home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts + Imported via 'bar' from file 'app.js' + app.js + Matched by default include pattern '**/*' Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 @@ -1238,11 +1371,11 @@ Info seq [hh:mm:ss:mss] event: After running Timeout callback:: count: 0 PolledWatches:: -/home/src/Library/Caches/typescript/node_modules/@types/bar/package.json: +/home/src/Library/Caches/typescript/node_modules/@types/bar/package.json: *new* {"pollingInterval":2000} -/home/src/Library/Caches/typescript/node_modules/@types/package.json: +/home/src/Library/Caches/typescript/node_modules/@types/package.json: *new* {"pollingInterval":2000} -/home/src/Library/Caches/typescript/node_modules/package.json: +/home/src/Library/Caches/typescript/node_modules/package.json: *new* {"pollingInterval":2000} /users/user/projects/node_modules: {"pollingInterval":500} @@ -1253,8 +1386,18 @@ PolledWatches:: /users/user/projects/project1/node_modules/@types: {"pollingInterval":500} +PolledWatches *deleted*:: +/users/user/projects/package.json: + {"pollingInterval":2000} +/users/user/projects/project1/node_modules/bar/package.json: + {"pollingInterval":2000} +/users/user/projects/project1/node_modules/package.json: + {"pollingInterval":2000} +/users/user/projects/project1/package.json: + {"pollingInterval":2000} + FsWatches:: -/home/src/Library/Caches/typescript/package.json: +/home/src/Library/Caches/typescript/package.json: *new* {} /home/src/tslibs/TS/Lib/lib.d.ts: {} @@ -1262,7 +1405,7 @@ FsWatches:: {} FsWatchesRecursive:: -/home/src/Library/Caches/typescript/node_modules: +/home/src/Library/Caches/typescript/node_modules: *new* {} /users/user/projects/project1: {} @@ -1272,9 +1415,27 @@ FsWatchesRecursive:: Projects:: /users/user/projects/project1/jsconfig.json (Configured) *changed* projectStateVersion: 5 - projectProgramVersion: 3 + projectProgramVersion: 5 *changed* dirty: false *changed* +ScriptInfos:: +/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts *changed* + version: Text-1 + containingProjects: 1 *changed* + /users/user/projects/project1/jsconfig.json *new* +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /users/user/projects/project1/jsconfig.json +/users/user/projects/project1/app.js (Open) + version: SVC-1-0 + containingProjects: 1 + /users/user/projects/project1/jsconfig.json *default* +/users/user/projects/project1/node_modules/bar/index.js *changed* + version: Text-1 + containingProjects: 0 *changed* + /users/user/projects/project1/jsconfig.json *deleted* + Before running Timeout callback:: count: 0 After running Timeout callback:: count: 0 diff --git a/tests/baselines/reference/tsserver/typeAquisition/changes-to-typeAquisition-with-already-aquired-typing-multiple-projects-with-shared-resolution.js b/tests/baselines/reference/tsserver/typeAquisition/changes-to-typeAquisition-with-already-aquired-typing-multiple-projects-with-shared-resolution.js index 0c3cc383684..05e152869a0 100644 --- a/tests/baselines/reference/tsserver/typeAquisition/changes-to-typeAquisition-with-already-aquired-typing-multiple-projects-with-shared-resolution.js +++ b/tests/baselines/reference/tsserver/typeAquisition/changes-to-typeAquisition-with-already-aquired-typing-multiple-projects-with-shared-resolution.js @@ -1353,12 +1353,60 @@ Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/ Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/package.json' exists according to earlier cached lookups. -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] ======== Resolving module 'bar' from '/users/user/projects/project1/app.js'. ======== +Info seq [hh:mm:ss:mss] Module resolution kind is not specified, using 'Node10'. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/project1/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.d.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/index.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/index.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/index.d.ts' does not exist. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/node_modules/@types' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/user/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: JavaScript. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for fallback extensions: JavaScript. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/project1/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.js' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.jsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/index.js' exists - use it as a name resolution result. +Info seq [hh:mm:ss:mss] Resolving real path for '/users/user/projects/node_modules/bar/index.js', result '/users/user/projects/node_modules/bar/index.js'. +Info seq [hh:mm:ss:mss] ======== Module name 'bar' was successfully resolved to '/users/user/projects/node_modules/bar/index.js'. ======== +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/package.json' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/package.json' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/package.json' does not exist. +Info seq [hh:mm:ss:mss] File '/users/package.json' does not exist. +Info seq [hh:mm:ss:mss] File '/package.json' does not exist. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/user/projects/node_modules/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/user/projects/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/user/projects/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/@types/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/@types/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (3) /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" - /home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts Text-1 "export const x = 1;" + /users/user/projects/node_modules/bar/index.js Text-1 "export const x = 1" /users/user/projects/project1/app.js SVC-1-0 "var x = require('bar');" + + + ../../../../home/src/tslibs/TS/Lib/lib.d.ts + Default library for target 'es5' + ../node_modules/bar/index.js + Imported via 'bar' from file 'app.js' + app.js + Matched by default include pattern '**/*' Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] event: @@ -1505,7 +1553,7 @@ FsWatchesRecursive:: Projects:: /users/user/projects/project1/jsconfig.json (Configured) *changed* projectStateVersion: 2 - projectProgramVersion: 1 + projectProgramVersion: 2 *changed* dirty: false *changed* /users/user/projects/project2/jsconfig.json (Configured) projectStateVersion: 1 @@ -1516,6 +1564,48 @@ Projects:: projectProgramVersion: 1 autoImportProviderHost: false +ScriptInfos:: +/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts *changed* + version: Text-1 + containingProjects: 1 *changed* + /users/user/projects/project2/jsconfig.json + /users/user/projects/project1/jsconfig.json *deleted* +/home/src/Library/Caches/typescript/node_modules/@types/foo/index.d.ts + version: Text-1 + containingProjects: 1 + /users/user/projects/project2/jsconfig.json +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 3 + /users/user/projects/project1/jsconfig.json + /users/user/projects/project2/jsconfig.json + /users/user/projects/project3/jsconfig.json +/users/user/projects/node_modules/bar/index.js *changed* + version: Text-1 + containingProjects: 2 *changed* + /users/user/projects/project3/jsconfig.json + /users/user/projects/project1/jsconfig.json *new* +/users/user/projects/project1/app.js (Open) + version: SVC-1-0 + containingProjects: 1 + /users/user/projects/project1/jsconfig.json *default* +/users/user/projects/project2/app.js (Open) + version: SVC-1-0 + containingProjects: 1 + /users/user/projects/project2/jsconfig.json *default* +/users/user/projects/project2/app2.js + version: Text-1 + containingProjects: 1 + /users/user/projects/project2/jsconfig.json +/users/user/projects/project3/app.js (Open) + version: SVC-1-0 + containingProjects: 1 + /users/user/projects/project3/jsconfig.json *default* +/users/user/projects/project3/app2.js + version: Text-1 + containingProjects: 1 + /users/user/projects/project3/jsconfig.json + Before running Timeout callback:: count: 0 After running Timeout callback:: count: 0 @@ -1548,7 +1638,7 @@ Timeout callback:: count: 2 Projects:: /users/user/projects/project1/jsconfig.json (Configured) *changed* projectStateVersion: 3 *changed* - projectProgramVersion: 1 + projectProgramVersion: 2 dirty: true *changed* /users/user/projects/project2/jsconfig.json (Configured) projectStateVersion: 1 @@ -1585,16 +1675,69 @@ Info seq [hh:mm:ss:mss] Config: /users/user/projects/project1/jsconfig.json : { } } Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] ======== Resolving module 'bar' from '/users/user/projects/project1/app.js'. ======== +Info seq [hh:mm:ss:mss] Module resolution kind is not specified, using 'Node10'. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/project1/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.d.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/index.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/index.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/index.d.ts' does not exist. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/node_modules/@types' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/user/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: JavaScript. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for fallback extensions: JavaScript. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/project1/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.js' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.jsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/index.js' exists - use it as a name resolution result. +Info seq [hh:mm:ss:mss] Resolving real path for '/users/user/projects/node_modules/bar/index.js', result '/users/user/projects/node_modules/bar/index.js'. +Info seq [hh:mm:ss:mss] ======== Module name 'bar' was successfully resolved to '/users/user/projects/node_modules/bar/index.js'. ======== +Info seq [hh:mm:ss:mss] Auto discovery for typings is enabled in project '/users/user/projects/project1/jsconfig.json'. Running extra resolution pass for module 'bar' using cache location '/home/src/Library/Caches/typescript'. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/bar.d.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar.d.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts' exists - use it as a name resolution result. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/package.json' exists according to earlier cached lookups. -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 3 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/@types/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/@types/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/node_modules/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 3 projectProgramVersion: 2 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (3) /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" /home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts Text-1 "export const x = 1;" /users/user/projects/project1/app.js SVC-1-0 "var x = require('bar');" + + + ../../../../home/src/tslibs/TS/Lib/lib.d.ts + Default library for target 'es5' + ../../../../home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts + Imported via 'bar' from file 'app.js' + app.js + Matched by default include pattern '**/*' Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 @@ -1844,7 +1987,7 @@ FsWatchesRecursive:: Projects:: /users/user/projects/project1/jsconfig.json (Configured) *changed* projectStateVersion: 3 - projectProgramVersion: 1 + projectProgramVersion: 3 *changed* dirty: false *changed* /users/user/projects/project2/jsconfig.json (Configured) projectStateVersion: 1 @@ -1855,6 +1998,48 @@ Projects:: projectProgramVersion: 1 autoImportProviderHost: false +ScriptInfos:: +/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts *changed* + version: Text-1 + containingProjects: 2 *changed* + /users/user/projects/project2/jsconfig.json + /users/user/projects/project1/jsconfig.json *new* +/home/src/Library/Caches/typescript/node_modules/@types/foo/index.d.ts + version: Text-1 + containingProjects: 1 + /users/user/projects/project2/jsconfig.json +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 3 + /users/user/projects/project1/jsconfig.json + /users/user/projects/project2/jsconfig.json + /users/user/projects/project3/jsconfig.json +/users/user/projects/node_modules/bar/index.js *changed* + version: Text-1 + containingProjects: 1 *changed* + /users/user/projects/project3/jsconfig.json + /users/user/projects/project1/jsconfig.json *deleted* +/users/user/projects/project1/app.js (Open) + version: SVC-1-0 + containingProjects: 1 + /users/user/projects/project1/jsconfig.json *default* +/users/user/projects/project2/app.js (Open) + version: SVC-1-0 + containingProjects: 1 + /users/user/projects/project2/jsconfig.json *default* +/users/user/projects/project2/app2.js + version: Text-1 + containingProjects: 1 + /users/user/projects/project2/jsconfig.json +/users/user/projects/project3/app.js (Open) + version: SVC-1-0 + containingProjects: 1 + /users/user/projects/project3/jsconfig.json *default* +/users/user/projects/project3/app2.js + version: Text-1 + containingProjects: 1 + /users/user/projects/project3/jsconfig.json + Before running Timeout callback:: count: 0 After running Timeout callback:: count: 0 diff --git a/tests/baselines/reference/tsserver/typeAquisition/changes-to-typeAquisition-with-already-aquired-typing-multiple-projects.js b/tests/baselines/reference/tsserver/typeAquisition/changes-to-typeAquisition-with-already-aquired-typing-multiple-projects.js index fb608d8b4ae..ae7452f2c32 100644 --- a/tests/baselines/reference/tsserver/typeAquisition/changes-to-typeAquisition-with-already-aquired-typing-multiple-projects.js +++ b/tests/baselines/reference/tsserver/typeAquisition/changes-to-typeAquisition-with-already-aquired-typing-multiple-projects.js @@ -1364,12 +1364,63 @@ Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/ Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/package.json' exists according to earlier cached lookups. -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] ======== Resolving module 'bar' from '/users/user/projects/project1/app.js'. ======== +Info seq [hh:mm:ss:mss] Module resolution kind is not specified, using 'Node10'. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.d.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.d.ts' does not exist. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/project1/node_modules/@types' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/user/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: JavaScript. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for fallback extensions: JavaScript. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.js' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.jsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.js' exists - use it as a name resolution result. +Info seq [hh:mm:ss:mss] Resolving real path for '/users/user/projects/project1/node_modules/bar/index.js', result '/users/user/projects/project1/node_modules/bar/index.js'. +Info seq [hh:mm:ss:mss] ======== Module name 'bar' was successfully resolved to '/users/user/projects/project1/node_modules/bar/index.js'. ======== +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/package.json' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/package.json' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/package.json' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/package.json' does not exist. +Info seq [hh:mm:ss:mss] File '/users/package.json' does not exist. +Info seq [hh:mm:ss:mss] File '/package.json' does not exist. +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/user/projects/project1/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/user/projects/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/@types/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/@types/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (3) /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" - /home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts Text-1 "export const x = 1;" + /users/user/projects/project1/node_modules/bar/index.js Text-1 "export const x = 1" /users/user/projects/project1/app.js SVC-1-0 "var x = require('bar');" + + + ../../../../home/src/tslibs/TS/Lib/lib.d.ts + Default library for target 'es5' + node_modules/bar/index.js + Imported via 'bar' from file 'app.js' + app.js + Matched by default include pattern '**/*' Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] event: @@ -1466,6 +1517,12 @@ PolledWatches:: {"pollingInterval":2000} /users/user/projects/project1/node_modules/@types: {"pollingInterval":500} +/users/user/projects/project1/node_modules/bar/package.json: *new* + {"pollingInterval":2000} +/users/user/projects/project1/node_modules/package.json: *new* + {"pollingInterval":2000} +/users/user/projects/project1/package.json: *new* + {"pollingInterval":2000} /users/user/projects/project2/bower_components: {"pollingInterval":500} /users/user/projects/project2/node_modules/@types: @@ -1518,7 +1575,7 @@ FsWatchesRecursive:: Projects:: /users/user/projects/project1/jsconfig.json (Configured) *changed* projectStateVersion: 2 - projectProgramVersion: 1 + projectProgramVersion: 2 *changed* dirty: false *changed* /users/user/projects/project2/jsconfig.json (Configured) projectStateVersion: 1 @@ -1529,6 +1586,51 @@ Projects:: projectProgramVersion: 1 autoImportProviderHost: false +ScriptInfos:: +/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts *changed* + version: Text-1 + containingProjects: 1 *changed* + /users/user/projects/project2/jsconfig.json + /users/user/projects/project1/jsconfig.json *deleted* +/home/src/Library/Caches/typescript/node_modules/@types/foo/index.d.ts + version: Text-1 + containingProjects: 1 + /users/user/projects/project2/jsconfig.json +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 3 + /users/user/projects/project1/jsconfig.json + /users/user/projects/project2/jsconfig.json + /users/user/projects/project3/jsconfig.json +/users/user/projects/project1/app.js (Open) + version: SVC-1-0 + containingProjects: 1 + /users/user/projects/project1/jsconfig.json *default* +/users/user/projects/project1/node_modules/bar/index.js *new* + version: Text-1 + containingProjects: 1 + /users/user/projects/project1/jsconfig.json +/users/user/projects/project2/app.js (Open) + version: SVC-1-0 + containingProjects: 1 + /users/user/projects/project2/jsconfig.json *default* +/users/user/projects/project2/app2.js + version: Text-1 + containingProjects: 1 + /users/user/projects/project2/jsconfig.json +/users/user/projects/project3/app.js (Open) + version: SVC-1-0 + containingProjects: 1 + /users/user/projects/project3/jsconfig.json *default* +/users/user/projects/project3/app2.js + version: Text-1 + containingProjects: 1 + /users/user/projects/project3/jsconfig.json +/users/user/projects/project3/node_modules/bar/index.js + version: Text-1 + containingProjects: 1 + /users/user/projects/project3/jsconfig.json + Before running Timeout callback:: count: 0 After running Timeout callback:: count: 0 @@ -1561,7 +1663,7 @@ Timeout callback:: count: 2 Projects:: /users/user/projects/project1/jsconfig.json (Configured) *changed* projectStateVersion: 3 *changed* - projectProgramVersion: 1 + projectProgramVersion: 2 dirty: true *changed* /users/user/projects/project2/jsconfig.json (Configured) projectStateVersion: 1 @@ -1598,16 +1700,70 @@ Info seq [hh:mm:ss:mss] Config: /users/user/projects/project1/jsconfig.json : { } } Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] ======== Resolving module 'bar' from '/users/user/projects/project1/app.js'. ======== +Info seq [hh:mm:ss:mss] Module resolution kind is not specified, using 'Node10'. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.d.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.d.ts' does not exist. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/project1/node_modules/@types' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/user/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: JavaScript. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for fallback extensions: JavaScript. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.js' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.jsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.js' exists - use it as a name resolution result. +Info seq [hh:mm:ss:mss] Resolving real path for '/users/user/projects/project1/node_modules/bar/index.js', result '/users/user/projects/project1/node_modules/bar/index.js'. +Info seq [hh:mm:ss:mss] ======== Module name 'bar' was successfully resolved to '/users/user/projects/project1/node_modules/bar/index.js'. ======== +Info seq [hh:mm:ss:mss] Auto discovery for typings is enabled in project '/users/user/projects/project1/jsconfig.json'. Running extra resolution pass for module 'bar' using cache location '/home/src/Library/Caches/typescript'. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/bar.d.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar.d.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts' exists - use it as a name resolution result. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/package.json' exists according to earlier cached lookups. -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 3 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/@types/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/@types/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/project1/node_modules/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/project1/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/project1/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 3 projectProgramVersion: 2 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (3) /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" /home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts Text-1 "export const x = 1;" /users/user/projects/project1/app.js SVC-1-0 "var x = require('bar');" + + + ../../../../home/src/tslibs/TS/Lib/lib.d.ts + Default library for target 'es5' + ../../../../home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts + Imported via 'bar' from file 'app.js' + app.js + Matched by default include pattern '**/*' Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 @@ -1826,6 +1982,14 @@ PolledWatches:: /users/user/projects/project3/package.json: {"pollingInterval":2000} +PolledWatches *deleted*:: +/users/user/projects/project1/node_modules/bar/package.json: + {"pollingInterval":2000} +/users/user/projects/project1/node_modules/package.json: + {"pollingInterval":2000} +/users/user/projects/project1/package.json: + {"pollingInterval":2000} + FsWatches:: /home/src/Library/Caches/typescript/package.json: {} @@ -1861,7 +2025,7 @@ FsWatchesRecursive:: Projects:: /users/user/projects/project1/jsconfig.json (Configured) *changed* projectStateVersion: 3 - projectProgramVersion: 1 + projectProgramVersion: 3 *changed* dirty: false *changed* /users/user/projects/project2/jsconfig.json (Configured) projectStateVersion: 1 @@ -1872,6 +2036,51 @@ Projects:: projectProgramVersion: 1 autoImportProviderHost: false +ScriptInfos:: +/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts *changed* + version: Text-1 + containingProjects: 2 *changed* + /users/user/projects/project2/jsconfig.json + /users/user/projects/project1/jsconfig.json *new* +/home/src/Library/Caches/typescript/node_modules/@types/foo/index.d.ts + version: Text-1 + containingProjects: 1 + /users/user/projects/project2/jsconfig.json +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 3 + /users/user/projects/project1/jsconfig.json + /users/user/projects/project2/jsconfig.json + /users/user/projects/project3/jsconfig.json +/users/user/projects/project1/app.js (Open) + version: SVC-1-0 + containingProjects: 1 + /users/user/projects/project1/jsconfig.json *default* +/users/user/projects/project1/node_modules/bar/index.js *changed* + version: Text-1 + containingProjects: 0 *changed* + /users/user/projects/project1/jsconfig.json *deleted* +/users/user/projects/project2/app.js (Open) + version: SVC-1-0 + containingProjects: 1 + /users/user/projects/project2/jsconfig.json *default* +/users/user/projects/project2/app2.js + version: Text-1 + containingProjects: 1 + /users/user/projects/project2/jsconfig.json +/users/user/projects/project3/app.js (Open) + version: SVC-1-0 + containingProjects: 1 + /users/user/projects/project3/jsconfig.json *default* +/users/user/projects/project3/app2.js + version: Text-1 + containingProjects: 1 + /users/user/projects/project3/jsconfig.json +/users/user/projects/project3/node_modules/bar/index.js + version: Text-1 + containingProjects: 1 + /users/user/projects/project3/jsconfig.json + Before running Timeout callback:: count: 0 After running Timeout callback:: count: 0 diff --git a/tests/baselines/reference/tsserver/typeAquisition/changes-to-typeAquisition-with-already-aquired-typing.js b/tests/baselines/reference/tsserver/typeAquisition/changes-to-typeAquisition-with-already-aquired-typing.js index cbae2bc7fd1..51a939c5910 100644 --- a/tests/baselines/reference/tsserver/typeAquisition/changes-to-typeAquisition-with-already-aquired-typing.js +++ b/tests/baselines/reference/tsserver/typeAquisition/changes-to-typeAquisition-with-already-aquired-typing.js @@ -603,12 +603,63 @@ Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/ Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/package.json' exists according to earlier cached lookups. -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 3 projectProgramVersion: 2 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] ======== Resolving module 'bar' from '/users/user/projects/project1/app.js'. ======== +Info seq [hh:mm:ss:mss] Module resolution kind is not specified, using 'Node10'. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.d.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.d.ts' does not exist. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/project1/node_modules/@types' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/user/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: JavaScript. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for fallback extensions: JavaScript. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.js' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.jsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.js' exists - use it as a name resolution result. +Info seq [hh:mm:ss:mss] Resolving real path for '/users/user/projects/project1/node_modules/bar/index.js', result '/users/user/projects/project1/node_modules/bar/index.js'. +Info seq [hh:mm:ss:mss] ======== Module name 'bar' was successfully resolved to '/users/user/projects/project1/node_modules/bar/index.js'. ======== +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/package.json' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/package.json' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/package.json' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/package.json' does not exist. +Info seq [hh:mm:ss:mss] File '/users/package.json' does not exist. +Info seq [hh:mm:ss:mss] File '/package.json' does not exist. +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/user/projects/project1/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/user/projects/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/@types/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/@types/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/Library/Caches/typescript/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 3 projectProgramVersion: 2 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (3) /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" - /home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts Text-1 "export const x = 1;" + /users/user/projects/project1/node_modules/bar/index.js Text-1 "export const x = 1" /users/user/projects/project1/app.js SVC-1-0 "var x = require('bar');" + + + ../../../../home/src/tslibs/TS/Lib/lib.d.ts + Default library for target 'es5' + node_modules/bar/index.js + Imported via 'bar' from file 'app.js' + app.js + Matched by default include pattern '**/*' Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] event: @@ -663,45 +714,75 @@ Info seq [hh:mm:ss:mss] event: After running Timeout callback:: count: 0 PolledWatches:: +/users/user/projects/node_modules: + {"pollingInterval":500} +/users/user/projects/node_modules/@types: + {"pollingInterval":500} +/users/user/projects/package.json: *new* + {"pollingInterval":2000} +/users/user/projects/project1/node_modules/@types: + {"pollingInterval":500} +/users/user/projects/project1/node_modules/bar/package.json: *new* + {"pollingInterval":2000} +/users/user/projects/project1/node_modules/package.json: *new* + {"pollingInterval":2000} +/users/user/projects/project1/package.json: *new* + {"pollingInterval":2000} + +PolledWatches *deleted*:: /home/src/Library/Caches/typescript/node_modules/@types/bar/package.json: {"pollingInterval":2000} /home/src/Library/Caches/typescript/node_modules/@types/package.json: {"pollingInterval":2000} /home/src/Library/Caches/typescript/node_modules/package.json: {"pollingInterval":2000} -/users/user/projects/node_modules: - {"pollingInterval":500} -/users/user/projects/node_modules/@types: - {"pollingInterval":500} -/users/user/projects/project1/node_modules/@types: - {"pollingInterval":500} - -PolledWatches *deleted*:: /users/user/projects/project1/bower_components: {"pollingInterval":500} FsWatches:: -/home/src/Library/Caches/typescript/package.json: - {} /home/src/tslibs/TS/Lib/lib.d.ts: {} /users/user/projects/project1/jsconfig.json: {} -FsWatchesRecursive:: -/home/src/Library/Caches/typescript/node_modules: +FsWatches *deleted*:: +/home/src/Library/Caches/typescript/package.json: {} + +FsWatchesRecursive:: /users/user/projects/project1: {} /users/user/projects/project1/node_modules: {} +FsWatchesRecursive *deleted*:: +/home/src/Library/Caches/typescript/node_modules: + {} + Projects:: /users/user/projects/project1/jsconfig.json (Configured) *changed* projectStateVersion: 3 - projectProgramVersion: 2 + projectProgramVersion: 3 *changed* dirty: false *changed* +ScriptInfos:: +/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts *changed* + version: Text-1 + containingProjects: 0 *changed* + /users/user/projects/project1/jsconfig.json *deleted* +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /users/user/projects/project1/jsconfig.json +/users/user/projects/project1/app.js (Open) + version: SVC-1-0 + containingProjects: 1 + /users/user/projects/project1/jsconfig.json *default* +/users/user/projects/project1/node_modules/bar/index.js *new* + version: Text-1 + containingProjects: 1 + /users/user/projects/project1/jsconfig.json + Before running Timeout callback:: count: 0 After running Timeout callback:: count: 0 @@ -734,7 +815,7 @@ Timeout callback:: count: 2 Projects:: /users/user/projects/project1/jsconfig.json (Configured) *changed* projectStateVersion: 4 *changed* - projectProgramVersion: 2 + projectProgramVersion: 3 dirty: true *changed* Info seq [hh:mm:ss:mss] Running: /users/user/projects/project1/jsconfig.json @@ -763,16 +844,70 @@ Info seq [hh:mm:ss:mss] Config: /users/user/projects/project1/jsconfig.json : { } } Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] ======== Resolving module 'bar' from '/users/user/projects/project1/app.js'. ======== +Info seq [hh:mm:ss:mss] Module resolution kind is not specified, using 'Node10'. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.d.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.d.ts' does not exist. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/project1/node_modules/@types' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/user/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: JavaScript. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for fallback extensions: JavaScript. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.js' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.jsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.js' exists - use it as a name resolution result. +Info seq [hh:mm:ss:mss] Resolving real path for '/users/user/projects/project1/node_modules/bar/index.js', result '/users/user/projects/project1/node_modules/bar/index.js'. +Info seq [hh:mm:ss:mss] ======== Module name 'bar' was successfully resolved to '/users/user/projects/project1/node_modules/bar/index.js'. ======== +Info seq [hh:mm:ss:mss] Auto discovery for typings is enabled in project '/users/user/projects/project1/jsconfig.json'. Running extra resolution pass for module 'bar' using cache location '/home/src/Library/Caches/typescript'. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/bar.d.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar.d.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts' exists - use it as a name resolution result. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/package.json' exists according to earlier cached lookups. -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 4 projectProgramVersion: 2 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/@types/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/@types/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Caches/typescript/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/project1/node_modules/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/project1/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/project1/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 4 projectProgramVersion: 3 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (3) /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" /home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts Text-1 "export const x = 1;" /users/user/projects/project1/app.js SVC-1-0 "var x = require('bar');" + + + ../../../../home/src/tslibs/TS/Lib/lib.d.ts + Default library for target 'es5' + ../../../../home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts + Imported via 'bar' from file 'app.js' + app.js + Matched by default include pattern '**/*' Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 @@ -934,11 +1069,11 @@ Info seq [hh:mm:ss:mss] event: After running Timeout callback:: count: 0 PolledWatches:: -/home/src/Library/Caches/typescript/node_modules/@types/bar/package.json: +/home/src/Library/Caches/typescript/node_modules/@types/bar/package.json: *new* {"pollingInterval":2000} -/home/src/Library/Caches/typescript/node_modules/@types/package.json: +/home/src/Library/Caches/typescript/node_modules/@types/package.json: *new* {"pollingInterval":2000} -/home/src/Library/Caches/typescript/node_modules/package.json: +/home/src/Library/Caches/typescript/node_modules/package.json: *new* {"pollingInterval":2000} /users/user/projects/node_modules: {"pollingInterval":500} @@ -949,8 +1084,18 @@ PolledWatches:: /users/user/projects/project1/node_modules/@types: {"pollingInterval":500} +PolledWatches *deleted*:: +/users/user/projects/package.json: + {"pollingInterval":2000} +/users/user/projects/project1/node_modules/bar/package.json: + {"pollingInterval":2000} +/users/user/projects/project1/node_modules/package.json: + {"pollingInterval":2000} +/users/user/projects/project1/package.json: + {"pollingInterval":2000} + FsWatches:: -/home/src/Library/Caches/typescript/package.json: +/home/src/Library/Caches/typescript/package.json: *new* {} /home/src/tslibs/TS/Lib/lib.d.ts: {} @@ -958,7 +1103,7 @@ FsWatches:: {} FsWatchesRecursive:: -/home/src/Library/Caches/typescript/node_modules: +/home/src/Library/Caches/typescript/node_modules: *new* {} /users/user/projects/project1: {} @@ -968,9 +1113,27 @@ FsWatchesRecursive:: Projects:: /users/user/projects/project1/jsconfig.json (Configured) *changed* projectStateVersion: 4 - projectProgramVersion: 2 + projectProgramVersion: 4 *changed* dirty: false *changed* +ScriptInfos:: +/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts *changed* + version: Text-1 + containingProjects: 1 *changed* + /users/user/projects/project1/jsconfig.json *new* +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /users/user/projects/project1/jsconfig.json +/users/user/projects/project1/app.js (Open) + version: SVC-1-0 + containingProjects: 1 + /users/user/projects/project1/jsconfig.json *default* +/users/user/projects/project1/node_modules/bar/index.js *changed* + version: Text-1 + containingProjects: 0 *changed* + /users/user/projects/project1/jsconfig.json *deleted* + Before running Timeout callback:: count: 0 After running Timeout callback:: count: 0 diff --git a/tests/baselines/reference/tsserver/typeAquisition/midway-changes-to-typeAquisition-when-typing-installer-installs-typing-multiple-projects-with-shared-resolution.js b/tests/baselines/reference/tsserver/typeAquisition/midway-changes-to-typeAquisition-when-typing-installer-installs-typing-multiple-projects-with-shared-resolution.js index d40e1fbde2e..7694581408c 100644 --- a/tests/baselines/reference/tsserver/typeAquisition/midway-changes-to-typeAquisition-when-typing-installer-installs-typing-multiple-projects-with-shared-resolution.js +++ b/tests/baselines/reference/tsserver/typeAquisition/midway-changes-to-typeAquisition-when-typing-installer-installs-typing-multiple-projects-with-shared-resolution.js @@ -2066,143 +2066,6 @@ Info seq [hh:mm:ss:mss] File '/users/user/projects/package.json' does not exist Info seq [hh:mm:ss:mss] File '/users/user/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/users/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 3 projectProgramVersion: 2 structureChanged: false structureIsReused:: Completely Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" - /users/user/projects/node_modules/bar/index.js Text-1 "export const x = 1" - /users/user/projects/project1/app.js SVC-1-0 "var x = require('bar');" - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 -Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /home/src/tslibs/ts/lib/lib.d.ts:: [] -Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /users/user/projects/node_modules/bar/index.js:: [] -Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /users/user/projects/project1/app.js:: ["bar"] -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 Done: ["bar"] -TI:: [hh:mm:ss:mss] Got install request - { - "projectName": "/users/user/projects/project1/jsconfig.json", - "fileNames": [ - "/home/src/tslibs/TS/Lib/lib.d.ts", - "/users/user/projects/project1/app.js" - ], - "compilerOptions": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "traceResolution": true, - "configFilePath": "/users/user/projects/project1/jsconfig.json", - "allowNonTsExtensions": true - }, - "typeAcquisition": { - "enable": true, - "include": [], - "exclude": [] - }, - "unresolvedImports": [ - "bar" - ], - "projectRootPath": "/users/user/projects/project1", - "kind": "discover" - } -TI:: [hh:mm:ss:mss] Explicitly included types: [] -TI:: [hh:mm:ss:mss] Inferred typings from unresolved imports: ["bar"] -TI:: [hh:mm:ss:mss] Finished typings discovery: - { - "cachedTypingPaths": [ - "/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts" - ], - "newTypingNames": [], - "filesToWatch": [ - "/users/user/projects/project1/bower_components", - "/users/user/projects/project1/node_modules" - ] - } -TI:: [hh:mm:ss:mss] Sending response: - { - "kind": "action::watchTypingLocations", - "projectName": "/users/user/projects/project1/jsconfig.json", - "files": [ - "/users/user/projects/project1/bower_components", - "/users/user/projects/project1/node_modules" - ] - } -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/bower_components 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/bower_components 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer -TI:: [hh:mm:ss:mss] Sending response: - { - "projectName": "/users/user/projects/project1/jsconfig.json", - "typeAcquisition": { - "enable": true, - "include": [], - "exclude": [] - }, - "compilerOptions": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "traceResolution": true, - "configFilePath": "/users/user/projects/project1/jsconfig.json", - "allowNonTsExtensions": true - }, - "typings": [ - "/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts" - ], - "unresolvedImports": [ - "bar" - ], - "kind": "action::set" - } -Info seq [hh:mm:ss:mss] Scheduled: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "setTypings", - "body": { - "projectName": "/users/user/projects/project1/jsconfig.json", - "typeAcquisition": { - "enable": true, - "include": [], - "exclude": [] - }, - "compilerOptions": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "traceResolution": true, - "configFilePath": "/users/user/projects/project1/jsconfig.json", - "allowNonTsExtensions": true - }, - "typings": [ - "/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts" - ], - "unresolvedImports": [ - "bar" - ], - "kind": "action::set" - } - } -TI:: [hh:mm:ss:mss] No new typings were requested as a result of typings discovery -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/users/user/projects/project1/jsconfig.json" - } - } -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json Info seq [hh:mm:ss:mss] ======== Resolving module 'bar' from '/users/user/projects/project1/app.js'. ======== Info seq [hh:mm:ss:mss] Module resolution kind is not specified, using 'Node10'. Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: TypeScript, Declaration. @@ -2244,7 +2107,7 @@ Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Cach Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/node_modules/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 4 projectProgramVersion: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 3 projectProgramVersion: 2 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (3) /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" @@ -2256,12 +2119,12 @@ Info seq [hh:mm:ss:mss] Files (3) Default library for target 'es5' ../../../../home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts Imported via 'bar' from file 'app.js' - Matched by default include pattern '**/*' app.js Matched by default include pattern '**/*' Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 +Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /home/src/tslibs/ts/lib/lib.d.ts:: [] Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /home/src/library/caches/typescript/node_modules/@types/bar/index.d.ts:: [] Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /users/user/projects/project1/app.js:: [] Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 Done: [] @@ -2270,7 +2133,6 @@ TI:: [hh:mm:ss:mss] Got install request "projectName": "/users/user/projects/project1/jsconfig.json", "fileNames": [ "/home/src/tslibs/TS/Lib/lib.d.ts", - "/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts", "/users/user/projects/project1/app.js" ], "compilerOptions": { @@ -2306,8 +2168,16 @@ TI:: [hh:mm:ss:mss] Finished typings discovery: TI:: [hh:mm:ss:mss] Sending response: { "kind": "action::watchTypingLocations", - "projectName": "/users/user/projects/project1/jsconfig.json" + "projectName": "/users/user/projects/project1/jsconfig.json", + "files": [ + "/users/user/projects/project1/bower_components", + "/users/user/projects/project1/node_modules" + ] } +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/bower_components 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/bower_components 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer TI:: [hh:mm:ss:mss] Sending response: { "projectName": "/users/user/projects/project1/jsconfig.json", @@ -2330,8 +2200,6 @@ TI:: [hh:mm:ss:mss] Sending response: "unresolvedImports": [], "kind": "action::set" } -Info seq [hh:mm:ss:mss] Scheduled: /users/user/projects/project1/jsconfig.json, Cancelled earlier one -Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one Info seq [hh:mm:ss:mss] event: { "seq": 0, @@ -2360,21 +2228,15 @@ Info seq [hh:mm:ss:mss] event: } } TI:: [hh:mm:ss:mss] No new typings were requested as a result of typings discovery -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] Reusing resolution of module 'bar' from '/users/user/projects/project1/app.js' of old program, it was successfully resolved to '/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts'. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/package.json' exists according to earlier cached lookups. -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 5 projectProgramVersion: 3 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" - /home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts Text-1 "export const x = 1;" - /users/user/projects/project1/app.js SVC-1-0 "var x = require('bar');" - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 Done: [] +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/users/user/projects/project1/jsconfig.json" + } + } Info seq [hh:mm:ss:mss] event: { "seq": 0, @@ -2386,7 +2248,62 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -After running Timeout callback:: count: 2 +Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* +Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: +Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/users/user/projects/project2/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/users/user/projects/project3/jsconfig.json' (Configured) +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: /users/user/projects/project1/app.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project1/jsconfig.json +Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project2/app.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project2/jsconfig.json +Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project3/app.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project3/jsconfig.json +Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: +Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/users/user/projects/project2/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/users/user/projects/project3/jsconfig.json' (Configured) +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: /users/user/projects/project1/app.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project1/jsconfig.json +Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project2/app.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project2/jsconfig.json +Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project3/app.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project3/jsconfig.json +Info seq [hh:mm:ss:mss] got projects updated in background /users/user/projects/project1/app.js,/users/user/projects/project2/app.js,/users/user/projects/project3/app.js +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectsUpdatedInBackground", + "body": { + "openFiles": [ + "/users/user/projects/project1/app.js", + "/users/user/projects/project2/app.js", + "/users/user/projects/project3/app.js" + ] + } + } +After running Timeout callback:: count: 0 PolledWatches:: /home/src/Library/Caches/typescript/node_modules/@types/bar/package.json: @@ -2450,15 +2367,10 @@ FsWatchesRecursive:: /users/user/projects/project3: {} -Timeout callback:: count: 2 -12: *ensureProjectForOpenFiles* *deleted* -15: /users/user/projects/project1/jsconfig.json *new* -16: *ensureProjectForOpenFiles* *new* - Projects:: /users/user/projects/project1/jsconfig.json (Configured) *changed* - projectStateVersion: 5 *changed* - projectProgramVersion: 4 *changed* + projectStateVersion: 3 + projectProgramVersion: 3 *changed* dirty: false *changed* /users/user/projects/project2/jsconfig.json (Configured) projectStateVersion: 3 @@ -2510,66 +2422,8 @@ ScriptInfos:: containingProjects: 1 /users/user/projects/project3/jsconfig.json -Before running Timeout callback:: count: 2 -15: /users/user/projects/project1/jsconfig.json -16: *ensureProjectForOpenFiles* +Before running Timeout callback:: count: 0 -Info seq [hh:mm:ss:mss] Running: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project2/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (5) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project3/jsconfig.json' (Configured) -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: /users/user/projects/project1/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project2/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project2/jsconfig.json -Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project3/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project3/jsconfig.json -Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project2/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (5) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project3/jsconfig.json' (Configured) -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: /users/user/projects/project1/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project2/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project2/jsconfig.json -Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project3/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project3/jsconfig.json -Info seq [hh:mm:ss:mss] got projects updated in background /users/user/projects/project1/app.js,/users/user/projects/project2/app.js,/users/user/projects/project3/app.js -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectsUpdatedInBackground", - "body": { - "openFiles": [ - "/users/user/projects/project1/app.js", - "/users/user/projects/project2/app.js", - "/users/user/projects/project3/app.js" - ] - } - } After running Timeout callback:: count: 0 Before running Timeout callback:: count: 0 diff --git a/tests/baselines/reference/tsserver/typeAquisition/midway-changes-to-typeAquisition-when-typing-installer-installs-typing-multiple-projects.js b/tests/baselines/reference/tsserver/typeAquisition/midway-changes-to-typeAquisition-when-typing-installer-installs-typing-multiple-projects.js index e26764ef1d5..4d8d556d76e 100644 --- a/tests/baselines/reference/tsserver/typeAquisition/midway-changes-to-typeAquisition-when-typing-installer-installs-typing-multiple-projects.js +++ b/tests/baselines/reference/tsserver/typeAquisition/midway-changes-to-typeAquisition-when-typing-installer-installs-typing-multiple-projects.js @@ -2142,145 +2142,6 @@ Info seq [hh:mm:ss:mss] File '/users/user/projects/package.json' does not exist Info seq [hh:mm:ss:mss] File '/users/user/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/users/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 3 projectProgramVersion: 2 structureChanged: false structureIsReused:: Completely Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" - /users/user/projects/project1/node_modules/bar/index.js Text-1 "export const x = 1" - /users/user/projects/project1/app.js SVC-1-0 "var x = require('bar');" - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 -Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /home/src/tslibs/ts/lib/lib.d.ts:: [] -Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /users/user/projects/project1/node_modules/bar/index.js:: [] -Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /users/user/projects/project1/app.js:: ["bar"] -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 Done: ["bar"] -TI:: [hh:mm:ss:mss] Got install request - { - "projectName": "/users/user/projects/project1/jsconfig.json", - "fileNames": [ - "/home/src/tslibs/TS/Lib/lib.d.ts", - "/users/user/projects/project1/app.js" - ], - "compilerOptions": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "traceResolution": true, - "configFilePath": "/users/user/projects/project1/jsconfig.json", - "allowNonTsExtensions": true - }, - "typeAcquisition": { - "enable": true, - "include": [], - "exclude": [] - }, - "unresolvedImports": [ - "bar" - ], - "projectRootPath": "/users/user/projects/project1", - "kind": "discover" - } -TI:: [hh:mm:ss:mss] Explicitly included types: [] -TI:: [hh:mm:ss:mss] Searching for typing names in /users/user/projects/project1/node_modules; all files: [] -TI:: [hh:mm:ss:mss] Found package names: [] -TI:: [hh:mm:ss:mss] Inferred typings from unresolved imports: ["bar"] -TI:: [hh:mm:ss:mss] Finished typings discovery: - { - "cachedTypingPaths": [ - "/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts" - ], - "newTypingNames": [], - "filesToWatch": [ - "/users/user/projects/project1/bower_components", - "/users/user/projects/project1/node_modules" - ] - } -TI:: [hh:mm:ss:mss] Sending response: - { - "kind": "action::watchTypingLocations", - "projectName": "/users/user/projects/project1/jsconfig.json", - "files": [ - "/users/user/projects/project1/bower_components", - "/users/user/projects/project1/node_modules" - ] - } -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/bower_components 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/bower_components 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer -TI:: [hh:mm:ss:mss] Sending response: - { - "projectName": "/users/user/projects/project1/jsconfig.json", - "typeAcquisition": { - "enable": true, - "include": [], - "exclude": [] - }, - "compilerOptions": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "traceResolution": true, - "configFilePath": "/users/user/projects/project1/jsconfig.json", - "allowNonTsExtensions": true - }, - "typings": [ - "/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts" - ], - "unresolvedImports": [ - "bar" - ], - "kind": "action::set" - } -Info seq [hh:mm:ss:mss] Scheduled: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "setTypings", - "body": { - "projectName": "/users/user/projects/project1/jsconfig.json", - "typeAcquisition": { - "enable": true, - "include": [], - "exclude": [] - }, - "compilerOptions": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "traceResolution": true, - "configFilePath": "/users/user/projects/project1/jsconfig.json", - "allowNonTsExtensions": true - }, - "typings": [ - "/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts" - ], - "unresolvedImports": [ - "bar" - ], - "kind": "action::set" - } - } -TI:: [hh:mm:ss:mss] No new typings were requested as a result of typings discovery -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/users/user/projects/project1/jsconfig.json" - } - } -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json Info seq [hh:mm:ss:mss] ======== Resolving module 'bar' from '/users/user/projects/project1/app.js'. ======== Info seq [hh:mm:ss:mss] Module resolution kind is not specified, using 'Node10'. Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: TypeScript, Declaration. @@ -2322,7 +2183,7 @@ Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/p Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/project1/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/project1/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 4 projectProgramVersion: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 3 projectProgramVersion: 2 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (3) /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" @@ -2334,12 +2195,12 @@ Info seq [hh:mm:ss:mss] Files (3) Default library for target 'es5' ../../../../home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts Imported via 'bar' from file 'app.js' - Matched by default include pattern '**/*' app.js Matched by default include pattern '**/*' Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 +Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /home/src/tslibs/ts/lib/lib.d.ts:: [] Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /home/src/library/caches/typescript/node_modules/@types/bar/index.d.ts:: [] Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /users/user/projects/project1/app.js:: [] Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 Done: [] @@ -2348,7 +2209,6 @@ TI:: [hh:mm:ss:mss] Got install request "projectName": "/users/user/projects/project1/jsconfig.json", "fileNames": [ "/home/src/tslibs/TS/Lib/lib.d.ts", - "/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts", "/users/user/projects/project1/app.js" ], "compilerOptions": { @@ -2386,8 +2246,16 @@ TI:: [hh:mm:ss:mss] Finished typings discovery: TI:: [hh:mm:ss:mss] Sending response: { "kind": "action::watchTypingLocations", - "projectName": "/users/user/projects/project1/jsconfig.json" + "projectName": "/users/user/projects/project1/jsconfig.json", + "files": [ + "/users/user/projects/project1/bower_components", + "/users/user/projects/project1/node_modules" + ] } +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/bower_components 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/bower_components 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer TI:: [hh:mm:ss:mss] Sending response: { "projectName": "/users/user/projects/project1/jsconfig.json", @@ -2410,8 +2278,6 @@ TI:: [hh:mm:ss:mss] Sending response: "unresolvedImports": [], "kind": "action::set" } -Info seq [hh:mm:ss:mss] Scheduled: /users/user/projects/project1/jsconfig.json, Cancelled earlier one -Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one Info seq [hh:mm:ss:mss] event: { "seq": 0, @@ -2440,21 +2306,15 @@ Info seq [hh:mm:ss:mss] event: } } TI:: [hh:mm:ss:mss] No new typings were requested as a result of typings discovery -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] Reusing resolution of module 'bar' from '/users/user/projects/project1/app.js' of old program, it was successfully resolved to '/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts'. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/package.json' exists according to earlier cached lookups. -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 5 projectProgramVersion: 3 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" - /home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts Text-1 "export const x = 1;" - /users/user/projects/project1/app.js SVC-1-0 "var x = require('bar');" - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 Done: [] +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/users/user/projects/project1/jsconfig.json" + } + } Info seq [hh:mm:ss:mss] event: { "seq": 0, @@ -2466,7 +2326,62 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -After running Timeout callback:: count: 2 +Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* +Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: +Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/users/user/projects/project2/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/users/user/projects/project3/jsconfig.json' (Configured) +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: /users/user/projects/project1/app.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project1/jsconfig.json +Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project2/app.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project2/jsconfig.json +Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project3/app.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project3/jsconfig.json +Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: +Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/users/user/projects/project2/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/users/user/projects/project3/jsconfig.json' (Configured) +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: /users/user/projects/project1/app.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project1/jsconfig.json +Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project2/app.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project2/jsconfig.json +Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project3/app.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project3/jsconfig.json +Info seq [hh:mm:ss:mss] got projects updated in background /users/user/projects/project1/app.js,/users/user/projects/project2/app.js,/users/user/projects/project3/app.js +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectsUpdatedInBackground", + "body": { + "openFiles": [ + "/users/user/projects/project1/app.js", + "/users/user/projects/project2/app.js", + "/users/user/projects/project3/app.js" + ] + } + } +After running Timeout callback:: count: 0 PolledWatches:: /home/src/Library/Caches/typescript/node_modules/@types/bar/package.json: @@ -2540,15 +2455,10 @@ FsWatchesRecursive:: /users/user/projects/project3/node_modules: {} -Timeout callback:: count: 2 -12: *ensureProjectForOpenFiles* *deleted* -15: /users/user/projects/project1/jsconfig.json *new* -16: *ensureProjectForOpenFiles* *new* - Projects:: /users/user/projects/project1/jsconfig.json (Configured) *changed* - projectStateVersion: 5 *changed* - projectProgramVersion: 4 *changed* + projectStateVersion: 3 + projectProgramVersion: 3 *changed* dirty: false *changed* /users/user/projects/project2/jsconfig.json (Configured) projectStateVersion: 3 @@ -2606,66 +2516,8 @@ ScriptInfos:: containingProjects: 1 /users/user/projects/project3/jsconfig.json -Before running Timeout callback:: count: 2 -15: /users/user/projects/project1/jsconfig.json -16: *ensureProjectForOpenFiles* +Before running Timeout callback:: count: 0 -Info seq [hh:mm:ss:mss] Running: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project2/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (5) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project3/jsconfig.json' (Configured) -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: /users/user/projects/project1/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project2/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project2/jsconfig.json -Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project3/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project3/jsconfig.json -Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project2/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (5) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project3/jsconfig.json' (Configured) -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: /users/user/projects/project1/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project2/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project2/jsconfig.json -Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project3/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project3/jsconfig.json -Info seq [hh:mm:ss:mss] got projects updated in background /users/user/projects/project1/app.js,/users/user/projects/project2/app.js,/users/user/projects/project3/app.js -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectsUpdatedInBackground", - "body": { - "openFiles": [ - "/users/user/projects/project1/app.js", - "/users/user/projects/project2/app.js", - "/users/user/projects/project3/app.js" - ] - } - } After running Timeout callback:: count: 0 Before running Timeout callback:: count: 0 diff --git a/tests/baselines/reference/tsserver/typeAquisition/midway-changes-to-typeAquisition-when-typing-installer-installs-typing.js b/tests/baselines/reference/tsserver/typeAquisition/midway-changes-to-typeAquisition-when-typing-installer-installs-typing.js index 65cd68d2d4b..1e2151cfc23 100644 --- a/tests/baselines/reference/tsserver/typeAquisition/midway-changes-to-typeAquisition-when-typing-installer-installs-typing.js +++ b/tests/baselines/reference/tsserver/typeAquisition/midway-changes-to-typeAquisition-when-typing-installer-installs-typing.js @@ -812,145 +812,6 @@ Info seq [hh:mm:ss:mss] File '/users/user/projects/package.json' does not exist Info seq [hh:mm:ss:mss] File '/users/user/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/users/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 3 projectProgramVersion: 2 structureChanged: false structureIsReused:: Completely Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" - /users/user/projects/project1/node_modules/bar/index.js Text-1 "export const x = 1" - /users/user/projects/project1/app.js SVC-1-0 "var x = require('bar');" - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 -Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /home/src/tslibs/ts/lib/lib.d.ts:: [] -Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /users/user/projects/project1/node_modules/bar/index.js:: [] -Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /users/user/projects/project1/app.js:: ["bar"] -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 Done: ["bar"] -TI:: [hh:mm:ss:mss] Got install request - { - "projectName": "/users/user/projects/project1/jsconfig.json", - "fileNames": [ - "/home/src/tslibs/TS/Lib/lib.d.ts", - "/users/user/projects/project1/app.js" - ], - "compilerOptions": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "traceResolution": true, - "configFilePath": "/users/user/projects/project1/jsconfig.json", - "allowNonTsExtensions": true - }, - "typeAcquisition": { - "enable": true, - "include": [], - "exclude": [] - }, - "unresolvedImports": [ - "bar" - ], - "projectRootPath": "/users/user/projects/project1", - "kind": "discover" - } -TI:: [hh:mm:ss:mss] Explicitly included types: [] -TI:: [hh:mm:ss:mss] Searching for typing names in /users/user/projects/project1/node_modules; all files: [] -TI:: [hh:mm:ss:mss] Found package names: [] -TI:: [hh:mm:ss:mss] Inferred typings from unresolved imports: ["bar"] -TI:: [hh:mm:ss:mss] Finished typings discovery: - { - "cachedTypingPaths": [ - "/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts" - ], - "newTypingNames": [], - "filesToWatch": [ - "/users/user/projects/project1/bower_components", - "/users/user/projects/project1/node_modules" - ] - } -TI:: [hh:mm:ss:mss] Sending response: - { - "kind": "action::watchTypingLocations", - "projectName": "/users/user/projects/project1/jsconfig.json", - "files": [ - "/users/user/projects/project1/bower_components", - "/users/user/projects/project1/node_modules" - ] - } -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/bower_components 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/bower_components 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer -TI:: [hh:mm:ss:mss] Sending response: - { - "projectName": "/users/user/projects/project1/jsconfig.json", - "typeAcquisition": { - "enable": true, - "include": [], - "exclude": [] - }, - "compilerOptions": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "traceResolution": true, - "configFilePath": "/users/user/projects/project1/jsconfig.json", - "allowNonTsExtensions": true - }, - "typings": [ - "/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts" - ], - "unresolvedImports": [ - "bar" - ], - "kind": "action::set" - } -Info seq [hh:mm:ss:mss] Scheduled: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "setTypings", - "body": { - "projectName": "/users/user/projects/project1/jsconfig.json", - "typeAcquisition": { - "enable": true, - "include": [], - "exclude": [] - }, - "compilerOptions": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "traceResolution": true, - "configFilePath": "/users/user/projects/project1/jsconfig.json", - "allowNonTsExtensions": true - }, - "typings": [ - "/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts" - ], - "unresolvedImports": [ - "bar" - ], - "kind": "action::set" - } - } -TI:: [hh:mm:ss:mss] No new typings were requested as a result of typings discovery -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/users/user/projects/project1/jsconfig.json" - } - } -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json Info seq [hh:mm:ss:mss] ======== Resolving module 'bar' from '/users/user/projects/project1/app.js'. ======== Info seq [hh:mm:ss:mss] Module resolution kind is not specified, using 'Node10'. Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: TypeScript, Declaration. @@ -994,7 +855,7 @@ Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/p Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/project1/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/project1/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 4 projectProgramVersion: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 3 projectProgramVersion: 2 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (3) /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" @@ -1006,12 +867,12 @@ Info seq [hh:mm:ss:mss] Files (3) Default library for target 'es5' ../../../../home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts Imported via 'bar' from file 'app.js' - Matched by default include pattern '**/*' app.js Matched by default include pattern '**/*' Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 +Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /home/src/tslibs/ts/lib/lib.d.ts:: [] Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /home/src/library/caches/typescript/node_modules/@types/bar/index.d.ts:: [] Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /users/user/projects/project1/app.js:: [] Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 Done: [] @@ -1020,7 +881,6 @@ TI:: [hh:mm:ss:mss] Got install request "projectName": "/users/user/projects/project1/jsconfig.json", "fileNames": [ "/home/src/tslibs/TS/Lib/lib.d.ts", - "/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts", "/users/user/projects/project1/app.js" ], "compilerOptions": { @@ -1058,8 +918,16 @@ TI:: [hh:mm:ss:mss] Finished typings discovery: TI:: [hh:mm:ss:mss] Sending response: { "kind": "action::watchTypingLocations", - "projectName": "/users/user/projects/project1/jsconfig.json" + "projectName": "/users/user/projects/project1/jsconfig.json", + "files": [ + "/users/user/projects/project1/bower_components", + "/users/user/projects/project1/node_modules" + ] } +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/bower_components 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/bower_components 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer TI:: [hh:mm:ss:mss] Sending response: { "projectName": "/users/user/projects/project1/jsconfig.json", @@ -1082,8 +950,6 @@ TI:: [hh:mm:ss:mss] Sending response: "unresolvedImports": [], "kind": "action::set" } -Info seq [hh:mm:ss:mss] Scheduled: /users/user/projects/project1/jsconfig.json, Cancelled earlier one -Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one Info seq [hh:mm:ss:mss] event: { "seq": 0, @@ -1112,22 +978,15 @@ Info seq [hh:mm:ss:mss] event: } } TI:: [hh:mm:ss:mss] No new typings were requested as a result of typings discovery -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] Reusing resolution of module 'bar' from '/users/user/projects/project1/app.js' of old program, it was successfully resolved to '/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts'. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/package.json' exists according to earlier cached lookups. -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 5 projectProgramVersion: 3 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" - /home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts Text-1 "export const x = 1;" - /users/user/projects/project1/app.js SVC-1-0 "var x = require('bar');" - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 Done: [] +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/users/user/projects/project1/jsconfig.json" + } + } Info seq [hh:mm:ss:mss] event: { "seq": 0, @@ -1139,7 +998,36 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -After running Timeout callback:: count: 2 +Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* +Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: +Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project1/app.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project1/jsconfig.json +Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: +Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project1/app.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project1/jsconfig.json +Info seq [hh:mm:ss:mss] got projects updated in background /users/user/projects/project1/app.js +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectsUpdatedInBackground", + "body": { + "openFiles": [ + "/users/user/projects/project1/app.js" + ] + } + } +After running Timeout callback:: count: 0 PolledWatches:: /home/src/Library/Caches/typescript/node_modules/@types/bar/package.json: *new* @@ -1183,15 +1071,10 @@ FsWatchesRecursive:: /users/user/projects/project1/node_modules: {} -Timeout callback:: count: 2 -6: *ensureProjectForOpenFiles* *deleted* -9: /users/user/projects/project1/jsconfig.json *new* -10: *ensureProjectForOpenFiles* *new* - Projects:: /users/user/projects/project1/jsconfig.json (Configured) *changed* - projectStateVersion: 5 *changed* - projectProgramVersion: 4 *changed* + projectStateVersion: 3 + projectProgramVersion: 3 *changed* dirty: false *changed* ScriptInfos:: @@ -1212,40 +1095,8 @@ ScriptInfos:: containingProjects: 0 *changed* /users/user/projects/project1/jsconfig.json *deleted* -Before running Timeout callback:: count: 2 -9: /users/user/projects/project1/jsconfig.json -10: *ensureProjectForOpenFiles* +Before running Timeout callback:: count: 0 -Info seq [hh:mm:ss:mss] Running: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Open files: -Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project1/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Open files: -Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project1/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] got projects updated in background /users/user/projects/project1/app.js -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectsUpdatedInBackground", - "body": { - "openFiles": [ - "/users/user/projects/project1/app.js" - ] - } - } After running Timeout callback:: count: 0 Before running Timeout callback:: count: 0 diff --git a/tests/baselines/reference/tsserver/typeAquisition/receives-update-of-typings-after-project-changes-multiple-projects-with-shared-resolution.js b/tests/baselines/reference/tsserver/typeAquisition/receives-update-of-typings-after-project-changes-multiple-projects-with-shared-resolution.js index d4271e5a163..fe2c77ad81c 100644 --- a/tests/baselines/reference/tsserver/typeAquisition/receives-update-of-typings-after-project-changes-multiple-projects-with-shared-resolution.js +++ b/tests/baselines/reference/tsserver/typeAquisition/receives-update-of-typings-after-project-changes-multiple-projects-with-shared-resolution.js @@ -1305,7 +1305,38 @@ Info seq [hh:mm:ss:mss] File '/users/user/projects/package.json' does not exist Info seq [hh:mm:ss:mss] File '/users/user/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/users/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] ======== Resolving module 'bar' from '/users/user/projects/project1/app.js'. ======== +Info seq [hh:mm:ss:mss] Module resolution kind is not specified, using 'Node10'. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/project1/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.d.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/index.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/index.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/index.d.ts' does not exist. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/node_modules/@types' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/user/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: JavaScript. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for fallback extensions: JavaScript. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/project1/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.js' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar.jsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/index.js' exists - use it as a name resolution result. +Info seq [hh:mm:ss:mss] Resolving real path for '/users/user/projects/node_modules/bar/index.js', result '/users/user/projects/node_modules/bar/index.js'. +Info seq [hh:mm:ss:mss] ======== Module name 'bar' was successfully resolved to '/users/user/projects/node_modules/bar/index.js'. ======== +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/node_modules/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (3) /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" @@ -1455,7 +1486,7 @@ FsWatchesRecursive:: Projects:: /users/user/projects/project1/jsconfig.json (Configured) *changed* projectStateVersion: 2 - projectProgramVersion: 1 + projectProgramVersion: 2 *changed* dirty: false *changed* /users/user/projects/project2/jsconfig.json (Configured) projectStateVersion: 1 @@ -1680,7 +1711,7 @@ Timeout callback:: count: 3 Projects:: /users/user/projects/project1/jsconfig.json (Configured) projectStateVersion: 2 - projectProgramVersion: 1 + projectProgramVersion: 2 /users/user/projects/project2/jsconfig.json (Configured) *changed* projectStateVersion: 2 *changed* projectProgramVersion: 1 @@ -1958,7 +1989,7 @@ Timeout callback:: count: 2 Projects:: /users/user/projects/project1/jsconfig.json (Configured) projectStateVersion: 2 - projectProgramVersion: 1 + projectProgramVersion: 2 /users/user/projects/project2/jsconfig.json (Configured) *changed* projectStateVersion: 3 *changed* projectProgramVersion: 3 *changed* @@ -2101,7 +2132,7 @@ Timeout callback:: count: 2 Projects:: /users/user/projects/project1/jsconfig.json (Configured) *changed* projectStateVersion: 3 *changed* - projectProgramVersion: 1 + projectProgramVersion: 2 dirty: true *changed* /users/user/projects/project2/jsconfig.json (Configured) projectStateVersion: 3 @@ -2143,143 +2174,6 @@ Info seq [hh:mm:ss:mss] File '/users/user/projects/package.json' does not exist Info seq [hh:mm:ss:mss] File '/users/user/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/users/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 3 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" - /users/user/projects/node_modules/bar/index.js Text-1 "export const x = 1" - /users/user/projects/project1/app.js SVC-1-0 "var x = require('bar');" - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 -Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /home/src/tslibs/ts/lib/lib.d.ts:: [] -Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /users/user/projects/node_modules/bar/index.js:: [] -Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /users/user/projects/project1/app.js:: ["bar"] -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 Done: ["bar"] -TI:: [hh:mm:ss:mss] Got install request - { - "projectName": "/users/user/projects/project1/jsconfig.json", - "fileNames": [ - "/home/src/tslibs/TS/Lib/lib.d.ts", - "/users/user/projects/project1/app.js" - ], - "compilerOptions": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "traceResolution": true, - "configFilePath": "/users/user/projects/project1/jsconfig.json", - "allowNonTsExtensions": true - }, - "typeAcquisition": { - "enable": true, - "include": [], - "exclude": [] - }, - "unresolvedImports": [ - "bar" - ], - "projectRootPath": "/users/user/projects/project1", - "kind": "discover" - } -TI:: [hh:mm:ss:mss] Explicitly included types: [] -TI:: [hh:mm:ss:mss] Inferred typings from unresolved imports: ["bar"] -TI:: [hh:mm:ss:mss] Finished typings discovery: - { - "cachedTypingPaths": [ - "/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts" - ], - "newTypingNames": [], - "filesToWatch": [ - "/users/user/projects/project1/bower_components", - "/users/user/projects/project1/node_modules" - ] - } -TI:: [hh:mm:ss:mss] Sending response: - { - "kind": "action::watchTypingLocations", - "projectName": "/users/user/projects/project1/jsconfig.json", - "files": [ - "/users/user/projects/project1/bower_components", - "/users/user/projects/project1/node_modules" - ] - } -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/bower_components 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/bower_components 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer -TI:: [hh:mm:ss:mss] Sending response: - { - "projectName": "/users/user/projects/project1/jsconfig.json", - "typeAcquisition": { - "enable": true, - "include": [], - "exclude": [] - }, - "compilerOptions": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "traceResolution": true, - "configFilePath": "/users/user/projects/project1/jsconfig.json", - "allowNonTsExtensions": true - }, - "typings": [ - "/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts" - ], - "unresolvedImports": [ - "bar" - ], - "kind": "action::set" - } -Info seq [hh:mm:ss:mss] Scheduled: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "setTypings", - "body": { - "projectName": "/users/user/projects/project1/jsconfig.json", - "typeAcquisition": { - "enable": true, - "include": [], - "exclude": [] - }, - "compilerOptions": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "traceResolution": true, - "configFilePath": "/users/user/projects/project1/jsconfig.json", - "allowNonTsExtensions": true - }, - "typings": [ - "/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts" - ], - "unresolvedImports": [ - "bar" - ], - "kind": "action::set" - } - } -TI:: [hh:mm:ss:mss] No new typings were requested as a result of typings discovery -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/users/user/projects/project1/jsconfig.json" - } - } -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json Info seq [hh:mm:ss:mss] ======== Resolving module 'bar' from '/users/user/projects/project1/app.js'. ======== Info seq [hh:mm:ss:mss] Module resolution kind is not specified, using 'Node10'. Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: TypeScript, Declaration. @@ -2321,7 +2215,7 @@ Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/Library/Cach Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/node_modules/bar/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 4 projectProgramVersion: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 3 projectProgramVersion: 2 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (3) /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" @@ -2333,12 +2227,12 @@ Info seq [hh:mm:ss:mss] Files (3) Default library for target 'es5' ../../../../home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts Imported via 'bar' from file 'app.js' - Matched by default include pattern '**/*' app.js Matched by default include pattern '**/*' Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 +Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /home/src/tslibs/ts/lib/lib.d.ts:: [] Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /home/src/library/caches/typescript/node_modules/@types/bar/index.d.ts:: [] Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /users/user/projects/project1/app.js:: [] Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 Done: [] @@ -2347,7 +2241,6 @@ TI:: [hh:mm:ss:mss] Got install request "projectName": "/users/user/projects/project1/jsconfig.json", "fileNames": [ "/home/src/tslibs/TS/Lib/lib.d.ts", - "/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts", "/users/user/projects/project1/app.js" ], "compilerOptions": { @@ -2383,8 +2276,16 @@ TI:: [hh:mm:ss:mss] Finished typings discovery: TI:: [hh:mm:ss:mss] Sending response: { "kind": "action::watchTypingLocations", - "projectName": "/users/user/projects/project1/jsconfig.json" + "projectName": "/users/user/projects/project1/jsconfig.json", + "files": [ + "/users/user/projects/project1/bower_components", + "/users/user/projects/project1/node_modules" + ] } +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/bower_components 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/bower_components 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer TI:: [hh:mm:ss:mss] Sending response: { "projectName": "/users/user/projects/project1/jsconfig.json", @@ -2407,8 +2308,6 @@ TI:: [hh:mm:ss:mss] Sending response: "unresolvedImports": [], "kind": "action::set" } -Info seq [hh:mm:ss:mss] Scheduled: /users/user/projects/project1/jsconfig.json, Cancelled earlier one -Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one Info seq [hh:mm:ss:mss] event: { "seq": 0, @@ -2437,21 +2336,15 @@ Info seq [hh:mm:ss:mss] event: } } TI:: [hh:mm:ss:mss] No new typings were requested as a result of typings discovery -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] Reusing resolution of module 'bar' from '/users/user/projects/project1/app.js' of old program, it was successfully resolved to '/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts'. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/package.json' exists according to earlier cached lookups. -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 5 projectProgramVersion: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" - /home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts Text-1 "export const x = 1;" - /users/user/projects/project1/app.js SVC-1-0 "var x = require('bar');" - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 Done: [] +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/users/user/projects/project1/jsconfig.json" + } + } Info seq [hh:mm:ss:mss] event: { "seq": 0, @@ -2463,7 +2356,62 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -After running Timeout callback:: count: 2 +Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* +Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: +Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/users/user/projects/project2/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/users/user/projects/project3/jsconfig.json' (Configured) +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: /users/user/projects/project1/app.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project1/jsconfig.json +Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project2/app.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project2/jsconfig.json +Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project3/app.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project3/jsconfig.json +Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: +Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/users/user/projects/project2/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/users/user/projects/project3/jsconfig.json' (Configured) +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: /users/user/projects/project1/app.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project1/jsconfig.json +Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project2/app.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project2/jsconfig.json +Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project3/app.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project3/jsconfig.json +Info seq [hh:mm:ss:mss] got projects updated in background /users/user/projects/project1/app.js,/users/user/projects/project2/app.js,/users/user/projects/project3/app.js +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectsUpdatedInBackground", + "body": { + "openFiles": [ + "/users/user/projects/project1/app.js", + "/users/user/projects/project2/app.js", + "/users/user/projects/project3/app.js" + ] + } + } +After running Timeout callback:: count: 0 PolledWatches:: /home/src/Library/Caches/typescript/node_modules/@types/bar/package.json: @@ -2527,14 +2475,9 @@ FsWatchesRecursive:: /users/user/projects/project3: {} -Timeout callback:: count: 2 -10: *ensureProjectForOpenFiles* *deleted* -13: /users/user/projects/project1/jsconfig.json *new* -14: *ensureProjectForOpenFiles* *new* - Projects:: /users/user/projects/project1/jsconfig.json (Configured) *changed* - projectStateVersion: 5 *changed* + projectStateVersion: 3 projectProgramVersion: 3 *changed* dirty: false *changed* /users/user/projects/project2/jsconfig.json (Configured) @@ -2587,66 +2530,8 @@ ScriptInfos:: containingProjects: 1 /users/user/projects/project3/jsconfig.json -Before running Timeout callback:: count: 2 -13: /users/user/projects/project1/jsconfig.json -14: *ensureProjectForOpenFiles* +Before running Timeout callback:: count: 0 -Info seq [hh:mm:ss:mss] Running: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project2/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (5) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project3/jsconfig.json' (Configured) -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: /users/user/projects/project1/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project2/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project2/jsconfig.json -Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project3/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project3/jsconfig.json -Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project2/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (5) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project3/jsconfig.json' (Configured) -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: /users/user/projects/project1/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project2/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project2/jsconfig.json -Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project3/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project3/jsconfig.json -Info seq [hh:mm:ss:mss] got projects updated in background /users/user/projects/project1/app.js,/users/user/projects/project2/app.js,/users/user/projects/project3/app.js -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectsUpdatedInBackground", - "body": { - "openFiles": [ - "/users/user/projects/project1/app.js", - "/users/user/projects/project2/app.js", - "/users/user/projects/project3/app.js" - ] - } - } After running Timeout callback:: count: 0 Before running Timeout callback:: count: 0 diff --git a/tests/baselines/reference/tsserver/typeAquisition/receives-update-of-typings-after-project-changes-multiple-projects.js b/tests/baselines/reference/tsserver/typeAquisition/receives-update-of-typings-after-project-changes-multiple-projects.js index 8bc72d2ce7e..f9dc4800c50 100644 --- a/tests/baselines/reference/tsserver/typeAquisition/receives-update-of-typings-after-project-changes-multiple-projects.js +++ b/tests/baselines/reference/tsserver/typeAquisition/receives-update-of-typings-after-project-changes-multiple-projects.js @@ -1358,7 +1358,38 @@ Info seq [hh:mm:ss:mss] File '/users/user/projects/package.json' does not exist Info seq [hh:mm:ss:mss] File '/users/user/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/users/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] ======== Resolving module 'bar' from '/users/user/projects/project1/app.js'. ======== +Info seq [hh:mm:ss:mss] Module resolution kind is not specified, using 'Node10'. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.d.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.d.ts' does not exist. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/project1/node_modules/@types' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/user/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: JavaScript. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for fallback extensions: JavaScript. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.js' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.jsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.js' exists - use it as a name resolution result. +Info seq [hh:mm:ss:mss] Resolving real path for '/users/user/projects/project1/node_modules/bar/index.js', result '/users/user/projects/project1/node_modules/bar/index.js'. +Info seq [hh:mm:ss:mss] ======== Module name 'bar' was successfully resolved to '/users/user/projects/project1/node_modules/bar/index.js'. ======== +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (3) /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" @@ -1522,7 +1553,7 @@ FsWatchesRecursive:: Projects:: /users/user/projects/project1/jsconfig.json (Configured) *changed* projectStateVersion: 2 - projectProgramVersion: 1 + projectProgramVersion: 2 *changed* dirty: false *changed* /users/user/projects/project2/jsconfig.json (Configured) projectStateVersion: 1 @@ -1747,7 +1778,7 @@ Timeout callback:: count: 3 Projects:: /users/user/projects/project1/jsconfig.json (Configured) projectStateVersion: 2 - projectProgramVersion: 1 + projectProgramVersion: 2 /users/user/projects/project2/jsconfig.json (Configured) *changed* projectStateVersion: 2 *changed* projectProgramVersion: 1 @@ -2043,7 +2074,7 @@ Timeout callback:: count: 2 Projects:: /users/user/projects/project1/jsconfig.json (Configured) projectStateVersion: 2 - projectProgramVersion: 1 + projectProgramVersion: 2 /users/user/projects/project2/jsconfig.json (Configured) *changed* projectStateVersion: 3 *changed* projectProgramVersion: 3 *changed* @@ -2192,7 +2223,7 @@ Timeout callback:: count: 2 Projects:: /users/user/projects/project1/jsconfig.json (Configured) *changed* projectStateVersion: 3 *changed* - projectProgramVersion: 1 + projectProgramVersion: 2 dirty: true *changed* /users/user/projects/project2/jsconfig.json (Configured) projectStateVersion: 3 @@ -2235,145 +2266,6 @@ Info seq [hh:mm:ss:mss] File '/users/user/projects/package.json' does not exist Info seq [hh:mm:ss:mss] File '/users/user/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/users/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 3 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" - /users/user/projects/project1/node_modules/bar/index.js Text-1 "export const x = 1" - /users/user/projects/project1/app.js SVC-1-0 "var x = require('bar');" - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 -Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /home/src/tslibs/ts/lib/lib.d.ts:: [] -Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /users/user/projects/project1/node_modules/bar/index.js:: [] -Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /users/user/projects/project1/app.js:: ["bar"] -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 Done: ["bar"] -TI:: [hh:mm:ss:mss] Got install request - { - "projectName": "/users/user/projects/project1/jsconfig.json", - "fileNames": [ - "/home/src/tslibs/TS/Lib/lib.d.ts", - "/users/user/projects/project1/app.js" - ], - "compilerOptions": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "traceResolution": true, - "configFilePath": "/users/user/projects/project1/jsconfig.json", - "allowNonTsExtensions": true - }, - "typeAcquisition": { - "enable": true, - "include": [], - "exclude": [] - }, - "unresolvedImports": [ - "bar" - ], - "projectRootPath": "/users/user/projects/project1", - "kind": "discover" - } -TI:: [hh:mm:ss:mss] Explicitly included types: [] -TI:: [hh:mm:ss:mss] Searching for typing names in /users/user/projects/project1/node_modules; all files: [] -TI:: [hh:mm:ss:mss] Found package names: [] -TI:: [hh:mm:ss:mss] Inferred typings from unresolved imports: ["bar"] -TI:: [hh:mm:ss:mss] Finished typings discovery: - { - "cachedTypingPaths": [ - "/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts" - ], - "newTypingNames": [], - "filesToWatch": [ - "/users/user/projects/project1/bower_components", - "/users/user/projects/project1/node_modules" - ] - } -TI:: [hh:mm:ss:mss] Sending response: - { - "kind": "action::watchTypingLocations", - "projectName": "/users/user/projects/project1/jsconfig.json", - "files": [ - "/users/user/projects/project1/bower_components", - "/users/user/projects/project1/node_modules" - ] - } -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/bower_components 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/bower_components 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer -TI:: [hh:mm:ss:mss] Sending response: - { - "projectName": "/users/user/projects/project1/jsconfig.json", - "typeAcquisition": { - "enable": true, - "include": [], - "exclude": [] - }, - "compilerOptions": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "traceResolution": true, - "configFilePath": "/users/user/projects/project1/jsconfig.json", - "allowNonTsExtensions": true - }, - "typings": [ - "/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts" - ], - "unresolvedImports": [ - "bar" - ], - "kind": "action::set" - } -Info seq [hh:mm:ss:mss] Scheduled: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "setTypings", - "body": { - "projectName": "/users/user/projects/project1/jsconfig.json", - "typeAcquisition": { - "enable": true, - "include": [], - "exclude": [] - }, - "compilerOptions": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "traceResolution": true, - "configFilePath": "/users/user/projects/project1/jsconfig.json", - "allowNonTsExtensions": true - }, - "typings": [ - "/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts" - ], - "unresolvedImports": [ - "bar" - ], - "kind": "action::set" - } - } -TI:: [hh:mm:ss:mss] No new typings were requested as a result of typings discovery -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/users/user/projects/project1/jsconfig.json" - } - } -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json Info seq [hh:mm:ss:mss] ======== Resolving module 'bar' from '/users/user/projects/project1/app.js'. ======== Info seq [hh:mm:ss:mss] Module resolution kind is not specified, using 'Node10'. Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: TypeScript, Declaration. @@ -2415,7 +2307,7 @@ Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/p Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/project1/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/project1/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 4 projectProgramVersion: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 3 projectProgramVersion: 2 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (3) /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" @@ -2427,12 +2319,12 @@ Info seq [hh:mm:ss:mss] Files (3) Default library for target 'es5' ../../../../home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts Imported via 'bar' from file 'app.js' - Matched by default include pattern '**/*' app.js Matched by default include pattern '**/*' Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 +Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /home/src/tslibs/ts/lib/lib.d.ts:: [] Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /home/src/library/caches/typescript/node_modules/@types/bar/index.d.ts:: [] Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /users/user/projects/project1/app.js:: [] Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 Done: [] @@ -2441,7 +2333,6 @@ TI:: [hh:mm:ss:mss] Got install request "projectName": "/users/user/projects/project1/jsconfig.json", "fileNames": [ "/home/src/tslibs/TS/Lib/lib.d.ts", - "/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts", "/users/user/projects/project1/app.js" ], "compilerOptions": { @@ -2479,8 +2370,16 @@ TI:: [hh:mm:ss:mss] Finished typings discovery: TI:: [hh:mm:ss:mss] Sending response: { "kind": "action::watchTypingLocations", - "projectName": "/users/user/projects/project1/jsconfig.json" + "projectName": "/users/user/projects/project1/jsconfig.json", + "files": [ + "/users/user/projects/project1/bower_components", + "/users/user/projects/project1/node_modules" + ] } +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/bower_components 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/bower_components 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer TI:: [hh:mm:ss:mss] Sending response: { "projectName": "/users/user/projects/project1/jsconfig.json", @@ -2503,8 +2402,6 @@ TI:: [hh:mm:ss:mss] Sending response: "unresolvedImports": [], "kind": "action::set" } -Info seq [hh:mm:ss:mss] Scheduled: /users/user/projects/project1/jsconfig.json, Cancelled earlier one -Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one Info seq [hh:mm:ss:mss] event: { "seq": 0, @@ -2533,21 +2430,15 @@ Info seq [hh:mm:ss:mss] event: } } TI:: [hh:mm:ss:mss] No new typings were requested as a result of typings discovery -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] Reusing resolution of module 'bar' from '/users/user/projects/project1/app.js' of old program, it was successfully resolved to '/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts'. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/package.json' exists according to earlier cached lookups. -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 5 projectProgramVersion: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" - /home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts Text-1 "export const x = 1;" - /users/user/projects/project1/app.js SVC-1-0 "var x = require('bar');" - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 Done: [] +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/users/user/projects/project1/jsconfig.json" + } + } Info seq [hh:mm:ss:mss] event: { "seq": 0, @@ -2559,7 +2450,62 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -After running Timeout callback:: count: 2 +Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* +Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: +Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/users/user/projects/project2/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/users/user/projects/project3/jsconfig.json' (Configured) +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: /users/user/projects/project1/app.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project1/jsconfig.json +Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project2/app.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project2/jsconfig.json +Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project3/app.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project3/jsconfig.json +Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: +Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/users/user/projects/project2/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/users/user/projects/project3/jsconfig.json' (Configured) +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: /users/user/projects/project1/app.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project1/jsconfig.json +Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project2/app.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project2/jsconfig.json +Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project3/app.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project3/jsconfig.json +Info seq [hh:mm:ss:mss] got projects updated in background /users/user/projects/project1/app.js,/users/user/projects/project2/app.js,/users/user/projects/project3/app.js +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectsUpdatedInBackground", + "body": { + "openFiles": [ + "/users/user/projects/project1/app.js", + "/users/user/projects/project2/app.js", + "/users/user/projects/project3/app.js" + ] + } + } +After running Timeout callback:: count: 0 PolledWatches:: /home/src/Library/Caches/typescript/node_modules/@types/bar/package.json: @@ -2633,14 +2579,9 @@ FsWatchesRecursive:: /users/user/projects/project3/node_modules: {} -Timeout callback:: count: 2 -10: *ensureProjectForOpenFiles* *deleted* -13: /users/user/projects/project1/jsconfig.json *new* -14: *ensureProjectForOpenFiles* *new* - Projects:: /users/user/projects/project1/jsconfig.json (Configured) *changed* - projectStateVersion: 5 *changed* + projectStateVersion: 3 projectProgramVersion: 3 *changed* dirty: false *changed* /users/user/projects/project2/jsconfig.json (Configured) @@ -2699,66 +2640,8 @@ ScriptInfos:: containingProjects: 1 /users/user/projects/project3/jsconfig.json -Before running Timeout callback:: count: 2 -13: /users/user/projects/project1/jsconfig.json -14: *ensureProjectForOpenFiles* +Before running Timeout callback:: count: 0 -Info seq [hh:mm:ss:mss] Running: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project2/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (5) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project3/jsconfig.json' (Configured) -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: /users/user/projects/project1/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project2/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project2/jsconfig.json -Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project3/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project3/jsconfig.json -Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project2/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (5) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project3/jsconfig.json' (Configured) -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: /users/user/projects/project1/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project2/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project2/jsconfig.json -Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project3/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project3/jsconfig.json -Info seq [hh:mm:ss:mss] got projects updated in background /users/user/projects/project1/app.js,/users/user/projects/project2/app.js,/users/user/projects/project3/app.js -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectsUpdatedInBackground", - "body": { - "openFiles": [ - "/users/user/projects/project1/app.js", - "/users/user/projects/project2/app.js", - "/users/user/projects/project3/app.js" - ] - } - } After running Timeout callback:: count: 0 Before running Timeout callback:: count: 0 diff --git a/tests/baselines/reference/tsserver/typeAquisition/receives-update-of-typings-after-project-changes.js b/tests/baselines/reference/tsserver/typeAquisition/receives-update-of-typings-after-project-changes.js index f213ef041e4..5c3c7126085 100644 --- a/tests/baselines/reference/tsserver/typeAquisition/receives-update-of-typings-after-project-changes.js +++ b/tests/baselines/reference/tsserver/typeAquisition/receives-update-of-typings-after-project-changes.js @@ -504,7 +504,38 @@ Info seq [hh:mm:ss:mss] File '/users/user/projects/package.json' does not exist Info seq [hh:mm:ss:mss] File '/users/user/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/users/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] ======== Resolving module 'bar' from '/users/user/projects/project1/app.js'. ======== +Info seq [hh:mm:ss:mss] Module resolution kind is not specified, using 'Node10'. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.d.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.ts' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.tsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.d.ts' does not exist. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/project1/node_modules/@types' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/user/projects/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/user/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/users/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Directory '/node_modules' does not exist, skipping all lookups in it. +Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: JavaScript. +Info seq [hh:mm:ss:mss] Searching all ancestor node_modules directories for fallback extensions: JavaScript. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.js' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar.jsx' does not exist. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/index.js' exists - use it as a name resolution result. +Info seq [hh:mm:ss:mss] Resolving real path for '/users/user/projects/project1/node_modules/bar/index.js', result '/users/user/projects/project1/node_modules/bar/index.js'. +Info seq [hh:mm:ss:mss] ======== Module name 'bar' was successfully resolved to '/users/user/projects/project1/node_modules/bar/index.js'. ======== +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/bar/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/node_modules/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/project1/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/projects/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/user/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/users/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (3) /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" @@ -598,7 +629,7 @@ FsWatchesRecursive:: Projects:: /users/user/projects/project1/jsconfig.json (Configured) *changed* projectStateVersion: 2 - projectProgramVersion: 1 + projectProgramVersion: 2 *changed* dirty: false *changed* Before running Timeout callback:: count: 0 @@ -742,7 +773,7 @@ Timeout callback:: count: 2 Projects:: /users/user/projects/project1/jsconfig.json (Configured) *changed* projectStateVersion: 3 *changed* - projectProgramVersion: 1 + projectProgramVersion: 2 dirty: true *changed* Info seq [hh:mm:ss:mss] Running: /users/user/projects/project1/jsconfig.json @@ -778,145 +809,6 @@ Info seq [hh:mm:ss:mss] File '/users/user/projects/package.json' does not exist Info seq [hh:mm:ss:mss] File '/users/user/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/users/package.json' does not exist according to earlier cached lookups. Info seq [hh:mm:ss:mss] File '/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 3 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" - /users/user/projects/project1/node_modules/bar/index.js Text-1 "export const x = 1" - /users/user/projects/project1/app.js SVC-1-0 "var x = require('bar');" - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 -Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /home/src/tslibs/ts/lib/lib.d.ts:: [] -Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /users/user/projects/project1/node_modules/bar/index.js:: [] -Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /users/user/projects/project1/app.js:: ["bar"] -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 Done: ["bar"] -TI:: [hh:mm:ss:mss] Got install request - { - "projectName": "/users/user/projects/project1/jsconfig.json", - "fileNames": [ - "/home/src/tslibs/TS/Lib/lib.d.ts", - "/users/user/projects/project1/app.js" - ], - "compilerOptions": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "traceResolution": true, - "configFilePath": "/users/user/projects/project1/jsconfig.json", - "allowNonTsExtensions": true - }, - "typeAcquisition": { - "enable": true, - "include": [], - "exclude": [] - }, - "unresolvedImports": [ - "bar" - ], - "projectRootPath": "/users/user/projects/project1", - "kind": "discover" - } -TI:: [hh:mm:ss:mss] Explicitly included types: [] -TI:: [hh:mm:ss:mss] Searching for typing names in /users/user/projects/project1/node_modules; all files: [] -TI:: [hh:mm:ss:mss] Found package names: [] -TI:: [hh:mm:ss:mss] Inferred typings from unresolved imports: ["bar"] -TI:: [hh:mm:ss:mss] Finished typings discovery: - { - "cachedTypingPaths": [ - "/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts" - ], - "newTypingNames": [], - "filesToWatch": [ - "/users/user/projects/project1/bower_components", - "/users/user/projects/project1/node_modules" - ] - } -TI:: [hh:mm:ss:mss] Sending response: - { - "kind": "action::watchTypingLocations", - "projectName": "/users/user/projects/project1/jsconfig.json", - "files": [ - "/users/user/projects/project1/bower_components", - "/users/user/projects/project1/node_modules" - ] - } -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/bower_components 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/bower_components 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer -TI:: [hh:mm:ss:mss] Sending response: - { - "projectName": "/users/user/projects/project1/jsconfig.json", - "typeAcquisition": { - "enable": true, - "include": [], - "exclude": [] - }, - "compilerOptions": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "traceResolution": true, - "configFilePath": "/users/user/projects/project1/jsconfig.json", - "allowNonTsExtensions": true - }, - "typings": [ - "/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts" - ], - "unresolvedImports": [ - "bar" - ], - "kind": "action::set" - } -Info seq [hh:mm:ss:mss] Scheduled: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "setTypings", - "body": { - "projectName": "/users/user/projects/project1/jsconfig.json", - "typeAcquisition": { - "enable": true, - "include": [], - "exclude": [] - }, - "compilerOptions": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "traceResolution": true, - "configFilePath": "/users/user/projects/project1/jsconfig.json", - "allowNonTsExtensions": true - }, - "typings": [ - "/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts" - ], - "unresolvedImports": [ - "bar" - ], - "kind": "action::set" - } - } -TI:: [hh:mm:ss:mss] No new typings were requested as a result of typings discovery -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/users/user/projects/project1/jsconfig.json" - } - } -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json Info seq [hh:mm:ss:mss] ======== Resolving module 'bar' from '/users/user/projects/project1/app.js'. ======== Info seq [hh:mm:ss:mss] Module resolution kind is not specified, using 'Node10'. Info seq [hh:mm:ss:mss] Loading module 'bar' from 'node_modules' folder, target file types: TypeScript, Declaration. @@ -960,7 +852,7 @@ Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/p Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/project1/node_modules/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/project1/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/user/projects/package.json 2000 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: File location affecting resolution -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 4 projectProgramVersion: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 3 projectProgramVersion: 2 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (3) /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" @@ -972,12 +864,12 @@ Info seq [hh:mm:ss:mss] Files (3) Default library for target 'es5' ../../../../home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts Imported via 'bar' from file 'app.js' - Matched by default include pattern '**/*' app.js Matched by default include pattern '**/*' Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 +Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /home/src/tslibs/ts/lib/lib.d.ts:: [] Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /home/src/library/caches/typescript/node_modules/@types/bar/index.d.ts:: [] Info seq [hh:mm:ss:mss] extractUnresolvedImportsFromSourceFile:: /users/user/projects/project1/app.js:: [] Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 Done: [] @@ -986,7 +878,6 @@ TI:: [hh:mm:ss:mss] Got install request "projectName": "/users/user/projects/project1/jsconfig.json", "fileNames": [ "/home/src/tslibs/TS/Lib/lib.d.ts", - "/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts", "/users/user/projects/project1/app.js" ], "compilerOptions": { @@ -1024,8 +915,16 @@ TI:: [hh:mm:ss:mss] Finished typings discovery: TI:: [hh:mm:ss:mss] Sending response: { "kind": "action::watchTypingLocations", - "projectName": "/users/user/projects/project1/jsconfig.json" + "projectName": "/users/user/projects/project1/jsconfig.json", + "files": [ + "/users/user/projects/project1/bower_components", + "/users/user/projects/project1/node_modules" + ] } +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/bower_components 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/bower_components 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/user/projects/project1/node_modules 1 undefined Project: /users/user/projects/project1/jsconfig.json WatchType: Directory location for typing installer TI:: [hh:mm:ss:mss] Sending response: { "projectName": "/users/user/projects/project1/jsconfig.json", @@ -1048,8 +947,6 @@ TI:: [hh:mm:ss:mss] Sending response: "unresolvedImports": [], "kind": "action::set" } -Info seq [hh:mm:ss:mss] Scheduled: /users/user/projects/project1/jsconfig.json, Cancelled earlier one -Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one Info seq [hh:mm:ss:mss] event: { "seq": 0, @@ -1078,22 +975,15 @@ Info seq [hh:mm:ss:mss] event: } } TI:: [hh:mm:ss:mss] No new typings were requested as a result of typings discovery -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] Reusing resolution of module 'bar' from '/users/user/projects/project1/app.js' of old program, it was successfully resolved to '/home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts'. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/bar/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/@types/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/node_modules/package.json' does not exist according to earlier cached lookups. -Info seq [hh:mm:ss:mss] File '/home/src/Library/Caches/typescript/package.json' exists according to earlier cached lookups. -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/user/projects/project1/jsconfig.json projectStateVersion: 5 projectProgramVersion: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" - /home/src/Library/Caches/typescript/node_modules/@types/bar/index.d.ts Text-1 "export const x = 1;" - /users/user/projects/project1/app.js SVC-1-0 "var x = require('bar');" - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 -Info seq [hh:mm:ss:mss] getUnresolvedImports:: Files:: 3 Done: [] +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/users/user/projects/project1/jsconfig.json" + } + } Info seq [hh:mm:ss:mss] event: { "seq": 0, @@ -1105,7 +995,36 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -After running Timeout callback:: count: 2 +Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* +Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: +Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project1/app.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project1/jsconfig.json +Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: +Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project1/app.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project1/jsconfig.json +Info seq [hh:mm:ss:mss] got projects updated in background /users/user/projects/project1/app.js +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectsUpdatedInBackground", + "body": { + "openFiles": [ + "/users/user/projects/project1/app.js" + ] + } + } +After running Timeout callback:: count: 0 PolledWatches:: /home/src/Library/Caches/typescript/node_modules/@types/bar/package.json: *new* @@ -1149,14 +1068,9 @@ FsWatchesRecursive:: /users/user/projects/project1/node_modules: {} -Timeout callback:: count: 2 -4: *ensureProjectForOpenFiles* *deleted* -7: /users/user/projects/project1/jsconfig.json *new* -8: *ensureProjectForOpenFiles* *new* - Projects:: /users/user/projects/project1/jsconfig.json (Configured) *changed* - projectStateVersion: 5 *changed* + projectStateVersion: 3 projectProgramVersion: 3 *changed* dirty: false *changed* @@ -1178,40 +1092,8 @@ ScriptInfos:: containingProjects: 0 *changed* /users/user/projects/project1/jsconfig.json *deleted* -Before running Timeout callback:: count: 2 -7: /users/user/projects/project1/jsconfig.json -8: *ensureProjectForOpenFiles* +Before running Timeout callback:: count: 0 -Info seq [hh:mm:ss:mss] Running: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Open files: -Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project1/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/users/user/projects/project1/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Open files: -Info seq [hh:mm:ss:mss] FileName: /users/user/projects/project1/app.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/user/projects/project1/jsconfig.json -Info seq [hh:mm:ss:mss] got projects updated in background /users/user/projects/project1/app.js -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectsUpdatedInBackground", - "body": { - "openFiles": [ - "/users/user/projects/project1/app.js" - ] - } - } After running Timeout callback:: count: 0 Before running Timeout callback:: count: 0