Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

platform-api-docs: `scan` strategy misses ESM-only packages, which ship `.d.ts` rather than `.d.cts`

オープン 初心者向け
#10,472 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
documentation

調査の方向性

packages/platform-api-docs/src/generate.ts の 393 行目付近から始め、スキャン glob とその重複排除の動作を調べます。両方の宣言拡張子に一致させた後、fresh な yarn build を実行します。両方の拡張子が存在する場合でも、ESM-only パッケージが重複したドキュメントなしで含まれれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.cts files still match, so the glob is not dead.
  • 112 of 150 @metamask packages with a dist would be missed (they ship only .d.ts).
  • 99 of those are workspace symlinks, already covered by the packages/*/src scan, 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.

主要言語
TypeScript
スター
414
フォーク
309
平均マージ
22時間 25分
マージ済み PR(30日)
367

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

MetaMask/core のほかの issue

MetaMask/core の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。