(fileName, packageJsonInfoCache, host, options)
| 43748 | */ |
| 43749 | /*@internal*/ |
| 43750 | function getPackageScopeForPath(fileName, packageJsonInfoCache, host, options) { |
| 43751 | var state = { |
| 43752 | host: host, |
| 43753 | compilerOptions: options, |
| 43754 | traceEnabled: isTraceEnabled(options, host), |
| 43755 | failedLookupLocations: [], |
| 43756 | packageJsonInfoCache: packageJsonInfoCache, |
| 43757 | features: 0, |
| 43758 | conditions: [], |
| 43759 | requestContainingDirectory: undefined, |
| 43760 | reportDiagnostic: ts.noop |
| 43761 | }; |
| 43762 | var parts = ts.getPathComponents(fileName); |
| 43763 | parts.pop(); |
| 43764 | while (parts.length > 0) { |
| 43765 | var pkg = getPackageJsonInfo(ts.getPathFromPathComponents(parts), /*onlyRecordFailures*/ false, state); |
| 43766 | if (pkg) { |
| 43767 | return pkg; |
| 43768 | } |
| 43769 | parts.pop(); |
| 43770 | } |
| 43771 | return undefined; |
| 43772 | } |
| 43773 | ts.getPackageScopeForPath = getPackageScopeForPath; |
| 43774 | /*@internal*/ |
| 43775 | function getPackageJsonInfo(packageDirectory, onlyRecordFailures, state) { |
no test coverage detected
searching dependent graphs…