Skip to content

chore: upgrade dependencies, add TypeScript support, and restructure build output#435

Merged
tonnyskk merged 3 commits intomasterfrom
djia/UpgradeAndTSSupport
Apr 17, 2026
Merged

chore: upgrade dependencies, add TypeScript support, and restructure build output#435
tonnyskk merged 3 commits intomasterfrom
djia/UpgradeAndTSSupport

Conversation

@tonnyskk
Copy link
Copy Markdown
Contributor

@tonnyskk tonnyskk commented Apr 17, 2026

upgrade dependencies, add TypeScript support, and restructure build output

  • Upgrade all dev dependencies (ESLint 9, Jest 30, Prettier 3, Husky 9, etc.)
  • Replace node-sass with sass, react-test-renderer with @testing-library/react
  • Migrate ESLint from .eslintrc to flat config (eslint.config.mjs) with TS parser
  • Add TypeScript: convert all src/ and spec/ files from JS to TS/TSX
  • Keep Babel for JS output, add tsc for type declarations (dist/types/)
  • Restructure build output into dist/ (cjs, esm, types, styles.css)
  • Upgrade Gatsby website to v4 + React 18 with updated plugins and examples
  • Move spec files to dedicated spec/ directory

v2.0.0 (2026-04-16)

Breaking Changes

  • Build output restructured: lib/dist/cjs/, es/dist/esm/, types/dist/types/, styles.cssdist/styles.css
    • CSS import changed from react-base-table/styles.css to react-base-table/dist/styles.css
    • SCSS import changed from ~react-base-table/es/_BaseTable.scss to react-base-table/dist/esm/_BaseTable.scss
  • Peer dependency: requires React >= 17.0.2 (dropped IE11 support)
  • Removed hand-written types/index.d.ts: replaced by auto-generated declarations from TypeScript source

Features

  • TypeScript: rewritten all source files (src/) and specs (spec/) in TypeScript; ships .d.ts declarations out of the box
  • Exported types: ColumnShape, RowData, RowKey, CellRendererProps, HeaderRendererProps, RowRendererProps, ScrollArgs, SortByShape, SortState, TableComponents, and more
  • New utility export: cloneArray

Upgrades

  • Upgraded all dev dependencies: ESLint 9, Jest 30, Prettier 3, Husky 9, Sass (Dart), TypeScript 6
  • Replaced node-sass with sass (Dart Sass)
  • Replaced react-test-renderer with @testing-library/react
  • Migrated ESLint from .eslintrc to flat config (eslint.config.mjs) with @typescript-eslint/parser
  • Moved test files from src/ to dedicated spec/ directory

Bug Fixes

  • fix: _handleRowExpand expand logic was always true (!arr.indexOf(x) >= 0arr.indexOf(x) < 0)

Website (Gatsby demo)

  • Upgraded Gatsby 2 → 4, React 16 → 18, and all associated plugins
  • Migrated faker@faker-js/faker v8
  • Fixed navigation links, code block rendering, and live code examples

…build output

- Upgrade all dev dependencies (ESLint 9, Jest 30, Prettier 3, Husky 9, etc.)
- Replace node-sass with sass, react-test-renderer with @testing-library/react
- Migrate ESLint from .eslintrc to flat config (eslint.config.mjs) with TS parser
- Add TypeScript: convert all src/ and spec/ files from JS to TS/TSX
- Keep Babel for JS output, add tsc for type declarations (dist/types/)
- Restructure build output into dist/ (cjs, esm, types, styles.css)
- Upgrade Gatsby website to v4 + React 18 with updated plugins and examples
- Move spec files to dedicated spec/ directory
@tonnyskk tonnyskk added the WIP Working in progress label Apr 17, 2026
Comment thread README.md
- Move Column static properties (Alignment, FrozenDirection) into class body
- Use `keyof TableComponents` for _getComponent instead of untyped string
- Add JSDoc comments to ColumnShape and other shared types
- Export cloneArray from index.ts
- Include LICENSE.md and README.md in published files

Made-with: Cursor
…s JSDoc

- Bump version from 1.13.5 to 2.0.0
- Generate v2.0.0 changelog with breaking changes, features, upgrades, and bug fixes
- Update docs (get-started, advance) with new import paths and browser support
- Restore JSDoc comments on BaseTable.propTypes for gatsby-transformer-react-docgen

Made-with: Cursor
@tonnyskk tonnyskk removed the WIP Working in progress label Apr 17, 2026
@tonnyskk tonnyskk merged commit 53c5af0 into master Apr 17, 2026
9 checks passed
@tonnyskk tonnyskk deleted the djia/UpgradeAndTSSupport branch April 17, 2026 16:42
@tonnyskk tonnyskk mentioned this pull request Apr 17, 2026
@nihgwu
Copy link
Copy Markdown
Contributor

nihgwu commented Apr 17, 2026

😮

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants