import { fetchManifest } from '../util/npm-api' ; import { getPkgDetails } from './common' ; export async function getCompareProps ( inputStr , pkgVersions , force , tmpDir ) { const promises = pkgVersions . map ( async ( { name , version } ) => { const manifest = await fetchManifest ( name ) ; return getPkgDetails ( manifest , name , version , force , tmpDir ) ; } ) ; const results = await Promise . all ( promises ) ; return { inputStr , results } ; }