CLI: Add caret to all dependencies

This commit is contained in:
Hypnosphi 2018-03-10 23:32:58 +02:00
parent bdec83e266
commit 3d17a1e7e4

View File

@ -30,7 +30,8 @@ export async function getVersion(packageName) {
process.exit(1);
}
return current && gt(current.replace(/^\^/, ''), latest) ? current : `^${latest}`;
const versionToUse = current && gt(current, latest) ? current : latest;
return `^${versionToUse}`;
}
export function getVersions(...packageNames) {