Skip to content
Draft
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
22 changes: 0 additions & 22 deletions .changeset/typescript-esm-only.md

This file was deleted.

23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# react-element-to-jsx-string

## 19.0.0

### Major Changes

- 62db2f7: Convert the source code from Flow to TypeScript and publish the package as an ES module only.

**Breaking changes**

- The package is published as an ES module only, and the CommonJS build is removed. CommonJS code can still `require()` it and read the default export from `.default`:

```js
const reactElementToJSXString = require("react-element-to-jsx-string").default;
```

- Node.js 24 or later is required. In browsers, the code targets ES2020.
- Flow type definitions (`.js.flow` files) are no longer published.

**Other changes**

- TypeScript types are generated from the source and included in the package, replacing the hand-written `index.d.ts`. The `Options` type is still exported, and `inlineFunction` and `preserveFunctionLineBreak` are now typed too.
- An invalid date nested in an object or array prop is printed as `Invalid Date` instead of throwing an error.
- An object created with `Object.create({})` is no longer formatted as a plain object.

# [18.0.0](https://github.com/algolia/react-element-to-jsx-string/compare/v17.0.1...v18.0.0) (2026-10-07)


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-element-to-jsx-string",
"version": "18.0.0",
"version": "19.0.0",
"description": "Turn a ReactElement into the corresponding JSX string.",
"packageManager": "pnpm@12.9.1",
"type": "module",
Expand Down