mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-26 21:23:53 -06:00
Addressing CR comments
This commit is contained in:
parent
7e58afadc4
commit
8d1c9d5f9a
@ -731,6 +731,7 @@ namespace ts.projectSystem {
|
||||
checkNumberOfProjects(projectService, { configuredProjects: 1 });
|
||||
const p = projectService.configuredProjects[0];
|
||||
checkProjectActualFiles(p, [app.path]);
|
||||
checkWatchedFiles(host, [jsconfig.path, "/bower_components", "/node_modules"]);
|
||||
|
||||
installer.installAll(/*expectedCount*/ 1);
|
||||
|
||||
|
||||
@ -218,7 +218,8 @@ namespace ts.JsTyping {
|
||||
const fileNames = host.readDirectory(packagesFolderPath, [".json"], /*excludes*/ undefined, /*includes*/ undefined, /*depth*/ 2);
|
||||
for (const fileName of fileNames) {
|
||||
const normalizedFileName = normalizePath(fileName);
|
||||
if (getBaseFileName(normalizedFileName) !== "package.json") {
|
||||
const baseFileName = getBaseFileName(normalizedFileName);
|
||||
if (baseFileName !== "package.json" && baseFileName !== "bower.json") {
|
||||
continue;
|
||||
}
|
||||
const result = readConfigFile(normalizedFileName, (path: string) => host.readFile(path));
|
||||
@ -230,7 +231,7 @@ namespace ts.JsTyping {
|
||||
// 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
|
||||
// "_requiredBy" field starts with "#" or equals "/" for npm 3.
|
||||
if (packageJson._requiredBy &&
|
||||
if (baseFileName === "package.json" && packageJson._requiredBy &&
|
||||
filter(packageJson._requiredBy, (r: string) => r[0] === "#" || r === "/").length === 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user