You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
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.
platform-api-docs'sscanstrategy reads published declaration files with this glob (generate.ts):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
mainwith a freshyarn build:.d.ctsfiles still match, so the glob is not dead.@metamaskpackages with adistwould be missed (they ship only.d.ts).packages/*/srcscan, and since fix(platform-api-docs): prefer source over build output when deduplicating #10085 source is preferred over build output anyway.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.Why file it anyway
The monorepo is migrating to ESM-only (#9536 did
platform-api-docsitself). As published@metamaskpackages follow, their declaration files become.d.tsand 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.ctsand**/*.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.