Skip to content

Commit

Permalink
Revert "fix the logic adding the caret to upgrade"
Browse files Browse the repository at this point in the history
This reverts commit f24784d.
  • Loading branch information
ndelangen committed Feb 15, 2024
1 parent f24784d commit 2a82b79
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions code/lib/cli/src/upgrade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,16 +238,10 @@ export const doUpgrade = async ({
return dependency in versions;
}) as Array<keyof typeof versions>;
return monorepoDependencies.map((dependency) => {
let char = '^';
if (isOutdated) {
char = '';
}
if (isCanary) {
char = '';
}
/* add ^ modifier to the version if this is the latest stable or prerelease version
example outputs: @storybook/react@^8.0.0 */
return `${dependency}@${char}${versions[dependency]}`;
const maybeCaret = (!isOutdated || isPrerelease) && !isCanary ? '^' : '';
return `${dependency}@${maybeCaret}${versions[dependency]}`;
});
};

Expand Down

0 comments on commit 2a82b79

Please sign in to comment.