Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI: Upgrade non-core storybook packages better #21508

Merged
merged 6 commits into from
Mar 9, 2023

Conversation

shilman
Copy link
Member

@shilman shilman commented Mar 9, 2023

Closes #21287

What I did

Storybook packages outside the monorepo were not getting upgraded properly with the --prerelease flag.

This PR changes the upgrade process to:

  • Don't hardcode the monorepo packages, use versions.ts instead
  • Upgrade storybook-related packages even if they don't have a @next dist tag, but filter out canary versions

How to test

  • See attached unit tests
  • Using the the CLI from this branch, upgrade --prerelease a project that contains older versions of non-monorepo packages that contain the string storybook, e.g. storybook-addon-designs, @storybook/addon-coverage, etc.

Copy link
Member

@yannbf yannbf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!

@yannbf
Copy link
Member

yannbf commented Mar 9, 2023

FYI (unrelated) tests are failing on Windows:

  ● getProjectRoot › should return the root directory containing a .yarn directory if there is no .git or .svn directory

    expect(received).toBe(expected) // Object.is equality

    Expected: "/path/to"
    Received: "\\path\\to"

      66 |     );
      67 |
    > 68 |     expect(getProjectRoot()).toBe('/path/to');
         |                              ^
      69 |   });
      70 | });
      71 |

      at Object.toBe (src/utils/__tests__/paths.test.ts:68:30)

@shilman shilman merged commit 41008a7 into next Mar 9, 2023
@shilman shilman deleted the shilman/21287-cli-upgrade branch March 9, 2023 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI: upgrade command does not upgrade addon-coverage
2 participants