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

⬆️ storybook@7 #2629

Merged
merged 1 commit into from Apr 16, 2023
Merged

⬆️ storybook@7 #2629

merged 1 commit into from Apr 16, 2023

Conversation

lgeiger
Copy link
Contributor

@lgeiger lgeiger commented Apr 16, 2023

This PR updates storybook to version 7 following their migration guide to fix #1400.

Comment on lines -22 to -28
// fix to make absolute imports working in storybook
webpackFinal: async (config, { configType }) => {
config.resolve.alias = {
...config.resolve.alias,
src: path.resolve(__dirname, "../src"),
styles: path.resolve(__dirname, "../styles"),
};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not needed anymore as storybook now works with next.js automatically.

@@ -114,8 +112,10 @@
"jest-environment-jsdom": "^29.5.0",
"msw": "^0.49.3",
"msw-storybook-addon": "^1.8.0",
"path-browserify": "^1.0.1",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We already use this in website/.storybook/main.js so it makes sense to explicitly add this to the dev dependencies.

"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@types/accept-language-parser": "^1.5.3",
"@types/node": "^18.15.10",
"@types/react": "18.0.26",
"@types/react-syntax-highlighter": "^15.5.6",
"@typescript-eslint/eslint-plugin": "^5.56.0",
"assert": "^2.0.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is required since webpack 5 (the default in storybook v7) doesn't include a polyfill for assert by default anymore.

Copy link
Collaborator

@notmd notmd left a comment

Choose a reason for hiding this comment

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

Thank you so much! I'm tired to see those warning...

@notmd notmd merged commit 7dcd456 into LAION-AI:main Apr 16, 2023
4 checks passed
@lgeiger lgeiger deleted the storybook-v7 branch April 16, 2023 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix NPM warnings and vulnerabilities in website
3 participants