From fa32913407a8da2f511cf9bae0e29902ba3d8465 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 23 Sep 2026 17:31:22 +0000 Subject: [PATCH] Version Packages --- .changeset/nervous-donkeys-smile.md | 28 ------------ .changeset/olive-dolls-repeat.md | 5 --- .changeset/olive-otters-listen.md | 21 --------- .changeset/plenty-hoops-wonder.md | 16 ------- .changeset/tame-moons-shake.md | 5 --- package-lock.json | 2 +- packages/react-live/CHANGELOG.md | 66 +++++++++++++++++++++++++++++ packages/react-live/package.json | 2 +- 8 files changed, 68 insertions(+), 77 deletions(-) delete mode 100644 .changeset/nervous-donkeys-smile.md delete mode 100644 .changeset/olive-dolls-repeat.md delete mode 100644 .changeset/olive-otters-listen.md delete mode 100644 .changeset/plenty-hoops-wonder.md delete mode 100644 .changeset/tame-moons-shake.md diff --git a/.changeset/nervous-donkeys-smile.md b/.changeset/nervous-donkeys-smile.md deleted file mode 100644 index d24f3f8a..00000000 --- a/.changeset/nervous-donkeys-smile.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -"react-live": major ---- - -Support React 19 type definitions, add an `exports` map, drop `engines`, and raise the -output target. - -`LivePreview`'s overloads referenced the global `JSX` namespace, which `@types/react@19` -removed. Because those types are emitted into the published declarations, consumers on React -19 types failed to compile. They now use `React.JSX`, which resolves under both -`@types/react@18` and `@types/react@19`. - -The package also gains an `exports` map with separate types for the ESM and CJS conditions. -Filenames are unchanged from 4.1.x (`dist/index.js`, `dist/index.mjs`, `dist/index.d.ts`), so -`main`, `module`, and `types` resolve exactly as before. Subpaths other than -`./package.json` are no longer importable; only the package root was ever documented. - -Output is now built for `es2022` rather than `es6`, so the bundle may contain syntax such as -optional chaining that previous releases transpiled away. - -The `engines` field is gone, along with the `node: ">= 0.12.0"` and `npm: ">= 2.0.0"` it -declared. Both were years out of date, and neither constrained anything real: this is browser -code, so the Node version that installs it has no bearing on whether it runs. npm will no -longer print an engine warning against those bounds. - -None of this changes the public API -- same exports, same props, same `react >=18` peer -range -- but the `exports` map and the raised output target are enough that a major release -is the honest way to ship them. diff --git a/.changeset/olive-dolls-repeat.md b/.changeset/olive-dolls-repeat.md deleted file mode 100644 index bcae9155..00000000 --- a/.changeset/olive-dolls-repeat.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-live": patch ---- - -Forward the `Editor` `prism` prop to `prism-react-renderer`. It was typed but never passed through, so a custom Prism instance was silently ignored. diff --git a/.changeset/olive-otters-listen.md b/.changeset/olive-otters-listen.md deleted file mode 100644 index 2f8dc136..00000000 --- a/.changeset/olive-otters-listen.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -"react-live": major ---- - -Type the `live` prop that `withLive` injects, instead of `Record`. - -Wrapped components saw `unknown` for every key, so `live.element` could not be -rendered and `live.error` could not be read without casting first. The prop now -uses the same type the context is created with, which is the shape -[the docs](https://github.com/FormidableLabs/react-live/blob/main/docs/api.md) -have always described: `code`, `error`, `element`, `onError`, `onChange`. - -```tsx -const Panel = withLive(({ live }) => { - const Result = live.element; // was `unknown`, now a component - return Result ? :
{live.error}
; -}); -``` - -Types only, with no runtime change. It is a narrowing, so a wrapped component -that reads a key outside that shape off `live` will now fail to compile. diff --git a/.changeset/plenty-hoops-wonder.md b/.changeset/plenty-hoops-wonder.md deleted file mode 100644 index cc8b9b11..00000000 --- a/.changeset/plenty-hoops-wonder.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -"react-live": patch ---- - -Stop emitting React's `__self` and `__source` debug props from transpiled code. - -Sucrase adds these props to every element it compiles. They describe a source file, and there -is no source file here -- the code comes from a live editor rather than from disk, so the -filename sucrase emitted was always the empty string. React ignores both props, and React 19 -additionally treats `__self` as the signature of an outdated JSX transform, logging -"Your app (or one of its dependencies) is using an outdated JSX transform" to the console of -every page rendering a `LiveProvider`. - -Transpiling with sucrase's `production` option drops both props, and with them the -`_jsxFileName` constant that the transform pipeline used to splice out and re-add solely to -keep `__source` resolvable. diff --git a/.changeset/tame-moons-shake.md b/.changeset/tame-moons-shake.md deleted file mode 100644 index d51136fd..00000000 --- a/.changeset/tame-moons-shake.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-live": patch ---- - -Add `getDerivedStateFromError` to the internal error boundary, so a runtime error in live code no longer logs a React warning about it. diff --git a/package-lock.json b/package-lock.json index e9f61280..852ad197 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24980,7 +24980,7 @@ } }, "packages/react-live": { - "version": "4.1.8", + "version": "5.0.0", "license": "MIT", "dependencies": { "prism-react-renderer": "^2.4.1", diff --git a/packages/react-live/CHANGELOG.md b/packages/react-live/CHANGELOG.md index bedf2c3a..ed29e2c6 100644 --- a/packages/react-live/CHANGELOG.md +++ b/packages/react-live/CHANGELOG.md @@ -1,5 +1,71 @@ # react-live +## 5.0.0 + +### Major Changes + +- [#418](https://github.com/FormidableLabs/react-live/pull/418) [`be53ccd`](https://github.com/FormidableLabs/react-live/commit/be53ccd06370220da0055caa9bc2c18db96e94c5) - Support React 19 type definitions, add an `exports` map, drop `engines`, and raise the + output target. + + `LivePreview`'s overloads referenced the global `JSX` namespace, which `@types/react@19` + removed. Because those types are emitted into the published declarations, consumers on React + 19 types failed to compile. They now use `React.JSX`, which resolves under both + `@types/react@18` and `@types/react@19`. + + The package also gains an `exports` map with separate types for the ESM and CJS conditions. + Filenames are unchanged from 4.1.x (`dist/index.js`, `dist/index.mjs`, `dist/index.d.ts`), so + `main`, `module`, and `types` resolve exactly as before. Subpaths other than + `./package.json` are no longer importable; only the package root was ever documented. + + Output is now built for `es2022` rather than `es6`, so the bundle may contain syntax such as + optional chaining that previous releases transpiled away. + + The `engines` field is gone, along with the `node: ">= 0.12.0"` and `npm: ">= 2.0.0"` it + declared. Both were years out of date, and neither constrained anything real: this is browser + code, so the Node version that installs it has no bearing on whether it runs. npm will no + longer print an engine warning against those bounds. + + None of this changes the public API -- same exports, same props, same `react >=18` peer + range -- but the `exports` map and the raised output target are enough that a major release + is the honest way to ship them. + +- [#421](https://github.com/FormidableLabs/react-live/pull/421) [`004b007`](https://github.com/FormidableLabs/react-live/commit/004b0071ca518b4f75a4bc77c0615e11979d814c) - Type the `live` prop that `withLive` injects, instead of `Record`. + + Wrapped components saw `unknown` for every key, so `live.element` could not be + rendered and `live.error` could not be read without casting first. The prop now + uses the same type the context is created with, which is the shape + [the docs](https://github.com/FormidableLabs/react-live/blob/main/docs/api.md) + have always described: `code`, `error`, `element`, `onError`, `onChange`. + + ```tsx + const Panel = withLive(({ live }) => { + const Result = live.element; // was `unknown`, now a component + return Result ? :
{live.error}
; + }); + ``` + + Types only, with no runtime change. It is a narrowing, so a wrapped component + that reads a key outside that shape off `live` will now fail to compile. + +### Patch Changes + +- [#418](https://github.com/FormidableLabs/react-live/pull/418) [`be53ccd`](https://github.com/FormidableLabs/react-live/commit/be53ccd06370220da0055caa9bc2c18db96e94c5) - Forward the `Editor` `prism` prop to `prism-react-renderer`. It was typed but never passed through, so a custom Prism instance was silently ignored. + +- [#418](https://github.com/FormidableLabs/react-live/pull/418) [`be53ccd`](https://github.com/FormidableLabs/react-live/commit/be53ccd06370220da0055caa9bc2c18db96e94c5) - Stop emitting React's `__self` and `__source` debug props from transpiled code. + + Sucrase adds these props to every element it compiles. They describe a source file, and there + is no source file here -- the code comes from a live editor rather than from disk, so the + filename sucrase emitted was always the empty string. React ignores both props, and React 19 + additionally treats `__self` as the signature of an outdated JSX transform, logging + "Your app (or one of its dependencies) is using an outdated JSX transform" to the console of + every page rendering a `LiveProvider`. + + Transpiling with sucrase's `production` option drops both props, and with them the + `_jsxFileName` constant that the transform pipeline used to splice out and re-add solely to + keep `__source` resolvable. + +- [#418](https://github.com/FormidableLabs/react-live/pull/418) [`be53ccd`](https://github.com/FormidableLabs/react-live/commit/be53ccd06370220da0055caa9bc2c18db96e94c5) - Add `getDerivedStateFromError` to the internal error boundary, so a runtime error in live code no longer logs a React warning about it. + ## 4.1.8 ### Patch Changes diff --git a/packages/react-live/package.json b/packages/react-live/package.json index 0741c112..d7d0f442 100644 --- a/packages/react-live/package.json +++ b/packages/react-live/package.json @@ -1,6 +1,6 @@ { "name": "react-live", - "version": "4.1.8", + "version": "5.0.0", "description": "A production-focused playground for live editing React code", "license": "MIT", "author": "@FormidableLabs",