Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup pnpm
uses: pnpm/action-setup@v6
with:
version: 11.17.0
version: 11.21.0

- name: Setup Node
uses: actions/setup-node@v7
Expand Down Expand Up @@ -64,3 +64,11 @@ jobs:

- name: Browser accessibility and layout tests
run: pnpm test:browser

- name: Upload Playwright failure artifacts
if: failure()
uses: actions/upload-artifact@v7
with:
name: playwright-failure-${{ github.run_attempt }}
path: test-results
retention-days: 7
75 changes: 73 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,79 @@
# Changelog

## Unreleased
## 5.0.0 - 2026-08-13

No changes yet.
Version 5 upgrades the package's TanStack-facing API to TanStack React Table
v9. Existing `DataTable` props, entrypoints, persisted state, saved views, and
URL-state formats remain supported unless called out below.

### Breaking changes

- `DataTableColumnDef` now follows TanStack Table v9. Rename the column option
`sortingFn` to `sortFn`.
- Values in the `aggregationFns` registry are now context-based
`DataTableAggregationFn` definitions with an `aggregate` method instead of
v8 callables.
- `apiRef.current.getTable()` returns a v9 table instance. Read its state from
`table.store.state`, use `getPrePaginatedRowModel()`, and use v9's logical
`start` / `end` pinning state and method families.
- Row, cell, column, and header methods are prototype methods in v9. Keep them
bound to their instance instead of destructuring, spreading, or passing them
as bare callbacks.
- TanStack's `getIsSomeRowsSelected()` and
`getIsSomePageRowsSelected()` now mean at least one selected row, including
the all-selected case. Combine them with the matching `getIsAll*` predicate
when computing an indeterminate state.
- Table row data must be a record or array; primitive row values are no longer
supported.
- Consumers that import raw TanStack `Table`, `Row`, `Column`, `Cell`,
`Header`, or `ColumnDef` types must supply v9's leading feature generic.
Project-owned `DataTable*` types already contain that generic.

The wrapper's `apiRef.current.getState()` method and public/persisted
`columnPinning: { left, right }` contract are unchanged. See
[`docs/Migration.md`](./docs/Migration.md) for before/after examples and the
full compatibility boundary.

### TanStack Table v9 migration

- Upgraded `@tanstack/react-table` to v9.1.2 without using the deprecated
`useLegacyTable` bridge.
- Added one explicit project feature registry for filtering, faceting,
grouping/aggregation, sorting, pagination, expansion, visibility, ordering,
sizing/resizing, selection, and row/column pinning.
- Moved optional row models and function registries into v9 feature slots and
replaced `useReactTable` with `useTable`.
- Contained v9's feature generic behind project-owned types so adapter and
consumer code does not need to repeat the registry type.
- Preserved the wrapper's physical `left` / `right` column-pinning state at
props, persistence, URL state, saved views, and API snapshots while adapting
it to v9's internal `start` / `end` regions.
- Added coverage for v9 context-based custom aggregation definitions.

### Validation

- 318 unit/integration tests and 11 browser accessibility/layout tests
- lint, package/demo typechecks and builds, public API snapshot,
packed-consumer build, bundle budgets, frozen install, and dependency audit

## 4.5.1 - 2026-08-12

Version 4.5.1 refreshes the development and runtime dependencies without
changing the public API.

### Maintenance

- Updated pnpm, React Virtual, Playwright, React type definitions, ESLint,
jsdom, shadcn, TypeScript ESLint, and Vite dependencies.
- Synchronized the pnpm version used by local development and CI.
- Kept TanStack React Table on the compatible v8 release line; v9 requires a
separate API migration.

### Validation

- 317 unit/integration tests and 11 browser accessibility/layout tests
- lint, package/demo typechecks and builds, public API snapshot,
packed-consumer build, bundle budgets, and dependency audit

## 4.5.0 - 2026-08-11

Expand Down
39 changes: 35 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,31 @@ infinite loading, typed server data sources, and host-owned drag/upload
integrations. See
[`docs/API.md`](./docs/API.md) for the complete contract.

## Breaking changes in 5.0.0

Version 5 upgrades to TanStack React Table v9.1.2 and uses `useTable` with an
explicit feature registry rather than the deprecated legacy bridge.

Direct TanStack-facing code must:

- rename column `sortingFn` options to `sortFn`;
- replace callable custom aggregations with context-based
`DataTableAggregationFn` definitions;
- read an underlying table snapshot from `table.store.state` instead of
`table.getState()`;
- use `getPrePaginatedRowModel()` and logical `start` / `end` pinning on the
table returned by `apiRef.current.getTable()`;
- keep row/cell/column/header methods bound to their instances; and
- use record or array row data rather than primitive rows.

The wrapper-owned `apiRef.current.getState()` method and public/persisted
`columnPinning: { left, right }` contract remain unchanged. Raw TanStack types
now take a leading feature generic; package-owned `DataTable*` types already
contain it.

See [the 5.0 migration guide](./docs/Migration.md) for before/after examples,
the complete breaking-change list, and the compatibility boundary.

## Breaking Changes In 3.0.0

- package output is ESM-only; `require()`/CommonJS entrypoints were removed
Expand All @@ -47,6 +72,11 @@ integrations. See
- toolbar search now filters client-side tables by default; disable with `manualFiltering` or `enableToolbarQueryFiltering={false}`
- column filters, CSV export, row expansion, density, column pinning/reordering, selection policies, labels, and column preference persistence were added

## 4.5.1 Compatibility

Version 4.5.1 is a dependency-maintenance release with no public API changes.
It remains on TanStack React Table v8; v9 requires a separate migration.

## 4.5.0 Compatibility

Version 4.5.0 adds optional scrollbar visibility control and corrects
Expand All @@ -70,16 +100,17 @@ public prop, type, or entrypoint was removed.
Version 4.0.0 removes no public prop, type, or package entrypoint. It is a
compatibility-first major that releases the accumulated state, persistence,
quality, dependency, accessibility, and package-splitting work after 3.0.9.
The previously planned API cleanup is deferred to a future 5.0 release.
The previously planned wrapper API cleanup was ultimately deferred beyond
5.0; version 5 uses its major boundary for the TanStack v9 migration.

## Installation

```bash
pnpm add github:Dastari/data-table-pro#v4.5.0
pnpm add github:Dastari/data-table-pro#v5.0.0
```

This package is installed from GitHub refs. It is not published to npm.
Release tags such as `v4.5.0` include committed `dist/` output, so consumers
Release tags such as `v5.0.0` include committed `dist/` output, so consumers
do not need to allow package build scripts during install.

Peer dependencies:
Expand Down Expand Up @@ -651,7 +682,7 @@ hooks, and loading states.
## Quality Gates

Contributors need a jsdom 30-supported Node.js release (`^22.22.2`,
`^24.15.0`, or `>=26`) and pnpm 11.17.0. CI uses Node.js 22.22.2.
`^24.15.0`, or `>=26`) and pnpm 11.21.0. CI uses Node.js 22.22.2.
TypeScript 7 provides the `tsc` command; the `typescript` package name
intentionally points to the official TypeScript 6 compatibility package
because ESLint and declaration bundling still require the compiler API that
Expand Down
Loading