import { isProd , isDev , isTest } from './is' ; /**
 * Generate cache identifier from some packages and config files.
 */ export function getCacheIdentifier ( packages , _files ? ) { let cacheIdentifier = isProd ( ) ? 'production' : isDev ( ) ? 'development' : isTest ( ) ? 'test' : '' ; for ( const { name , version } of packages ) { cacheIdentifier += `:${ name }@${ version }` ; } return cacheIdentifier ; }