Skip to content

@object-ui/plugin-report 的 peerDependencies 只允许 React/ReactDOM ^18.0.0,其余 28 个 UI 包都是 ^18.0.0 || ^19.0.0(仓库自身 dev 用 19.2.8) #3690

Description

@yinlianghui

越界发现,记录于 #3645(退役 36 个包 README 的 §Compatibility 生成块,PR #3688)期间 —— 逐行核对 README 的 - **React:** 18.x or 19.x 是否与 peerDependencies 一致时量到。未在 PR #3688 中顺手修改:那单的文件面锁死在 packages/*/README.md,明确禁止碰任何 package.json

事实(对 origin/main 复核,切点 9961df297)

packages/plugin-report/package.json:

"peerDependencies": {
  "react": "^18.0.0",
  "react-dom": "^18.0.0"
}

全仓对照 —— 29 个声明了 peerDependencies.react 的包里,28 个^18.0.0 || ^19.0.0,只有 plugin-report^18.0.0:

app-shell / auth / collaboration / components / fields / i18n / layout / mobile /
permissions / plugin-ai / plugin-calendar / plugin-charts / plugin-chatbot /
plugin-dashboard / plugin-designer / plugin-detail / plugin-editor / plugin-form /
plugin-gantt / plugin-grid / plugin-kanban / plugin-list / plugin-map /
plugin-markdown / plugin-timeline / plugin-view / providers / react
                                                    → ^18.0.0 || ^19.0.0
plugin-report                                       → ^18.0.0        ← 唯一

react-dom 同样只到 ^18.0.0;该包无 peerDependenciesMeta,也无 devDependencies.react

为什么这不是纯风格问题

仓库自身开发用的是 React 19.2.8(多个包的 devDependencies.react)。一个装了 React 19 的使用者同时安装 @object-ui/plugin-report,包管理器会报 peer 冲突/警告 —— 而同一个 fixed 版本组里其余 28 个包都声明支持 19。要么这是笔误(那 React 19 使用者在装 report 插件时会被无谓地拦一下),要么该包确实有只在 18 下成立的约束(那这个约束目前没有任何地方记录,而且 README 直到 PR #3688 删掉它之前还一直宣称 "React: 18.x or 19.x",与 package.json 自相矛盾)。

这个自相矛盾正是 #3645 决定删掉 README 那行手抄版本号的依据之一:散文副本已经和被它抄写的 peerDependencies 分了岔。PR #3688 删掉了散文侧,真相侧的这处不一致仍在

需要确认的问题(不猜,留给维护者)

plugin-report 是否真的不支持 React 19?

  • 若是笔误 → 对齐为 ^18.0.0 || ^19.0.0,与其余 28 个包一致。
  • 若是真实约束 → 保留,但需要一条说明(它依赖的哪个渲染/报表库卡在 18?),否则下一个 agent 会当成笔误"顺手对齐"掉。

顺带建议(不在本单范围):这类「fixed 版本组内 peerDependencies 应当一致」的约束目前无门禁,靠人眼在 39 个 package.json 之间比对。若认为值得,可另立一单加 scripts/check-*.mjs 机械校验 —— 但那是独立判断,不应捆绑进本单。

已搜重

plugin-report peerDependencies reactpeer dependencies React 19 搜过开放 issue,total_count: 0,无重复。

关联


Generated by Claude Code

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions