-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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: Improve support of mono repositories #23458
Conversation
cda3ae7
to
e2a33c5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes all look great! I haven't QA'd this but I plan to do it later this week! I'm curious what will happen in scenarios where people have a "base" main.js which is used in other main.js files e.g.
import baseConfig from '../../../storybook-common/main'
export default {
...baseConfig,
stories: ['...']
}
What should happen? -> Nothing will happen ;) We are doing AST analysis, so we don't follow the path of their base config. They would have to apply the changes manually. There is no chance for us to figure out whether we have to run the auto migrations. An edge case we can safely ignore. It's not worth supporting it in the auto migrations. |
c08bba7
to
4c3e892
Compare
…y-setups CLI: Improve support of mono repositories (cherry picked from commit 5b34161)
In monorepo, the framework name will be an absolute path. A follow up for storybookjs#23458.
In monorepo, the framework name will be an absolute path. A follow up for storybookjs#23458.
In monorepo, the framework name will be an absolute path. A follow up for storybookjs#23458.
In monorepo, the framework name will be an absolute path. A follow up for storybookjs#23458.
In monorepo, the framework name will be an absolute path. A follow up for storybookjs#23458.
Closes #21216
Closes #21710
What I did
Improved support for mono repositories to apply the "wrapForPnp" wrapper also in mono repository environments. Additionally, an auto migration was added.
Improved support for projects which are part of a workspace configured by yarn, npm, pnpm, lerna, turbo or rush
How to test
yarn exec <storybook-project-folder>/code/lib/cli/bin/index.js automigrate
for the automigration oryarn exec <storybook-project-folder>/code/lib/cli/bin/index.js init
to initialize Storybook. Otherwise, you can ditch theyarn exec
part.main.ts
are properly wrapped by thewrapForPnp
orgetAbsolutePath
wrapper.main.ts
andmain.js
files.Tested scenarios:
getAbsolutePath
orwrapForPnp
functions are in place)Checklist
MIGRATION.MD
Maintainers
ci:normal
,ci:merged
orci:daily
GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli/src/sandbox-templates.ts
["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]