MCPcopy Index your code
hub / github.com/nodejs/node / updateExtendedConfigFilesWatches

Function updateExtendedConfigFilesWatches

test/fixtures/snapshot/typescript.js:123932–123959  ·  view source on GitHub ↗
(forProjectPath, options, watchOptions, watchType)

Source from the content-addressed store, hash-verified

123930 }, flags, watchOptions, ts.WatchType.WildcardDirectory);
123931 }
123932 function updateExtendedConfigFilesWatches(forProjectPath, options, watchOptions, watchType) {
123933 ts.updateSharedExtendedConfigFileWatcher(forProjectPath, options, sharedExtendedConfigFileWatchers || (sharedExtendedConfigFileWatchers = new ts.Map()), function (extendedConfigFileName, extendedConfigFilePath) { return watchFile(extendedConfigFileName, function (_fileName, eventKind) {
123934 var _a;
123935 updateCachedSystemWithFile(extendedConfigFileName, extendedConfigFilePath, eventKind);
123936 // Update extended config cache
123937 if (extendedConfigCache)
123938 ts.cleanExtendedConfigCache(extendedConfigCache, extendedConfigFilePath, toPath);
123939 // Update projects
123940 var projects = (_a = sharedExtendedConfigFileWatchers.get(extendedConfigFilePath)) === null || _a === void 0 ? void 0 : _a.projects;
123941 // If there are no referenced projects this extended config file watcher depend on ignore
123942 if (!(projects === null || projects === void 0 ? void 0 : projects.size))
123943 return;
123944 projects.forEach(function (projectPath) {
123945 if (toPath(configFileName) === projectPath) {
123946 // If this is the config file of the project, reload completely
123947 reloadLevel = ts.ConfigFileProgramReloadLevel.Full;
123948 }
123949 else {
123950 // Reload config for the referenced projects and remove the resolutions from referenced projects since the config file changed
123951 var config = parsedConfigs === null || parsedConfigs === void 0 ? void 0 : parsedConfigs.get(projectPath);
123952 if (config)
123953 config.reloadLevel = ts.ConfigFileProgramReloadLevel.Full;
123954 resolutionCache.removeResolutionsFromProjectReferenceRedirects(projectPath);
123955 }
123956 scheduleProgramUpdate();
123957 });
123958 }, ts.PollingInterval.High, watchOptions, watchType); }, toPath);
123959 }
123960 function watchReferencedProject(configFileName, configPath, commandLine) {
123961 var _a, _b, _c, _d, _e;
123962 // Watch file

Callers 3

createWatchProgramFunction · 0.85
reloadConfigFileFunction · 0.85
watchReferencedProjectFunction · 0.85

Calls 6

toPathFunction · 0.85
scheduleProgramUpdateFunction · 0.85
watchFileFunction · 0.70
getMethod · 0.65
forEachMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…