- Removing filesToWatch from getTypingNamesFromNodeModuleFolder.

These modules are already installed and are not expected to change
This commit is contained in:
Jason Ramsay 2016-03-01 19:06:31 -08:00
parent 6aad783db8
commit 4bbdf2a0bb

View File

@ -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