( ref: string, packageJsonPath: string, )
| 16 | } |
| 17 | |
| 18 | function getPackageVersionAtRef( |
| 19 | ref: string, |
| 20 | packageJsonPath: string, |
| 21 | ): string | null { |
| 22 | try { |
| 23 | let content = execGit(["show", `${ref}:${packageJsonPath}`]); |
| 24 | return parseVersionFromPackageJson(content); |
| 25 | } catch { |
| 26 | return null; |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | /** |
| 31 | * Finds the commit that introduced a specific version in a package.json file. |
no test coverage detected