v5: remove deprecated and dead exports
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- リファクタリング
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- firebase, react, typescript
調査の方向性
まず src/index.ts、src/useObservable.ts、src/auth.tsx にある v5 の呼び出し箇所を読み、ブロックされている Group 1 に触れる前に #740 を確認してください。Group 3 については、test/auth.test.tsx とその AuthCheckWrapper の使用箇所を調査してください。完了には npm run docs:fork と、置き換えに関する v5 upgrade-guide の項目も必要です。
索引モデルが issue の本文から書いたものです。
説明
Background
reactfire ships several exports that are deprecated or dead but kept because removing them breaks consumers at load time, not just at compile time. v5 is the release that can drop them. Scope widened 2026-08-03 from the two checkOptions helpers to every deprecated export, so the breaking-removals work is tracked in one place.
Corrected 2026-08-05. An earlier revision of this issue described the work as a checklist of independent deletions. Call sites were checked against
v5ate7b18c2and that is not accurate: one group is blocked on another PR, one is not dead code at all, and one requires test changes. The three groups below are sorted by what they actually cost, and they are not independent. Line references are as ofe7b18c2.
Group 1: checkOptions and checkinitialData (BLOCKED, do not start)
- Remove
checkOptionsfromsrc/index.ts(:34) - Remove
checkinitialDatafromsrc/index.ts(:43)
⚠️ These are not dead on v5 today. checkIdField (src/index.ts:47) still calls checkOptions, and so does checkinitialData. The earlier claim that they became unused "as of #740" is true of #740's branch, which rewrites checkIdField to read options?.idField directly, but #740 targets main and has not merged, so v5 has not received that rewrite.
Doing this group now would mean duplicating #740's change on v5, which then conflicts when main is forward-integrated. Blocked until #740 merges and is forward-integrated. checkIdField itself stays either way; it is still used by the Firestore and Database data hooks.
Group 2: startWithValue (NOT a deletion, it is a behavior change)
- Remove
startWithValuefromReactFireOptions(src/index.ts:30), marked@deprecated use initialData instead
⚠️ This is not dead code. It has three live call sites on v5:
src/useObservable.ts(:113):config?.initialData ?? config?.startWithValue, the actual fallback that makes the option worksrc/useObservable.ts(:78): thehasInitialDatacheck that decides whether to skiploadingsrc/auth.tsx(:34):useUserwill not seedinitialDatafromauth.currentUserif the caller passedstartWithValue
So removing it changes runtime behavior for anyone still passing it, rather than only failing their typecheck. It needs the fallback logic removed alongside the field, and an upgrade-guide entry pointing at initialData. Independent of Group 1.
Group 3: ClaimsCheck and AuthCheck (self-contained, but touches tests)
- Remove
ClaimsCheck(src/auth.tsx:215) and its exportedClaimsCheckProps(:60) - Remove
AuthCheck(src/auth.tsx:259) and its exportedAuthCheckProps(:54)
Both are @deprecated Use useSigninCheck instead, both only function in experimental Suspense mode and console.warn otherwise. They must go together: AuthCheck renders ClaimsCheck internally (src/auth.tsx:271).
⚠️ test/auth.test.tsx needs more than deletion. It defines an AuthCheckWrapper and reuses it at :285-300 and :369 inside a useUser test that is not about AuthCheck at all. That test needs rewriting to use a plain provider, not removing.
Do not also remove ClaimCheckErrors (:67), despite it sitting between the two interfaces. It is part of the SigninCheckResult shape (:81, :96) and stays.
Then, once the groups above land
- Regenerate reference docs (
npm run docs:fork, notnpm run docs) to drop the corresponding pages - Record each removal in the v5 upgrade guide with its replacement (
initialDataforstartWithValue,useSigninCheckfor both components)
Notes
- Each of these is a runtime break for plain JS importers (an ESM import error at load), not only a type error. That is why they were deferred rather than done in a patch.
- After #740's tightening,
checkinitialData's inferred return type becomesunknown(wasany). Harmless while unused, and another reason to retire it. - Deliberately not folded into #740. That PR tightens
ReactFireOptionsgenerics, its squash body becomes the changelog, and a removal buried under afix:title is how a break gets missed. Same release, separate PR. - Groups 2 and 3 can proceed while Group 1 is blocked. Splitting this into more than one PR is reasonable; a single PR mixing a behavior change with two component removals makes the changelog harder to read.
Context: #740, #741.
- 主要言語
- TypeScript
- スター
- 3.6k
- フォーク
- 403
- 平均マージ
- 5日 1時間
- マージ済み PR(30日)
- 10
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
FirebaseExtended/reactfire のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 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 件 ·
-
v5
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
FirebaseExtended/reactfire#789 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
FirebaseExtended/reactfire#788 ·
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