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

Function findPackageJson

test/fixtures/snapshot/typescript.js:129166–129177  ·  view source on GitHub ↗
(directory, host)

Source from the content-addressed store, hash-verified

129164 }
129165 ts.findPackageJsons = findPackageJsons;
129166 function findPackageJson(directory, host) {
129167 var packageJson;
129168 ts.forEachAncestorDirectory(directory, function (ancestor) {
129169 if (ancestor === "node_modules")
129170 return true;
129171 packageJson = ts.findConfigFile(ancestor, function (f) { return tryFileExists(host, f); }, "package.json");
129172 if (packageJson) {
129173 return true; // break out
129174 }
129175 });
129176 return packageJson;
129177 }
129178 ts.findPackageJson = findPackageJson;
129179 function getPackageJsonsVisibleToFile(fileName, host) {
129180 if (!host.fileExists) {

Callers

nothing calls this directly

Calls 1

tryFileExistsFunction · 0.85

Tested by

no test coverage detected