-
Notifications
You must be signed in to change notification settings - Fork 7
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
fix: updated storybook to v7 #509
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
e3745c9
fix(update storybook): updated storybook to v7
vivek-p44 49ca0a2
fix(update storybook): added changeset
vivek-p44 6ece42a
fix(update storybook): removed unused file
vivek-p44 14b83ab
fix(update storybook): fix calendar range story rendering
vivek-p44 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'storybook-manifest': minor | ||
--- | ||
|
||
Upgraded storybook to v7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
{ | ||
"**/*.{ts,tsx,js,jsx}": [ | ||
"prettier --write", | ||
"eslint --fix --max-warnings 0" | ||
], | ||
"**/*.{md,mdx,yml,json}": [ | ||
"**/*.{ts,tsx,js,jsx,md,mdx,yml,json}": [ | ||
"prettier --write" | ||
], | ||
"**/*.{ts,tsx,js,jsx} !(**/.storybook/*.js)": [ | ||
"eslint --fix --max-warnings 0" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,24 @@ | ||
module.exports = { | ||
import { dirname, join } from 'path'; | ||
const config = { | ||
stories: ['../../../packages/**/*.stories.@(js|jsx|ts|tsx|mdx)'], | ||
addons: ['@storybook/addon-links', '@storybook/addon-essentials', '@storybook/addon-a11y'], | ||
framework: '@storybook/react', | ||
core: { | ||
builder: 'webpack5', | ||
addons: [ | ||
getAbsolutePath('@storybook/addon-links'), | ||
getAbsolutePath('@storybook/addon-essentials'), | ||
getAbsolutePath('@storybook/addon-a11y'), | ||
], | ||
|
||
framework: { | ||
name: getAbsolutePath('@storybook/react-webpack5'), | ||
options: {}, | ||
}, | ||
|
||
docs: { | ||
autodocs: true, | ||
}, | ||
}; | ||
|
||
export default config; | ||
|
||
function getAbsolutePath(value) { | ||
return dirname(require.resolve(join(value, 'package.json'))); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"sourceType": "unambiguous", | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"targets": { | ||
"chrome": 100, | ||
"safari": 15, | ||
"firefox": 91 | ||
} | ||
} | ||
], | ||
"@babel/preset-typescript", | ||
"@babel/preset-react" | ||
], | ||
"plugins": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,26 @@ | ||
{ | ||
"name": "storybook", | ||
"name": "storybook-manifest", | ||
"version": "0.0.10", | ||
"private": true, | ||
"scripts": { | ||
"build": "build-storybook -c .storybook -o ./build", | ||
"dev": "start-storybook -p 8000 --quiet" | ||
"build": "storybook build -c .storybook -o ./build", | ||
"dev": "storybook dev -p 8000 --quiet" | ||
}, | ||
"dependencies": { | ||
"@project44-manifest/react": "^3.18.1", | ||
"@project44-manifest/react-icons": "^2.0.0", | ||
"@storybook/addon-a11y": "^6.5.16", | ||
"@storybook/addon-essentials": "^6.5.16", | ||
"@storybook/addon-links": "^6.5.16", | ||
"@storybook/builder-webpack5": "^6.5.16", | ||
"@storybook/manager-webpack5": "^6.5.16", | ||
"@storybook/react": "^6.5.16", | ||
"@storybook/addon-a11y": "^7.5.3", | ||
"@storybook/addon-essentials": "^7.5.3", | ||
"@storybook/addon-links": "^7.5.3", | ||
"@storybook/react": "^7.5.3", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/preset-env": "^7.23.3", | ||
"@babel/preset-react": "^7.23.3", | ||
"@babel/preset-typescript": "^7.23.3", | ||
"@storybook/react-webpack5": "^7.5.3", | ||
"storybook": "next" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
We tend to avoid default exports to enforce naming during imports - but if this is the only thing it exports its OK
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.
Yeah @dmorton-p44 i agree named import is nice thing to have, but with new version storybook expects these to be default exported.
https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#70-breaking-changes.