mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-09 00:19:13 +08:00
CLI: Add caret to all dependencies
This commit is contained in:
parent
bdec83e266
commit
3d17a1e7e4
@ -30,7 +30,8 @@ export async function getVersion(packageName) {
|
|||||||
process.exit(1);
|
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) {
|
export function getVersions(...packageNames) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user