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 摘要。