From 4bbdf2a0bb3553f1d4fa20b719e3f3fc952179cc Mon Sep 17 00:00:00 2001 From: Jason Ramsay Date: Tue, 1 Mar 2016 19:06:31 -0800 Subject: [PATCH] - Removing filesToWatch from getTypingNamesFromNodeModuleFolder. These modules are already installed and are not expected to change --- src/services/jsTyping.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/services/jsTyping.ts b/src/services/jsTyping.ts index 3866296e2f8..01cc3eed3b1 100644 --- a/src/services/jsTyping.ts +++ b/src/services/jsTyping.ts @@ -85,7 +85,7 @@ namespace ts.JsTyping { getTypingNamesFromJson(bowerJsonPath, filesToWatch); const nodeModulesPath = combinePaths(searchDir, "node_modules"); - getTypingNamesFromNodeModuleFolder(nodeModulesPath, filesToWatch); + getTypingNamesFromNodeModuleFolder(nodeModulesPath); } getTypingNamesFromSourceFileNames(fileNames); @@ -178,7 +178,7 @@ namespace ts.JsTyping { * Infer typing names from node_module folder * @param nodeModulesPath is the path to the "node_modules" folder */ - function getTypingNamesFromNodeModuleFolder(nodeModulesPath: string, filesToWatch: string[]) { + function getTypingNamesFromNodeModuleFolder(nodeModulesPath: string) { // Todo: add support for ModuleResolutionHost too if (!host.directoryExists(nodeModulesPath)) { return; @@ -192,7 +192,6 @@ namespace ts.JsTyping { const result = readConfigFile(normalizedFileName, (path: string) => host.readFile(path)); if (!result.config) { continue; } const packageJson: PackageJson = result.config; - filesToWatch.push(normalizedFileName); // npm 3's package.json contains a "_requiredBy" field // we should include all the top level module names for npm 2, and only module names whose