PR: bump up the dependency packages to support react 19 and apply security patches - #4
Open
seshagiriprabhu wants to merge 17 commits into
Conversation
- Upgrade react/react-dom to v19, @types/react to v19 - Upgrade storybook packages to v10, rollup to v4.62 - Upgrade typescript to v5.7, styled-components to v6 - Add serialize-javascript override to patch security vulnerabilities - Split runtime deps into dependencies, externalized deps into peerDependencies - Add vite, tslib, storybook CLI as dev dependencies - Update storybook scripts to use new CLI commands
- Split rollup config into separate CJS/ESM builds for @rollup/plugin-typescript v12 - Replace import assert with import with syntax - Externalize @primer/react in rollup bundle - Update tsconfig target to es2016, moduleResolution to bundler
- Replace main.cjs/preview.js with main.ts/preview.ts - Switch from webpack5 builder to @storybook/react-vite - Remove deprecated addon references absorbed into Storybook 10 core - Set chunkSizeWarningLimit to 2000 kB
- Remove deprecated SSRProvider from MarkdownEditor and MarkdownViewer - Replace Tailwind @apply directives with plain CSS in style.module.scss - Update stories to use StoryFn type instead of deprecated Story - Export MarkdownEditorProps and MarkdownViewerProps types from index
… scss type declarations, remove unused polyfill-node
Use the same theme switching pattern as chaya-ui: globalTypes toolbar with useGlobals() decorator, ThemedDocsContainer for docs view.
Add isDarkTheme to useEffect dependency array so the markdown HTML is regenerated when the theme switches.
The import/order rule conflicted with prettier's sort-imports plugin. Let prettier be the sole authority on import ordering.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Bump all dependency packages to support React 19, upgrade tooling to modern standards, and apply security patches. Follows patterns established in the
chaya-uipackage for consistency across Traboda projects.React 19 & Storybook 10
^18.2.0 || ^19.0.0.cjs/.js) to TypeScript (.ts/.tsx)storybook-dark-modeaddon withglobalTypestoolbar theme switcher (same pattern as chaya-ui)ThemedDocsContainerfor docs view dark mode supportisDarkThemeinuseEffectdeps)Tooling Modernization
.eslintrc.jsonto ESLint 9 flat config (eslint.config.mjs) withtypescript-eslint@trivago/prettier-plugin-sort-importsandprettier-plugin-tailwindcssrollup-plugin-polyfill-node, silence Dart Sass legacy JS API deprecationOther Changes
npm run devscript for Storybook developmentsrc/types/scss.d.ts)libfromES6toES2016forArray.includessupportRemoved
@typescript-eslint/eslint-pluginand@typescript-eslint/parser(replaced bytypescript-eslint)eslint-config-airbnb-typescript(replaced by flat config rules)storybook-dark-mode(replaced by globalTypes theme switcher)rollup-plugin-polyfill-node(unmaintained, unnecessary — no Node.js polyfills needed)Test Plan
npm run buildcompletes without errorsnpm run lintpassesnpm run type-checkpassesnpm run devstarts Storybook on port 6006