mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-04 21:53:42 -06:00
Incremental testing for program structure and resolutions and fixes (#55814)
This commit is contained in:
parent
83f02a4b7e
commit
dcb0fa7f44
@ -1109,7 +1109,8 @@ export function getInferredLibraryNameResolveFrom(options: CompilerOptions, curr
|
||||
return combinePaths(containingDirectory, `__lib_node_modules_lookup_${libFileName}__.ts`);
|
||||
}
|
||||
|
||||
function getLibraryNameFromLibFileName(libFileName: string) {
|
||||
/** @internal */
|
||||
export function getLibraryNameFromLibFileName(libFileName: string) {
|
||||
// Support resolving to lib.dom.d.ts -> @typescript/lib-dom, and
|
||||
// lib.dom.iterable.d.ts -> @typescript/lib-dom/iterable
|
||||
// lib.es2015.symbol.wellknown.d.ts -> @typescript/lib-es2015/symbol-wellknown
|
||||
|
||||
@ -54,6 +54,7 @@ import {
|
||||
normalizePath,
|
||||
PackageId,
|
||||
packageIdToString,
|
||||
PackageJsonInfo,
|
||||
parseNodeModuleFromPath,
|
||||
Path,
|
||||
PathPathComponents,
|
||||
@ -89,9 +90,26 @@ export interface HasInvalidatedFromResolutionCache {
|
||||
* @internal
|
||||
*/
|
||||
export interface ResolutionCache {
|
||||
rootDirForResolution: string;
|
||||
resolvedModuleNames: Map<Path, ModeAwareCache<CachedResolvedModuleWithFailedLookupLocations>>;
|
||||
resolvedTypeReferenceDirectives: Map<Path, ModeAwareCache<CachedResolvedTypeReferenceDirectiveWithFailedLookupLocations>>;
|
||||
resolvedLibraries: Map<string, CachedResolvedModuleWithFailedLookupLocations>;
|
||||
resolvedFileToResolution: Map<Path, Set<ResolutionWithFailedLookupLocations>>;
|
||||
resolutionsWithFailedLookups: Set<ResolutionWithFailedLookupLocations>;
|
||||
resolutionsWithOnlyAffectingLocations: Set<ResolutionWithFailedLookupLocations>;
|
||||
directoryWatchesOfFailedLookups: Map<string, DirectoryWatchesOfFailedLookup>;
|
||||
fileWatchesOfAffectingLocations: Map<string, FileWatcherOfAffectingLocation>;
|
||||
startRecordingFilesWithChangedResolutions(): void;
|
||||
finishRecordingFilesWithChangedResolutions(): Path[] | undefined;
|
||||
|
||||
watchFailedLookupLocationsOfExternalModuleResolutions<T extends ResolutionWithFailedLookupLocations, R extends ResolutionWithResolvedFileName>(
|
||||
name: string,
|
||||
resolution: T,
|
||||
filePath: Path,
|
||||
getResolutionWithResolvedFileName: GetResolutionWithResolvedFileName<T, R>,
|
||||
deferWatchingNonRelativeResolution: boolean,
|
||||
): void;
|
||||
|
||||
resolveModuleNameLiterals(
|
||||
moduleLiterals: readonly StringLiteralLike[],
|
||||
containingFile: string,
|
||||
@ -121,7 +139,7 @@ export interface ResolutionCache {
|
||||
|
||||
invalidateResolutionsOfFailedLookupLocations(): boolean;
|
||||
invalidateResolutionOfFile(filePath: Path): void;
|
||||
removeResolutionsOfFile(filePath: Path): void;
|
||||
removeResolutionsOfFile(filePath: Path, syncDirWatcherRemove?: boolean): void;
|
||||
removeResolutionsFromProjectReferenceRedirects(filePath: Path): void;
|
||||
setFilesWithInvalidatedNonRelativeUnresolvedImports(filesWithUnresolvedImports: Map<Path, readonly string[]>): void;
|
||||
createHasInvalidatedResolutions(
|
||||
@ -154,7 +172,8 @@ export interface ResolutionWithFailedLookupLocations {
|
||||
node10Result?: string;
|
||||
}
|
||||
|
||||
interface ResolutionWithResolvedFileName {
|
||||
/** @internal */
|
||||
export interface ResolutionWithResolvedFileName {
|
||||
resolvedFileName: string | undefined;
|
||||
packageId?: PackageId;
|
||||
}
|
||||
@ -163,7 +182,8 @@ interface ResolutionWithResolvedFileName {
|
||||
export interface CachedResolvedModuleWithFailedLookupLocations extends ResolvedModuleWithFailedLookupLocations, ResolutionWithFailedLookupLocations {
|
||||
}
|
||||
|
||||
interface CachedResolvedTypeReferenceDirectiveWithFailedLookupLocations extends ResolvedTypeReferenceDirectiveWithFailedLookupLocations, ResolutionWithFailedLookupLocations {
|
||||
/** @internal */
|
||||
export interface CachedResolvedTypeReferenceDirectiveWithFailedLookupLocations extends ResolvedTypeReferenceDirectiveWithFailedLookupLocations, ResolutionWithFailedLookupLocations {
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
@ -187,15 +207,17 @@ export interface ResolutionCacheHost extends MinimalResolutionCacheHost {
|
||||
onDiscoveredSymlink?(): void;
|
||||
}
|
||||
|
||||
interface FileWatcherOfAffectingLocation {
|
||||
/** @internal */
|
||||
export interface FileWatcherOfAffectingLocation {
|
||||
/** watcher for the lookup */
|
||||
watcher: FileWatcher;
|
||||
resolutions: number;
|
||||
files: number;
|
||||
paths: Set<string>;
|
||||
symlinks: Set<string> | undefined;
|
||||
}
|
||||
|
||||
interface DirectoryWatchesOfFailedLookup {
|
||||
/** @internal */
|
||||
export interface DirectoryWatchesOfFailedLookup {
|
||||
/** watcher for the lookup */
|
||||
watcher: FileWatcher;
|
||||
/** ref count keeping this watch alive */
|
||||
@ -417,7 +439,74 @@ export function getRootPathSplitLength(rootPath: Path) {
|
||||
return rootPath.split(directorySeparator).length - (hasTrailingDirectorySeparator(rootPath) ? 1 : 0);
|
||||
}
|
||||
|
||||
type GetResolutionWithResolvedFileName<T extends ResolutionWithFailedLookupLocations = ResolutionWithFailedLookupLocations, R extends ResolutionWithResolvedFileName = ResolutionWithResolvedFileName> = (resolution: T) => R | undefined;
|
||||
/** @internal */
|
||||
export function createModuleResolutionLoaderUsingGlobalCache(
|
||||
containingFile: string,
|
||||
redirectedReference: ResolvedProjectReference | undefined,
|
||||
options: CompilerOptions,
|
||||
resolutionHost: ResolutionCacheHost,
|
||||
moduleResolutionCache: ModuleResolutionCache,
|
||||
): ResolutionLoader<StringLiteralLike, ResolvedModuleWithFailedLookupLocations, SourceFile> {
|
||||
return {
|
||||
nameAndMode: moduleResolutionNameAndModeGetter,
|
||||
resolve: (moduleName, resoluionMode) =>
|
||||
resolveModuleNameUsingGlobalCache(
|
||||
resolutionHost,
|
||||
moduleResolutionCache,
|
||||
moduleName,
|
||||
containingFile,
|
||||
options,
|
||||
redirectedReference,
|
||||
resoluionMode,
|
||||
),
|
||||
};
|
||||
}
|
||||
|
||||
function resolveModuleNameUsingGlobalCache(
|
||||
resolutionHost: ResolutionCacheHost,
|
||||
moduleResolutionCache: ModuleResolutionCache,
|
||||
moduleName: string,
|
||||
containingFile: string,
|
||||
compilerOptions: CompilerOptions,
|
||||
redirectedReference?: ResolvedProjectReference,
|
||||
mode?: ResolutionMode,
|
||||
): ResolvedModuleWithFailedLookupLocations {
|
||||
const host = resolutionHost.getCompilerHost?.() || 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.getGlobalCache) {
|
||||
return primaryResult;
|
||||
}
|
||||
|
||||
// otherwise try to load typings from @types
|
||||
const globalCache = resolutionHost.getGlobalCache();
|
||||
if (globalCache !== undefined && !isExternalModuleNameRelative(moduleName) && !(primaryResult.resolvedModule && extensionIsTS(primaryResult.resolvedModule.extension))) {
|
||||
// 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(
|
||||
Debug.checkDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName),
|
||||
resolutionHost.projectName,
|
||||
compilerOptions,
|
||||
host,
|
||||
globalCache,
|
||||
moduleResolutionCache,
|
||||
);
|
||||
if (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);
|
||||
return primaryResult;
|
||||
}
|
||||
}
|
||||
|
||||
// Default return the result from the first pass
|
||||
return primaryResult;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export type GetResolutionWithResolvedFileName<T extends ResolutionWithFailedLookupLocations = ResolutionWithFailedLookupLocations, R extends ResolutionWithResolvedFileName = ResolutionWithResolvedFileName> = (resolution: T) => R | undefined;
|
||||
|
||||
/** @internal */
|
||||
export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootDirForResolution: string, logChangesWhenResolvingModule: boolean): ResolutionCache {
|
||||
@ -428,7 +517,7 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD
|
||||
|
||||
const resolutionsWithFailedLookups = new Set<ResolutionWithFailedLookupLocations>();
|
||||
const resolutionsWithOnlyAffectingLocations = new Set<ResolutionWithFailedLookupLocations>();
|
||||
const resolvedFileToResolution = new Map<string, Set<ResolutionWithFailedLookupLocations>>();
|
||||
const resolvedFileToResolution = new Map<Path, Set<ResolutionWithFailedLookupLocations>>();
|
||||
const impliedFormatPackageJsons = new Map<Path, readonly string[]>();
|
||||
|
||||
let hasChangedAutomaticTypeDirectiveNames = false;
|
||||
@ -469,7 +558,7 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD
|
||||
moduleResolutionCache.getPackageJsonInfoCache(),
|
||||
);
|
||||
|
||||
const directoryWatchesOfFailedLookups = new Map<string, DirectoryWatchesOfFailedLookup>();
|
||||
const directoryWatchesOfFailedLookups = new Map<Path, DirectoryWatchesOfFailedLookup>();
|
||||
const fileWatchesOfAffectingLocations = new Map<string, FileWatcherOfAffectingLocation>();
|
||||
const rootDir = getRootDirectoryOfResolutionCache(rootDirForResolution, getCurrentDirectory);
|
||||
const rootPath = resolutionHost.toPath(rootDir);
|
||||
@ -479,6 +568,16 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD
|
||||
const typeRootsWatches = new Map<string, FileWatcher>();
|
||||
|
||||
return {
|
||||
rootDirForResolution,
|
||||
resolvedModuleNames,
|
||||
resolvedTypeReferenceDirectives,
|
||||
resolvedLibraries,
|
||||
resolvedFileToResolution,
|
||||
resolutionsWithFailedLookups,
|
||||
resolutionsWithOnlyAffectingLocations,
|
||||
directoryWatchesOfFailedLookups,
|
||||
fileWatchesOfAffectingLocations,
|
||||
watchFailedLookupLocationsOfExternalModuleResolutions,
|
||||
getModuleResolutionCache: () => moduleResolutionCache,
|
||||
startRecordingFilesWithChangedResolutions,
|
||||
finishRecordingFilesWithChangedResolutions,
|
||||
@ -601,7 +700,7 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD
|
||||
if (!newProgram?.resolvedLibReferences?.has(libFileName)) {
|
||||
stopWatchFailedLookupLocationOfResolution(
|
||||
resolution,
|
||||
resolutionHost.toPath(getInferredLibraryNameResolveFrom(newProgram!.getCompilerOptions(), getCurrentDirectory(), libFileName)),
|
||||
resolutionHost.toPath(getInferredLibraryNameResolveFrom(resolutionHost.getCompilationSettings(), getCurrentDirectory(), libFileName)),
|
||||
getResolvedModule,
|
||||
);
|
||||
resolvedLibraries.delete(libFileName);
|
||||
@ -638,73 +737,23 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD
|
||||
}
|
||||
});
|
||||
}
|
||||
directoryWatchesOfFailedLookups.forEach((watcher, path) => {
|
||||
if (watcher.refCount === 0) {
|
||||
directoryWatchesOfFailedLookups.delete(path);
|
||||
watcher.watcher.close();
|
||||
}
|
||||
});
|
||||
fileWatchesOfAffectingLocations.forEach((watcher, path) => {
|
||||
if (watcher.files === 0 && watcher.resolutions === 0) {
|
||||
fileWatchesOfAffectingLocations.delete(path);
|
||||
watcher.watcher.close();
|
||||
}
|
||||
});
|
||||
|
||||
directoryWatchesOfFailedLookups.forEach(closeDirectoryWatchesOfFailedLookup);
|
||||
fileWatchesOfAffectingLocations.forEach(closeFileWatcherOfAffectingLocation);
|
||||
hasChangedAutomaticTypeDirectiveNames = false;
|
||||
}
|
||||
|
||||
function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, redirectedReference?: ResolvedProjectReference, mode?: ResolutionMode): CachedResolvedModuleWithFailedLookupLocations {
|
||||
const host = resolutionHost.getCompilerHost?.() || 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.getGlobalCache) {
|
||||
return primaryResult;
|
||||
function closeDirectoryWatchesOfFailedLookup(watcher: DirectoryWatchesOfFailedLookup, path: Path) {
|
||||
if (watcher.refCount === 0) {
|
||||
directoryWatchesOfFailedLookups.delete(path);
|
||||
watcher.watcher.close();
|
||||
}
|
||||
|
||||
// otherwise try to load typings from @types
|
||||
const globalCache = resolutionHost.getGlobalCache();
|
||||
if (globalCache !== undefined && !isExternalModuleNameRelative(moduleName) && !(primaryResult.resolvedModule && extensionIsTS(primaryResult.resolvedModule.extension))) {
|
||||
// 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(
|
||||
Debug.checkDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName),
|
||||
resolutionHost.projectName,
|
||||
compilerOptions,
|
||||
host,
|
||||
globalCache,
|
||||
moduleResolutionCache,
|
||||
);
|
||||
if (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);
|
||||
return primaryResult;
|
||||
}
|
||||
}
|
||||
|
||||
// Default return the result from the first pass
|
||||
return primaryResult;
|
||||
}
|
||||
|
||||
function createModuleResolutionLoader(
|
||||
containingFile: string,
|
||||
redirectedReference: ResolvedProjectReference | undefined,
|
||||
options: CompilerOptions,
|
||||
): ResolutionLoader<StringLiteralLike, ResolvedModuleWithFailedLookupLocations, SourceFile> {
|
||||
return {
|
||||
nameAndMode: moduleResolutionNameAndModeGetter,
|
||||
resolve: (moduleName, resoluionMode) =>
|
||||
resolveModuleName(
|
||||
moduleName,
|
||||
containingFile,
|
||||
options,
|
||||
redirectedReference,
|
||||
resoluionMode,
|
||||
),
|
||||
};
|
||||
function closeFileWatcherOfAffectingLocation(watcher: FileWatcherOfAffectingLocation, path: string) {
|
||||
if (watcher.files === 0 && watcher.resolutions === 0 && !watcher.symlinks?.size) {
|
||||
fileWatchesOfAffectingLocations.delete(path);
|
||||
watcher.watcher.close();
|
||||
}
|
||||
}
|
||||
|
||||
interface ResolveNamesWithLocalCacheInput<Entry, SourceFile, T extends ResolutionWithFailedLookupLocations, R extends ResolutionWithResolvedFileName> {
|
||||
@ -765,9 +814,11 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD
|
||||
resolutionHost.onDiscoveredSymlink();
|
||||
}
|
||||
resolutionsInFile.set(name, mode, resolution);
|
||||
watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution);
|
||||
if (existingResolution) {
|
||||
stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolutionWithResolvedFileName);
|
||||
if (resolution !== existingResolution) {
|
||||
watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution);
|
||||
if (existingResolution) {
|
||||
stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolutionWithResolvedFileName);
|
||||
}
|
||||
}
|
||||
|
||||
if (logChanges && filesWithChangedSetOfUnresolvedImports && !resolutionIsEqualTo(existingResolution, resolution)) {
|
||||
@ -886,10 +937,12 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD
|
||||
options,
|
||||
reusedNames,
|
||||
perFileCache: resolvedModuleNames,
|
||||
loader: createModuleResolutionLoader(
|
||||
loader: createModuleResolutionLoaderUsingGlobalCache(
|
||||
containingFile,
|
||||
redirectedReference,
|
||||
options,
|
||||
resolutionHost,
|
||||
moduleResolutionCache,
|
||||
),
|
||||
getResolutionWithResolvedFileName: getResolvedModule,
|
||||
shouldRetryResolution: resolution => !resolution.resolvedModule || !resolutionExtensionIsTSOrJson(resolution.resolvedModule.extension),
|
||||
@ -941,7 +994,7 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD
|
||||
const resolutionsInFile = resolvedModuleNames.get(path);
|
||||
const resolution = resolutionsInFile?.get(moduleName, /*mode*/ undefined);
|
||||
if (resolution && !resolution.isInvalidated) return resolution;
|
||||
return resolveModuleName(moduleName, containingFile, resolutionHost.getCompilationSettings());
|
||||
return resolveModuleNameUsingGlobalCache(resolutionHost, moduleResolutionCache, moduleName, containingFile, resolutionHost.getCompilationSettings());
|
||||
}
|
||||
|
||||
function isNodeModulesAtTypesDirectory(dirPath: Path) {
|
||||
@ -1042,49 +1095,61 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD
|
||||
return;
|
||||
}
|
||||
let locationToWatch = affectingLocation;
|
||||
let isSymlink = false;
|
||||
let symlinkWatcher: FileWatcherOfAffectingLocation | undefined;
|
||||
if (resolutionHost.realpath) {
|
||||
locationToWatch = resolutionHost.realpath(affectingLocation);
|
||||
if (affectingLocation !== locationToWatch) {
|
||||
const fileWatcher = fileWatchesOfAffectingLocations.get(locationToWatch);
|
||||
if (fileWatcher) {
|
||||
if (forResolution) fileWatcher.resolutions++;
|
||||
else fileWatcher.files++;
|
||||
fileWatcher.paths.add(affectingLocation);
|
||||
fileWatchesOfAffectingLocations.set(affectingLocation, fileWatcher);
|
||||
return;
|
||||
}
|
||||
isSymlink = true;
|
||||
symlinkWatcher = fileWatchesOfAffectingLocations.get(locationToWatch);
|
||||
}
|
||||
}
|
||||
const paths = new Set<string>();
|
||||
paths.add(locationToWatch);
|
||||
let actualWatcher = canWatchAffectingLocation(resolutionHost.toPath(locationToWatch)) ?
|
||||
resolutionHost.watchAffectingFileLocation(locationToWatch, (fileName, eventKind) => {
|
||||
cachedDirectoryStructureHost?.addOrDeleteFile(fileName, resolutionHost.toPath(locationToWatch), eventKind);
|
||||
const packageJsonMap = moduleResolutionCache.getPackageJsonInfoCache().getInternalMap();
|
||||
paths.forEach(path => {
|
||||
if (watcher.resolutions) (affectingPathChecks ??= new Set()).add(path);
|
||||
if (watcher.files) (affectingPathChecksForFile ??= new Set()).add(path);
|
||||
packageJsonMap?.delete(resolutionHost.toPath(path));
|
||||
});
|
||||
resolutionHost.scheduleInvalidateResolutionsOfFailedLookupLocations();
|
||||
}) : noopFileWatcher;
|
||||
const watcher: FileWatcherOfAffectingLocation = {
|
||||
watcher: actualWatcher !== noopFileWatcher ? {
|
||||
close: () => {
|
||||
actualWatcher.close();
|
||||
// Ensure when watching symlinked package.json, we can close the actual file watcher only once
|
||||
actualWatcher = noopFileWatcher;
|
||||
},
|
||||
} : actualWatcher,
|
||||
resolutions: forResolution ? 1 : 0,
|
||||
files: forResolution ? 0 : 1,
|
||||
paths,
|
||||
};
|
||||
fileWatchesOfAffectingLocations.set(locationToWatch, watcher);
|
||||
if (affectingLocation !== locationToWatch) {
|
||||
fileWatchesOfAffectingLocations.set(affectingLocation, watcher);
|
||||
paths.add(affectingLocation);
|
||||
|
||||
const resolutions = forResolution ? 1 : 0;
|
||||
const files = forResolution ? 0 : 1;
|
||||
if (!isSymlink || !symlinkWatcher) {
|
||||
const watcher: FileWatcherOfAffectingLocation = {
|
||||
watcher: canWatchAffectingLocation(resolutionHost.toPath(locationToWatch)) ?
|
||||
resolutionHost.watchAffectingFileLocation(locationToWatch, (fileName, eventKind) => {
|
||||
cachedDirectoryStructureHost?.addOrDeleteFile(fileName, resolutionHost.toPath(locationToWatch), eventKind);
|
||||
invalidateAffectingFileWatcher(locationToWatch, moduleResolutionCache.getPackageJsonInfoCache().getInternalMap());
|
||||
resolutionHost.scheduleInvalidateResolutionsOfFailedLookupLocations();
|
||||
}) : noopFileWatcher,
|
||||
resolutions: isSymlink ? 0 : resolutions,
|
||||
files: isSymlink ? 0 : files,
|
||||
symlinks: undefined,
|
||||
};
|
||||
fileWatchesOfAffectingLocations.set(locationToWatch, watcher);
|
||||
if (isSymlink) symlinkWatcher = watcher;
|
||||
}
|
||||
if (isSymlink) {
|
||||
Debug.assert(!!symlinkWatcher);
|
||||
const watcher: FileWatcherOfAffectingLocation = {
|
||||
watcher: {
|
||||
close: () => {
|
||||
const symlinkWatcher = fileWatchesOfAffectingLocations.get(locationToWatch);
|
||||
// Close symlink watcher if no ref
|
||||
if (symlinkWatcher?.symlinks?.delete(affectingLocation) && !symlinkWatcher.symlinks.size && !symlinkWatcher.resolutions && !symlinkWatcher.files) {
|
||||
fileWatchesOfAffectingLocations.delete(locationToWatch);
|
||||
symlinkWatcher.watcher.close();
|
||||
}
|
||||
},
|
||||
},
|
||||
resolutions,
|
||||
files,
|
||||
symlinks: undefined,
|
||||
};
|
||||
fileWatchesOfAffectingLocations.set(affectingLocation, watcher);
|
||||
(symlinkWatcher.symlinks ??= new Set()).add(affectingLocation);
|
||||
}
|
||||
}
|
||||
|
||||
function invalidateAffectingFileWatcher(path: string, packageJsonMap: Map<Path, PackageJsonInfo | boolean> | undefined) {
|
||||
const watcher = fileWatchesOfAffectingLocations.get(path);
|
||||
if (watcher?.resolutions) (affectingPathChecks ??= new Set()).add(path);
|
||||
if (watcher?.files) (affectingPathChecksForFile ??= new Set()).add(path);
|
||||
watcher?.symlinks?.forEach(path => invalidateAffectingFileWatcher(path, packageJsonMap));
|
||||
packageJsonMap?.delete(resolutionHost.toPath(path));
|
||||
}
|
||||
|
||||
function watchFailedLookupLocationOfNonRelativeModuleResolutions(resolutions: ResolutionWithFailedLookupLocations[], name: string) {
|
||||
@ -1108,7 +1173,7 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD
|
||||
}
|
||||
}
|
||||
|
||||
function stopWatchFailedLookupLocation(failedLookupLocation: string, removeAtRoot: boolean) {
|
||||
function stopWatchFailedLookupLocation(failedLookupLocation: string, removeAtRoot: boolean, syncDirWatcherRemove: boolean | undefined) {
|
||||
const failedLookupLocationPath = resolutionHost.toPath(failedLookupLocation);
|
||||
const toWatch = getDirectoryToWatchFailedLookupLocation(
|
||||
failedLookupLocation,
|
||||
@ -1124,7 +1189,7 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD
|
||||
removeAtRoot = true;
|
||||
}
|
||||
else {
|
||||
removeDirectoryWatcher(dirPath);
|
||||
removeDirectoryWatcher(dirPath, syncDirWatcherRemove);
|
||||
}
|
||||
}
|
||||
return removeAtRoot;
|
||||
@ -1134,6 +1199,7 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD
|
||||
resolution: T,
|
||||
filePath: Path,
|
||||
getResolutionWithResolvedFileName: GetResolutionWithResolvedFileName<T, R>,
|
||||
syncDirWatcherRemove?: boolean,
|
||||
) {
|
||||
Debug.checkDefined(resolution.files).delete(filePath);
|
||||
resolution.refCount!--;
|
||||
@ -1152,11 +1218,11 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD
|
||||
let removeAtRoot = false;
|
||||
if (failedLookupLocations) {
|
||||
for (const failedLookupLocation of failedLookupLocations) {
|
||||
removeAtRoot = stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot);
|
||||
removeAtRoot = stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot, syncDirWatcherRemove);
|
||||
}
|
||||
}
|
||||
if (node10Result) removeAtRoot = stopWatchFailedLookupLocation(node10Result, removeAtRoot);
|
||||
if (removeAtRoot) removeDirectoryWatcher(rootPath);
|
||||
if (node10Result) removeAtRoot = stopWatchFailedLookupLocation(node10Result, removeAtRoot, syncDirWatcherRemove);
|
||||
if (removeAtRoot) removeDirectoryWatcher(rootPath, syncDirWatcherRemove);
|
||||
}
|
||||
else if (affectingLocations?.length) {
|
||||
resolutionsWithOnlyAffectingLocations.delete(resolution);
|
||||
@ -1166,14 +1232,16 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD
|
||||
for (const affectingLocation of affectingLocations) {
|
||||
const watcher = fileWatchesOfAffectingLocations.get(affectingLocation)!;
|
||||
watcher.resolutions--;
|
||||
if (syncDirWatcherRemove) closeFileWatcherOfAffectingLocation(watcher, affectingLocation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function removeDirectoryWatcher(dirPath: string) {
|
||||
function removeDirectoryWatcher(dirPath: Path, syncDirWatcherRemove: boolean | undefined) {
|
||||
const dirWatcher = directoryWatchesOfFailedLookups.get(dirPath)!;
|
||||
// Do not close the watcher yet since it might be needed by other failed lookup locations.
|
||||
dirWatcher.refCount--;
|
||||
if (syncDirWatcherRemove) closeDirectoryWatchesOfFailedLookup(dirWatcher, dirPath);
|
||||
}
|
||||
|
||||
function createDirectoryWatcher(directory: string, dirPath: Path, nonRecursive: boolean | undefined) {
|
||||
@ -1192,11 +1260,19 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD
|
||||
cache: Map<string, ModeAwareCache<T>>,
|
||||
filePath: Path,
|
||||
getResolutionWithResolvedFileName: GetResolutionWithResolvedFileName<T, R>,
|
||||
syncDirWatcherRemove: boolean | undefined,
|
||||
) {
|
||||
// Deleted file, stop watching failed lookups for all the resolutions in the file
|
||||
const resolutions = cache.get(filePath);
|
||||
if (resolutions) {
|
||||
resolutions.forEach(resolution => stopWatchFailedLookupLocationOfResolution(resolution, filePath, getResolutionWithResolvedFileName));
|
||||
resolutions.forEach(resolution =>
|
||||
stopWatchFailedLookupLocationOfResolution(
|
||||
resolution,
|
||||
filePath,
|
||||
getResolutionWithResolvedFileName,
|
||||
syncDirWatcherRemove,
|
||||
)
|
||||
);
|
||||
cache.delete(filePath);
|
||||
}
|
||||
}
|
||||
@ -1215,9 +1291,9 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD
|
||||
resolvedProjectReference.commandLine.fileNames.forEach(f => removeResolutionsOfFile(resolutionHost.toPath(f)));
|
||||
}
|
||||
|
||||
function removeResolutionsOfFile(filePath: Path) {
|
||||
removeResolutionsOfFileFromCache(resolvedModuleNames, filePath, getResolvedModule);
|
||||
removeResolutionsOfFileFromCache(resolvedTypeReferenceDirectives, filePath, getResolvedTypeReferenceDirective);
|
||||
function removeResolutionsOfFile(filePath: Path, syncDirWatcherRemove?: boolean) {
|
||||
removeResolutionsOfFileFromCache(resolvedModuleNames, filePath, getResolvedModule, syncDirWatcherRemove);
|
||||
removeResolutionsOfFileFromCache(resolvedTypeReferenceDirectives, filePath, getResolvedTypeReferenceDirective, syncDirWatcherRemove);
|
||||
}
|
||||
|
||||
function invalidateResolutions(resolutions: Set<ResolutionWithFailedLookupLocations> | Map<string, ResolutionWithFailedLookupLocations> | undefined, canInvalidate: (resolution: ResolutionWithFailedLookupLocations) => boolean | undefined) {
|
||||
|
||||
@ -65,6 +65,7 @@ import {
|
||||
perfLogger,
|
||||
PollingInterval,
|
||||
ProjectReference,
|
||||
ResolutionCache,
|
||||
ResolutionCacheHost,
|
||||
ResolutionMode,
|
||||
ResolvedModule,
|
||||
@ -341,6 +342,8 @@ export interface Watch<T> {
|
||||
getCurrentProgram(): T;
|
||||
/** Closes the watch */
|
||||
close(): void;
|
||||
/** @internal */
|
||||
getResolutionCache(): ResolutionCache;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -552,8 +555,8 @@ export function createWatchProgram<T extends BuilderProgram>(host: WatchCompiler
|
||||
if (configFileName) updateExtendedConfigFilesWatches(toPath(configFileName), compilerOptions, watchOptions, WatchType.ExtendedConfigFile);
|
||||
|
||||
return configFileName ?
|
||||
{ getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, close } :
|
||||
{ getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, updateRootFileNames, close };
|
||||
{ getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, close, getResolutionCache } :
|
||||
{ getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, updateRootFileNames, close, getResolutionCache };
|
||||
|
||||
function close() {
|
||||
clearInvalidateResolutionsOfFailedLookupLocations();
|
||||
@ -593,6 +596,10 @@ export function createWatchProgram<T extends BuilderProgram>(host: WatchCompiler
|
||||
}
|
||||
}
|
||||
|
||||
function getResolutionCache() {
|
||||
return resolutionCache;
|
||||
}
|
||||
|
||||
function getCurrentBuilderProgram() {
|
||||
return builderProgram;
|
||||
}
|
||||
|
||||
@ -102,7 +102,422 @@ function verifyDocumentRegistry(service: ts.server.ProjectService) {
|
||||
service.forEachProject(collectStats);
|
||||
verifyDocumentRegistryStats(service.documentRegistry, stats);
|
||||
}
|
||||
interface ResolutionInfo {
|
||||
cacheType: string;
|
||||
fileName: string;
|
||||
name: string;
|
||||
mode: ts.ResolutionMode;
|
||||
}
|
||||
|
||||
function getResolutionCacheDetails<T extends ts.ResolutionWithFailedLookupLocations>(
|
||||
baseline: string[],
|
||||
cacheType: string,
|
||||
cache: ts.ModeAwareCache<T> | undefined,
|
||||
getResolvedFileName: (resolution: T) => string | undefined,
|
||||
indent: string,
|
||||
) {
|
||||
let addedCacheType = false;
|
||||
cache?.forEach((resolved, key, mode) => {
|
||||
if (!addedCacheType) {
|
||||
addedCacheType = true;
|
||||
baseline.push(`${indent}${cacheType}:`);
|
||||
}
|
||||
baseline.push(`${indent} ${key}: ${mode ? ts.getNameOfCompilerOptionValue(mode, ts.moduleOptionDeclaration.type) + ":" : ""}${getResolvedFileName(resolved)}`);
|
||||
});
|
||||
}
|
||||
|
||||
function getResolvedModuleFileName(r: ts.ResolvedModuleWithFailedLookupLocations) {
|
||||
return r.resolvedModule?.resolvedFileName;
|
||||
}
|
||||
|
||||
function getResolvedTypeRefFileName(r: ts.ResolvedTypeReferenceDirectiveWithFailedLookupLocations) {
|
||||
return r.resolvedTypeReferenceDirective?.resolvedFileName;
|
||||
}
|
||||
|
||||
function getLibResolutionCacheDetails(
|
||||
baseline: string[],
|
||||
cache: Map<string, ts.LibResolution> | undefined,
|
||||
indent: string,
|
||||
) {
|
||||
let addedCacheType = false;
|
||||
cache?.forEach((resolved, libFileName) => {
|
||||
if (!addedCacheType) {
|
||||
addedCacheType = true;
|
||||
baseline.push(`${indent}Libs:`);
|
||||
}
|
||||
baseline.push(`${indent} ${libFileName}: Actual: ${resolved.actual} Resolution: ${getResolvedModuleFileName(resolved.resolution)}`);
|
||||
});
|
||||
}
|
||||
|
||||
function getProgramStructure(program: ts.Program | undefined) {
|
||||
const baseline: string[] = [];
|
||||
program?.getSourceFiles().slice().sort((f1, f2) => ts.comparePathsCaseSensitive(f1.path, f2.path)).forEach(f => {
|
||||
baseline.push(` File: ${f.fileName} Path: ${f.path} ResolvedPath: ${f.resolvedPath} impliedNodeFormat: ${f.impliedNodeFormat}`);
|
||||
baseline.push(f.text.split(/\r?\n/g).map(l => l ? " " + l : "").join("\n"));
|
||||
getResolutionCacheDetails(
|
||||
baseline,
|
||||
"Modules",
|
||||
program.resolvedModules?.get(f.path),
|
||||
getResolvedModuleFileName,
|
||||
" ",
|
||||
);
|
||||
getResolutionCacheDetails(
|
||||
baseline,
|
||||
"TypeRefs",
|
||||
program.resolvedTypeReferenceDirectiveNames?.get(f.path),
|
||||
getResolvedTypeRefFileName,
|
||||
" ",
|
||||
);
|
||||
});
|
||||
getResolutionCacheDetails(
|
||||
baseline,
|
||||
"AutoTypeRefs",
|
||||
program?.getAutomaticTypeDirectiveResolutions(),
|
||||
getResolvedTypeRefFileName,
|
||||
" ",
|
||||
);
|
||||
getLibResolutionCacheDetails(
|
||||
baseline,
|
||||
program?.resolvedLibReferences,
|
||||
" ",
|
||||
);
|
||||
return baseline.join("\n");
|
||||
}
|
||||
|
||||
export function verifyProgramStructure(expectedProgram: ts.Program, actualProgram: ts.Program, projectName: string) {
|
||||
const actual = getProgramStructure(actualProgram);
|
||||
const expected = getProgramStructure(expectedProgram);
|
||||
ts.Debug.assert(actual === expected, `Program verification:: ${projectName}`);
|
||||
}
|
||||
|
||||
export function verifyResolutionCache(
|
||||
actual: ts.ResolutionCache,
|
||||
actualProgram: ts.Program,
|
||||
resolutionHostCacheHost: ts.ResolutionCacheHost,
|
||||
projectName: string,
|
||||
) {
|
||||
const currentDirectory = resolutionHostCacheHost.getCurrentDirectory!();
|
||||
const expected = ts.createResolutionCache(resolutionHostCacheHost, actual.rootDirForResolution, /*logChangesWhenResolvingModule*/ false);
|
||||
expected.startCachingPerDirectoryResolution();
|
||||
|
||||
type ExpectedResolution = ts.CachedResolvedModuleWithFailedLookupLocations & ts.CachedResolvedTypeReferenceDirectiveWithFailedLookupLocations;
|
||||
|
||||
const expectedToResolution = new Map<ExpectedResolution, ts.ResolutionWithFailedLookupLocations>();
|
||||
const resolutionToExpected = new Map<ts.ResolutionWithFailedLookupLocations, ExpectedResolution>();
|
||||
const resolutionToRefs = new Map<ts.ResolutionWithFailedLookupLocations, ResolutionInfo[]>();
|
||||
actual.resolvedModuleNames.forEach((resolutions, path) =>
|
||||
collectResolutionToRefFromCache(
|
||||
"Modules",
|
||||
path,
|
||||
resolutions,
|
||||
getResolvedModuleFileName,
|
||||
/*deferWatchingNonRelativeResolution*/ true,
|
||||
expected.resolvedModuleNames,
|
||||
)
|
||||
);
|
||||
actual.resolvedTypeReferenceDirectives.forEach((resolutions, path) =>
|
||||
collectResolutionToRefFromCache(
|
||||
"TypeRefs",
|
||||
path,
|
||||
resolutions,
|
||||
getResolvedTypeRefFileName,
|
||||
/*deferWatchingNonRelativeResolution*/ false,
|
||||
expected.resolvedTypeReferenceDirectives,
|
||||
)
|
||||
);
|
||||
actual.resolvedLibraries.forEach((resolved, libFileName) => {
|
||||
const expectedResolution = collectResolution(
|
||||
"Libs",
|
||||
resolutionHostCacheHost.toPath(
|
||||
ts.getInferredLibraryNameResolveFrom(actualProgram.getCompilerOptions(), currentDirectory, libFileName),
|
||||
),
|
||||
resolved,
|
||||
getResolvedModuleFileName(resolved),
|
||||
ts.getLibraryNameFromLibFileName(libFileName),
|
||||
/*mode*/ undefined,
|
||||
/*deferWatchingNonRelativeResolution*/ false,
|
||||
);
|
||||
expected.resolvedLibraries.set(libFileName, expectedResolution);
|
||||
});
|
||||
|
||||
expected.finishCachingPerDirectoryResolution(actualProgram, /*oldProgram*/ undefined);
|
||||
|
||||
// Verify ref count
|
||||
resolutionToRefs.forEach((info, resolution) => {
|
||||
ts.Debug.assert(
|
||||
resolution.refCount === info.length,
|
||||
`${projectName}:: Expected Resolution ref count ${info.length} but got ${resolution.refCount}`,
|
||||
() =>
|
||||
`Expected from:: ${JSON.stringify(info, undefined, " ")}` +
|
||||
`Actual from: ${resolution.refCount}`,
|
||||
);
|
||||
ts.Debug.assert(
|
||||
resolutionToExpected.get(resolution)!.refCount === resolution.refCount,
|
||||
`${projectName}:: Expected Resolution ref count ${resolutionToExpected.get(resolution)!.refCount} but got ${resolution.refCount}`,
|
||||
);
|
||||
verifySet(resolutionToExpected.get(resolution)!.files, resolution.files, `Resolution files`);
|
||||
});
|
||||
verifyMapOfResolutionSet(expected.resolvedFileToResolution, actual.resolvedFileToResolution, `resolvedFileToResolution`);
|
||||
verifyResolutionSet(expected.resolutionsWithFailedLookups, actual.resolutionsWithFailedLookups, `resolutionsWithFailedLookups`);
|
||||
verifyResolutionSet(expected.resolutionsWithOnlyAffectingLocations, actual.resolutionsWithOnlyAffectingLocations, `resolutionsWithOnlyAffectingLocations`);
|
||||
verifyDirectoryWatchesOfFailedLookups(expected.directoryWatchesOfFailedLookups, actual.directoryWatchesOfFailedLookups);
|
||||
verifyFileWatchesOfAffectingLocations(expected.fileWatchesOfAffectingLocations, actual.fileWatchesOfAffectingLocations);
|
||||
|
||||
// Stop watching resolutions to verify everything gets closed.
|
||||
actual.resolvedModuleNames.forEach((_resolutions, path) => expected.removeResolutionsOfFile(path));
|
||||
actual.resolvedTypeReferenceDirectives.forEach((_resolutions, path) => expected.removeResolutionsOfFile(path));
|
||||
expected.finishCachingPerDirectoryResolution(/*newProgram*/ undefined, actualProgram);
|
||||
|
||||
resolutionToExpected.forEach(expected => {
|
||||
ts.Debug.assert(!expected.refCount, `${projectName}:: All the resolution should be released`);
|
||||
ts.Debug.assert(!expected.files?.size, `${projectName}:: Shouldnt ref to any files`);
|
||||
});
|
||||
ts.Debug.assert(expected.resolvedFileToResolution.size === 0, `${projectName}:: resolvedFileToResolution should be released`);
|
||||
ts.Debug.assert(expected.resolutionsWithFailedLookups.size === 0, `${projectName}:: resolutionsWithFailedLookups should be released`);
|
||||
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`);
|
||||
|
||||
function collectResolutionToRefFromCache<T extends ts.ResolutionWithFailedLookupLocations>(
|
||||
cacheType: string,
|
||||
fileName: ts.Path,
|
||||
cache: ts.ModeAwareCache<T> | undefined,
|
||||
getResolvedFileName: (resolution: T) => string | undefined,
|
||||
deferWatchingNonRelativeResolution: boolean,
|
||||
storeExpcted: Map<ts.Path, ts.ModeAwareCache<ts.ResolutionWithFailedLookupLocations>>,
|
||||
) {
|
||||
ts.Debug.assert(
|
||||
actualProgram.getSourceFileByPath(fileName) || ts.endsWith(fileName, ts.inferredTypesContainingFile),
|
||||
`${projectName}:: ${cacheType} ${fileName} Expect cache for file in program or auto type ref`,
|
||||
);
|
||||
let expectedCache: ts.ModeAwareCache<ts.ResolutionWithFailedLookupLocations> | undefined;
|
||||
cache?.forEach((resolved, name, mode) => {
|
||||
const resolvedFileName = getResolvedFileName(resolved);
|
||||
const expected = collectResolution(cacheType, fileName, resolved, resolvedFileName, name, mode, deferWatchingNonRelativeResolution);
|
||||
if (!expectedCache) storeExpcted.set(fileName, expectedCache = ts.createModeAwareCache());
|
||||
expectedCache.set(name, mode, expected);
|
||||
});
|
||||
}
|
||||
|
||||
function collectResolution<T extends ts.ResolutionWithFailedLookupLocations>(
|
||||
cacheType: string,
|
||||
fileName: ts.Path,
|
||||
resolved: T,
|
||||
resolvedFileName: string | undefined,
|
||||
name: string,
|
||||
mode: ts.ResolutionMode,
|
||||
deferWatchingNonRelativeResolution: boolean,
|
||||
): ExpectedResolution {
|
||||
const existing = resolutionToRefs.get(resolved);
|
||||
let expectedResolution: ExpectedResolution;
|
||||
if (existing) {
|
||||
existing.push({ cacheType, fileName, name, mode });
|
||||
expectedResolution = resolutionToExpected.get(resolved)!;
|
||||
}
|
||||
else {
|
||||
resolutionToRefs.set(resolved, [{ cacheType, fileName, name, mode }]);
|
||||
expectedResolution = {
|
||||
resolvedModule: (resolved as any).resolvedModule,
|
||||
resolvedTypeReferenceDirective: (resolved as any).resolvedTypeReferenceDirective,
|
||||
failedLookupLocations: resolved.failedLookupLocations,
|
||||
affectingLocations: resolved.affectingLocations,
|
||||
node10Result: resolved.node10Result,
|
||||
};
|
||||
expectedToResolution.set(expectedResolution, resolved);
|
||||
resolutionToExpected.set(resolved, expectedResolution);
|
||||
}
|
||||
expected.watchFailedLookupLocationsOfExternalModuleResolutions(name, expectedResolution, fileName, () => ({ resolvedFileName }), deferWatchingNonRelativeResolution);
|
||||
return expectedResolution;
|
||||
}
|
||||
|
||||
function verifyMap<Expected, Actual>(
|
||||
expected: Map<string, Expected> | undefined,
|
||||
actual: Map<string, Actual> | undefined,
|
||||
verifyValue: (expected: Expected | undefined, actual: Actual | undefined, key: string) => void,
|
||||
caption: string,
|
||||
) {
|
||||
expected?.forEach((expected, path) => verifyValue(expected, actual?.get(path), `${caption}:: ${path}`));
|
||||
actual?.forEach((actual, path) => verifyValue(expected?.get(path), actual, `${caption}:: ${path}`));
|
||||
}
|
||||
|
||||
function verifySet(
|
||||
expected: Set<string> | undefined,
|
||||
actual: Set<string> | undefined,
|
||||
caption: string,
|
||||
) {
|
||||
expected?.forEach(expected =>
|
||||
ts.Debug.assert(
|
||||
actual?.has(expected),
|
||||
`${projectName}:: ${caption}:: Expected should be present in actual`,
|
||||
)
|
||||
);
|
||||
actual?.forEach(actual =>
|
||||
ts.Debug.assert(
|
||||
expected?.has(actual),
|
||||
`${projectName}:: ${caption}:: Actual should be present in expected`,
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
function verifyMapOfResolutionSet(
|
||||
expected: Map<ts.Path, Set<ts.ResolutionWithFailedLookupLocations>> | undefined,
|
||||
actual: Map<ts.Path, Set<ts.ResolutionWithFailedLookupLocations>> | undefined,
|
||||
caption: string,
|
||||
) {
|
||||
verifyMap(expected, actual, verifyResolutionSet, caption);
|
||||
}
|
||||
|
||||
function verifyResolutionSet(
|
||||
expected: Set<ts.ResolutionWithFailedLookupLocations> | undefined,
|
||||
actual: Set<ts.ResolutionWithFailedLookupLocations> | undefined,
|
||||
caption: string,
|
||||
) {
|
||||
expected?.forEach(resolution =>
|
||||
ts.Debug.assert(
|
||||
actual?.has(expectedToResolution.get(resolution as ExpectedResolution)!),
|
||||
`${projectName}:: ${caption}:: Expected resolution should be present in actual resolutions`,
|
||||
)
|
||||
);
|
||||
actual?.forEach(resolution =>
|
||||
ts.Debug.assert(
|
||||
expected?.has(resolutionToExpected.get(resolution)!),
|
||||
`${projectName}:: ${caption}:: Actual resolution should be present in expected resolutions`,
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
function verifyDirectoryWatchesOfFailedLookups(expected: Map<string, ts.DirectoryWatchesOfFailedLookup>, actual: Map<string, ts.DirectoryWatchesOfFailedLookup>) {
|
||||
verifyMap(expected, actual, (expected, actual, caption) => {
|
||||
ts.Debug.assert(expected?.refCount === actual?.refCount, `${projectName}:: ${caption}:: refCount`);
|
||||
ts.Debug.assert(!!expected?.refCount, `${projectName}:: ${caption}:: expected refCount to be non zero`);
|
||||
ts.Debug.assert(expected?.nonRecursive === actual?.nonRecursive, `${projectName}:: ${caption}:: nonRecursive`);
|
||||
}, "directoryWatchesOfFailedLookups");
|
||||
}
|
||||
|
||||
function verifyFileWatchesOfAffectingLocations(
|
||||
expected: Map<string, ts.FileWatcherOfAffectingLocation>,
|
||||
actual: Map<string, ts.FileWatcherOfAffectingLocation>,
|
||||
) {
|
||||
verifyMap(expected, actual, verifyFileWatcherOfAffectingLocation, "fileWatchesOfAffectingLocations");
|
||||
}
|
||||
|
||||
function verifyFileWatcherOfAffectingLocation(
|
||||
expected: ts.FileWatcherOfAffectingLocation | undefined,
|
||||
actual: ts.FileWatcherOfAffectingLocation | undefined,
|
||||
caption: string,
|
||||
) {
|
||||
ts.Debug.assert(expected?.resolutions === actual?.resolutions, `${projectName}:: ${caption}:: resolutions`);
|
||||
ts.Debug.assert(expected?.files === actual?.files, `${projectName}:: ${caption}:: files`);
|
||||
verifySet(expected?.symlinks, actual?.symlinks, `${projectName}:: ${caption}:: symlinks`);
|
||||
}
|
||||
}
|
||||
|
||||
function verifyProgram(service: ts.server.ProjectService, project: ts.server.Project) {
|
||||
if (service.serverMode === ts.LanguageServiceMode.Syntactic) return;
|
||||
const options = project.getCompilerOptions();
|
||||
const compilerHost = ts.createCompilerHostWorker(options, /*setParentNodes*/ undefined, service.host);
|
||||
compilerHost.useSourceOfProjectReferenceRedirect = project.useSourceOfProjectReferenceRedirect?.bind(project);
|
||||
compilerHost.getCurrentDirectory = project.getCurrentDirectory.bind(project);
|
||||
const getDefaultLibLocation = compilerHost.getDefaultLibLocation!;
|
||||
compilerHost.getDefaultLibLocation = () => ts.getNormalizedAbsolutePath(getDefaultLibLocation(), service.host.getCurrentDirectory());
|
||||
compilerHost.getDefaultLibFileName = options => ts.combinePaths(compilerHost.getDefaultLibLocation!(), ts.getDefaultLibFileName(options));
|
||||
const readFile = compilerHost.readFile;
|
||||
compilerHost.readFile = fileName => {
|
||||
const path = project.toPath(fileName);
|
||||
const info = project.projectService.filenameToScriptInfo.get(path);
|
||||
if (info?.isDynamicOrHasMixedContent() || project.fileIsOpen(path)) {
|
||||
return ts.getSnapshotText(info!.getSnapshot());
|
||||
}
|
||||
if (!ts.isAnySupportedFileExtension(path)) {
|
||||
// Some external file
|
||||
const snapshot = project.getScriptSnapshot(path);
|
||||
return snapshot ? ts.getSnapshotText(snapshot) : undefined;
|
||||
}
|
||||
// Read only rooted disk paths from host similar to ProjectService
|
||||
if (!ts.isRootedDiskPath(fileName) || !compilerHost.fileExists(fileName)) return undefined;
|
||||
if (ts.hasTSFileExtension(fileName)) return readFile(fileName);
|
||||
let text: string | undefined | false;
|
||||
let fileSize: number;
|
||||
if (service.host.getFileSize) fileSize = service.host.getFileSize(fileName);
|
||||
else {
|
||||
text = readFile(fileName);
|
||||
fileSize = text?.length || 0;
|
||||
text = text !== undefined ? text : false;
|
||||
}
|
||||
// Large js files like project service
|
||||
if (fileSize > ts.server.maxFileSize) return "";
|
||||
return text !== undefined ? text || undefined : readFile(fileName);
|
||||
};
|
||||
const resolutionHostCacheHost: ts.ResolutionCacheHost = {
|
||||
...compilerHost,
|
||||
|
||||
getCompilerHost: () => compilerHost,
|
||||
toPath: project.toPath.bind(project),
|
||||
getCompilationSettings: project.getCompilationSettings.bind(project),
|
||||
projectName: project.projectName,
|
||||
getGlobalCache: project.getGlobalCache.bind(project),
|
||||
globalCacheResolutionModuleName: project.globalCacheResolutionModuleName.bind(project),
|
||||
fileIsOpen: project.fileIsOpen.bind(project),
|
||||
getCurrentProgram: () => project.getCurrentProgram(),
|
||||
|
||||
watchDirectoryOfFailedLookupLocation: ts.returnNoopFileWatcher,
|
||||
watchAffectingFileLocation: ts.returnNoopFileWatcher,
|
||||
onInvalidatedResolution: ts.noop,
|
||||
watchTypeRootsDirectory: ts.returnNoopFileWatcher,
|
||||
onChangedAutomaticTypeDirectiveNames: ts.noop,
|
||||
scheduleInvalidateResolutionsOfFailedLookupLocations: ts.noop,
|
||||
getCachedDirectoryStructureHost: ts.returnUndefined,
|
||||
writeLog: ts.noop,
|
||||
};
|
||||
const moduleResolutionCache = ts.createModuleResolutionCache(compilerHost.getCurrentDirectory(), compilerHost.getCanonicalFileName, project.getCompilerOptions());
|
||||
compilerHost.resolveModuleNameLiterals = (moduleNames, containingFile, redirectedReference, options, containingSourceFile) =>
|
||||
ts.loadWithModeAwareCache(
|
||||
moduleNames,
|
||||
containingFile,
|
||||
redirectedReference,
|
||||
options,
|
||||
containingSourceFile,
|
||||
compilerHost,
|
||||
moduleResolutionCache,
|
||||
(containingFile, redirectedReference, options) =>
|
||||
ts.createModuleResolutionLoaderUsingGlobalCache(
|
||||
containingFile,
|
||||
redirectedReference,
|
||||
options,
|
||||
resolutionHostCacheHost,
|
||||
moduleResolutionCache,
|
||||
),
|
||||
);
|
||||
verifyProgramStructure(
|
||||
ts.createProgram({
|
||||
rootNames: project.getScriptFileNames(),
|
||||
options: project.getCompilationSettings(),
|
||||
projectReferences: project.getProjectReferences(),
|
||||
host: compilerHost,
|
||||
}),
|
||||
project.getCurrentProgram()!,
|
||||
project.projectName,
|
||||
);
|
||||
verifyResolutionCache(project.resolutionCache, project.getCurrentProgram()!, resolutionHostCacheHost, project.projectName);
|
||||
}
|
||||
|
||||
export interface IncrementalVerifierCallbacks {
|
||||
beforeVerification?(): any;
|
||||
afterVerification?(dataFromBefore: any): void;
|
||||
}
|
||||
|
||||
export function incrementalVerifier(service: ts.server.ProjectService) {
|
||||
service.verifyDocumentRegistry = () => verifyDocumentRegistry(service);
|
||||
service.verifyDocumentRegistry = withIncrementalVerifierCallbacks(service, verifyDocumentRegistry);
|
||||
service.verifyProgram = withIncrementalVerifierCallbacks(service, verifyProgram);
|
||||
}
|
||||
|
||||
function withIncrementalVerifierCallbacks(
|
||||
service: ts.server.ProjectService,
|
||||
callback: (service: ts.server.ProjectService, ...args: any[]) => void,
|
||||
): (...args: any[]) => void {
|
||||
return (...args: any[]) => {
|
||||
const data = (service.host as IncrementalVerifierCallbacks).beforeVerification?.();
|
||||
callback(service, ...args);
|
||||
(service.host as IncrementalVerifierCallbacks).afterVerification?.(data);
|
||||
};
|
||||
}
|
||||
|
||||
@ -999,6 +999,7 @@ export class ProjectService {
|
||||
private currentPluginEnablementPromise?: Promise<void>;
|
||||
|
||||
/** @internal */ verifyDocumentRegistry = noop;
|
||||
/** @internal */ verifyProgram: (project: Project) => void = noop;
|
||||
|
||||
readonly jsDocParsingMode: JSDocParsingMode | undefined;
|
||||
|
||||
|
||||
@ -539,7 +539,6 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo
|
||||
// If files are listed explicitly or allowJs is specified, allow all extensions
|
||||
this.compilerOptions.allowNonTsExtensions = true;
|
||||
}
|
||||
|
||||
switch (projectService.serverMode) {
|
||||
case LanguageServiceMode.Semantic:
|
||||
this.languageServiceEnabled = true;
|
||||
@ -1541,13 +1540,13 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo
|
||||
if (!newFile || (f.resolvedPath === f.path && newFile.resolvedPath !== f.path)) {
|
||||
// new program does not contain this file - detach it from the project
|
||||
// - remove resolutions only if the new program doesnt contain source file by the path (not resolvedPath since path is used for resolution)
|
||||
this.detachScriptInfoFromProject(f.fileName, !!this.program.getSourceFileByPath(f.path));
|
||||
this.detachScriptInfoFromProject(f.fileName, !!this.program.getSourceFileByPath(f.path), /*syncDirWatcherRemove*/ true);
|
||||
}
|
||||
}
|
||||
|
||||
oldProgram.forEachResolvedProjectReference(resolvedProjectReference => {
|
||||
if (!this.program!.getResolvedProjectReferenceByPath(resolvedProjectReference.sourceFile.path)) {
|
||||
this.detachScriptInfoFromProject(resolvedProjectReference.sourceFile.fileName);
|
||||
this.detachScriptInfoFromProject(resolvedProjectReference.sourceFile.fileName, /*noRemoveResolution*/ undefined, /*syncDirWatcherRemove*/ true);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -1603,6 +1602,7 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo
|
||||
}
|
||||
}
|
||||
|
||||
this.projectService.verifyProgram(this);
|
||||
if (this.exportMapCache && !this.exportMapCache.isEmpty()) {
|
||||
this.exportMapCache.releaseSymbols();
|
||||
if (this.hasAddedorRemovedFiles || oldProgram && !this.program!.structureIsReused) {
|
||||
@ -1671,12 +1671,12 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo
|
||||
this.projectService.sendPerformanceEvent(kind, durationMs);
|
||||
}
|
||||
|
||||
private detachScriptInfoFromProject(uncheckedFileName: string, noRemoveResolution?: boolean) {
|
||||
private detachScriptInfoFromProject(uncheckedFileName: string, noRemoveResolution?: boolean, syncDirWatcherRemove?: boolean) {
|
||||
const scriptInfoToDetach = this.projectService.getScriptInfo(uncheckedFileName);
|
||||
if (scriptInfoToDetach) {
|
||||
scriptInfoToDetach.detachFromProject(this);
|
||||
if (!noRemoveResolution) {
|
||||
this.resolutionCache.removeResolutionsOfFile(scriptInfoToDetach.path);
|
||||
this.resolutionCache.removeResolutionsOfFile(scriptInfoToDetach.path, syncDirWatcherRemove);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2516,16 +2516,17 @@ export class AutoImportProviderProject extends Project {
|
||||
);
|
||||
if (entrypoints) {
|
||||
const real = host.realpath?.(packageJson.packageDirectory);
|
||||
const isSymlink = real && real !== packageJson.packageDirectory;
|
||||
const realPath = real ? hostProject.toPath(real) : undefined;
|
||||
const isSymlink = realPath && realPath !== hostProject.toPath(packageJson.packageDirectory);
|
||||
if (isSymlink) {
|
||||
symlinkCache.setSymlinkedDirectory(packageJson.packageDirectory, {
|
||||
real,
|
||||
realPath: hostProject.toPath(real),
|
||||
real: real!,
|
||||
realPath,
|
||||
});
|
||||
}
|
||||
|
||||
return mapDefined(entrypoints, entrypoint => {
|
||||
const resolvedFileName = isSymlink ? entrypoint.replace(packageJson.packageDirectory, real) : entrypoint;
|
||||
const resolvedFileName = isSymlink ? entrypoint.replace(packageJson.packageDirectory, real!) : entrypoint;
|
||||
if (!program.getSourceFile(resolvedFileName) && !(isSymlink && program.getSourceFile(entrypoint))) {
|
||||
return resolvedFileName;
|
||||
}
|
||||
|
||||
@ -45,12 +45,10 @@ export function commandLineCallbacks(
|
||||
};
|
||||
}
|
||||
|
||||
export function baselinePrograms(baseline: string[], getPrograms: () => readonly CommandLineProgram[], oldPrograms: readonly (CommandLineProgram | undefined)[], baselineDependencies: boolean | undefined) {
|
||||
const programs = getPrograms();
|
||||
export function baselinePrograms(baseline: string[], programs: readonly CommandLineProgram[], oldPrograms: readonly (CommandLineProgram | undefined)[], baselineDependencies: boolean | undefined) {
|
||||
for (let i = 0; i < programs.length; i++) {
|
||||
baselineProgram(baseline, programs[i], oldPrograms[i], baselineDependencies);
|
||||
}
|
||||
return programs;
|
||||
}
|
||||
|
||||
function baselineProgram(baseline: string[], [program, builderProgram]: CommandLineProgram, oldProgram: CommandLineProgram | undefined, baselineDependencies: boolean | undefined) {
|
||||
|
||||
@ -156,10 +156,11 @@ export function testTscCompile(input: TestTscCompile) {
|
||||
|
||||
function additionalBaseline(sys: TscCompileSystem) {
|
||||
const { baselineSourceMap, baselineReadFileCalls, baselinePrograms: shouldBaselinePrograms, baselineDependencies } = input;
|
||||
if (input.computeDtsSignatures) storeDtsSignatures(sys, getPrograms!());
|
||||
const programs = getPrograms!();
|
||||
if (input.computeDtsSignatures) storeDtsSignatures(sys, programs);
|
||||
if (shouldBaselinePrograms) {
|
||||
const baseline: string[] = [];
|
||||
baselinePrograms(baseline, getPrograms!, ts.emptyArray, baselineDependencies);
|
||||
baselinePrograms(baseline, programs, ts.emptyArray, baselineDependencies);
|
||||
sys.write(baseline.join("\n"));
|
||||
}
|
||||
if (baselineReadFileCalls) {
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
import {
|
||||
verifyProgramStructure,
|
||||
verifyResolutionCache,
|
||||
} from "../../../harness/incrementalUtils";
|
||||
import {
|
||||
patchHostForBuildInfoReadWrite,
|
||||
} from "../../_namespaces/fakes";
|
||||
@ -38,6 +42,9 @@ export interface TscWatchCompileChange<T extends ts.BuilderProgram = ts.EmitAndS
|
||||
programs: readonly CommandLineProgram[],
|
||||
watchOrSolution: WatchOrSolution<T>,
|
||||
) => void;
|
||||
// TODO:: sheetal: Needing these fields are technically issues that need to be fixed later
|
||||
symlinksNotReflected?: readonly string[];
|
||||
skipStructureCheck?: true;
|
||||
}
|
||||
export interface TscWatchCheckOptions {
|
||||
baselineSourceMap?: boolean;
|
||||
@ -214,6 +221,7 @@ export interface RunWatchBaseline<T extends ts.BuilderProgram> extends BaselineB
|
||||
sys: TscWatchSystem;
|
||||
getPrograms: () => readonly CommandLineProgram[];
|
||||
watchOrSolution: WatchOrSolution<T>;
|
||||
useSourceOfProjectReferenceRedirect?: () => boolean;
|
||||
}
|
||||
export function runWatchBaseline<T extends ts.BuilderProgram = ts.EmitAndSemanticDiagnosticsBuilderProgram>({
|
||||
scenario,
|
||||
@ -227,6 +235,7 @@ export function runWatchBaseline<T extends ts.BuilderProgram = ts.EmitAndSemanti
|
||||
baselineDependencies,
|
||||
edits,
|
||||
watchOrSolution,
|
||||
useSourceOfProjectReferenceRedirect,
|
||||
}: RunWatchBaseline<T>) {
|
||||
baseline.push(`${sys.getExecutingFilePath()} ${commandLineArgs.join(" ")}`);
|
||||
let programs = watchBaseline({
|
||||
@ -240,7 +249,7 @@ export function runWatchBaseline<T extends ts.BuilderProgram = ts.EmitAndSemanti
|
||||
});
|
||||
|
||||
if (edits) {
|
||||
for (const { caption, edit, timeouts } of edits) {
|
||||
for (const { caption, edit, timeouts, symlinksNotReflected, skipStructureCheck } of edits) {
|
||||
oldSnap = applyEdit(sys, baseline, edit, caption);
|
||||
timeouts(sys, programs, watchOrSolution);
|
||||
programs = watchBaseline({
|
||||
@ -251,6 +260,10 @@ export function runWatchBaseline<T extends ts.BuilderProgram = ts.EmitAndSemanti
|
||||
oldSnap,
|
||||
baselineSourceMap,
|
||||
baselineDependencies,
|
||||
caption,
|
||||
resolutionCache: !skipStructureCheck ? (watchOrSolution as ts.WatchOfConfigFile<T> | undefined)?.getResolutionCache?.() : undefined,
|
||||
useSourceOfProjectReferenceRedirect,
|
||||
symlinksNotReflected,
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -268,20 +281,94 @@ export function isWatch(commandLineArgs: readonly string[]) {
|
||||
export interface WatchBaseline extends BaselineBase, TscWatchCheckOptions {
|
||||
oldPrograms: readonly (CommandLineProgram | undefined)[];
|
||||
getPrograms: () => readonly CommandLineProgram[];
|
||||
caption?: string;
|
||||
resolutionCache?: ts.ResolutionCache;
|
||||
useSourceOfProjectReferenceRedirect?: () => boolean;
|
||||
symlinksNotReflected?: readonly string[];
|
||||
}
|
||||
export function watchBaseline({ baseline, getPrograms, oldPrograms, sys, oldSnap, baselineSourceMap, baselineDependencies }: WatchBaseline) {
|
||||
export function watchBaseline({
|
||||
baseline,
|
||||
getPrograms,
|
||||
oldPrograms,
|
||||
sys,
|
||||
oldSnap,
|
||||
baselineSourceMap,
|
||||
baselineDependencies,
|
||||
caption,
|
||||
resolutionCache,
|
||||
useSourceOfProjectReferenceRedirect,
|
||||
symlinksNotReflected,
|
||||
}: WatchBaseline) {
|
||||
if (baselineSourceMap) generateSourceMapBaselineFiles(sys);
|
||||
sys.serializeOutput(baseline);
|
||||
const programs = baselinePrograms(baseline, getPrograms, oldPrograms, baselineDependencies);
|
||||
const programs = getPrograms();
|
||||
baselinePrograms(baseline, programs, oldPrograms, baselineDependencies);
|
||||
sys.serializeWatches(baseline);
|
||||
baseline.push(`exitCode:: ExitStatus.${ts.ExitStatus[sys.exitCode as ts.ExitStatus]}`, "");
|
||||
sys.diff(baseline, oldSnap);
|
||||
sys.writtenFiles.forEach((value, key) => {
|
||||
assert.equal(value, 1, `Expected to write file ${key} only once`);
|
||||
});
|
||||
// Verify program structure and resolution cache when incremental edit with tsc --watch (without build mode)
|
||||
if (resolutionCache && programs.length) {
|
||||
ts.Debug.assert(programs.length === 1);
|
||||
verifyProgramStructureAndResolutionCache(caption!, sys, programs[0][0], resolutionCache, useSourceOfProjectReferenceRedirect, symlinksNotReflected);
|
||||
}
|
||||
sys.writtenFiles.clear();
|
||||
return programs;
|
||||
}
|
||||
function verifyProgramStructureAndResolutionCache(
|
||||
caption: string,
|
||||
sys: TscWatchSystem,
|
||||
program: ts.Program,
|
||||
resolutionCache: ts.ResolutionCache,
|
||||
useSourceOfProjectReferenceRedirect?: () => boolean,
|
||||
symlinksNotReflected?: readonly string[],
|
||||
) {
|
||||
const options = program.getCompilerOptions();
|
||||
const compilerHost = ts.createCompilerHostWorker(options, /*setParentNodes*/ undefined, sys);
|
||||
compilerHost.trace = ts.noop;
|
||||
compilerHost.writeFile = ts.notImplemented;
|
||||
compilerHost.useSourceOfProjectReferenceRedirect = useSourceOfProjectReferenceRedirect;
|
||||
const readFile = compilerHost.readFile;
|
||||
compilerHost.readFile = fileName => {
|
||||
const text = readFile.call(compilerHost, fileName);
|
||||
if (!ts.contains(symlinksNotReflected, fileName)) return text;
|
||||
// Handle symlinks that dont reflect the watch change
|
||||
ts.Debug.assert(sys.toPath(sys.realpath(fileName)) !== sys.toPath(fileName));
|
||||
const file = program.getSourceFile(fileName)!;
|
||||
ts.Debug.assert(file.text !== text);
|
||||
return file.text;
|
||||
};
|
||||
verifyProgramStructure(
|
||||
ts.createProgram({
|
||||
rootNames: program.getRootFileNames(),
|
||||
options,
|
||||
projectReferences: program.getProjectReferences(),
|
||||
host: compilerHost,
|
||||
}),
|
||||
program,
|
||||
caption,
|
||||
);
|
||||
verifyResolutionCache(resolutionCache, program, {
|
||||
...compilerHost,
|
||||
|
||||
getCompilerHost: () => compilerHost,
|
||||
toPath: fileName => sys.toPath(fileName),
|
||||
getCompilationSettings: () => options,
|
||||
fileIsOpen: ts.returnFalse,
|
||||
getCurrentProgram: () => program,
|
||||
|
||||
watchDirectoryOfFailedLookupLocation: ts.returnNoopFileWatcher,
|
||||
watchAffectingFileLocation: ts.returnNoopFileWatcher,
|
||||
onInvalidatedResolution: ts.noop,
|
||||
watchTypeRootsDirectory: ts.returnNoopFileWatcher,
|
||||
onChangedAutomaticTypeDirectiveNames: ts.noop,
|
||||
scheduleInvalidateResolutionsOfFailedLookupLocations: ts.noop,
|
||||
getCachedDirectoryStructureHost: ts.returnUndefined,
|
||||
writeLog: ts.noop,
|
||||
}, caption);
|
||||
}
|
||||
export interface VerifyTscWatch extends TscWatchCompile {
|
||||
baselineIncremental?: boolean;
|
||||
}
|
||||
|
||||
@ -489,6 +489,7 @@ function patchHostTimeouts(
|
||||
export interface TestSessionOptions extends ts.server.SessionOptions {
|
||||
logger: Logger;
|
||||
allowNonBaseliningLogger?: boolean;
|
||||
disableAutomaticTypingAcquisition?: boolean;
|
||||
}
|
||||
|
||||
export type TestSessionRequest<T extends ts.server.protocol.Request> = Pick<T, "command" | "arguments">;
|
||||
@ -543,7 +544,7 @@ export class TestSession extends ts.server.Session {
|
||||
|
||||
export function createSession(host: TestServerHost, opts: Partial<TestSessionOptions> = {}) {
|
||||
const logger = opts.logger || createHasErrorMessageLogger();
|
||||
if (opts.typingsInstaller === undefined) {
|
||||
if (!opts.disableAutomaticTypingAcquisition && opts.typingsInstaller === undefined) {
|
||||
opts.typingsInstaller = new TestTypingsInstaller(host.getHostSpecificPath("/a/data/"), /*throttleLimit*/ 5, host, logger);
|
||||
}
|
||||
|
||||
@ -556,7 +557,6 @@ export function createSession(host: TestServerHost, opts: Partial<TestSessionOpt
|
||||
cancellationToken: ts.server.nullCancellationToken,
|
||||
useSingleInferredProject: false,
|
||||
useInferredProjectPerProjectRoot: false,
|
||||
typingsInstaller: undefined!, // TODO: GH#18217
|
||||
byteLength: Buffer.byteLength,
|
||||
hrtime: process.hrtime,
|
||||
logger,
|
||||
|
||||
@ -280,7 +280,7 @@ export class TestServerHost implements server.ServerHost, FormatDiagnosticsHost,
|
||||
private fs = new Map<Path, FSEntry>();
|
||||
private time = timeIncrements;
|
||||
getCanonicalFileName: (s: string) => string;
|
||||
private toPath: (f: string) => Path;
|
||||
toPath: (f: string) => Path;
|
||||
readonly timeoutCallbacks = new Callbacks(this, "Timeout");
|
||||
readonly immediateCallbacks = new Callbacks(this, "Immedidate");
|
||||
readonly screenClears: number[] = [];
|
||||
|
||||
@ -76,7 +76,7 @@ export function f22() { } // trailing`,
|
||||
sys.exit(exitStatus);
|
||||
sys.write(`exitCode:: ExitStatus.${ts.ExitStatus[sys.exitCode as ts.ExitStatus]}\n`);
|
||||
const baseline: string[] = [];
|
||||
baselinePrograms(baseline, getPrograms, ts.emptyArray, /*baselineDependencies*/ false);
|
||||
baselinePrograms(baseline, getPrograms(), ts.emptyArray, /*baselineDependencies*/ false);
|
||||
sys.write(baseline.join("\n"));
|
||||
fs.makeReadonly();
|
||||
sys.baseLine = () => {
|
||||
|
||||
@ -223,6 +223,7 @@ a;b;
|
||||
`,
|
||||
),
|
||||
timeouts: sys => sys.runQueuedTimeoutCallbacks(),
|
||||
symlinksNotReflected: [`/user/username/projects/myproject/link.ts`],
|
||||
},
|
||||
],
|
||||
});
|
||||
@ -277,6 +278,7 @@ a;b;
|
||||
`,
|
||||
),
|
||||
timeouts: sys => sys.runQueuedTimeoutCallbacks(),
|
||||
symlinksNotReflected: [`/user/username/projects/myproject/link/a.ts`],
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
@ -306,6 +306,10 @@ declare module "fs" {
|
||||
`,
|
||||
),
|
||||
timeouts: sys => sys.runQueuedTimeoutCallbacks(),
|
||||
// This is currently issue with ambient modules in same file not leading to resolution watching
|
||||
// In this case initially resolution is watched and will continued to be watched but
|
||||
// incremental check will determine that the resolution should not be watched as thats what would have happened if we had started tsc --watch at this state.
|
||||
skipStructureCheck: true,
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
@ -50,6 +50,7 @@ describe("unittests:: tsc-watch:: watchAPI:: with sourceOfProjectReferenceRedire
|
||||
oldSnap,
|
||||
getPrograms,
|
||||
watchOrSolution: watch,
|
||||
useSourceOfProjectReferenceRedirect: ts.returnTrue,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -591,6 +591,7 @@ describe("unittests:: tsc-watch:: watchAPI:: when getParsedCommandLine is implem
|
||||
},
|
||||
],
|
||||
watchOrSolution: watch,
|
||||
useSourceOfProjectReferenceRedirect: ts.returnTrue,
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
import {
|
||||
IncrementalVerifierCallbacks,
|
||||
} from "../../../harness/incrementalUtils";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import {
|
||||
baselineTsserverLogs,
|
||||
@ -19,44 +22,54 @@ import {
|
||||
} from "../helpers/virtualFileSystemWithWatch";
|
||||
|
||||
describe("unittests:: tsserver:: CachingFileSystemInformation:: tsserverProjectSystem CachingFileSystemInformation", () => {
|
||||
enum CalledMapsWithSingleArg {
|
||||
fileExists = "fileExists",
|
||||
directoryExists = "directoryExists",
|
||||
getDirectories = "getDirectories",
|
||||
readFile = "readFile",
|
||||
}
|
||||
enum CalledMapsWithFiveArgs {
|
||||
readDirectory = "readDirectory",
|
||||
}
|
||||
type CalledMapsWithSingleArg = "fileExists" | "directoryExists" | "getDirectories" | "readFile";
|
||||
type CalledMapsWithFiveArgs = "readDirectory";
|
||||
type CalledMaps = CalledMapsWithSingleArg | CalledMapsWithFiveArgs;
|
||||
type CalledWithFiveArgs = [readonly string[], readonly string[], readonly string[], number];
|
||||
function createLoggerTrackingHostCalls(host: TestServerHost) {
|
||||
const originals: Record<CalledMaps, any> = {} as any;
|
||||
const calledMaps: Record<CalledMapsWithSingleArg, ts.MultiMap<string, true>> & Record<CalledMapsWithFiveArgs, ts.MultiMap<string, CalledWithFiveArgs>> = {
|
||||
fileExists: setCallsTrackingWithSingleArgFn(CalledMapsWithSingleArg.fileExists),
|
||||
directoryExists: setCallsTrackingWithSingleArgFn(CalledMapsWithSingleArg.directoryExists),
|
||||
getDirectories: setCallsTrackingWithSingleArgFn(CalledMapsWithSingleArg.getDirectories),
|
||||
readFile: setCallsTrackingWithSingleArgFn(CalledMapsWithSingleArg.readFile),
|
||||
readDirectory: setCallsTrackingWithFiveArgFn(CalledMapsWithFiveArgs.readDirectory),
|
||||
fileExists: setCallsTrackingWithSingleArgFn("fileExists"),
|
||||
directoryExists: setCallsTrackingWithSingleArgFn("directoryExists"),
|
||||
getDirectories: setCallsTrackingWithSingleArgFn("getDirectories"),
|
||||
readFile: setCallsTrackingWithSingleArgFn("readFile"),
|
||||
readDirectory: setCallsTrackingWithFiveArgFn("readDirectory"),
|
||||
};
|
||||
|
||||
(host as IncrementalVerifierCallbacks).beforeVerification = storeAndSetToOriginal;
|
||||
(host as IncrementalVerifierCallbacks).afterVerification = revertCallbacks;
|
||||
|
||||
function storeAndSetToOriginal() {
|
||||
const current: Record<CalledMaps, any> = {} as any;
|
||||
forEachHostProperty(prop => {
|
||||
current[prop] = host[prop];
|
||||
host[prop] = originals[prop];
|
||||
});
|
||||
return current;
|
||||
}
|
||||
|
||||
function revertCallbacks(storage: Record<CalledMaps, any>) {
|
||||
forEachHostProperty(prop => host[prop] = storage[prop]);
|
||||
}
|
||||
|
||||
return logCacheAndClear;
|
||||
|
||||
function setCallsTrackingWithSingleArgFn(prop: CalledMapsWithSingleArg) {
|
||||
const calledMap = ts.createMultiMap<string, true>();
|
||||
const cb = (host as any)[prop].bind(host);
|
||||
originals[prop] = (host as any)[prop].bind(host);
|
||||
(host as any)[prop] = (f: string) => {
|
||||
calledMap.add(f, /*value*/ true);
|
||||
return cb(f);
|
||||
return originals[prop](f);
|
||||
};
|
||||
return calledMap;
|
||||
}
|
||||
|
||||
function setCallsTrackingWithFiveArgFn<U, V, W, X>(prop: CalledMapsWithFiveArgs) {
|
||||
const calledMap = ts.createMultiMap<string, [U, V, W, X]>();
|
||||
const cb = (host as any)[prop].bind(host);
|
||||
originals[prop] = (host as any)[prop].bind(host);
|
||||
(host as any)[prop] = (f: string, arg1?: U, arg2?: V, arg3?: W, arg4?: X) => {
|
||||
calledMap.add(f, [arg1!, arg2!, arg3!, arg4!]); // TODO: GH#18217
|
||||
return cb(f, arg1, arg2, arg3, arg4);
|
||||
return originals[prop](f, arg1, arg2, arg3, arg4);
|
||||
};
|
||||
return calledMap;
|
||||
}
|
||||
@ -68,11 +81,15 @@ describe("unittests:: tsserver:: CachingFileSystemInformation:: tsserverProjectS
|
||||
}
|
||||
|
||||
function logCacheAndClear(logger: Logger) {
|
||||
logCacheEntry(logger, CalledMapsWithSingleArg.fileExists);
|
||||
logCacheEntry(logger, CalledMapsWithSingleArg.directoryExists);
|
||||
logCacheEntry(logger, CalledMapsWithSingleArg.getDirectories);
|
||||
logCacheEntry(logger, CalledMapsWithSingleArg.readFile);
|
||||
logCacheEntry(logger, CalledMapsWithFiveArgs.readDirectory);
|
||||
forEachHostProperty(prop => logCacheEntry(logger, prop));
|
||||
}
|
||||
|
||||
function forEachHostProperty(callback: (prop: CalledMaps) => void) {
|
||||
callback("fileExists");
|
||||
callback("directoryExists");
|
||||
callback("getDirectories");
|
||||
callback("readFile");
|
||||
callback("readDirectory");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import {
|
||||
dedent,
|
||||
} from "../../_namespaces/Utils";
|
||||
import {
|
||||
commonFile1,
|
||||
} from "../helpers/tscWatch";
|
||||
@ -289,4 +292,41 @@ describe("unittests:: tsserver:: inferredProjects", () => {
|
||||
session.testhost.logTimeoutQueueLength();
|
||||
baselineTsserverLogs("inferredProjects", "Setting compiler options for inferred projects when there are no open files should not schedule any refresh", session);
|
||||
});
|
||||
|
||||
it("when existing inferred project has no root files", () => {
|
||||
const host = createServerHost({
|
||||
"/user/username/projects/myproject/app.ts": dedent`
|
||||
import {x} from "./module";
|
||||
`,
|
||||
// Removing resolutions of this happens after program gets created and we are removing not needed files
|
||||
"/user/username/projects/myproject/module.d.ts": dedent`
|
||||
import {y} from "./module2";
|
||||
import {a} from "module3";
|
||||
export const x = y;
|
||||
export const b = a;
|
||||
`,
|
||||
"/user/username/projects/myproject/module2.d.ts": dedent`
|
||||
export const y = 10;
|
||||
`,
|
||||
"/user/username/projects/myproject/node_modules/module3/package.json": JSON.stringify({
|
||||
name: "module3",
|
||||
version: "1.0.0",
|
||||
}),
|
||||
"/user/username/projects/myproject/node_modules/module3/index.d.ts": dedent`
|
||||
export const a = 10;
|
||||
`,
|
||||
[libFile.path]: libFile.content,
|
||||
});
|
||||
const session = createSession(host, { logger: createLoggerWithInMemoryLogs(host) });
|
||||
openFilesForSession([{
|
||||
file: "/user/username/projects/myproject/app.ts",
|
||||
projectRootPath: "/user/username/projects/myproject",
|
||||
}], session);
|
||||
closeFilesForSession(["/user/username/projects/myproject/app.ts"], session);
|
||||
openFilesForSession([{
|
||||
file: "/user/username/projects/myproject/module.d.ts",
|
||||
projectRootPath: "/user/username/projects/myproject",
|
||||
}], session);
|
||||
baselineTsserverLogs("inferredProjects", "when existing inferred project has no root files", session);
|
||||
});
|
||||
});
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import {
|
||||
dedent,
|
||||
} from "../../_namespaces/Utils";
|
||||
import {
|
||||
baselineTsserverLogs,
|
||||
closeFilesForSession,
|
||||
@ -59,4 +62,29 @@ describe("unittests:: tsserver:: maxNodeModuleJsDepth for inferred projects", ()
|
||||
session.logger.log(`maxNodeModuleJsDepth: ${session.getProjectService().inferredProjects[0].getCompilationSettings().maxNodeModuleJsDepth}`);
|
||||
baselineTsserverLogs("maxNodeModuleJsDepth", "should return to normal state when all js root files are removed from project", session);
|
||||
});
|
||||
|
||||
it("handles resolutions when currentNodeModulesDepth changes when referencing file from another file", () => {
|
||||
const host = createServerHost({
|
||||
"/user/username/projects/project1/src/file1.js": dedent`
|
||||
import {x} from 'glob';
|
||||
import {y} from 'minimatch'; // This imported file will add imports from minimatch to program
|
||||
`,
|
||||
"/user/username/projects/project1/src/node_modules/glob/index.js": dedent`
|
||||
import { y } from "minimatch"; // This import is will put minimatch at maxNodeModuleJsDepth so its imports are not added to program
|
||||
export const x = y;
|
||||
`,
|
||||
"/user/username/projects/project1/src/node_modules/minimatch/index.js": dedent`
|
||||
import { z } from "path"; // This will be resolved two times
|
||||
export const y = z;
|
||||
`,
|
||||
"/user/username/projects/project1/src/node_modules/path/index.js": dedent`
|
||||
export const z = 10;
|
||||
`,
|
||||
[libFile.path]: libFile.content,
|
||||
});
|
||||
const session = createSession(host, { useSingleInferredProject: true, logger: createLoggerWithInMemoryLogs(host) });
|
||||
|
||||
openFilesForSession(["/user/username/projects/project1/src/file1.js"], session);
|
||||
baselineTsserverLogs("maxNodeModuleJsDepth", "handles resolutions when currentNodeModulesDepth changes when referencing file from another file", session);
|
||||
});
|
||||
});
|
||||
|
||||
@ -1,6 +1,10 @@
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import {
|
||||
dedent,
|
||||
} from "../../_namespaces/Utils";
|
||||
import {
|
||||
baselineTsserverLogs,
|
||||
closeFilesForSession,
|
||||
createLoggerWithInMemoryLogs,
|
||||
createSession,
|
||||
openFilesForSession,
|
||||
@ -204,4 +208,62 @@ new C();`,
|
||||
verifyModuleResolution(/*withPathMapping*/ false);
|
||||
verifyModuleResolution(/*withPathMapping*/ true);
|
||||
});
|
||||
|
||||
it("when not symlink but differs in casing", () => {
|
||||
const host = createServerHost({
|
||||
"C:/temp/replay/axios-src/lib/core/AxiosHeaders.js": dedent`
|
||||
export const b = 10;
|
||||
|
||||
`,
|
||||
"C:/temp/replay/axios-src/lib/core/dispatchRequest.js": dedent`
|
||||
import { b } from "./AxiosHeaders.js";
|
||||
import { b2 } from "./settle.js";
|
||||
import { x } from "follow-redirects";
|
||||
export const y = 10;
|
||||
`,
|
||||
"C:/temp/replay/axios-src/lib/core/mergeConfig.js": dedent`
|
||||
import { b } from "./AxiosHeaders.js";
|
||||
export const y = 10;
|
||||
`,
|
||||
"C:/temp/replay/axios-src/lib/core/settle.js": dedent`
|
||||
export const b2 = 10;
|
||||
`,
|
||||
"C:/temp/replay/axios-src/package.json": JSON.stringify({
|
||||
name: "axios",
|
||||
version: "1.4.0",
|
||||
dependencies: { "follow-redirects": "^1.15.0" },
|
||||
}),
|
||||
"C:/temp/replay/axios-src/node_modules/follow-redirects/package.json": JSON.stringify({
|
||||
name: "follow-redirects",
|
||||
version: "1.15.0",
|
||||
}),
|
||||
"C:/temp/replay/axios-src/node_modules/follow-redirects/index.js": "export const x = 10;",
|
||||
}, { windowsStyleRoot: "C:/" });
|
||||
const session = createSession(host, { canUseEvents: true, logger: createLoggerWithInMemoryLogs(host), disableAutomaticTypingAcquisition: true });
|
||||
openFilesForSession(["c:/temp/replay/axios-src/lib/core/AxiosHeaders.js"], session); // Creates InferredProject1 and AutoImportProvider1
|
||||
session.executeCommandSeq<ts.server.protocol.UpdateOpenRequest>({ // Different content from disk
|
||||
command: ts.server.protocol.CommandTypes.UpdateOpen,
|
||||
arguments: {
|
||||
changedFiles: [{
|
||||
fileName: "c:/temp/replay/axios-src/lib/core/AxiosHeaders.js",
|
||||
textChanges: [{
|
||||
newText: "//comment",
|
||||
start: { line: 2, offset: 1 },
|
||||
end: { line: 2, offset: 1 },
|
||||
}],
|
||||
}],
|
||||
},
|
||||
});
|
||||
// This will create InferredProject2, but will not create AutoImportProvider as it includes follow-redirect import,
|
||||
// contains the file we will be opening after closing changed file
|
||||
// It will also close InferredProject1 and AutoImportProvider1
|
||||
openFilesForSession(["c:/temp/replay/axios-src/lib/core/dispatchRequest.js"], session);
|
||||
// This creates InferredProject3 and AutoImportProvider2
|
||||
openFilesForSession(["c:/temp/replay/axios-src/lib/core/mergeConfig.js"], session);
|
||||
// Closing this file will schedule update for InferredProject2, InferredProject3
|
||||
closeFilesForSession(["c:/temp/replay/axios-src/lib/core/AxiosHeaders.js"], session);
|
||||
// When we open this file, we will update InferredProject2 which contains this file and the follow-redirect will be resolved again
|
||||
openFilesForSession(["c:/temp/replay/axios-src/lib/core/settle.js"], session);
|
||||
baselineTsserverLogs("symLinks", "when not symlink but differs in casing", session);
|
||||
});
|
||||
});
|
||||
|
||||
@ -0,0 +1,368 @@
|
||||
currentDirectory:: / useCaseSensitiveFileNames: false
|
||||
Info seq [hh:mm:ss:mss] Provided types map file "/a/lib/typesMap.json" doesn't exist
|
||||
Before request
|
||||
//// [/user/username/projects/myproject/app.ts]
|
||||
import {x} from "./module";
|
||||
|
||||
|
||||
//// [/user/username/projects/myproject/module.d.ts]
|
||||
import {y} from "./module2";
|
||||
import {a} from "module3";
|
||||
export const x = y;
|
||||
export const b = a;
|
||||
|
||||
|
||||
//// [/user/username/projects/myproject/module2.d.ts]
|
||||
export const y = 10;
|
||||
|
||||
|
||||
//// [/user/username/projects/myproject/node_modules/module3/package.json]
|
||||
{"name":"module3","version":"1.0.0"}
|
||||
|
||||
//// [/user/username/projects/myproject/node_modules/module3/index.d.ts]
|
||||
export const a = 10;
|
||||
|
||||
|
||||
//// [/a/lib/lib.d.ts]
|
||||
/// <reference no-default-lib="true"/>
|
||||
interface Boolean {}
|
||||
interface Function {}
|
||||
interface CallableFunction {}
|
||||
interface NewableFunction {}
|
||||
interface IArguments {}
|
||||
interface Number { toExponential: any; }
|
||||
interface Object {}
|
||||
interface RegExp {}
|
||||
interface String { charAt: any; }
|
||||
interface Array<T> { length: number; [n: number]: T; }
|
||||
|
||||
|
||||
Info seq [hh:mm:ss:mss] request:
|
||||
{
|
||||
"command": "open",
|
||||
"arguments": {
|
||||
"file": "/user/username/projects/myproject/app.ts",
|
||||
"projectRootPath": "/user/username/projects/myproject"
|
||||
},
|
||||
"seq": 1,
|
||||
"type": "request"
|
||||
}
|
||||
Info seq [hh:mm:ss:mss] Search path: /user/username/projects/myproject
|
||||
Info seq [hh:mm:ss:mss] For info: /user/username/projects/myproject/app.ts :: No config files found.
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root
|
||||
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1*
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/module.d.ts 500 undefined WatchType: Closed Script info
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/module2.d.ts 500 undefined WatchType: Closed Script info
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/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: /user/username/projects/myproject/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: /a/lib/lib.d.ts 500 undefined WatchType: Closed Script info
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/module3/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms
|
||||
Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
|
||||
Info seq [hh:mm:ss:mss] Files (5)
|
||||
/a/lib/lib.d.ts Text-1 "/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }"
|
||||
/user/username/projects/myproject/module2.d.ts Text-1 "export const y = 10;\n"
|
||||
/user/username/projects/myproject/node_modules/module3/index.d.ts Text-1 "export const a = 10;\n"
|
||||
/user/username/projects/myproject/module.d.ts Text-1 "import {y} from \"./module2\";\nimport {a} from \"module3\";\nexport const x = y;\nexport const b = a;\n"
|
||||
/user/username/projects/myproject/app.ts SVC-1-0 "import {x} from \"./module\";\n"
|
||||
|
||||
|
||||
../../../../a/lib/lib.d.ts
|
||||
Default library for target 'es5'
|
||||
module2.d.ts
|
||||
Imported via "./module2" from file 'module.d.ts'
|
||||
node_modules/module3/index.d.ts
|
||||
Imported via "module3" from file 'module.d.ts' with packageId 'module3/index.d.ts@1.0.0'
|
||||
module.d.ts
|
||||
Imported via "./module" from file 'app.ts'
|
||||
app.ts
|
||||
Root file specified for compilation
|
||||
|
||||
Info seq [hh:mm:ss:mss] -----------------------------------------------
|
||||
Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
|
||||
Info seq [hh:mm:ss:mss] Files (5)
|
||||
|
||||
Info seq [hh:mm:ss:mss] -----------------------------------------------
|
||||
Info seq [hh:mm:ss:mss] Open files:
|
||||
Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/app.ts ProjectRootPath: /user/username/projects/myproject
|
||||
Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1*
|
||||
Info seq [hh:mm:ss:mss] response:
|
||||
{
|
||||
"responseRequired": false
|
||||
}
|
||||
After request
|
||||
|
||||
PolledWatches::
|
||||
/user/username/projects/myproject/jsconfig.json: *new*
|
||||
{"pollingInterval":2000}
|
||||
/user/username/projects/myproject/node_modules/@types: *new*
|
||||
{"pollingInterval":500}
|
||||
/user/username/projects/myproject/tsconfig.json: *new*
|
||||
{"pollingInterval":2000}
|
||||
/user/username/projects/node_modules/@types: *new*
|
||||
{"pollingInterval":500}
|
||||
|
||||
FsWatches::
|
||||
/a/lib/lib.d.ts: *new*
|
||||
{}
|
||||
/user/username/projects/myproject: *new*
|
||||
{}
|
||||
/user/username/projects/myproject/module.d.ts: *new*
|
||||
{}
|
||||
/user/username/projects/myproject/module2.d.ts: *new*
|
||||
{}
|
||||
/user/username/projects/myproject/node_modules/module3/package.json: *new*
|
||||
{}
|
||||
|
||||
FsWatchesRecursive::
|
||||
/user/username/projects/myproject/node_modules: *new*
|
||||
{}
|
||||
|
||||
Before request
|
||||
|
||||
Info seq [hh:mm:ss:mss] request:
|
||||
{
|
||||
"command": "close",
|
||||
"arguments": {
|
||||
"file": "/user/username/projects/myproject/app.ts"
|
||||
},
|
||||
"seq": 2,
|
||||
"type": "request"
|
||||
}
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/app.ts 500 undefined WatchType: Closed Script info
|
||||
Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
|
||||
Info seq [hh:mm:ss:mss] Files (5)
|
||||
|
||||
Info seq [hh:mm:ss:mss] -----------------------------------------------
|
||||
Info seq [hh:mm:ss:mss] Open files:
|
||||
Info seq [hh:mm:ss:mss] response:
|
||||
{
|
||||
"responseRequired": false
|
||||
}
|
||||
After request
|
||||
|
||||
PolledWatches::
|
||||
/user/username/projects/myproject/node_modules/@types:
|
||||
{"pollingInterval":500}
|
||||
/user/username/projects/node_modules/@types:
|
||||
{"pollingInterval":500}
|
||||
|
||||
PolledWatches *deleted*::
|
||||
/user/username/projects/myproject/jsconfig.json:
|
||||
{"pollingInterval":2000}
|
||||
/user/username/projects/myproject/tsconfig.json:
|
||||
{"pollingInterval":2000}
|
||||
|
||||
FsWatches::
|
||||
/a/lib/lib.d.ts:
|
||||
{}
|
||||
/user/username/projects/myproject:
|
||||
{}
|
||||
/user/username/projects/myproject/app.ts: *new*
|
||||
{}
|
||||
/user/username/projects/myproject/module.d.ts:
|
||||
{}
|
||||
/user/username/projects/myproject/module2.d.ts:
|
||||
{}
|
||||
/user/username/projects/myproject/node_modules/module3/package.json:
|
||||
{}
|
||||
|
||||
FsWatchesRecursive::
|
||||
/user/username/projects/myproject/node_modules:
|
||||
{}
|
||||
|
||||
Before request
|
||||
|
||||
Info seq [hh:mm:ss:mss] request:
|
||||
{
|
||||
"command": "open",
|
||||
"arguments": {
|
||||
"file": "/user/username/projects/myproject/module.d.ts",
|
||||
"projectRootPath": "/user/username/projects/myproject"
|
||||
},
|
||||
"seq": 3,
|
||||
"type": "request"
|
||||
}
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/module.d.ts 500 undefined WatchType: Closed Script info
|
||||
Info seq [hh:mm:ss:mss] Search path: /user/username/projects/myproject
|
||||
Info seq [hh:mm:ss:mss] For info: /user/username/projects/myproject/module.d.ts :: No config files found.
|
||||
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1*
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/module3/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
|
||||
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms
|
||||
Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
|
||||
Info seq [hh:mm:ss:mss] Files (0)
|
||||
|
||||
|
||||
|
||||
Info seq [hh:mm:ss:mss] -----------------------------------------------
|
||||
TI:: Creating typing installer
|
||||
|
||||
PolledWatches::
|
||||
/user/username/projects/myproject/node_modules/@types:
|
||||
{"pollingInterval":500}
|
||||
/user/username/projects/node_modules/@types:
|
||||
{"pollingInterval":500}
|
||||
|
||||
FsWatches::
|
||||
/a/lib/lib.d.ts:
|
||||
{}
|
||||
/user/username/projects/myproject/app.ts:
|
||||
{}
|
||||
/user/username/projects/myproject/module2.d.ts:
|
||||
{}
|
||||
|
||||
FsWatches *deleted*::
|
||||
/user/username/projects/myproject:
|
||||
{}
|
||||
/user/username/projects/myproject/module.d.ts:
|
||||
{}
|
||||
/user/username/projects/myproject/node_modules/module3/package.json:
|
||||
{}
|
||||
|
||||
FsWatchesRecursive::
|
||||
/user/username/projects/myproject/node_modules:
|
||||
{}
|
||||
|
||||
TI:: [hh:mm:ss:mss] Global cache location '/a/data/', safe file path '/safeList.json', types map path /typesMap.json
|
||||
TI:: [hh:mm:ss:mss] Processing cache location '/a/data/'
|
||||
TI:: [hh:mm:ss:mss] Trying to find '/a/data/package.json'...
|
||||
TI:: [hh:mm:ss:mss] Finished processing cache location '/a/data/'
|
||||
TI:: [hh:mm:ss:mss] Npm config file: /a/data/package.json
|
||||
TI:: [hh:mm:ss:mss] Npm config file: '/a/data/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] TI:: Updated types-registry npm package
|
||||
TI:: typing installer creation complete
|
||||
//// [/a/data/package.json]
|
||||
{ "private": true }
|
||||
|
||||
//// [/a/data/node_modules/types-registry/index.json]
|
||||
{
|
||||
"entries": {}
|
||||
}
|
||||
|
||||
|
||||
TI:: [hh:mm:ss:mss] Got install request {"projectName":"/dev/null/inferredProject1*","fileNames":[],"compilerOptions":{"target":1,"jsx":1,"allowNonTsExtensions":true,"allowJs":true,"noEmitForJsFiles":true},"typeAcquisition":{"enable":true,"include":[],"exclude":[]},"unresolvedImports":[],"projectRootPath":"/user/username/projects/myproject","cachePath":"/a/data/","kind":"discover"}
|
||||
TI:: [hh:mm:ss:mss] Request specifies cache path '/a/data/', loading cached information...
|
||||
TI:: [hh:mm:ss:mss] Processing cache location '/a/data/'
|
||||
TI:: [hh:mm:ss:mss] Cache location was already processed...
|
||||
TI:: [hh:mm:ss:mss] Failed to load safelist from types map file '/typesMap.json'
|
||||
TI:: [hh:mm:ss:mss] Explicitly included types: []
|
||||
TI:: [hh:mm:ss:mss] Searching for typing names in /user/username/projects/myproject/node_modules; all files: ["/user/username/projects/myproject/node_modules/module3/package.json"]
|
||||
TI:: [hh:mm:ss:mss] Found package names: ["module3"]
|
||||
TI:: [hh:mm:ss:mss] Inferred typings from unresolved imports: []
|
||||
TI:: [hh:mm:ss:mss] Result: {"cachedTypingPaths":[],"newTypingNames":["module3"],"filesToWatch":["/user/username/projects/myproject/bower_components","/user/username/projects/myproject/node_modules"]}
|
||||
TI:: [hh:mm:ss:mss] Finished typings discovery: {"cachedTypingPaths":[],"newTypingNames":["module3"],"filesToWatch":["/user/username/projects/myproject/bower_components","/user/username/projects/myproject/node_modules"]}
|
||||
TI:: [hh:mm:ss:mss] Sending response:
|
||||
{"kind":"action::watchTypingLocations","projectName":"/dev/null/inferredProject1*","files":["/user/username/projects/myproject/bower_components","/user/username/projects/myproject/node_modules"]}
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/bower_components 1 undefined Project: /dev/null/inferredProject1* WatchType: Directory location for typing installer
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/bower_components 1 undefined Project: /dev/null/inferredProject1* WatchType: Directory location for typing installer
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Directory location for typing installer
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Directory location for typing installer
|
||||
TI:: [hh:mm:ss:mss] Installing typings ["module3"]
|
||||
TI:: [hh:mm:ss:mss] 'module3':: Entry for package 'module3' does not exist in local types registry - skipping...
|
||||
TI:: [hh:mm:ss:mss] All typings are known to be missing or invalid - no need to install more typings
|
||||
TI:: [hh:mm:ss:mss] Sending response:
|
||||
{"projectName":"/dev/null/inferredProject1*","typeAcquisition":{"enable":true,"include":[],"exclude":[]},"compilerOptions":{"target":1,"jsx":1,"allowNonTsExtensions":true,"allowJs":true,"noEmitForJsFiles":true},"typings":[],"unresolvedImports":[],"kind":"action::set"}
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root
|
||||
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1*
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/module3/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution
|
||||
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 3 structureChanged: true structureIsReused:: Not Elapsed:: *ms
|
||||
Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
|
||||
Info seq [hh:mm:ss:mss] Files (4)
|
||||
/a/lib/lib.d.ts Text-1 "/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }"
|
||||
/user/username/projects/myproject/module2.d.ts Text-1 "export const y = 10;\n"
|
||||
/user/username/projects/myproject/node_modules/module3/index.d.ts Text-1 "export const a = 10;\n"
|
||||
/user/username/projects/myproject/module.d.ts Text-1 "import {y} from \"./module2\";\nimport {a} from \"module3\";\nexport const x = y;\nexport const b = a;\n"
|
||||
|
||||
|
||||
../../../../a/lib/lib.d.ts
|
||||
Default library for target 'es5'
|
||||
module2.d.ts
|
||||
Imported via "./module2" from file 'module.d.ts'
|
||||
node_modules/module3/index.d.ts
|
||||
Imported via "module3" from file 'module.d.ts' with packageId 'module3/index.d.ts@1.0.0'
|
||||
module.d.ts
|
||||
Root file specified for compilation
|
||||
|
||||
Info seq [hh:mm:ss:mss] -----------------------------------------------
|
||||
TI:: [hh:mm:ss:mss] Got install request {"projectName":"/dev/null/inferredProject1*","fileNames":["/a/lib/lib.d.ts","/user/username/projects/myproject/module2.d.ts","/user/username/projects/myproject/module.d.ts"],"compilerOptions":{"target":1,"jsx":1,"allowNonTsExtensions":true,"allowJs":true,"noEmitForJsFiles":true},"typeAcquisition":{"enable":true,"include":[],"exclude":[]},"unresolvedImports":[],"projectRootPath":"/user/username/projects/myproject","cachePath":"/a/data/","kind":"discover"}
|
||||
TI:: [hh:mm:ss:mss] Request specifies cache path '/a/data/', loading cached information...
|
||||
TI:: [hh:mm:ss:mss] Processing cache location '/a/data/'
|
||||
TI:: [hh:mm:ss:mss] Cache location was already processed...
|
||||
TI:: [hh:mm:ss:mss] Explicitly included types: []
|
||||
TI:: [hh:mm:ss:mss] Searching for typing names in /user/username/projects/myproject/node_modules; all files: ["/user/username/projects/myproject/node_modules/module3/package.json"]
|
||||
TI:: [hh:mm:ss:mss] Found package names: ["module3"]
|
||||
TI:: [hh:mm:ss:mss] Inferred typings from unresolved imports: []
|
||||
TI:: [hh:mm:ss:mss] Result: {"cachedTypingPaths":[],"newTypingNames":["module3"],"filesToWatch":["/user/username/projects/myproject/bower_components","/user/username/projects/myproject/node_modules"]}
|
||||
TI:: [hh:mm:ss:mss] Finished typings discovery: {"cachedTypingPaths":[],"newTypingNames":["module3"],"filesToWatch":["/user/username/projects/myproject/bower_components","/user/username/projects/myproject/node_modules"]}
|
||||
TI:: [hh:mm:ss:mss] Sending response:
|
||||
{"kind":"action::watchTypingLocations","projectName":"/dev/null/inferredProject1*"}
|
||||
TI:: [hh:mm:ss:mss] Installing typings ["module3"]
|
||||
TI:: [hh:mm:ss:mss] 'module3':: Entry for package 'module3' does not exist in local types registry - skipping...
|
||||
TI:: [hh:mm:ss:mss] All typings are known to be missing or invalid - no need to install more typings
|
||||
TI:: [hh:mm:ss:mss] Sending response:
|
||||
{"projectName":"/dev/null/inferredProject1*","typeAcquisition":{"enable":true,"include":[],"exclude":[]},"compilerOptions":{"target":1,"jsx":1,"allowNonTsExtensions":true,"allowJs":true,"noEmitForJsFiles":true},"typings":[],"unresolvedImports":[],"kind":"action::set"}
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/app.ts 500 undefined WatchType: Closed Script info
|
||||
Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
|
||||
Info seq [hh:mm:ss:mss] Files (4)
|
||||
|
||||
Info seq [hh:mm:ss:mss] -----------------------------------------------
|
||||
Info seq [hh:mm:ss:mss] Open files:
|
||||
Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/module.d.ts ProjectRootPath: /user/username/projects/myproject
|
||||
Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1*
|
||||
Info seq [hh:mm:ss:mss] response:
|
||||
{
|
||||
"responseRequired": false
|
||||
}
|
||||
After request
|
||||
|
||||
PolledWatches::
|
||||
/user/username/projects/myproject/bower_components: *new*
|
||||
{"pollingInterval":500}
|
||||
/user/username/projects/myproject/jsconfig.json: *new*
|
||||
{"pollingInterval":2000}
|
||||
/user/username/projects/myproject/node_modules/@types:
|
||||
{"pollingInterval":500}
|
||||
/user/username/projects/myproject/tsconfig.json: *new*
|
||||
{"pollingInterval":2000}
|
||||
/user/username/projects/node_modules/@types:
|
||||
{"pollingInterval":500}
|
||||
|
||||
FsWatches::
|
||||
/a/lib/lib.d.ts:
|
||||
{}
|
||||
/user/username/projects/myproject: *new*
|
||||
{}
|
||||
/user/username/projects/myproject/module2.d.ts:
|
||||
{}
|
||||
/user/username/projects/myproject/node_modules/module3/package.json: *new*
|
||||
{}
|
||||
|
||||
FsWatches *deleted*::
|
||||
/user/username/projects/myproject/app.ts:
|
||||
{}
|
||||
|
||||
FsWatchesRecursive::
|
||||
/user/username/projects/myproject/node_modules:
|
||||
{}
|
||||
@ -0,0 +1,185 @@
|
||||
currentDirectory:: / useCaseSensitiveFileNames: false
|
||||
Info seq [hh:mm:ss:mss] Provided types map file "/a/lib/typesMap.json" doesn't exist
|
||||
Before request
|
||||
//// [/user/username/projects/project1/src/file1.js]
|
||||
import {x} from 'glob';
|
||||
import {y} from 'minimatch'; // This imported file will add imports from minimatch to program
|
||||
|
||||
|
||||
//// [/user/username/projects/project1/src/node_modules/glob/index.js]
|
||||
import { y } from "minimatch"; // This import is will put minimatch at maxNodeModuleJsDepth so its imports are not added to program
|
||||
export const x = y;
|
||||
|
||||
|
||||
//// [/user/username/projects/project1/src/node_modules/minimatch/index.js]
|
||||
import { z } from "path"; // This will be resolved two times
|
||||
export const y = z;
|
||||
|
||||
|
||||
//// [/user/username/projects/project1/src/node_modules/path/index.js]
|
||||
export const z = 10;
|
||||
|
||||
|
||||
//// [/a/lib/lib.d.ts]
|
||||
/// <reference no-default-lib="true"/>
|
||||
interface Boolean {}
|
||||
interface Function {}
|
||||
interface CallableFunction {}
|
||||
interface NewableFunction {}
|
||||
interface IArguments {}
|
||||
interface Number { toExponential: any; }
|
||||
interface Object {}
|
||||
interface RegExp {}
|
||||
interface String { charAt: any; }
|
||||
interface Array<T> { length: number; [n: number]: T; }
|
||||
|
||||
|
||||
Info seq [hh:mm:ss:mss] request:
|
||||
{
|
||||
"command": "open",
|
||||
"arguments": {
|
||||
"file": "/user/username/projects/project1/src/file1.js"
|
||||
},
|
||||
"seq": 1,
|
||||
"type": "request"
|
||||
}
|
||||
Info seq [hh:mm:ss:mss] Search path: /user/username/projects/project1/src
|
||||
Info seq [hh:mm:ss:mss] For info: /user/username/projects/project1/src/file1.js :: No config files found.
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/project1/src/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/project1/src/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/project1/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/project1/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root
|
||||
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1*
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/project1/src/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: /user/username/projects/project1/src/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: /a/lib/lib.d.ts 500 undefined WatchType: Closed Script info
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms
|
||||
Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
|
||||
Info seq [hh:mm:ss:mss] Files (5)
|
||||
/a/lib/lib.d.ts Text-1 "/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }"
|
||||
/user/username/projects/project1/src/node_modules/minimatch/index.js Text-1 "import { z } from \"path\"; // This will be resolved two times\nexport const y = z;\n"
|
||||
/user/username/projects/project1/src/node_modules/glob/index.js Text-1 "import { y } from \"minimatch\"; // This import is will put minimatch at maxNodeModuleJsDepth so its imports are not added to program\nexport const x = y;\n"
|
||||
/user/username/projects/project1/src/node_modules/path/index.js Text-1 "export const z = 10;\n"
|
||||
/user/username/projects/project1/src/file1.js SVC-1-0 "import {x} from 'glob';\nimport {y} from 'minimatch'; // This imported file will add imports from minimatch to program\n"
|
||||
|
||||
|
||||
a/lib/lib.d.ts
|
||||
Default library for target 'es5'
|
||||
user/username/projects/project1/src/node_modules/minimatch/index.js
|
||||
Imported via "minimatch" from file 'user/username/projects/project1/src/node_modules/glob/index.js'
|
||||
Imported via 'minimatch' from file 'user/username/projects/project1/src/file1.js'
|
||||
user/username/projects/project1/src/node_modules/glob/index.js
|
||||
Imported via 'glob' from file 'user/username/projects/project1/src/file1.js'
|
||||
user/username/projects/project1/src/node_modules/path/index.js
|
||||
Imported via "path" from file 'user/username/projects/project1/src/node_modules/minimatch/index.js'
|
||||
user/username/projects/project1/src/file1.js
|
||||
Root file specified for compilation
|
||||
|
||||
Info seq [hh:mm:ss:mss] -----------------------------------------------
|
||||
TI:: Creating typing installer
|
||||
|
||||
PolledWatches::
|
||||
/user/username/projects/project1/jsconfig.json: *new*
|
||||
{"pollingInterval":2000}
|
||||
/user/username/projects/project1/src/jsconfig.json: *new*
|
||||
{"pollingInterval":2000}
|
||||
/user/username/projects/project1/src/tsconfig.json: *new*
|
||||
{"pollingInterval":2000}
|
||||
/user/username/projects/project1/tsconfig.json: *new*
|
||||
{"pollingInterval":2000}
|
||||
|
||||
FsWatches::
|
||||
/a/lib/lib.d.ts: *new*
|
||||
{}
|
||||
|
||||
FsWatchesRecursive::
|
||||
/user/username/projects: *new*
|
||||
{}
|
||||
/user/username/projects/project1/src/node_modules: *new*
|
||||
{}
|
||||
|
||||
TI:: [hh:mm:ss:mss] Global cache location '/a/data/', safe file path '/safeList.json', types map path /typesMap.json
|
||||
TI:: [hh:mm:ss:mss] Processing cache location '/a/data/'
|
||||
TI:: [hh:mm:ss:mss] Trying to find '/a/data/package.json'...
|
||||
TI:: [hh:mm:ss:mss] Finished processing cache location '/a/data/'
|
||||
TI:: [hh:mm:ss:mss] Npm config file: /a/data/package.json
|
||||
TI:: [hh:mm:ss:mss] Npm config file: '/a/data/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] TI:: Updated types-registry npm package
|
||||
TI:: typing installer creation complete
|
||||
//// [/a/data/package.json]
|
||||
{ "private": true }
|
||||
|
||||
//// [/a/data/node_modules/types-registry/index.json]
|
||||
{
|
||||
"entries": {}
|
||||
}
|
||||
|
||||
|
||||
TI:: [hh:mm:ss:mss] Got install request {"projectName":"/dev/null/inferredProject1*","fileNames":["/a/lib/lib.d.ts","/user/username/projects/project1/src/file1.js"],"compilerOptions":{"target":1,"jsx":1,"allowNonTsExtensions":true,"allowJs":true,"noEmitForJsFiles":true,"maxNodeModuleJsDepth":2},"typeAcquisition":{"enable":true,"include":[],"exclude":[]},"unresolvedImports":["glob","minimatch","path"],"projectRootPath":"/","cachePath":"/a/data/","kind":"discover"}
|
||||
TI:: [hh:mm:ss:mss] Request specifies cache path '/a/data/', loading cached information...
|
||||
TI:: [hh:mm:ss:mss] Processing cache location '/a/data/'
|
||||
TI:: [hh:mm:ss:mss] Cache location was already processed...
|
||||
TI:: [hh:mm:ss:mss] Failed to load safelist from types map file '/typesMap.json'
|
||||
TI:: [hh:mm:ss:mss] Explicitly included types: []
|
||||
TI:: [hh:mm:ss:mss] Searching for typing names in /user/username/projects/project1/src/node_modules; all files: []
|
||||
TI:: [hh:mm:ss:mss] Found package names: []
|
||||
TI:: [hh:mm:ss:mss] Inferred typings from unresolved imports: ["glob","minimatch","node"]
|
||||
TI:: [hh:mm:ss:mss] Result: {"cachedTypingPaths":[],"newTypingNames":["glob","minimatch","node"],"filesToWatch":["/user/username/projects/project1/src/bower_components","/user/username/projects/project1/src/node_modules","/bower_components","/node_modules"]}
|
||||
TI:: [hh:mm:ss:mss] Finished typings discovery: {"cachedTypingPaths":[],"newTypingNames":["glob","minimatch","node"],"filesToWatch":["/user/username/projects/project1/src/bower_components","/user/username/projects/project1/src/node_modules","/bower_components","/node_modules"]}
|
||||
TI:: [hh:mm:ss:mss] Sending response:
|
||||
{"kind":"action::watchTypingLocations","projectName":"/dev/null/inferredProject1*","files":["/user/username/projects/project1/src/bower_components","/user/username/projects/project1/src/node_modules","/bower_components","/node_modules"]}
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user 1 undefined Project: /dev/null/inferredProject1* WatchType: Directory location for typing installer
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user 1 undefined Project: /dev/null/inferredProject1* WatchType: Directory location for typing installer
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /bower_components 1 undefined Project: /dev/null/inferredProject1* WatchType: Directory location for typing installer
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /bower_components 1 undefined Project: /dev/null/inferredProject1* WatchType: Directory location for typing installer
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Directory location for typing installer
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Directory location for typing installer
|
||||
TI:: [hh:mm:ss:mss] Installing typings ["glob","minimatch","node"]
|
||||
TI:: [hh:mm:ss:mss] 'glob':: Entry for package 'glob' does not exist in local types registry - skipping...
|
||||
TI:: [hh:mm:ss:mss] 'minimatch':: Entry for package 'minimatch' does not exist in local types registry - skipping...
|
||||
TI:: [hh:mm:ss:mss] 'node':: Entry for package 'node' does not exist in local types registry - skipping...
|
||||
TI:: [hh:mm:ss:mss] All typings are known to be missing or invalid - no need to install more typings
|
||||
TI:: [hh:mm:ss:mss] Sending response:
|
||||
{"projectName":"/dev/null/inferredProject1*","typeAcquisition":{"enable":true,"include":[],"exclude":[]},"compilerOptions":{"target":1,"jsx":1,"allowNonTsExtensions":true,"allowJs":true,"noEmitForJsFiles":true,"maxNodeModuleJsDepth":2},"typings":[],"unresolvedImports":["glob","minimatch","path"],"kind":"action::set"}
|
||||
Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
|
||||
Info seq [hh:mm:ss:mss] Files (5)
|
||||
|
||||
Info seq [hh:mm:ss:mss] -----------------------------------------------
|
||||
Info seq [hh:mm:ss:mss] Open files:
|
||||
Info seq [hh:mm:ss:mss] FileName: /user/username/projects/project1/src/file1.js ProjectRootPath: undefined
|
||||
Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1*
|
||||
Info seq [hh:mm:ss:mss] response:
|
||||
{
|
||||
"responseRequired": false
|
||||
}
|
||||
After request
|
||||
|
||||
PolledWatches::
|
||||
/bower_components: *new*
|
||||
{"pollingInterval":500}
|
||||
/node_modules: *new*
|
||||
{"pollingInterval":500}
|
||||
/user/username/projects/project1/jsconfig.json:
|
||||
{"pollingInterval":2000}
|
||||
/user/username/projects/project1/src/jsconfig.json:
|
||||
{"pollingInterval":2000}
|
||||
/user/username/projects/project1/src/tsconfig.json:
|
||||
{"pollingInterval":2000}
|
||||
/user/username/projects/project1/tsconfig.json:
|
||||
{"pollingInterval":2000}
|
||||
|
||||
FsWatches::
|
||||
/a/lib/lib.d.ts:
|
||||
{}
|
||||
|
||||
FsWatchesRecursive::
|
||||
/user: *new*
|
||||
{}
|
||||
/user/username/projects:
|
||||
{}
|
||||
/user/username/projects/project1/src/node_modules:
|
||||
{}
|
||||
@ -0,0 +1,618 @@
|
||||
currentDirectory:: C:/ useCaseSensitiveFileNames: false
|
||||
Info seq [hh:mm:ss:mss] Provided types map file "C:/a/lib/typesMap.json" doesn't exist
|
||||
Before request
|
||||
//// [C:/temp/replay/axios-src/lib/core/AxiosHeaders.js]
|
||||
export const b = 10;
|
||||
|
||||
|
||||
|
||||
//// [C:/temp/replay/axios-src/lib/core/dispatchRequest.js]
|
||||
import { b } from "./AxiosHeaders.js";
|
||||
import { b2 } from "./settle.js";
|
||||
import { x } from "follow-redirects";
|
||||
export const y = 10;
|
||||
|
||||
|
||||
//// [C:/temp/replay/axios-src/lib/core/mergeConfig.js]
|
||||
import { b } from "./AxiosHeaders.js";
|
||||
export const y = 10;
|
||||
|
||||
|
||||
//// [C:/temp/replay/axios-src/lib/core/settle.js]
|
||||
export const b2 = 10;
|
||||
|
||||
|
||||
//// [C:/temp/replay/axios-src/package.json]
|
||||
{"name":"axios","version":"1.4.0","dependencies":{"follow-redirects":"^1.15.0"}}
|
||||
|
||||
//// [C:/temp/replay/axios-src/node_modules/follow-redirects/package.json]
|
||||
{"name":"follow-redirects","version":"1.15.0"}
|
||||
|
||||
//// [C:/temp/replay/axios-src/node_modules/follow-redirects/index.js]
|
||||
export const x = 10;
|
||||
|
||||
|
||||
Info seq [hh:mm:ss:mss] request:
|
||||
{
|
||||
"command": "open",
|
||||
"arguments": {
|
||||
"file": "c:/temp/replay/axios-src/lib/core/AxiosHeaders.js"
|
||||
},
|
||||
"seq": 1,
|
||||
"type": "request"
|
||||
}
|
||||
Info seq [hh:mm:ss:mss] Search path: c:/temp/replay/axios-src/lib/core
|
||||
Info seq [hh:mm:ss:mss] For info: c:/temp/replay/axios-src/lib/core/AxiosHeaders.js :: No config files found.
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/lib/core/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/lib/core/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/lib/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/lib/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: c:/temp/replay/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: c:/temp/replay/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root
|
||||
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1*
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: c:/a/lib/lib.d.ts 500 undefined Project: /dev/null/inferredProject1* WatchType: Missing file
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/lib/core/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/lib/core/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/lib/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/lib/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: c:/temp/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: c:/temp/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms
|
||||
Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
|
||||
Info seq [hh:mm:ss:mss] Files (1)
|
||||
c:/temp/replay/axios-src/lib/core/AxiosHeaders.js SVC-1-0 "export const b = 10;\n\n"
|
||||
|
||||
|
||||
AxiosHeaders.js
|
||||
Root file specified for compilation
|
||||
|
||||
Info seq [hh:mm:ss:mss] -----------------------------------------------
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/package.json 250 undefined WatchType: package.json file
|
||||
Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 1 root files in 1 dependencies in * ms
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/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: c:/temp/replay/axios-src/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache
|
||||
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject1*
|
||||
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms
|
||||
Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider)
|
||||
Info seq [hh:mm:ss:mss] Files (1)
|
||||
c:/temp/replay/axios-src/node_modules/follow-redirects/index.js Text-1 "export const x = 10;"
|
||||
|
||||
|
||||
../../node_modules/follow-redirects/index.js
|
||||
Root file specified for compilation
|
||||
|
||||
Info seq [hh:mm:ss:mss] -----------------------------------------------
|
||||
Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
|
||||
Info seq [hh:mm:ss:mss] Files (1)
|
||||
|
||||
Info seq [hh:mm:ss:mss] -----------------------------------------------
|
||||
Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider)
|
||||
Info seq [hh:mm:ss:mss] Files (1)
|
||||
|
||||
Info seq [hh:mm:ss:mss] -----------------------------------------------
|
||||
Info seq [hh:mm:ss:mss] Open files:
|
||||
Info seq [hh:mm:ss:mss] FileName: c:/temp/replay/axios-src/lib/core/AxiosHeaders.js ProjectRootPath: undefined
|
||||
Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1*
|
||||
Info seq [hh:mm:ss:mss] response:
|
||||
{
|
||||
"responseRequired": false
|
||||
}
|
||||
After request
|
||||
|
||||
PolledWatches::
|
||||
c:/a/lib/lib.d.ts: *new*
|
||||
{"pollingInterval":500}
|
||||
c:/temp/node_modules/@types: *new*
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/axios-src/jsconfig.json: *new*
|
||||
{"pollingInterval":2000}
|
||||
c:/temp/replay/axios-src/lib/core/jsconfig.json: *new*
|
||||
{"pollingInterval":2000}
|
||||
c:/temp/replay/axios-src/lib/core/node_modules/@types: *new*
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/axios-src/lib/core/tsconfig.json: *new*
|
||||
{"pollingInterval":2000}
|
||||
c:/temp/replay/axios-src/lib/jsconfig.json: *new*
|
||||
{"pollingInterval":2000}
|
||||
c:/temp/replay/axios-src/lib/node_modules/@types: *new*
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/axios-src/lib/tsconfig.json: *new*
|
||||
{"pollingInterval":2000}
|
||||
c:/temp/replay/axios-src/node_modules/@types: *new*
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/axios-src/tsconfig.json: *new*
|
||||
{"pollingInterval":2000}
|
||||
c:/temp/replay/jsconfig.json: *new*
|
||||
{"pollingInterval":2000}
|
||||
c:/temp/replay/node_modules/@types: *new*
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/tsconfig.json: *new*
|
||||
{"pollingInterval":2000}
|
||||
|
||||
FsWatches::
|
||||
c:/temp/replay/axios-src/package.json: *new*
|
||||
{}
|
||||
|
||||
FsWatchesRecursive::
|
||||
c:/temp/replay/axios-src/node_modules: *new*
|
||||
{}
|
||||
|
||||
Before request
|
||||
|
||||
Info seq [hh:mm:ss:mss] request:
|
||||
{
|
||||
"command": "updateOpen",
|
||||
"arguments": {
|
||||
"changedFiles": [
|
||||
{
|
||||
"fileName": "c:/temp/replay/axios-src/lib/core/AxiosHeaders.js",
|
||||
"textChanges": [
|
||||
{
|
||||
"newText": "//comment",
|
||||
"start": {
|
||||
"line": 2,
|
||||
"offset": 1
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"offset": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"seq": 2,
|
||||
"type": "request"
|
||||
}
|
||||
Info seq [hh:mm:ss:mss] response:
|
||||
{
|
||||
"response": true,
|
||||
"responseRequired": true
|
||||
}
|
||||
After request
|
||||
|
||||
Before request
|
||||
|
||||
Info seq [hh:mm:ss:mss] request:
|
||||
{
|
||||
"command": "open",
|
||||
"arguments": {
|
||||
"file": "c:/temp/replay/axios-src/lib/core/dispatchRequest.js"
|
||||
},
|
||||
"seq": 3,
|
||||
"type": "request"
|
||||
}
|
||||
Info seq [hh:mm:ss:mss] Search path: c:/temp/replay/axios-src/lib/core
|
||||
Info seq [hh:mm:ss:mss] For info: c:/temp/replay/axios-src/lib/core/dispatchRequest.js :: No config files found.
|
||||
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2*
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/lib/core/AxiosHeaders.js 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/lib/core/AxiosHeaders.js 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/lib/core 0 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/lib/core 0 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/lib/core/settle.js 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/lib/core/settle.js 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/lib/core/settle.js 500 undefined WatchType: Closed Script info
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/lib/core/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/lib/core/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/lib/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/lib/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: c:/temp/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: c:/temp/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: C:/temp/replay/axios-src/node_modules/follow-redirects/package.json 2000 undefined Project: /dev/null/inferredProject2* WatchType: File location affecting resolution
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: c:/a/lib/lib.d.ts 500 undefined Project: /dev/null/inferredProject2* WatchType: Missing file
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/lib/core/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/lib/core/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/lib/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/lib/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: c:/temp/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: c:/temp/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms
|
||||
Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred)
|
||||
Info seq [hh:mm:ss:mss] Files (4)
|
||||
c:/temp/replay/axios-src/lib/core/AxiosHeaders.js SVC-1-1 "export const b = 10;\n//comment\n"
|
||||
c:/temp/replay/axios-src/lib/core/settle.js Text-1 "export const b2 = 10;\n"
|
||||
c:/temp/replay/axios-src/node_modules/follow-redirects/index.js Text-1 "export const x = 10;"
|
||||
c:/temp/replay/axios-src/lib/core/dispatchRequest.js SVC-1-0 "import { b } from \"./AxiosHeaders.js\";\nimport { b2 } from \"./settle.js\";\nimport { x } from \"follow-redirects\";\nexport const y = 10;\n"
|
||||
|
||||
|
||||
AxiosHeaders.js
|
||||
Imported via "./AxiosHeaders.js" from file 'dispatchRequest.js'
|
||||
settle.js
|
||||
Imported via "./settle.js" from file 'dispatchRequest.js'
|
||||
../../node_modules/follow-redirects/index.js
|
||||
Imported via "follow-redirects" from file 'dispatchRequest.js' with packageId 'follow-redirects/index.js@1.15.0'
|
||||
dispatchRequest.js
|
||||
Root file specified for compilation
|
||||
|
||||
Info seq [hh:mm:ss:mss] -----------------------------------------------
|
||||
Info seq [hh:mm:ss:mss] `remove Project::
|
||||
Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred)
|
||||
Info seq [hh:mm:ss:mss] Files (1)
|
||||
c:/temp/replay/axios-src/lib/core/AxiosHeaders.js
|
||||
|
||||
|
||||
AxiosHeaders.js
|
||||
Root file specified for compilation
|
||||
|
||||
Info seq [hh:mm:ss:mss] -----------------------------------------------
|
||||
Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider)
|
||||
Info seq [hh:mm:ss:mss] Files (1)
|
||||
|
||||
Info seq [hh:mm:ss:mss] -----------------------------------------------
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: c:/temp/replay/axios-src/lib/core/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: c:/temp/replay/axios-src/lib/core/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: c:/temp/replay/axios-src/lib/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: c:/temp/replay/axios-src/lib/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: c:/temp/replay/axios-src/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: c:/temp/replay/axios-src/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: c:/temp/replay/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: c:/temp/replay/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: c:/temp/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: c:/temp/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: c:/a/lib/lib.d.ts 500 undefined Project: /dev/null/inferredProject1* WatchType: Missing file
|
||||
Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred)
|
||||
Info seq [hh:mm:ss:mss] Files (4)
|
||||
|
||||
Info seq [hh:mm:ss:mss] -----------------------------------------------
|
||||
Info seq [hh:mm:ss:mss] Open files:
|
||||
Info seq [hh:mm:ss:mss] FileName: c:/temp/replay/axios-src/lib/core/AxiosHeaders.js ProjectRootPath: undefined
|
||||
Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2*
|
||||
Info seq [hh:mm:ss:mss] FileName: c:/temp/replay/axios-src/lib/core/dispatchRequest.js ProjectRootPath: undefined
|
||||
Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2*
|
||||
Info seq [hh:mm:ss:mss] response:
|
||||
{
|
||||
"responseRequired": false
|
||||
}
|
||||
After request
|
||||
|
||||
PolledWatches::
|
||||
c:/a/lib/lib.d.ts:
|
||||
{"pollingInterval":500}
|
||||
c:/temp/node_modules: *new*
|
||||
{"pollingInterval":500}
|
||||
c:/temp/node_modules/@types:
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/axios-src/jsconfig.json:
|
||||
{"pollingInterval":2000}
|
||||
c:/temp/replay/axios-src/lib/core/axiosheaders.js: *new*
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/axios-src/lib/core/jsconfig.json:
|
||||
{"pollingInterval":2000}
|
||||
c:/temp/replay/axios-src/lib/core/node_modules: *new*
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/axios-src/lib/core/node_modules/@types:
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/axios-src/lib/core/settle.js: *new*
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/axios-src/lib/core/tsconfig.json:
|
||||
{"pollingInterval":2000}
|
||||
c:/temp/replay/axios-src/lib/jsconfig.json:
|
||||
{"pollingInterval":2000}
|
||||
c:/temp/replay/axios-src/lib/node_modules: *new*
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/axios-src/lib/node_modules/@types:
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/axios-src/lib/tsconfig.json:
|
||||
{"pollingInterval":2000}
|
||||
c:/temp/replay/axios-src/node_modules/@types:
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/axios-src/tsconfig.json:
|
||||
{"pollingInterval":2000}
|
||||
c:/temp/replay/jsconfig.json:
|
||||
{"pollingInterval":2000}
|
||||
c:/temp/replay/node_modules: *new*
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/node_modules/@types:
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/tsconfig.json:
|
||||
{"pollingInterval":2000}
|
||||
|
||||
FsWatches::
|
||||
c:/temp/replay/axios-src/lib/core: *new*
|
||||
{}
|
||||
c:/temp/replay/axios-src/lib/core/settle.js: *new*
|
||||
{}
|
||||
c:/temp/replay/axios-src/node_modules/follow-redirects/package.json: *new*
|
||||
{}
|
||||
c:/temp/replay/axios-src/package.json:
|
||||
{}
|
||||
|
||||
FsWatchesRecursive::
|
||||
c:/temp/replay/axios-src/node_modules:
|
||||
{}
|
||||
|
||||
Before request
|
||||
|
||||
Info seq [hh:mm:ss:mss] request:
|
||||
{
|
||||
"command": "open",
|
||||
"arguments": {
|
||||
"file": "c:/temp/replay/axios-src/lib/core/mergeConfig.js"
|
||||
},
|
||||
"seq": 4,
|
||||
"type": "request"
|
||||
}
|
||||
Info seq [hh:mm:ss:mss] Search path: c:/temp/replay/axios-src/lib/core
|
||||
Info seq [hh:mm:ss:mss] For info: c:/temp/replay/axios-src/lib/core/mergeConfig.js :: No config files found.
|
||||
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject3*
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/lib/core/AxiosHeaders.js 1 undefined Project: /dev/null/inferredProject3* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/lib/core/AxiosHeaders.js 1 undefined Project: /dev/null/inferredProject3* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/lib/core 0 undefined Project: /dev/null/inferredProject3* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/lib/core 0 undefined Project: /dev/null/inferredProject3* WatchType: Failed Lookup Locations
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: c:/a/lib/lib.d.ts 500 undefined Project: /dev/null/inferredProject3* WatchType: Missing file
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/lib/core/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/lib/core/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/lib/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/lib/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: c:/temp/replay/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: c:/temp/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: c:/temp/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots
|
||||
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject3* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms
|
||||
Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject3*' (Inferred)
|
||||
Info seq [hh:mm:ss:mss] Files (2)
|
||||
c:/temp/replay/axios-src/lib/core/AxiosHeaders.js SVC-1-1 "export const b = 10;\n//comment\n"
|
||||
c:/temp/replay/axios-src/lib/core/mergeConfig.js SVC-1-0 "import { b } from \"./AxiosHeaders.js\";\nexport const y = 10;\n"
|
||||
|
||||
|
||||
AxiosHeaders.js
|
||||
Imported via "./AxiosHeaders.js" from file 'mergeConfig.js'
|
||||
mergeConfig.js
|
||||
Root file specified for compilation
|
||||
|
||||
Info seq [hh:mm:ss:mss] -----------------------------------------------
|
||||
Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 1 root files in 1 dependencies in * ms
|
||||
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject2*
|
||||
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms
|
||||
Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject2*' (AutoImportProvider)
|
||||
Info seq [hh:mm:ss:mss] Files (1)
|
||||
c:/temp/replay/axios-src/node_modules/follow-redirects/index.js Text-1 "export const x = 10;"
|
||||
|
||||
|
||||
../../node_modules/follow-redirects/index.js
|
||||
Root file specified for compilation
|
||||
|
||||
Info seq [hh:mm:ss:mss] -----------------------------------------------
|
||||
Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred)
|
||||
Info seq [hh:mm:ss:mss] Files (4)
|
||||
|
||||
Info seq [hh:mm:ss:mss] -----------------------------------------------
|
||||
Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject3*' (Inferred)
|
||||
Info seq [hh:mm:ss:mss] Files (2)
|
||||
|
||||
Info seq [hh:mm:ss:mss] -----------------------------------------------
|
||||
Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject2*' (AutoImportProvider)
|
||||
Info seq [hh:mm:ss:mss] Files (1)
|
||||
|
||||
Info seq [hh:mm:ss:mss] -----------------------------------------------
|
||||
Info seq [hh:mm:ss:mss] Open files:
|
||||
Info seq [hh:mm:ss:mss] FileName: c:/temp/replay/axios-src/lib/core/AxiosHeaders.js ProjectRootPath: undefined
|
||||
Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2*,/dev/null/inferredProject3*
|
||||
Info seq [hh:mm:ss:mss] FileName: c:/temp/replay/axios-src/lib/core/dispatchRequest.js ProjectRootPath: undefined
|
||||
Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2*
|
||||
Info seq [hh:mm:ss:mss] FileName: c:/temp/replay/axios-src/lib/core/mergeConfig.js ProjectRootPath: undefined
|
||||
Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject3*
|
||||
Info seq [hh:mm:ss:mss] response:
|
||||
{
|
||||
"responseRequired": false
|
||||
}
|
||||
After request
|
||||
|
||||
Before request
|
||||
|
||||
Info seq [hh:mm:ss:mss] request:
|
||||
{
|
||||
"command": "close",
|
||||
"arguments": {
|
||||
"file": "c:/temp/replay/axios-src/lib/core/AxiosHeaders.js"
|
||||
},
|
||||
"seq": 5,
|
||||
"type": "request"
|
||||
}
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: c:/temp/replay/axios-src/lib/core/AxiosHeaders.js 500 undefined WatchType: Closed Script info
|
||||
Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred)
|
||||
Info seq [hh:mm:ss:mss] Files (4)
|
||||
|
||||
Info seq [hh:mm:ss:mss] -----------------------------------------------
|
||||
Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject3*' (Inferred)
|
||||
Info seq [hh:mm:ss:mss] Files (2)
|
||||
|
||||
Info seq [hh:mm:ss:mss] -----------------------------------------------
|
||||
Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject2*' (AutoImportProvider)
|
||||
Info seq [hh:mm:ss:mss] Files (1)
|
||||
|
||||
Info seq [hh:mm:ss:mss] -----------------------------------------------
|
||||
Info seq [hh:mm:ss:mss] Open files:
|
||||
Info seq [hh:mm:ss:mss] FileName: c:/temp/replay/axios-src/lib/core/dispatchRequest.js ProjectRootPath: undefined
|
||||
Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2*
|
||||
Info seq [hh:mm:ss:mss] FileName: c:/temp/replay/axios-src/lib/core/mergeConfig.js ProjectRootPath: undefined
|
||||
Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject3*
|
||||
Info seq [hh:mm:ss:mss] response:
|
||||
{
|
||||
"responseRequired": false
|
||||
}
|
||||
After request
|
||||
|
||||
PolledWatches::
|
||||
c:/a/lib/lib.d.ts:
|
||||
{"pollingInterval":500}
|
||||
c:/temp/node_modules:
|
||||
{"pollingInterval":500}
|
||||
c:/temp/node_modules/@types:
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/axios-src/jsconfig.json:
|
||||
{"pollingInterval":2000}
|
||||
c:/temp/replay/axios-src/lib/core/axiosheaders.js:
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/axios-src/lib/core/jsconfig.json:
|
||||
{"pollingInterval":2000}
|
||||
c:/temp/replay/axios-src/lib/core/node_modules:
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/axios-src/lib/core/node_modules/@types:
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/axios-src/lib/core/settle.js:
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/axios-src/lib/core/tsconfig.json:
|
||||
{"pollingInterval":2000}
|
||||
c:/temp/replay/axios-src/lib/jsconfig.json:
|
||||
{"pollingInterval":2000}
|
||||
c:/temp/replay/axios-src/lib/node_modules:
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/axios-src/lib/node_modules/@types:
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/axios-src/lib/tsconfig.json:
|
||||
{"pollingInterval":2000}
|
||||
c:/temp/replay/axios-src/node_modules/@types:
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/axios-src/tsconfig.json:
|
||||
{"pollingInterval":2000}
|
||||
c:/temp/replay/jsconfig.json:
|
||||
{"pollingInterval":2000}
|
||||
c:/temp/replay/node_modules:
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/node_modules/@types:
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/tsconfig.json:
|
||||
{"pollingInterval":2000}
|
||||
|
||||
FsWatches::
|
||||
c:/temp/replay/axios-src/lib/core:
|
||||
{}
|
||||
c:/temp/replay/axios-src/lib/core/axiosheaders.js: *new*
|
||||
{}
|
||||
c:/temp/replay/axios-src/lib/core/settle.js:
|
||||
{}
|
||||
c:/temp/replay/axios-src/node_modules/follow-redirects/package.json:
|
||||
{}
|
||||
c:/temp/replay/axios-src/package.json:
|
||||
{}
|
||||
|
||||
FsWatchesRecursive::
|
||||
c:/temp/replay/axios-src/node_modules:
|
||||
{}
|
||||
|
||||
Before request
|
||||
|
||||
Info seq [hh:mm:ss:mss] request:
|
||||
{
|
||||
"command": "open",
|
||||
"arguments": {
|
||||
"file": "c:/temp/replay/axios-src/lib/core/settle.js"
|
||||
},
|
||||
"seq": 6,
|
||||
"type": "request"
|
||||
}
|
||||
Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: c:/temp/replay/axios-src/lib/core/settle.js 500 undefined WatchType: Closed Script info
|
||||
Info seq [hh:mm:ss:mss] Search path: c:/temp/replay/axios-src/lib/core
|
||||
Info seq [hh:mm:ss:mss] For info: c:/temp/replay/axios-src/lib/core/settle.js :: No config files found.
|
||||
Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2*
|
||||
Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 2 structureChanged: false structureIsReused:: Completely Elapsed:: *ms
|
||||
Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred)
|
||||
Info seq [hh:mm:ss:mss] Files (4)
|
||||
c:/temp/replay/axios-src/lib/core/AxiosHeaders.js Text-2 "export const b = 10;\n\n"
|
||||
c:/temp/replay/axios-src/lib/core/settle.js Text-1 "export const b2 = 10;\n"
|
||||
c:/temp/replay/axios-src/node_modules/follow-redirects/index.js Text-1 "export const x = 10;"
|
||||
c:/temp/replay/axios-src/lib/core/dispatchRequest.js SVC-1-0 "import { b } from \"./AxiosHeaders.js\";\nimport { b2 } from \"./settle.js\";\nimport { x } from \"follow-redirects\";\nexport const y = 10;\n"
|
||||
|
||||
Info seq [hh:mm:ss:mss] -----------------------------------------------
|
||||
Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred)
|
||||
Info seq [hh:mm:ss:mss] Files (4)
|
||||
|
||||
Info seq [hh:mm:ss:mss] -----------------------------------------------
|
||||
Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject3*' (Inferred)
|
||||
Info seq [hh:mm:ss:mss] Files (2)
|
||||
|
||||
Info seq [hh:mm:ss:mss] -----------------------------------------------
|
||||
Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject2*' (AutoImportProvider)
|
||||
Info seq [hh:mm:ss:mss] Files (1)
|
||||
|
||||
Info seq [hh:mm:ss:mss] -----------------------------------------------
|
||||
Info seq [hh:mm:ss:mss] Open files:
|
||||
Info seq [hh:mm:ss:mss] FileName: c:/temp/replay/axios-src/lib/core/dispatchRequest.js ProjectRootPath: undefined
|
||||
Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2*
|
||||
Info seq [hh:mm:ss:mss] FileName: c:/temp/replay/axios-src/lib/core/mergeConfig.js ProjectRootPath: undefined
|
||||
Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject3*
|
||||
Info seq [hh:mm:ss:mss] FileName: c:/temp/replay/axios-src/lib/core/settle.js ProjectRootPath: undefined
|
||||
Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2*
|
||||
Info seq [hh:mm:ss:mss] response:
|
||||
{
|
||||
"responseRequired": false
|
||||
}
|
||||
After request
|
||||
|
||||
PolledWatches::
|
||||
c:/a/lib/lib.d.ts:
|
||||
{"pollingInterval":500}
|
||||
c:/temp/node_modules:
|
||||
{"pollingInterval":500}
|
||||
c:/temp/node_modules/@types:
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/axios-src/jsconfig.json:
|
||||
{"pollingInterval":2000}
|
||||
c:/temp/replay/axios-src/lib/core/axiosheaders.js:
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/axios-src/lib/core/jsconfig.json:
|
||||
{"pollingInterval":2000}
|
||||
c:/temp/replay/axios-src/lib/core/node_modules:
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/axios-src/lib/core/node_modules/@types:
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/axios-src/lib/core/settle.js:
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/axios-src/lib/core/tsconfig.json:
|
||||
{"pollingInterval":2000}
|
||||
c:/temp/replay/axios-src/lib/jsconfig.json:
|
||||
{"pollingInterval":2000}
|
||||
c:/temp/replay/axios-src/lib/node_modules:
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/axios-src/lib/node_modules/@types:
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/axios-src/lib/tsconfig.json:
|
||||
{"pollingInterval":2000}
|
||||
c:/temp/replay/axios-src/node_modules/@types:
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/axios-src/tsconfig.json:
|
||||
{"pollingInterval":2000}
|
||||
c:/temp/replay/jsconfig.json:
|
||||
{"pollingInterval":2000}
|
||||
c:/temp/replay/node_modules:
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/node_modules/@types:
|
||||
{"pollingInterval":500}
|
||||
c:/temp/replay/tsconfig.json:
|
||||
{"pollingInterval":2000}
|
||||
|
||||
FsWatches::
|
||||
c:/temp/replay/axios-src/lib/core:
|
||||
{}
|
||||
c:/temp/replay/axios-src/lib/core/axiosheaders.js:
|
||||
{}
|
||||
c:/temp/replay/axios-src/node_modules/follow-redirects/package.json:
|
||||
{}
|
||||
c:/temp/replay/axios-src/package.json:
|
||||
{}
|
||||
|
||||
FsWatches *deleted*::
|
||||
c:/temp/replay/axios-src/lib/core/settle.js:
|
||||
{}
|
||||
|
||||
FsWatchesRecursive::
|
||||
c:/temp/replay/axios-src/node_modules:
|
||||
{}
|
||||
Loading…
x
Reference in New Issue
Block a user