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

Docs: Adds pnpm yarn automigrate scripts #23477

Merged
merged 1 commit into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions docs/configure/upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,17 @@ In addition to running the command, we also recommend checking the [MIGRATION.md

Storybook upgrades are not the only thing to consider: changes in the ecosystem also present challenges. For example, lots of frameworks ([Angular 12](https://angular.io/guide/updating-to-version-12#breaking-changes-in-angular-version-12), [Create React App v5](https://github.com/facebook/create-react-app/pull/11201), [NextJS](https://nextjs.org/docs/upgrading#webpack-5)) have recently migrated from [Webpack 4 to Webpack 5](https://webpack.js.org/migrate/5/), so even if you don't upgrade your Storybook version, you might need to update your configuration accordingly. That's what Automigrate is for:

```
npx storybook@latest automigrate
```
<!-- prettier-ignore-start -->

<CodeSnippets
paths={[
'common/storybook-automigrate.npm.js.mdx',
'common/storybook-automigrate.pnpm.js.mdx',
'common/storybook-automigrate.yarn.js.mdx'
]}
/>

<!-- prettier-ignore-end -->

It runs a set of standard configuration checks, explains what is potentially out-of-date, and offers to fix it for you automatically. It also points to the relevant documentation so you can learn more. It runs automatically as part of [`storybook upgrade`](#upgrade-script) command, but it's also available on its own if you don't want to upgrade Storybook.

Expand All @@ -55,6 +63,7 @@ To upgrade to the latest pre-release:
paths={[
'common/storybook-upgrade-prerelease.npm.js.mdx',
'common/storybook-upgrade-prerelease.pnpm.js.mdx',
'common/storybook-upgrade-prerelease.yarn.js.mdx',
]}
/>

Expand Down
3 changes: 3 additions & 0 deletions docs/snippets/common/storybook-automigrate.npm.js.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```shell
npx storybook@latest automigrate
```
3 changes: 3 additions & 0 deletions docs/snippets/common/storybook-automigrate.pnpm.js.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```shell
pnpm dlx storybook@latest automigrate
```
3 changes: 3 additions & 0 deletions docs/snippets/common/storybook-automigrate.yarn.js.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```shell
yarn dlx storybook@latest automigrate
```