React 19 foundation: run tests against 19, then drop React 16/17
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 55/100
- Issue 类型
- 重构
- 描述清晰度
- 描述清楚
- 活跃度
- 冷清
- 技术栈
- github-actions, react, typescript
调研方向
从测试任务矩阵、package.json 和锁定文件开始,追踪当前的 React 和 Node 组合。先加入 React 19 测试任务的覆盖,然后验证所述的 peer dependency、shim 移除、CI 矩阵以及通过的 React 19 测试套件是否满足验收标准。
由索引模型根据 Issue 内容生成。
描述
Tracking issue for the v5 React 19 foundation. Two PRs, in this order.
Why this is first
Every other v5 cluster sits on top of it, and one half of it is a gap rather than a migration: CI type-checks React 19 but has never executed a test against it. The type-check job carries matrix.react: ["18","19"]; the test job's matrix is Node versions only, and the lockfile resolves React 18.2.0. So executed coverage on 19 is zero today.
PR 1: React 19 as an executed test job (CI only)
Adds a react dimension to the test job so the suite actually runs on 19.
This lands first and alone, before any src/ change. The use-sync-external-store shim delegates to React.useSyncExternalStore when it exists, so the suite runs on React 19 with the shim still in place. That gives a measured baseline to compare against once the shim is deleted, instead of changing the runtime and the dependency in one step.
⚠️ Not a one-line matrix addition. The test job currently matrixes node: [22, 24] only. Adding a react dimension doubles the emulator jobs from two to four, each with its own Java setup and emulator cache.
⚠️ That interacts with #776. The firestore flake sits at 7.5% per full-suite run, so doubling the emulator jobs roughly doubles per-PR exposure to a red job. Deliberately not putting a number on it: contention is the suspected mechanism, so the jobs are correlated rather than independent, and multiplying the rate would overstate the precision. This argues for #787's timing data landing before the matrix widens.
Reviewable by anyone; no src/ change, no API surface.
PR 2: drop React 16/17
One PR, one review:
peerDependencies.react:>=16 || experimentalbecomes^18 || ^19- delete the
use-sync-external-storeshim and its dependency - drop the 16/17 entries from the CI matrix
Splitting these buys a second review round trip on what is a single decision.
Acceptance
peerDependencies.reactreads^18 || ^19use-sync-external-storeis absent frompackage.json- the test job runs on React 19 and is green, with the shim gone
Notes
- The
use()suspend-gate swap is out of scope. Spiked: it is a behavioural no-op on React 19.2.8 and React 19 emits no warning for the current throw form, so there is no deprecation pressure and no reason to bundle it here. - Related to #788. "CI type-checks React 19 but never runs a test against it" is a live instance of the pattern that issue collects: a check that passes while measuring nothing. #788 currently has no example attached to it.
- The React floor is
^18 || ^19, not 19-only. Dropping 18 is not part of this.
- 主要语言
- TypeScript
- 星标
- 3.6k
- 派生
- 403
- 平均合并
- 5 天 1 小时
- 30 天内合并 PR
- 10
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
FirebaseExtended/reactfire 的其他 Issue
-
难度 5/5 一周以上 新手友好度 38/100
FirebaseExtended/reactfire#801 ·
-
v5
难度 4/5 3-5 天 新手友好度 48/100
FirebaseExtended/reactfire#793 ·
-
v5
难度 4/5 3-5 天 新手友好度 35/100
FirebaseExtended/reactfire#790 · 2 条评论 ·
-
难度 5/5 一周以上 新手友好度 35/100
FirebaseExtended/reactfire#788 ·
-
难度 4/5 3-5 天 新手友好度 55/100
FirebaseExtended/reactfire#784 ·
查看 FirebaseExtended/reactfire 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
bcgov/bc-wallet-mobile#4761 · 1 条评论 ·
-
external-issue to-triage
难度 2/5 1-3 小时 新手友好度 88/100
-
area-deployment area-integrations triage:bot-seen
难度 2/5 半天 新手友好度 86/100
-
难度 2/5 1-3 小时 新手友好度 82/100
-
refactor
难度 2/5 1-3 小时 新手友好度 84/100