Release process: add a built-artifact (dist/bundle) check to catch runtime regressions before publish
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- firebase, node.js, react, typescript
- 領域
- build-system, ci-cd, release, testing
調査の方向性
npm pack の出力に対する提案済みのチェックから始め、特に dist/index.js、パッケージの exports/main/module パス、および Node ESM と CommonJS の import コマンドを確認します。動的な require と外部チェック、エントリーポイントのロード、tarball パスの整合性、バンドルサイズの比較を対象とする公開前ゲートを定義します。ランタイムのスモークアプリと .d.ts の diff は関連する後続作業です。完了とは、公開前にリリースプロセスが #759 に記載された回帰を検出できることを意味します。
索引モデルが issue の本文から書いたものです。
説明
Motivation
#759 (the App Router / Vite client crash in 4.2.4 and 4.2.5) shipped because the build-tooling migration silently changed the built ESM output: use-sync-external-store/shim (CJS) started getting bundled into the ESM dist, producing a dynamic require() that throws in any browser bundle (Calling \require` for "react" in an environment that doesn't expose the require function`). The source was unchanged; only the emitted artifact regressed, and nothing in the release flow compared the artifact before publish.
This is the second dist-level regression to ship as a patch: #749 already proposes a published .d.ts diff to catch the type side (the 4.2.4 ObservableStatus break). This issue covers the runtime/bundle side. Together they form a built-artifact diff gate.
Proposed pre-publish checks
A concrete checklist for a pre-publish gate (each item derived from auditing the 4.2.6 release by hand). Items marked would have caught #759.
- No dynamic
require(/ CJS-interop shims in the ESM dist. Grepdist/index.jsfor\brequire\b,__require,createRequire,__commonJS. (Would have caught #759:requirecount went 0 at 4.2.3 to 3 at 4.2.4+.) - Externals are not inlined. Only
rxfire/rxjs/tslibshould be bundled;react,firebase/*,@firebase/*, anduse-sync-external-store/shimmust stay externalimportspecifiers. Catches accidental bundling that causes duplicate-instance bugs. - Both entry points load.
node --input-type=module -e "import('reactfire')"andnode -e "require('reactfire')"(in a fixture withreact+firebaseinstalled) must resolve without throwing. Catches missing/renamed files and broken imports. - exports map integrity. Every path referenced by
exports/main/moduleexists in the packed tarball. - Bundle-size delta vs previous
latest.npm packthe currentlatest, comparedistsize; flag large jumps (a proxy for accidental inlining). - Published
.d.tsdiff vs previous version. Type-side counterpart, tracked in #749; catches the 4.2.4ObservableStatusbreak class. - Runtime smoke render in CI (strongest). A minimal Next App Router (turbopack) and Vite app that renders a data hook against the packed build; fails on the #759 crash. This is the check that catches runtime regressions the static greps miss.
Items 1 to 5 are cheap and scriptable against npm pack output; 7 is the higher-value integration check.
Related
- #749 (published
.d.tsdiff, the type-side counterpart) - #759 / #760 (the regression this would have caught, and its fix)
- 主要言語
- 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