-
Notifications
You must be signed in to change notification settings - Fork 42
Prepare for SB9 #75
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
Prepare for SB9 #75
Conversation
ndelangen
commented
Mar 12, 2025
- Upgraded Storybook dependencies to version 9.0.0-0 in package.json and package-lock.json.
- Changed the module resolution strategy in tsconfig.json to "bundler" and updated the module type to "Preserve".
- Updated TypeScript target to ES2022.
- Adjusted imports in story files to use "@storybook/react-vite" and added a mock function for button click events.
- Cleaned up unused code and comments in various files.
- Upgraded Storybook dependencies to version 9.0.0-0 in package.json and package-lock.json. - Changed the module resolution strategy in tsconfig.json to "bundler" and updated the module type to "Preserve". - Updated TypeScript target to ES2022. - Adjusted imports in story files to use "@storybook/react-vite" and added a mock function for button click events. - Cleaned up unused code and comments in various files.
- Removed outdated dependencies from package-lock.json. - Updated 'semver' version to 7.7.1 in multiple locations. - Changed the postinstall script name to '_postinstall' in package.json for better compatibility.
Prepare for SB9 (part 2)
- Replaced `@storybook/addon-essentials` and `@storybook/addon-interactions` with `@storybook/addon-docs` in package.json and .storybook/main.ts. - Updated import statements in Introduction.mdx to use `@storybook/addon-docs/blocks`. - Renamed the postinstall script in package.json to `_postinstall` for compatibility. - Updated various dependencies in package-lock.json to their latest versions, including `@auto-it` packages and Babel-related packages.
…20.x - Created a new build workflow to automate the build process on push events. - Updated the release workflow to use Node.js 20.x instead of 18.x for consistency across workflows.
JReinhold
left a comment
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.
@ndelangen I changed a few tsup and TS configurations, as you can see from my comments. Let's discuss this when you can, going to merge for now.
| autodocs: "tag", | ||
| }, | ||
| }; | ||
| addons: ["@storybook/addon-docs", "./local-preset.cjs"], |
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.
Changed to .cjs to be correct
| "skipLibCheck": true, | ||
| "target": "es2023", // Node 20 according to https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping#node-20 | ||
| "allowJs": true, | ||
| "resolveJsonModule": true, | ||
| "moduleDetection": "force", | ||
| "moduleResolution": "bundler", | ||
| "module": "preserve", | ||
| "jsx": "react", | ||
| "lib": ["es2020", "dom"], | ||
| "module": "commonjs", | ||
| "isolatedModules": true, | ||
| "verbatimModuleSyntax": true, | ||
| "strict": true, | ||
| "noUncheckedIndexedAccess": true, | ||
| "noImplicitOverride": true, | ||
| "noImplicitAny": true, | ||
| "rootDir": "./src", | ||
| "skipLibCheck": true, | ||
| "target": "ES2020" | ||
| "lib": ["es2023", "dom", "dom.iterable"], | ||
| "baseUrl": ".", | ||
| "rootDir": "./src" |
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.
changed this to follow https://www.totaltypescript.com/tsconfig-cheat-sheet#base-options and set target to es2023 to match Node 20: https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping#node-20
| // The current browsers supported by Storybook v7 | ||
| const BROWSER_TARGET: Options["target"] = [ | ||
| "chrome100", | ||
| "safari15", | ||
| "firefox91", | ||
| ]; | ||
| const NODE_TARGET: Options["target"] = ["node18"]; |
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.
I removed browser targets as the manager+preview builders are going to bundle this accordingly anyway.