From 3bcd18a8a56b06bd6eb73e451e80eff5c58f79c3 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 8 Aug 2026 09:05:51 +0000 Subject: [PATCH] fix(plugin-report): accept React 19 in the peer range, the last UI package pinned to 18 alone (#3690) `peerDependencies.react` and `peerDependencies.react-dom` widen from `^18.0.0` to `^18.0.0 || ^19.0.0`, matching the other 29 packages in the fixed version group. With npm 7+ resolving peers strictly, a React 19 consumer installing the published package hit an ERESOLVE on first install while every sibling installed clean; the package README already documented the wider range, so the manifest was the half that was wrong. Three probes, run before the edit, all pointing the same way: 1. History. No batch commit ever added `|| ^19.0.0` to 28 packages, so the dispatch's "predates the batch and was missed" mechanism does not exist. The wide range is the repo's birth convention since 2026-01-14, applied per package at creation. plugin-report's manifest was hand-authored 2026-02-06 (1e557cbda) when nineteen siblings already carried the wide range, and every package created afterwards was born with it. The only other narrow-born package, plugin-dashboard, was corrected 2026-05-08 (d2b6ecec6) in a build fix touching only itself. No commit in the file's 172-commit history revisited the peer line; none mentions a React 18 requirement. 2. API surface. Zero uses of anything React 19 removed. The package's whole React surface is React.FC, useState, useEffect, useMemo, useReducer, useContext, Fragment, ComponentType, CSSProperties, ReactNode. react-dom is never imported by the source; it appears only as a UMD global name in the Vite externals. 3. Empirical. The workspace pins react to 19.2.8 via a root pnpm.overrides, and plugin-report resolves that build, so its 78 tests have been running under React 19 the whole time the manifest said 18 only. Also flips the plugin-report row in scripts/__tests__/doc-version-claims.test.ts from `kind: 'stale'` to `restatement`: that ledger row recorded the README as wrong-versus-manifest, and widening the manifest makes the README's existing text true without editing a character of prose. Header counts go from nine stale rows to eight. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt --- .../plugin-report-react-19-peer-3690.md | 11 ++++++ packages/plugin-report/package.json | 4 +-- scripts/__tests__/doc-version-claims.test.ts | 36 ++++++++++--------- 3 files changed, 33 insertions(+), 18 deletions(-) create mode 100644 .changeset/plugin-report-react-19-peer-3690.md diff --git a/.changeset/plugin-report-react-19-peer-3690.md b/.changeset/plugin-report-react-19-peer-3690.md new file mode 100644 index 000000000..2a49f59fe --- /dev/null +++ b/.changeset/plugin-report-react-19-peer-3690.md @@ -0,0 +1,11 @@ +--- +'@object-ui/plugin-report': patch +--- + +Accept React 19 in `@object-ui/plugin-report`'s peer range, the last UI package still declaring React 18 alone (objectui#3690). + +`peerDependencies.react` and `peerDependencies.react-dom` widen from `^18.0.0` to `^18.0.0 || ^19.0.0`, matching the other 29 packages in the fixed version group. With npm 7+ resolving peers strictly, a React 19 consumer installing this published package hit an `ERESOLVE` on first install while every sibling installed clean — and the package's own README already documented the wider range, so the manifest was the half that was wrong. + +The narrow range was never a constraint anyone stated. `packages/plugin-report/package.json` was hand-authored on 2026-02-06 (`1e557cbda`), by which point nineteen sibling packages already carried `^18.0.0 || ^19.0.0` and every package created afterwards was born with it; the one other package born narrow, `plugin-dashboard`, was corrected on 2026-05-08 (`d2b6ecec6`) in a build fix that touched only itself. No commit in the file's 172-commit history ever revisited the peer line, and no commit message mentions a React 18 requirement. + +Nothing in the package needs React 18. Its entire React surface is `React.FC`, `useState`, `useEffect`, `useMemo`, `useReducer`, `useContext`, `Fragment`, `ComponentType`, `CSSProperties` and `ReactNode` — all unchanged in React 19 — with zero uses of anything React 19 removed (`ReactDOM.render`, `unmountComponentAtNode`, `findDOMNode`, legacy context, string refs, `defaultProps` / `propTypes` on function components, `createFactory`, `useFormState`, `react-dom/test-utils`). `react-dom` is not imported by the source at all; it appears only as a UMD global name in the Vite externals config. The workspace pins `react` to 19.2.8 via a root `pnpm.overrides`, so this package's 78 tests have been running against React 19 the whole time it declared it did not support it. diff --git a/packages/plugin-report/package.json b/packages/plugin-report/package.json index b85fe62fa..c7571ba7d 100644 --- a/packages/plugin-report/package.json +++ b/packages/plugin-report/package.json @@ -39,8 +39,8 @@ "tailwind-merge": "^3.6.0" }, "peerDependencies": { - "react": "^18.0.0", - "react-dom": "^18.0.0" + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" }, "devDependencies": { "@objectstack/spec": "^17.0.0-rc.5", diff --git a/scripts/__tests__/doc-version-claims.test.ts b/scripts/__tests__/doc-version-claims.test.ts index 44f765e21..d1721d49c 100644 --- a/scripts/__tests__/doc-version-claims.test.ts +++ b/scripts/__tests__/doc-version-claims.test.ts @@ -44,12 +44,19 @@ import { fileURLToPath } from 'node:url'; * * 221 files scanned, 38 literals matched, 11 structurally exempt, 27 inventoried. * - * Of the 27, NINE are measurably wrong today and are recorded as `stale` below — - * including `@objectstack/spec ^4.0.4` in the architecture overview's layer diagram, - * thirteen majors behind the `^17.0.0-rc.5` every manifest declares. None is fixed - * here: objectui#3697 is a test-only task and every repair is a docs edit. They are - * filed separately; inventorying a known-false line with `kind: 'stale'` records the - * debt instead of blessing it, and still stops a tenth from joining them silently. + * Of the 27, NINE were measurably wrong when this file landed and were recorded as + * `stale` below — including `@objectstack/spec ^4.0.4` in the architecture overview's + * layer diagram, thirteen majors behind the `^17.0.0-rc.5` every manifest declares. + * None was fixed here: objectui#3697 is a test-only task and every repair is a docs + * edit. They are filed separately; inventorying a known-false line with `kind: 'stale'` + * records the debt instead of blessing it, and still stops a tenth from joining them + * silently. + * + * EIGHT remain. objectui#3690 paid off the first: `plugin-report/README.md` was the one + * entry where the README was RIGHT and the manifest lagged it, so widening that package + * peerDependencies to `^18.0.0 || ^19.0.0` turned the claim true without touching a + * single character of prose. Its entry is now a plain `restatement`. That direction — + * fix the anchor, not the sentence — is the cheapest way an entry ever leaves this list. * * ## Fences are SCANNED — the opposite of `check-doc-links.mjs`, on purpose * @@ -325,10 +332,12 @@ const keyOf = (c: Pick): string => `${c.file} :: ${c.cl * can tell us when it stops being true. * `stale` - measured WRONG at the time of writing. Recorded, not blessed. * - * Nine of the 27 are `stale`. None is fixed here: objectui#3697 is a test-only task and - * every one of them is a docs edit. They are filed separately. Inventorying a - * known-false line records the debt where the next reader will trip over it, and the - * ratchet still stops a tenth from joining them unnoticed. + * Nine of the 27 were `stale` when this file landed; EIGHT are today (objectui#3690 + * cleared `plugin-report/README.md` by widening the manifest the README already + * described). None was fixed here: objectui#3697 is a test-only task and every one of + * them is a docs edit. They are filed separately. Inventorying a known-false line + * records the debt where the next reader will trip over it, and the ratchet still stops + * a tenth from joining them unnoticed. */ type ClaimKind = 'anchored' | 'restatement' | 'sample' | 'unanchored' | 'stale'; @@ -440,6 +449,7 @@ const KNOWN_CLAIMS: KnownClaim[] = [ { file: 'packages/permissions/README.md', claim: PEER_18_19, kind: 'restatement', why: PEER_RESTATEMENT_OK }, { file: 'packages/plugin-ai/README.md', claim: PEER_18_19, kind: 'restatement', why: PEER_RESTATEMENT_OK }, { file: 'packages/plugin-designer/README.md', claim: PEER_18_19, kind: 'restatement', why: PEER_RESTATEMENT_OK }, + { file: 'packages/plugin-report/README.md', claim: PEER_18_19, kind: 'restatement', why: PEER_RESTATEMENT_OK }, { file: 'packages/react/README.md', claim: PEER_18_19, kind: 'restatement', why: PEER_RESTATEMENT_OK }, { file: 'packages/react-runtime/README.md', @@ -453,12 +463,6 @@ const KNOWN_CLAIMS: KnownClaim[] = [ kind: 'stale', why: 'Claims ">= 18.0.0", which admits React 20; the manifest peer is ^18.0.0 || ^19.0.0 and rejects it. The README is broader than what npm will install.', }, - { - file: 'packages/plugin-report/README.md', - claim: PEER_18_19, - kind: 'stale', - why: 'Claims ^18.0.0 || ^19.0.0 while this package peerDependencies.react is ^18.0.0 alone — the sole UI package without React 19, first noticed as an out-of-scope finding in PR #3688.', - }, { file: 'packages/plugin-chatbot/README.md', claim: '@ai-sdk/react' + TICK + ' v3',