Bump @openpkg-ts/sdk to ^0.40.0: extraction now flattens mapped/conditional type aliases into members (with @deprecated recovered from conditional arm aliases), gives function-type aliases real signatures, and defaults to strict so T | undefined unions survive. Combined with 1.8's instance typing, prose-deprecated-reference now works on wasm/proxy surfaces — e.g. drift lint <clarinet-sdk> --docs guides/ deterministically flags simnet.runSnippet with "use simnet.execute(command) instead".
Changelog
Every release, straight from the changesets. Newest first.
Instance typing for prose-deprecated-reference. The registry now maps callable exports to their named return types (Promise unwrapped), so const simnet = await initSimnet() types simnet as Simnet — deprecated members are judged against the actual type instead of being suppressed when an identically-named non-deprecated member exists elsewhere (the proxy-over-raw-class pattern: clarinet's runSnippet). Deprecation notes also flow from deprecationReason fields, not just @deprecated tags.
New prose drift type: prose-deprecated-reference (17 drift types total). Docs code blocks that import or call an API the spec marks deprecated are flagged — with the spec's deprecation note surfaced as the suggestion — unless the surrounding prose (±5 lines) already acknowledges the deprecation. Deterministic version of a finding class previously only agents caught (e.g. clarinet's runSnippet promoted while its types say @deprecated use execute). Registry now indexes deprecated exports/members; MarkdownDocFile carries raw content for prose-context checks.
Coverage accuracy + external docs corpus (posthog-js dogfood fixes):
- Coverage no longer counts external re-exports as undocumented. Exports whose
declaration lives outside the analyzed program (
source.file === '<external>'or a package-only source) are excluded from the denominator inbuildDriftSpec,scan,coverage, andhealth, and surfaced separately:summary.externalExports/health.completeness.externalin the SDK,coverage.externalin CLI JSON, and a "+N external (not resolvable here)" note in human output. New SDK exports:isExternalExport,EXTERNAL_SOURCE_FILE;ApiSourcegainspackage/version. - New
--docs <patterns...>flag onscanandlint: point prose drift at an arbitrary markdown corpus (glob patterns or directories, e.g. a hosted docs site pulled down locally) instead of the repo-local defaults. Runs for any language when given explicitly; warns when patterns match no files.
Readable type labels for OpenAPI surfaces. The adapter preserves inlined schema names as title (so a resolved $ref still knows it was CandidateInfoSuccessResponse); drift get renders composed types (string | null, Success | Error) instead of bare anyOf/oneOf, and long parameter names no longer collide with the type column.