Add a published .d.ts diff to the release process to catch breaking type changes
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- typescript
調査の方向性
リポジトリに既存の release または CI プロセスから始め、npm pack を使用して最新の公開済みパッケージと release candidate を比較します。dist/*.d.ts を抽出し、非加法的な型の変更を特定して、チェックを失敗させるか、適切なバージョンの引き上げを伴う breaking change の明示的な承認を必須にします。
索引モデルが issue の本文から書いたものです。
説明
Problem
4.2.4 shipped as a patch but contained breaking TypeScript type changes with no changelog note. The main one: ObservableStatus<T> was refactored from a flat interface (data: T) into a discriminated union (data: T | undefined unless narrowed on status), which breaks the standard destructure-and-use pattern across every data hook, including the documented suspense pattern. It is type-only (no runtime impact), but it reds strict-TS consumer CI on upgrade.
It slipped through because:
- The change came in via #583 ("use
useSyncExternalStoreto sync data"), whose title looked like an internals change, not a public API break. - It then sat unreleased for ~3 years (v4.2.3 was 2022-08, #583 merged 2023-07).
- 4.2.4 batched 35 PRs of accumulated
maininto one bump, with no step auditing the cumulative public type surface.
Proposal
Add a release-time (or CI) check that diffs the candidate's emitted types against the last published version:
npm packthe latest published version, extractdist/*.d.ts.npm packthe release candidate, extractdist/*.d.ts.- Diff them. Any non-additive change (removed/narrowed/changed signature) fails the check or requires an explicit "breaking" acknowledgment and a minor/major bump.
This exact diff would have flagged both the ObservableStatus union change and the useFirestoreDocData widening (#733) immediately.
Related
- Remediation for the live 4.2.4 release is tracked separately (deprecate + re-cut as 4.3.0 with a migration note).
- Surfaced while reviewing #740.
- 主要言語
- 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
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
Crush オープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md オープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
ElementsProject/cln-application#167 · コメント 1 件 · リアクション 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Quantco/pnpm-licenses#17 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100