Release process: add a built-artifact (dist/bundle) check to catch runtime regressions before publish
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 48/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Ruhig
- Tech-Stack
- firebase, node.js, react, typescript
- Bereich
- build-system, ci-cd, release, testing
Rechercherichtung
Beginne mit den vorgeschlagenen Prüfungen für die Ausgabe von npm pack, insbesondere dist/index.js, den Paketpfaden für exports/main/module und den Node-Importbefehlen für ESM und CommonJS. Definiere ein Gate vor der Veröffentlichung, das dynamisches require und externe Prüfungen, das Laden des Einstiegspunkts, die Integrität der Tarball-Pfade und den Vergleich der Bundle-Größe abdeckt; die Runtime-Smoke-Apps und der .d.ts-Diff sind verwandte Folgearbeiten. Erledigt bedeutet, dass der Release-Prozess die in #759 beschriebenen Regressionen vor der Veröffentlichung erkennt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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)
- Vorherrschende Sprache
- TypeScript
- Sterne
- 3.6k
- Forks
- 403
- Ø Merge
- 5 T. 1 Std.
- Gemergte PRs (30 T.)
- 10
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus FirebaseExtended/reactfire
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 38/100
FirebaseExtended/reactfire#801 ·
-
v5
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
FirebaseExtended/reactfire#793 ·
-
v5
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
FirebaseExtended/reactfire#790 · 2 Kommentare ·
-
v5
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 55/100
FirebaseExtended/reactfire#789 ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
FirebaseExtended/reactfire#788 ·
Alle Issues in FirebaseExtended/reactfire
Ähnliche Issues
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
-
Crush Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
ElementsProject/cln-application#167 · 1 Kommentar · 1 Reaktion ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Quantco/pnpm-licenses#17 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100