Skip to content

docs(formatters): evaluate twinkleplop for terminal code highlighting - #1634

Draft
jared-outpost[bot] wants to merge 1 commit into
mainfrom
issue-1633-evaluate-twinkleplop
Draft

jared-outpost[bot] wants to merge 1 commit into
mainfrom
issue-1633-evaluate-twinkleplop

Conversation

@jared-outpost

@jared-outpost jared-outpost Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

evaluates whether twinkleplop can replace cli-highlight in the terminal markdown code-block renderer (packages/cli/src/lib/formatters/markdown.ts). this is an evaluation deliverable — no code, deps, or CI change.

findings

  • twinkleplop has no terminal/ANSI rendering API — it emits HTML or flat token spans, so adopting it means building and owning a token-to-ANSI adapter mapping onto our chalk/COLORS palette.
  • its published benchmarks compare against shiki and prism; highlight.js (what we use via cli-highlight) is absent, so the advertised speedups don't establish a benefit for this path.
  • no terminal perf comparison was run: twinkleplop isn't resolvable from the npm registry (npm view twinkleplop → 404), so startup/size/ANSI/coverage/plain-mode can't be measured here.
  • packaged-size benefit is unproven — it only helps if it displaces highlight.js + the parse5 HTML round-trip, not if it sits alongside them.
  • sql formatting (sql.ts / @sentry/sqlish) is explicitly out of scope.

recommendation

keep cli-highlight; revisit only if twinkleplop ships a terminal/ANSI API, publishes a highlight.js-inclusive benchmark, and becomes installable so a real comparison can be run.

full evaluation: docs/superpowers/specs/2026-09-24-twinkleplop-terminal-highlighting-evaluation.md

Closes #1633

Records a suitability evaluation of Twinkleplop as a replacement for
cli-highlight in the terminal Markdown renderer. Concludes not to migrate:
Twinkleplop has no terminal/ANSI rendering API, its benchmarks omit
highlight.js, and it is not installable from npm to run a real comparison.

Fixes #1633
@vercel

vercel Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cli Ready Ready Preview Sep 24, 2026 11:37am UTC
sentry-local Ready Ready Preview Sep 24, 2026 11:37am UTC

Request Review

This branch was successfully deployed

2 active deployments
Preview – sentry-local — 64d389c4 Deployed Sep 24, 2026 by vercel[bot]
Preview – cli — 64d389c4 Deployed Sep 24, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Evaluate Twinkleplop for terminal code highlighting

0 participants