You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #25293, we changed the CLI so that sb upgrade does not upgrade any non-core packages. The previous logic of “upgrade all the core packages + addons to the latest” wasn’t a terrible heuristic, but it also wasn’t great, and falls down when we could be upgrading to any arbitrary version and not the latest.
Since sb upgrade no longer upgrades addons, any user that uses non-core addons will very likely be left in a bad state after upgrade. To address this, we call sb doctor automatically after upgrades. sb doctor's job is to look for inconsistencies in the user’s project setup, including addons that are incompatible with the current version of Storybook.
Unfortunately, the current logic for this is problematic. The list is hand-maintained, and hard-coded in the doctor command’s code, which means that (1) it is probably out of date, and (2) even when we update the list, it will probably not get patched to older versions of the CLI.
Instead of a hard-coding the list, we propose the following heuristics (or some variant thereof):
currentVersion = getCurrentVersion()
for addon in mainJs.addons:
packageJson = readPackageJson(addon)
for dep in storybookDeps(packageJson):
if isIncompatible(dep, currentVersion):
alert 'Addon ${addon}@${packageJson.version} likely incompatible'
alert 'with Storybook ${currentVersion}.'
alert 'Please see the addon docs: ${packageJson.homepage}'
break
latestVersion = getLatestVersion(addon)
if(latestVersion > packageJson.version)
alert 'There is a new version of ${addon} available: ${latestVersion}'
The text was updated successfully, but these errors were encountered:
In #25293, we changed the CLI so that
sb upgrade
does not upgrade any non-core packages. The previous logic of “upgrade all the core packages + addons to the latest” wasn’t a terrible heuristic, but it also wasn’t great, and falls down when we could be upgrading to any arbitrary version and not the latest.Since
sb upgrade
no longer upgrades addons, any user that uses non-core addons will very likely be left in a bad state after upgrade. To address this, we callsb doctor
automatically after upgrades.sb doctor
's job is to look for inconsistencies in the user’s project setup, including addons that are incompatible with the current version of Storybook.Unfortunately, the current logic for this is problematic. The list is hand-maintained, and hard-coded in the
doctor
command’s code, which means that (1) it is probably out of date, and (2) even when we update the list, it will probably not get patched to older versions of the CLI.Instead of a hard-coding the list, we propose the following heuristics (or some variant thereof):
The text was updated successfully, but these errors were encountered: