GetPackageJsonInfo implements checker.Program.
(pkgJsonPath string)
| 144 | |
| 145 | // GetPackageJsonInfo implements checker.Program. |
| 146 | func (p *Program) GetPackageJsonInfo(pkgJsonPath string) *packagejson.InfoCacheEntry { |
| 147 | directory := tspath.GetDirectoryPath(pkgJsonPath) |
| 148 | scoped := p.resolver.GetPackageScopeForPath(directory) |
| 149 | if scoped != nil && scoped.Exists() && scoped.PackageDirectory == directory { |
| 150 | return scoped |
| 151 | } |
| 152 | return nil |
| 153 | } |
| 154 | |
| 155 | // PackageJsonCacheEntries iterates on all package json cache entries. |
| 156 | func (p *Program) PackageJsonCacheEntries(f func(key tspath.Path, value *packagejson.InfoCacheEntry) bool) { |
no test coverage detected