react 19: the Dependabot halves cannot resolve alone, so the bump needs one combined PR

未关闭 适合新手
#403 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 4 天内回复

@IanoNjuguna 已经在做这个了。

开始于 2026年11月22日。

  • #404 来自 @IanoNjuguna —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
70/100
Issue 类型
重构
描述清晰度
描述清楚
活跃度
活跃
技术栈
github-actions, react, typescript

调研方向

先从 website/package.json 开始,然后检查 website/package-lock.json 和 .github/workflows/deploy.yml;两个失败的 Dependabot PR 是 #401/#402,它们解释了为什么未合并的 lockfile 会破坏 Pages 部署。在 website 中升级 react、react-dom 和 @types/react-dom,用 npm install 重新生成 lockfile,然后用 npm ci 和 npm run build 进行验证。当合并后的 PR 能干净地安装且构建通过时即完成;过时的 yarn packageManager/resolutions 清理留到单独的改动中处理。

由索引模型根据 Issue 内容生成。

描述

dependencies

Dependabot opened the react 19 major as two PRs, and neither can pass on its own:

  • #401 bumps react 18.3.1 to 19.3.1
  • #402 bumps react-dom and @types/react-dom to 19.3.1 / 19.3.0

Each half breaks the other's peer requirement, so both fail npm ci with ERESOLVE:

#402: Found: [email protected]
      Could not resolve dependency: peer react@^19.3.1 from [email protected]

#401: Found: [email protected]
      Could not resolve dependency: peer react-dom@^18.3.1 from [email protected]

Merging them one after the other does not fix it either. deploy.yml runs on every push to main, so between the two merges the tracked lockfile does not resolve, the build job fails, and the Pages deploy is skipped. Any PR opened in that window inherits the same broken lockfile.

Proposed fix

One PR that takes the peer set together, with a regenerated lockfile:

  • react and react-dom to ^19.3.1
  • @types/react-dom to ^19.3.0 (19.3.1 does not exist)

Verified locally against main at 973801b:

  • npm install with the bumped versions: 1409 packages, no ERESOLVE
  • npm ci against the regenerated website/package-lock.json: exit 0
  • npm run build: SUCCESS, static files generated

@docusaurus/core 3.10.2 declares react ^18.0.0 || ^19.0.0, so 19 is inside the supported range. The @slorber/react-helmet-async alias it depends on prints a peer warning capped at react 18, and the install still exits 0.

Related, separate

website/package.json still carries packageManager: [email protected] and a resolutions block pinning react and react-dom to ^18.3.1, both stale since the repo standardised on npm. A yarn install would put react 18 back. npm ignores both, so this does not block the bump, but it should be cleaned up in its own change.

Also worth considering: a groups entry in .github/dependabot.yml covering the peer set, so the next react major arrives as one PR instead of two unresolvable halves.

主要语言
TypeScript
星标
13
派生
24
平均合并
2 天 3 小时
30 天内合并 PR
16

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

IntersectMBO/developer-experience 的其他 Issue

查看 IntersectMBO/developer-experience 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。