We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Running the csf-hoist-story-annotations migration on tsx files leaves files with deprecated syntax unmodified
csf-hoist-story-annotations
tsx
unmodified
To Reproduce
npx -p @storybook/cli@next sb migrate storiesof-to-csf --glob="**/*.stories.tsx"
Example.story = { parameters: {} }
System
Environment Info: System: OS: macOS 11.4 CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz Binaries: Node: 14.17.0 - ~/.nvm/versions/node/v14.17.0/bin/node Yarn: 1.22.10 - /usr/local/bin/yarn npm: 7.10.0 Browsers: Chrome: 91.0.4472.114 Firefox: 86.0 Safari: 14.1.1 npmPackages: @storybook/addon-actions: ^5.3.19 => 5.3.21 @storybook/addon-docs: ^5.3.19 => 5.3.21 @storybook/addon-info: ^5.3.19 => 5.3.21 @storybook/addon-knobs: ^5.3.19 => 5.3.21 @storybook/addon-links: ^5.3.19 => 5.3.21 @storybook/addon-storysource: ^5.3.19 => 5.3.21 @storybook/preset-typescript: ^3.0.0 => 3.0.0 @storybook/react: ^5.3.19 => 5.3.21 @storybook/source-loader: ^5.3.19 => 5.3.21 @storybook/theming: ^5.3.19 => 5.3.21
Additional context This repo use yarn workspaces, could have an impact but unlikely.
The text was updated successfully, but these errors were encountered:
This migration is looking for code of the following form in *.stories.tsx:
*.stories.tsx
Example.story = { parameters: { options: { selectedPanel: SB_SOURCE_PANEL }, }, };
The problem is that your *.stories.tsx look like this:
export { Example as basic } from './1_basic'; export { Example as withValueLabel } from './2_label_value';
And the pattern that the codemod is looking for is in files like 1_basic.tsx and 2_label_value.tsx.
1_basic.tsx
2_label_value.tsx
If you're able to come up with a glob that matches those files, I'd expect it to work as advertised.
Sorry, something went wrong.
Ahh gotcha! Thanks for the quick look. I managed to use a regex replace in vscode to migrate the syntax.
Thanks for the help!
No branches or pull requests
Describe the bug
Running the
csf-hoist-story-annotations
migration ontsx
files leaves files with deprecated syntaxunmodified
To Reproduce
npx -p @storybook/cli@next sb migrate storiesof-to-csf --glob="**/*.stories.tsx"
Example.story = { parameters: {} }
syntaxSystem
Additional context
This repo use yarn workspaces, could have an impact but unlikely.
The text was updated successfully, but these errors were encountered: