Skip to content

Meta: Read examples from JSDoc instead of addTests - #257

Merged
fregante merged 13 commits into
mainfrom
claude/jsdoc-examples
Nov 22, 2026
Merged

fregante merged 13 commits into
mainfrom
claude/jsdoc-examples

Conversation

@fregante

@fregante fregante commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Created by Claude Dragon 🐉, will be reviewed by @fregante first.

Each detection now lists its examples as @example (URL) and @see (another detection) JSDoc tags instead of addTests. tsc carries them into the .d.ts, so add-examples-to-dts.ts, the TEST: labels and --drop-labels are gone. Detections that only combine others now @see their parts.

  • vite-plugin-examples.ts turns the JSDoc into a virtual:examples module that collector.ts imports, for both the demo and index.test.ts. Only the entries are shipped to the demo, not the source. ts-morph and tsx are no longer needed.
  • esbuild is dropped: tsc emits index.js (without comments, so the examples aren't shipped) and index.d.ts from the single tsconfig.json. The try script is removed with it.
  • The examples resolve to the same URLs as before. hasCode also lists isBlame and isCompareWikiPage, which it matches.

fregante and others added 13 commits November 22, 2026 03:46
Co-authored-by: Claude Dragon 🐉 <noreply@anthropic.com>
Co-authored-by: Claude Dragon 🐉 <noreply@anthropic.com>
Co-authored-by: Claude Dragon 🐉 <noreply@anthropic.com>
Co-authored-by: Claude Dragon 🐉 <noreply@anthropic.com>
Co-authored-by: Claude Dragon 🐉 <noreply@anthropic.com>
Co-authored-by: Claude Dragon 🐉 <noreply@anthropic.com>
Co-authored-by: Claude Dragon 🐉 <noreply@anthropic.com>
Co-authored-by: Claude Dragon 🐉 <noreply@anthropic.com>
Co-authored-by: Claude Dragon 🐉 <noreply@anthropic.com>
Co-authored-by: Claude Dragon 🐉 <noreply@anthropic.com>
Co-authored-by: Claude Dragon 🐉 <noreply@anthropic.com>
Co-authored-by: Claude Dragon 🐉 <noreply@anthropic.com>
Co-authored-by: Claude Dragon 🐉 <noreply@anthropic.com>
@fregante
fregante requested a balanced review from Copilot November 22, 2026 15:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@fregante
fregante marked this pull request as ready for review November 22, 2026 15:52
@fregante
fregante merged commit afcf223 into main Nov 22, 2026
11 checks passed
@fregante
fregante deleted the claude/jsdoc-examples branch November 22, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants