From c2f7379ee32d15c9bf8796e0a77fd02606bd9e63 Mon Sep 17 00:00:00 2001 From: Afzal Ahmad Date: Thu, 19 Nov 2026 23:24:06 +0100 Subject: [PATCH] release: react-data-export 1.0.0 Exit pre mode and version 1.0.0 for the latest dist-tag (from 0.6.0). The 1.0.0 changelog section opens with a summary and a 'Migrating from 0.x' lead; the READMEs, the migration guide and docs/api.md drop the prerelease wording. --- .changeset/engine-2-0-0.md | 5 -- .changeset/pre.json | 4 -- .changeset/pre/beta-wording.md | 5 -- .changeset/pre/community-credits.md | 13 ---- .../pre/csv-strictmode-single-download.md | 5 -- .changeset/pre/dataset-module.md | 11 ---- .changeset/pre/javascript-excel-alpha-3.md | 5 -- .changeset/pre/javascript-excel-beta-0.md | 5 -- .../pre/legacy-duplicate-sheet-names.md | 5 -- .changeset/pre/legacy-entry.md | 19 ------ .changeset/pre/readme-legacy-wording.md | 5 -- .changeset/pre/table-module.md | 8 --- README.md | 8 +-- apps/playground/package.json | 2 +- docs/api.md | 2 +- docs/migration.md | 2 +- package-lock.json | 4 +- packages/react-data-export/CHANGELOG.md | 65 +++++++++++++++++++ packages/react-data-export/README.md | 2 +- packages/react-data-export/package.json | 2 +- packages/react-data-export/src/index.ts | 2 +- 21 files changed, 77 insertions(+), 102 deletions(-) delete mode 100644 .changeset/engine-2-0-0.md delete mode 100644 .changeset/pre.json delete mode 100644 .changeset/pre/beta-wording.md delete mode 100644 .changeset/pre/community-credits.md delete mode 100644 .changeset/pre/csv-strictmode-single-download.md delete mode 100644 .changeset/pre/dataset-module.md delete mode 100644 .changeset/pre/javascript-excel-alpha-3.md delete mode 100644 .changeset/pre/javascript-excel-beta-0.md delete mode 100644 .changeset/pre/legacy-duplicate-sheet-names.md delete mode 100644 .changeset/pre/legacy-entry.md delete mode 100644 .changeset/pre/readme-legacy-wording.md delete mode 100644 .changeset/pre/table-module.md diff --git a/.changeset/engine-2-0-0.md b/.changeset/engine-2-0-0.md deleted file mode 100644 index 9e56c39..0000000 --- a/.changeset/engine-2-0-0.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-data-export": patch ---- - -Require javascript-excel `^2.0.0`, the stable release (was a 2.0.0 prerelease range). diff --git a/.changeset/pre.json b/.changeset/pre.json deleted file mode 100644 index f679993..0000000 --- a/.changeset/pre.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "mode": "pre", - "tag": "beta" -} diff --git a/.changeset/pre/beta-wording.md b/.changeset/pre/beta-wording.md deleted file mode 100644 index 15a2f58..0000000 --- a/.changeset/pre/beta-wording.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-data-export": patch ---- - -README: the 1.0 feature set is complete; until 1.0.0, changes are limited to fixes found in testing. A Web Worker option comes in a 1.x release. diff --git a/.changeset/pre/community-credits.md b/.changeset/pre/community-credits.md deleted file mode 100644 index 209f486..0000000 --- a/.changeset/pre/community-credits.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -"react-data-export": patch ---- - -Thanks to the community pull requests whose ideas shaped 1.0: -- #143 by @samuelhulla: correct the `ExcelCell` typing (#141). -- #161 by @atefBB: document the real `alignment.horizontal` values. -- #165 by @mehmetyilmaz001: nested object access in columns (`user.name`, #164). -- #167 by @apperside: a callback after the file is generated. -- #171 by @xaviergeorge: fix the `ExcelCell` value type (#141). -- #174 by @tobwithu: make the types work with React + TypeScript. -- #176 by @saeedkhal: skip falsy (conditional) columns. -- #180 by @imsuvesh: ship the type declarations where npm resolves them (#179, #146, #64). diff --git a/.changeset/pre/csv-strictmode-single-download.md b/.changeset/pre/csv-strictmode-single-download.md deleted file mode 100644 index 8583d5a..0000000 --- a/.changeset/pre/csv-strictmode-single-download.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-data-export": patch ---- - -CSV exports started on mount under React 18/19 StrictMode no longer download twice. `toCsvBlob` is synchronous, so a CSV export (build, write, download) used to finish inside the first effect run, before StrictMode's simulated unmount could abort it. Every export (`exportDataset`, `exportWorkbook`, `exportTable`, and the hooks and components built on them) now yields once and re-checks its signal before building. xlsx exports were not affected. diff --git a/.changeset/pre/dataset-module.md b/.changeset/pre/dataset-module.md deleted file mode 100644 index 89c5a83..0000000 --- a/.changeset/pre/dataset-module.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"react-data-export": minor ---- - -Add the 1.0 dataset module, built on javascript-excel 2.0: -- `exportDataset(dataset, options)` and `exportWorkbook({ sheets, activeSheet }, options)` build sheets with javascript-excel's `fromDataset`/`fromDatasets`, write `.xlsx` (`toBlob`) or `.csv` (`toCsvBlob`) and download through `javascript-excel/dom`. They resolve with `{ blob, filename, format, warnings }`. Falsy sheets are skipped, `download: false` only builds the file, and `signal`/`onProgress` are supported. -- `useExcelExport(defaults)` adds `status`, `progress`, `error` and `result`, stable functions, `abort()`, and aborts running exports on unmount (StrictMode-safe). -- `` renders a default button or a render prop with a `run()` that never rejects, and reports through `onExported`/`onError`. -- The entry is marked `"use client"`. The dataset, column, style and option types are javascript-excel's own, re-exported (`Dataset`, `ColumnDef`, `LeafColumn`, `GroupColumn`, `DatasetBlock`, `DatasetOptions`, `Style`, `CellInput`, `WriteOptions`, `CsvWriteOptions`, `Progress`, `ExcelWarning`, `DocProperties`), along with `isExcelError` and `sanitizeSheetName`. - -The scaffold placeholder `useVersion` is removed. diff --git a/.changeset/pre/javascript-excel-alpha-3.md b/.changeset/pre/javascript-excel-alpha-3.md deleted file mode 100644 index 49a4665..0000000 --- a/.changeset/pre/javascript-excel-alpha-3.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-data-export": patch ---- - -Depend on javascript-excel `^2.0.0-alpha.3`. diff --git a/.changeset/pre/javascript-excel-beta-0.md b/.changeset/pre/javascript-excel-beta-0.md deleted file mode 100644 index 2cfc784..0000000 --- a/.changeset/pre/javascript-excel-beta-0.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-data-export": patch ---- - -Depend on javascript-excel `^2.0.0-beta.0`, its first 2.0.0 beta. Since 2.0.0-alpha.7 its writer returns to the event loop about every 16 ms, so a large `.xlsx` export on the main thread no longer freezes the page, and `signal`/`abort()` take effect while it runs. diff --git a/.changeset/pre/legacy-duplicate-sheet-names.md b/.changeset/pre/legacy-duplicate-sheet-names.md deleted file mode 100644 index 8b138ea..0000000 --- a/.changeset/pre/legacy-duplicate-sheet-names.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-data-export": patch ---- - -`react-data-export/legacy`: two `` elements with the same name (compared case-insensitively) no longer fail the export; the later ones are written as `name (2)`, `name (3)`... with a development warning. 0.x wrote such files as given, and Excel offered to repair them (#94). diff --git a/.changeset/pre/legacy-entry.md b/.changeset/pre/legacy-entry.md deleted file mode 100644 index b359ebd..0000000 --- a/.changeset/pre/legacy-entry.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -"react-data-export": minor ---- - -Add `react-data-export/legacy`, a deprecated quick path for 0.x code: ``, ``, ``, the 0.x default export (`import ReactExport from 'react-data-export/legacy'`), the `dataSet` shape with `xSteps`/`ySteps`, and xlsx-style cell styles, built on 1.0's export code and javascript-excel. The files it writes match 0.6.0's (checked against the real 0.6.0): -- plain `` headers and bold `dataSet` headers -- 80 px default widths -- UTC dates -- the `Download` default name with the extension always appended -- the `` trigger wrapper - -0.6's bugs stay fixed: -- one download under StrictMode -- `fileExtension: 'csv'` writes real CSV -- `xls`/`txt`/`html` write `.xlsx` with a warning -- string `dataSet` columns keep their header text -- falsy children are skipped - -`convertLegacyStyle` converts 0.x styles to the 1.0 style model. The entry is supported for all of 1.x and removed in 2.0, and it logs one deprecation warning in development. It's a separate entry, so the main entry's bundle doesn't include it. diff --git a/.changeset/pre/readme-legacy-wording.md b/.changeset/pre/readme-legacy-wording.md deleted file mode 100644 index 75cf86d..0000000 --- a/.changeset/pre/readme-legacy-wording.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-data-export": patch ---- - -README: the 0.6 API is described as shipping only in the deprecated `react-data-export/legacy` entry (removed in 2.0), and the playground is linked. diff --git a/.changeset/pre/table-module.md b/.changeset/pre/table-module.md deleted file mode 100644 index ed83b64..0000000 --- a/.changeset/pre/table-module.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"react-data-export": minor ---- - -Add table export, built on javascript-excel 2.0's `fromTable`: -- `exportTable(tableOrRef, options)` reads an HTML `` (an element, or a ref read when called). `colspan`/`rowspan` become merges, `` rows become headers, hidden and `[data-export-ignore]` rows are skipped, and `data-*` hints are honoured. It exports `.xlsx` or `.csv` with the same options and the same `{ blob, filename, format, warnings }` result as `exportDataset`. `fromTable` options pass through unchanged. -- `useTableExport(ref, defaults)` and `` share the state, abort, unmount and trigger behaviour of `useExcelExport` and ``. -- An empty ref rejects with a `TypeError` before anything is built. `FromTableOptions`, `TableElement` and `TableCellElement` are re-exported. diff --git a/README.md b/README.md index f4570ba..0a08349 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,10 @@ Export data from React to `.xlsx` and `.csv`. -## Status: 1.0 is a from-scratch rewrite, in progress +## Status: 1.0 is a from-scratch rewrite - **1.0 has a new API.** It is rebuilt on [javascript-excel](https://github.com/securedeveloper/javascript-excel) 2.0, and its main entry has no `` / `` / ``. The 0.6 API ships only as the deprecated `react-data-export/legacy` entry: supported for all of 1.x, removed in 2.0. See [Migrating from 0.x](#migrating-from-0x). -- **1.0 prereleases are on npm's `next` tag:** `npm install react-data-export@next`. They have dataset export (`exportDataset`, `exportWorkbook`, `useExcelExport`, ``) and table export for an HTML `
` (`exportTable`, `useTableExport`, ``), as specified in [docs/api.md](docs/api.md), built on javascript-excel 2.0's `fromDataset`, `fromTable`, writer and download. The 1.0 feature set is complete: until 1.0.0, changes are limited to fixes found in testing. Coming from 0.x: the [migration guide](docs/migration.md). +- **1.0.0 is on npm's `latest` tag:** `npm install react-data-export`. It has dataset export (`exportDataset`, `exportWorkbook`, `useExcelExport`, ``) and table export for an HTML `
` (`exportTable`, `useTableExport`, ``), as specified in [docs/api.md](docs/api.md), built on javascript-excel 2.0's `fromDataset`, `fromTable`, writer and download. Coming from 0.x: the [migration guide](docs/migration.md). - **Big exports stay responsive.** Exports run on the main thread. Since javascript-excel 2.0.0-alpha.7 (react-data-export requires 2.0.0 or later), the `.xlsx` writer returns to the event loop about every 16 ms, so the page keeps rendering and handling input during a large export, and `abort()` works while it runs. A `worker` option, which writes the file in a Web Worker on top of `javascript-excel/worker`, comes in a 1.x release after 1.0.0, not in 1.0 ([docs/api.md §7](docs/api.md#7-errors-abort-and-progress)). ```tsx @@ -20,8 +20,8 @@ Export data from React to `.xlsx` and `.csv`. Download people.xlsx ``` -- **Try it in the browser:** the [playground](https://react-data-export-playground.vercel.app/) runs the published 1.0 prerelease. -- **0.6.x stays on npm unchanged, and `latest` is still 0.6.0:** a plain `npm install react-data-export` keeps installing 0.6.0 until 1.0.0 is final, and `npm install react-data-export@0.6` keeps working. Nothing is unpublished or deprecated. +- **Try it in the browser:** the [playground](https://react-data-export-playground.vercel.app/) runs the published 1.0 release. +- **0.6.x stays on npm unchanged:** `latest` is now 1.0.0, so a plain `npm install react-data-export` installs 1.0. Existing `^0.6.0` ranges keep resolving to 0.6.0, and `npm install react-data-export@0.6` keeps working. Nothing is unpublished or deprecated. - **Legacy code and docs** (0.x README, examples, Babel/Jest setup) live at the [`v0.6.0` tag](https://github.com/securedeveloper/react-data-export/tree/v0.6.0). ## Migrating from 0.x diff --git a/apps/playground/package.json b/apps/playground/package.json index 212c9e4..efd9aae 100644 --- a/apps/playground/package.json +++ b/apps/playground/package.json @@ -12,7 +12,7 @@ "dependencies": { "javascript-excel": "^2.0.0", "react": "^19.3.1", - "react-data-export": "1.0.0-beta.0", + "react-data-export": "1.0.0", "react-dom": "^19.3.1" }, "devDependencies": { diff --git a/docs/api.md b/docs/api.md index f3c652e..479e1d4 100644 --- a/docs/api.md +++ b/docs/api.md @@ -1,6 +1,6 @@ # react-data-export 1.0: API design (dataset module) -Status: **design decided (2026-11-16); the dataset module is implemented** (RDE-1.9) on **javascript-excel ≥ 2.0.0** (see [§9](#9-dependencies-and-order)), and ships in the 1.0 prereleases on npm's `next` tag. The 1.0 feature set is complete: until 1.0.0, changes are limited to fixes found in testing. Table export (module B, [§13](#13-table-export)) is designed and implemented in RDE-1.17. +Status: **design decided (2026-11-16); the dataset module is implemented** (RDE-1.9) on **javascript-excel ≥ 2.0.0** (see [§9](#9-dependencies-and-order)), and ships in 1.0.0 on npm's `latest` tag. Table export (module B, [§13](#13-table-export)) is designed and implemented in RDE-1.17. This document covers module A, **dataset export** (`exportDataset`, `exportWorkbook`, `useExcelExport`, ``), and module B, **table export** (`exportTable`, `useTableExport`, ``, [§13](#13-table-export)). diff --git a/docs/migration.md b/docs/migration.md index 6bc3365..c5a0b8f 100644 --- a/docs/migration.md +++ b/docs/migration.md @@ -27,7 +27,7 @@ Every 1.0 snippet below is a file in [`examples/migration/`](../examples/migrati ```sh npm uninstall file-saver tempa-xlsx # only if you added them for 0.x -npm install react-data-export@next # 1.0 prereleases are on the `next` tag +npm install react-data-export@^1 # 1.0 is on the `latest` tag ``` - **No peer libraries, no bundler setup.** 0.x needed `file-saver` and `tempa-xlsx`, and webpack settings for them (`node: { fs: 'empty' }`, `externals` for `./cptable` and `./jszip`). Delete those. 1.0's only dependency is javascript-excel, which has no dependencies of its own. diff --git a/package-lock.json b/package-lock.json index 6f956fb..e6fc12f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "dependencies": { "javascript-excel": "^2.0.0", "react": "^19.3.1", - "react-data-export": "1.0.0-beta.0", + "react-data-export": "1.0.0", "react-dom": "^19.3.1" }, "devDependencies": { @@ -4153,7 +4153,7 @@ } }, "packages/react-data-export": { - "version": "1.0.0-beta.0", + "version": "1.0.0", "license": "MIT", "dependencies": { "javascript-excel": "^2.0.0" diff --git a/packages/react-data-export/CHANGELOG.md b/packages/react-data-export/CHANGELOG.md index a27725c..adc5e5c 100644 --- a/packages/react-data-export/CHANGELOG.md +++ b/packages/react-data-export/CHANGELOG.md @@ -1,5 +1,70 @@ # react-data-export +## 1.0.0 + +1.0 is a from-scratch rewrite on [javascript-excel](https://github.com/securedeveloper/javascript-excel) 2.0, with no runtime dependency other than javascript-excel. It exports datasets (`exportDataset`, `exportWorkbook`, `useExcelExport`, ``) and HTML tables (`exportTable`, `useTableExport`, ``) to real `.xlsx` and `.csv`, in React 17, 18 and 19. + +### Migrating from 0.x + +0.6.x stays on npm. Existing `^0.6.0` ranges keep installing it; `latest` now points to 1.0.0. The [migration guide](https://github.com/securedeveloper/react-data-export/blob/main/docs/migration.md) shows every 0.x pattern next to its 1.0 code. In short: + +- **New main API.** The main entry has named exports only and no `` / `` / ``. For a quick switch, [`react-data-export/legacy`](https://github.com/securedeveloper/react-data-export/blob/main/docs/migration.md#11-quick-path-react-data-exportlegacy) runs that 0.6 JSX on 1.0 with one import change; it is deprecated, supported for all of 1.x and removed in 2.0. +- **No peer libraries or bundler setup.** Uninstall `file-saver` and `tempa-xlsx` if you added them for 0.x, and drop the webpack settings they needed (`node: { fs: 'empty' }`, the `./cptable` and `./jszip` externals). +- **Real CSV.** 0.x wrote an `.xlsx` package under any `fileExtension`; 1.0 writes real CSV for `'csv'` and throws a `TypeError` for other formats. +- **Output differences** (header bold, column widths, dates in the local time zone instead of UTC, file name default `export`, async exports with `onError` / `onExported`, validated sheet names and styles) are listed in the guide's [behaviour differences](https://github.com/securedeveloper/react-data-export/blob/main/docs/migration.md#4-behaviour-differences), each with the option that restores the 0.6 output. +- **Runtimes:** Node.js 22 or later for tooling and SSR imports; React 17–19. + +The prereleases `1.0.0-alpha.1` to `1.0.0-beta.0` stay on the `next` dist-tag; their entries are folded into this section. + +### Minor Changes + +- 05a07db: Add the 1.0 dataset module, built on javascript-excel 2.0: + - `exportDataset(dataset, options)` and `exportWorkbook({ sheets, activeSheet }, options)` build sheets with javascript-excel's `fromDataset`/`fromDatasets`, write `.xlsx` (`toBlob`) or `.csv` (`toCsvBlob`) and download through `javascript-excel/dom`. They resolve with `{ blob, filename, format, warnings }`. Falsy sheets are skipped, `download: false` only builds the file, and `signal`/`onProgress` are supported. + - `useExcelExport(defaults)` adds `status`, `progress`, `error` and `result`, stable functions, `abort()`, and aborts running exports on unmount (StrictMode-safe). + - `` renders a default button or a render prop with a `run()` that never rejects, and reports through `onExported`/`onError`. + - The entry is marked `"use client"`. The dataset, column, style and option types are javascript-excel's own, re-exported (`Dataset`, `ColumnDef`, `LeafColumn`, `GroupColumn`, `DatasetBlock`, `DatasetOptions`, `Style`, `CellInput`, `WriteOptions`, `CsvWriteOptions`, `Progress`, `ExcelWarning`, `DocProperties`), along with `isExcelError` and `sanitizeSheetName`. + + The scaffold placeholder `useVersion` is removed. +- 986d0d7: Add `react-data-export/legacy`, a deprecated quick path for 0.x code: ``, ``, ``, the 0.x default export (`import ReactExport from 'react-data-export/legacy'`), the `dataSet` shape with `xSteps`/`ySteps`, and xlsx-style cell styles, built on 1.0's export code and javascript-excel. The files it writes match 0.6.0's (checked against the real 0.6.0): + - plain `` headers and bold `dataSet` headers + - 80 px default widths + - UTC dates + - the `Download` default name with the extension always appended + - the `` trigger wrapper + + 0.6's bugs stay fixed: + - one download under StrictMode + - `fileExtension: 'csv'` writes real CSV + - `xls`/`txt`/`html` write `.xlsx` with a warning + - string `dataSet` columns keep their header text + - falsy children are skipped + + `convertLegacyStyle` converts 0.x styles to the 1.0 style model. The entry is supported for all of 1.x and removed in 2.0, and it logs one deprecation warning in development. It's a separate entry, so the main entry's bundle doesn't include it. +- e4e9492: Add table export, built on javascript-excel 2.0's `fromTable`: + - `exportTable(tableOrRef, options)` reads an HTML `
` (an element, or a ref read when called). `colspan`/`rowspan` become merges, `` rows become headers, hidden and `[data-export-ignore]` rows are skipped, and `data-*` hints are honoured. It exports `.xlsx` or `.csv` with the same options and the same `{ blob, filename, format, warnings }` result as `exportDataset`. `fromTable` options pass through unchanged. + - `useTableExport(ref, defaults)` and `` share the state, abort, unmount and trigger behaviour of `useExcelExport` and ``. + - An empty ref rejects with a `TypeError` before anything is built. `FromTableOptions`, `TableElement` and `TableCellElement` are re-exported. + +### Patch Changes + +- e9f731c: Require javascript-excel `^2.0.0`, the stable release (was a 2.0.0 prerelease range). +- README: drop the prerelease notice; install from `latest`. +- f48b7b6: README: the 1.0 feature set is complete; until 1.0.0, changes are limited to fixes found in testing. A Web Worker option comes in a 1.x release. +- 12d2cbf: Thanks to the community pull requests whose ideas shaped 1.0: + - #143 by @samuelhulla: correct the `ExcelCell` typing (#141). + - #161 by @atefBB: document the real `alignment.horizontal` values. + - #165 by @mehmetyilmaz001: nested object access in columns (`user.name`, #164). + - #167 by @apperside: a callback after the file is generated. + - #171 by @xaviergeorge: fix the `ExcelCell` value type (#141). + - #174 by @tobwithu: make the types work with React + TypeScript. + - #176 by @saeedkhal: skip falsy (conditional) columns. + - #180 by @imsuvesh: ship the type declarations where npm resolves them (#179, #146, #64). +- de3f774: CSV exports started on mount under React 18/19 StrictMode no longer download twice. `toCsvBlob` is synchronous, so a CSV export (build, write, download) used to finish inside the first effect run, before StrictMode's simulated unmount could abort it. Every export (`exportDataset`, `exportWorkbook`, `exportTable`, and the hooks and components built on them) now yields once and re-checks its signal before building. xlsx exports were not affected. +- 180ee54: Depend on javascript-excel `^2.0.0-alpha.3`. +- f48b7b6: Depend on javascript-excel `^2.0.0-beta.0`, its first 2.0.0 beta. Since 2.0.0-alpha.7 its writer returns to the event loop about every 16 ms, so a large `.xlsx` export on the main thread no longer freezes the page, and `signal`/`abort()` take effect while it runs. +- 1a36b62: `react-data-export/legacy`: two `` elements with the same name (compared case-insensitively) no longer fail the export; the later ones are written as `name (2)`, `name (3)`... with a development warning. 0.x wrote such files as given, and Excel offered to repair them (#94). +- 3ce8219: README: the 0.6 API is described as shipping only in the deprecated `react-data-export/legacy` entry (removed in 2.0), and the playground is linked. + ## 1.0.0-beta.0 First beta of 1.0.0, on the `next` dist-tag. The 1.0 feature set is complete: everything in the 1.0.0-alpha releases below. Until 1.0.0, changes are limited to fixes found in testing. The Web Worker option (`worker`, on `javascript-excel/worker`) comes in a 1.x release, not in 1.0. Until then the main-thread writer yields to the browser, so large exports keep the page responsive. The 0.x API (``, ``, ``) runs on 1.0 through the deprecated `react-data-export/legacy` entry (removed in 2.0); see the migration guide. 0.6.0 stays on `latest` until 1.0.0. Bundle size: in a Vite + React 19 production build, 1.0 adds 24.7 KiB gzip for `exportDataset` and 31.5 KiB with every export, against 266.3 KiB for 0.6.0's `` (measured with the bundler matrix's `bundle-size` fixture). diff --git a/packages/react-data-export/README.md b/packages/react-data-export/README.md index 8df8336..4b3fe35 100644 --- a/packages/react-data-export/README.md +++ b/packages/react-data-export/README.md @@ -2,7 +2,7 @@ Export data from React to `.xlsx` and `.csv`, built on [javascript-excel](https://github.com/securedeveloper/javascript-excel) 2.0. -> **This is a 1.0 prerelease of a from-scratch rewrite** (`npm install react-data-export@next`). The API may still change before 1.0.0. 1.0's main API is new: the main entry has no `` / `` / ``, and the 0.6 API ships only as the deprecated `react-data-export/legacy` entry (removed in 2.0). The [migration guide](https://github.com/securedeveloper/react-data-export/blob/main/docs/migration.md) shows every 0.x pattern next to its 1.0 code. The `latest` tag stays **0.6.0** until 1.0.0 is final; the 0.x docs are at the [`v0.6.0` tag](https://github.com/securedeveloper/react-data-export/tree/v0.6.0). +> **1.0 is a from-scratch rewrite** (`npm install react-data-export`). Its main API is new: the main entry has no `` / `` / ``, and the 0.6 API ships only as the deprecated `react-data-export/legacy` entry (removed in 2.0). The [migration guide](https://github.com/securedeveloper/react-data-export/blob/main/docs/migration.md) shows every 0.x pattern next to its 1.0 code. 0.6.x stays on npm (`npm install react-data-export@0.6`); the 0.x docs are at the [`v0.6.0` tag](https://github.com/securedeveloper/react-data-export/tree/v0.6.0). ```tsx import { useRef } from 'react'; diff --git a/packages/react-data-export/package.json b/packages/react-data-export/package.json index 3f25473..a85a5cf 100644 --- a/packages/react-data-export/package.json +++ b/packages/react-data-export/package.json @@ -1,6 +1,6 @@ { "name": "react-data-export", - "version": "1.0.0-beta.0", + "version": "1.0.0", "description": "Export data from React to .xlsx and .csv. 1.0 is a from-scratch rewrite in progress.", "license": "MIT", "author": "Afzal Ahmad", diff --git a/packages/react-data-export/src/index.ts b/packages/react-data-export/src/index.ts index 81c5b10..b9fa7a3 100644 --- a/packages/react-data-export/src/index.ts +++ b/packages/react-data-export/src/index.ts @@ -34,4 +34,4 @@ export type { FromTableOptions, TableCellElement, TableElement } from 'javascrip export { isExcelError, sanitizeSheetName } from 'javascript-excel'; /** The published version of react-data-export. */ -export const version = '1.0.0-beta.0'; +export const version = '1.0.0';