( pkg: ExtendedPackageJson, options?: AnalyzePackageOptions, )
| 392 | * Analyze a package and return structured analysis |
| 393 | */ |
| 394 | export function analyzePackage( |
| 395 | pkg: ExtendedPackageJson, |
| 396 | options?: AnalyzePackageOptions, |
| 397 | ): PackageAnalysis { |
| 398 | const moduleFormat = detectModuleFormat(pkg) |
| 399 | const types = detectTypesStatus(pkg, options?.typesPackage, options?.files) |
| 400 | |
| 401 | return { |
| 402 | moduleFormat, |
| 403 | types, |
| 404 | engines: pkg.engines, |
| 405 | createPackage: options?.createPackage, |
| 406 | } |
| 407 | } |
no test coverage detected