Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
cdae2da
chore: remove dead tooling, Storybook, and the duplicate demo app
ryan-roemer Sep 14, 2026
f08e221
style: reformat with Prettier 3
ryan-roemer Sep 14, 2026
af3fefc
chore: modernize the toolchain and upgrade Docusaurus to 3
ryan-roemer Sep 14, 2026
6e662bc
ci: rebuild workflows on npm with OIDC publishing, and document deplo…
ryan-roemer Sep 14, 2026
fb1f7d1
docs: explain why both `prepare` and `prebuild` build the library
ryan-roemer Sep 14, 2026
2ee3922
chore: drop the root `prepare` hook; make library builds explicit
ryan-roemer Sep 14, 2026
d0b75bf
test: add component coverage with Testing Library
ryan-roemer Sep 15, 2026
28215b2
Testing fixups and storybook manual harness
ryan-roemer Sep 15, 2026
5845271
chore: rename test:browser to stories:test, theme the harness
ryan-roemer Sep 15, 2026
97e5bb2
test: close story gaps, and fix a premature smoke-test assertion
ryan-roemer Sep 15, 2026
d26aca6
Two quick bugs and fixes
ryan-roemer Sep 15, 2026
705d2c4
chore: review fixes — keep published filenames, tidy docs, drop empty…
ryan-roemer Sep 15, 2026
f0756cd
Add npm env, make major version bump
ryan-roemer Sep 15, 2026
ef4cf6b
Change suffix of contributing
ryan-roemer Sep 15, 2026
bafc2e6
chore: clear the trivial lint warnings, track the rest in #417
ryan-roemer Sep 15, 2026
b246ad5
Hone down contributing. Split out COC
ryan-roemer Sep 15, 2026
885029d
chore: uplift deps to React 19, keep React 18 working
ryan-roemer Sep 15, 2026
a7559fb
Changesets and notes cleanup
ryan-roemer Sep 15, 2026
8fb9d18
Update vercel notes
ryan-roemer Sep 15, 2026
fbd41fa
Code review tweaks
ryan-roemer Sep 16, 2026
136eb30
Add node engines to website for vercel.
ryan-roemer Sep 16, 2026
66009a0
For react 18 tests, split lib vs types
ryan-roemer Sep 16, 2026
8c4641d
Update notes about node engines
ryan-roemer Sep 16, 2026
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
11 changes: 5 additions & 6 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json",
"$schema": "https://unpkg.com/@changesets/config@4.0.0/schema.json",
"changelog": [
"@svitejs/changesets-changelog-github-compact",
{
"repo": "FormidableLabs/react-live"
}
"@changesets/changelog-github",
{ "repo": "FormidableLabs/react-live" }
],
"access": "public",
"baseBranch": "master"
"baseBranch": "master",
"privatePackages": false
}
28 changes: 28 additions & 0 deletions .changeset/nervous-donkeys-smile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
"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.
5 changes: 5 additions & 0 deletions .changeset/olive-dolls-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"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.
16 changes: 16 additions & 0 deletions .changeset/plenty-hoops-wonder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
"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.
5 changes: 5 additions & 0 deletions .changeset/tame-moons-shake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"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.
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

69 changes: 0 additions & 69 deletions .eslintrc

This file was deleted.

23 changes: 0 additions & 23 deletions .github/actions/setup/action.yml

This file was deleted.

117 changes: 117 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: CI

on:
pull_request:
push:
branches:
- master

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
check:
name: Lint, typecheck, and test
runs-on: ubuntu-latest
permissions:
contents: read # to check out repo (actions/checkout)
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
with:
node-version-file: ".nvmrc"
cache: "npm"
- run: npm ci
# Build first: `check:types` typechecks the website against the library's
# *emitted* declarations, so `dist` has to exist. This also means the
# Docusaurus production build -- what Vercel deploys -- is exercised here.
- name: Build
run: npm run build
- name: Check
run: npm run check
# Reported, not enforced -- no threshold gate while the suite is still
# being built out. Watch the number rather than blocking PRs on it.
- name: Coverage
run: npm run test:coverage -w react-live

browser:
name: Browser tests
runs-on: ubuntu-latest
permissions:
contents: read # to check out repo (actions/checkout)
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
with:
node-version-file: ".nvmrc"
cache: "npm"
- run: npm ci
# Separate job: these need a real Chromium, which jsdom cannot stand in
# for (no contentEditable editing model). Kept out of `npm run check` so
# the main job does not pay the browser download.
- name: Install Chromium
run: npx playwright install --with-deps chromium
- name: Run browser tests
run: npm run stories:test

react-compat:
name: React ${{ matrix.react }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# The lockfile pins React 19, so `check` and `browser` above already
# cover it. This job exists for the *other* end of the `>=18.0.0` peer
# range -- nothing else proves that claim still holds. React itself is
# pinned exactly, not `^18`: a caret installs the newest 18.x, so
# anything added later in the 18 line would silently satisfy a claim
# about 18.0.0.
#
# The types float on `^18` because they are not what the peer range is
# about -- `@types/react` is not a peer dependency, and its versions
# track the typings, not the runtime. `@types/react@18.0.0` predates
# the `React.JSX` namespace, so pinning it exactly would fail on our
# use of the *current* idiom rather than on anything React 18 can or
# cannot do.
include:
- react: "18.0.0"
types: "^18"
permissions:
contents: read # to check out repo (actions/checkout)
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
with:
node-version-file: ".nvmrc"
cache: "npm"
- run: npm ci
- name: Pin React ${{ matrix.react }}
run: |
npm pkg set \
devDependencies.react="${{ matrix.react }}" \
devDependencies.react-dom="${{ matrix.react }}" \
"devDependencies.@types/react=${{ matrix.types }}" \
"devDependencies.@types/react-dom=${{ matrix.types }}" \
-w react-live
npm pkg set \
dependencies.react="${{ matrix.react }}" \
dependencies.react-dom="${{ matrix.react }}" \
-w website
npm install --no-package-lock
- name: Build
run: npm run build
- name: Check
run: npm run check
- name: Install Chromium
run: npx playwright install --with-deps chromium
- name: Run browser tests
run: npm run stories:test
23 changes: 0 additions & 23 deletions .github/workflows/code-check.yml

This file was deleted.

Loading
Loading