( packageManagerInfo: PackageManagerInfo, cacheDependencyPath: string )
| 207 | * @return list of files on which the cache depends |
| 208 | */ |
| 209 | export const getCacheDirectories = async ( |
| 210 | packageManagerInfo: PackageManagerInfo, |
| 211 | cacheDependencyPath: string |
| 212 | ): Promise<string[]> => { |
| 213 | // For yarn, if cacheDependencyPath is set, ask information about cache folders in each project |
| 214 | // folder satisfied by cacheDependencyPath https://github.com/actions/setup-node/issues/488 |
| 215 | if (packageManagerInfo.name === 'yarn' && cacheDependencyPath) { |
| 216 | return getCacheDirectoriesFromCacheDependencyPath( |
| 217 | packageManagerInfo, |
| 218 | cacheDependencyPath |
| 219 | ); |
| 220 | } |
| 221 | return getCacheDirectoriesForRootProject(packageManagerInfo); |
| 222 | }; |
| 223 | |
| 224 | /** |
| 225 | * A function to check if the directory is a yarn project configured to manage |
no test coverage detected