platform-api-docs: `scan` strategy misses ESM-only packages, which ship `.d.ts` rather than `.d.cts`
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 76/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- documentation
Hướng nghiên cứu
Bắt đầu trong packages/platform-api-docs/src/generate.ts, khoảng dòng 393, và kiểm tra glob quét cùng hành vi loại bỏ trùng lặp của nó. Chạy một yarn build mới sau khi khớp cả hai phần mở rộng khai báo; được coi là hoàn tất khi các gói ESM-only được đưa vào mà không có tài liệu trùng lặp khi cả hai phần mở rộng đều tồn tại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
platform-api-docs's scan strategy reads published declaration files with this glob (generate.ts):
node_modules/@metamask/*/dist/**/*.d.cts
That only matches CommonJS declaration files. A package published ESM-only emits .d.ts, so it is skipped silently: no warning, it just contributes nothing to the docs.
Current impact: none
Worth stating plainly so this isn't over-prioritised. Measured on main with a fresh yarn build:
- 654
.d.ctsfiles still match, so the glob is not dead. - 112 of 150
@metamaskpackages with adistwould be missed (they ship only.d.ts). - 99 of those are workspace symlinks, already covered by the
packages/*/srcscan, and since #10085 source is preferred over build output anyway. - The remaining 13 are real npm dependencies:
abi-utils,action-utils,api-specs,browser-passworder,create-release-branch,eth-json-rpc-infura,eth-sig-util,metamask-eth-abis,nonce-tracker,object-multiplex,scure-bip39,snaps-registry,swappable-obj-proxy. - Zero of those 13 contain messenger types, so nothing is missing from the docs today.
Why file it anyway
The monorepo is migrating to ESM-only (#9536 did platform-api-docs itself). As published @metamask packages follow, their declaration files become .d.ts and this glob stops seeing them. The failure mode is a silent omission rather than an error, which is the part that makes it worth fixing before it bites.
Suggested fix
Match both extensions, e.g. **/*.d.cts and **/*.d.ts, keeping them in the same call so the exclusion scoping established in #10085 is preserved. Note that a package shipping both would then be matched twice, so it is worth checking that deduplication resolves that the way we want.
- Ngôn ngữ chính
- TypeScript
- Star
- 414
- Fork
- 309
- Merge trung bình
- 1 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 388
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có 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 MetaMask/core
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[utils] Replace the `uuid` dependency with `crypto.randomUUID()`Có thể đã có người làm @avantikonde đã nhận 4 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
MetaMask/core#10210 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
eth-json-rpc-middleware: `TransactionParamsStruct` rejects numeric `chainId`, breaking dapp transactionsCó thể đã có người làm @truehazker đã nhận 48 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
MetaMask/core#9964 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[eth-block-tracker]: `json-rpc-engine` should be a production dependencyCó thể đã có người làm @SnowingFox đã nhận 62 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
MetaMask/core#6864 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của MetaMask/core
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
db-ux-design-system/core-web#8461 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Cannot run an integration on windows when power shell is selected as the default profile terminalĐang mởPriority/Blocker Type/Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
wso2/product-integrator#2767 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
severity:low
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày