Skip to content

PR: bump up the dependency packages to support react 19 and apply security patches - #4

Open
seshagiriprabhu wants to merge 17 commits into
mainfrom
3-bump-up-the-dependency-packages-to-support-react-19-and-apply-security-patches
Open

PR: bump up the dependency packages to support react 19 and apply security patches#4
seshagiriprabhu wants to merge 17 commits into
mainfrom
3-bump-up-the-dependency-packages-to-support-react-19-and-apply-security-patches

Conversation

@seshagiriprabhu

Copy link
Copy Markdown

Summary

Bump all dependency packages to support React 19, upgrade tooling to modern standards, and apply security patches. Follows patterns established in the chaya-ui package for consistency across Traboda projects.

React 19 & Storybook 10

  • Upgrade React peer dependency to ^18.2.0 || ^19.0.0
  • Migrate Storybook from v7 (Webpack) to v10 (Vite builder)
  • Migrate Storybook config from CJS (.cjs/.js) to TypeScript (.ts/.tsx)
  • Replace storybook-dark-mode addon with globalTypes toolbar theme switcher (same pattern as chaya-ui)
  • Add ThemedDocsContainer for docs view dark mode support
  • Fix MarkdownViewer not re-rendering on theme change (missing isDarkTheme in useEffect deps)

Tooling Modernization

  • ESLint: Migrate from legacy .eslintrc.json to ESLint 9 flat config (eslint.config.mjs) with typescript-eslint
  • Prettier: Add with @trivago/prettier-plugin-sort-imports and prettier-plugin-tailwindcss
  • Husky + lint-staged: Pre-commit runs prettier + eslint on staged files; pre-push runs format-check, lint, type-check, build, and build-storybook
  • Rollup: Update config, remove unmaintained rollup-plugin-polyfill-node, silence Dart Sass legacy JS API deprecation

Other Changes

  • Add MDX documentation pages for MarkdownEditor and MarkdownViewer stories
  • Add npm run dev script for Storybook development
  • Update CI workflow for new tooling
  • Add SCSS module type declarations (src/types/scss.d.ts)
  • Update tsconfig lib from ES6 to ES2016 for Array.includes support
  • Upgrade all packages to latest semver-safe versions

Removed

  • @typescript-eslint/eslint-plugin and @typescript-eslint/parser (replaced by typescript-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 build completes without errors
  • npm run lint passes
  • npm run type-check passes
  • npm run dev starts Storybook on port 6006
  • MarkdownEditor: theme switching works in both Default and Docs views
  • MarkdownViewer: theme switching works without page reload in both Default and Docs views
  • Code blocks render with correct theme (light/dark) matching the selected mode
  • Pre-commit hook runs prettier + eslint on staged files
  • Pre-push hook runs full validation pipeline

- 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.
@seshagiriprabhu seshagiriprabhu self-assigned this Aug 8, 2026
@seshagiriprabhu seshagiriprabhu added documentation Improvements or additions to documentation enhancement New feature or request labels Aug 8, 2026
@seshagiriprabhu seshagiriprabhu added the dependencies Pull requests that update a dependency file label Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bump up the dependency packages to support react 19 and apply security patches

1 participant