Release process: add a built-artifact (dist/bundle) check to catch runtime regressions before publish
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- firebase, node.js, react, typescript
- Lĩnh vực
- build-system, ci-cd, release, testing
Hướng nghiên cứu
Bắt đầu với các kiểm tra được đề xuất đối với đầu ra của npm pack, đặc biệt là dist/index.js, các đường dẫn exports/main/module của package và các lệnh import Node ESM và CommonJS. Xác định một gate trước khi publish, bao quát require động và các kiểm tra bên ngoài, việc tải entry point, tính toàn vẹn của các đường dẫn tarball và việc so sánh kích thước bundle; các ứng dụng smoke test ở runtime và diff .d.ts là các phần tiếp theo có liên quan. Hoàn tất nghĩa là quy trình release phát hiện được các hồi quy được mô tả trong #759 trước khi publish.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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)
- Ngôn ngữ chính
- TypeScript
- Star
- 3.6k
- Fork
- 403
- Merge trung bình
- 5 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 10
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của FirebaseExtended/reactfire
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
FirebaseExtended/reactfire#801 ·
-
v5
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
FirebaseExtended/reactfire#793 ·
-
v5
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
FirebaseExtended/reactfire#790 · 2 bình luận ·
-
v5
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
FirebaseExtended/reactfire#789 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
FirebaseExtended/reactfire#788 ·
Tất cả issue của FirebaseExtended/reactfire
Issue tương tự
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Crush Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
ElementsProject/cln-application#167 · 1 bình luận · 1 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Quantco/pnpm-licenses#17 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100