Skip to content

Highlight error sources with twinkleplop, update to Solid rc.9 - #20

Merged
ryansolid merged 5 commits into
mainfrom
shiki-to-twinklepop
Sep 30, 2026
Merged

ryansolid merged 5 commits into
mainfrom
shiki-to-twinklepop

Conversation

@lxsmnsyc

Copy link
Copy Markdown
Member
  • Replace shiki with twinkleplop. Highlighting is synchronous and ships no WebAssembly, so the build drops from 8.1 MB to 3.6 MB.
  • Mark the frame's line with the focus directive and the word it points at with err.
  • Highlight the whole file, then keep 25 lines on each side of the frame, so a block comment above the window no longer breaks the colours.
  • Update every dev dependency, including Solid 2.0.0-rc.9, which needs @solidjs/compiler in place of @dom-expressions/compiler.

🤖 Generated with Claude Code

@socket-security

socket-security Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​twinkleplop/​tsx@​0.1.5731006692100
Added@​twinkleplop/​typescript@​0.1.5761006892100
Added@​twinkleplop/​theme-github@​0.2.2761006992100
Added@​twinkleplop/​annotation@​0.1.5731009992100

View full report

@socket-security

socket-security Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Priority Alert  (click "▶" to expand/collapse) Action
Low priority
Low adoption: npm @twinkleplop/annotation

Location: Package overview

From: package.json → npm/@twinkleplop/annotation@0.1.5

ℹ Read more on: This package | This alert | What are unpopular packages?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Unpopular packages may have less maintenance and contain other problems.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@twinkleplop/annotation@0.1.5. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn
Low priority
Low adoption: npm @twinkleplop/core

Location: Package overview

From: pnpm-lock.yaml → npm/@twinkleplop/theme-github@0.2.2 → npm/@twinkleplop/tsx@0.1.5 → npm/@twinkleplop/annotation@0.1.5 → npm/@twinkleplop/typescript@0.1.5 → npm/@twinkleplop/core@0.2.2

ℹ Read more on: This package | This alert | What are unpopular packages?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Unpopular packages may have less maintenance and contain other problems.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@twinkleplop/core@0.2.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn
Low priority
Low adoption: npm @twinkleplop/css

Location: Package overview

From: pnpm-lock.yaml → npm/@twinkleplop/tsx@0.1.5 → npm/@twinkleplop/typescript@0.1.5 → npm/@twinkleplop/css@0.1.5

ℹ Read more on: This package | This alert | What are unpopular packages?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Unpopular packages may have less maintenance and contain other problems.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@twinkleplop/css@0.1.5. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn
Low priority
Low adoption: npm @twinkleplop/html

Location: Package overview

From: pnpm-lock.yaml → npm/@twinkleplop/tsx@0.1.5 → npm/@twinkleplop/typescript@0.1.5 → npm/@twinkleplop/html@0.1.5

ℹ Read more on: This package | This alert | What are unpopular packages?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Unpopular packages may have less maintenance and contain other problems.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@twinkleplop/html@0.1.5. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn
Low priority
Low adoption: npm @twinkleplop/javascript

Location: Package overview

From: pnpm-lock.yaml → npm/@twinkleplop/tsx@0.1.5 → npm/@twinkleplop/typescript@0.1.5 → npm/@twinkleplop/javascript@0.1.5

ℹ Read more on: This package | This alert | What are unpopular packages?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Unpopular packages may have less maintenance and contain other problems.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@twinkleplop/javascript@0.1.5. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn
Low priority
Low adoption: npm @twinkleplop/theme-github

Location: Package overview

From: package.json → npm/@twinkleplop/theme-github@0.2.2

ℹ Read more on: This package | This alert | What are unpopular packages?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Unpopular packages may have less maintenance and contain other problems.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@twinkleplop/theme-github@0.2.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn
Low priority
Low adoption: npm @twinkleplop/tsx

Location: Package overview

From: package.json → npm/@twinkleplop/tsx@0.1.5

ℹ Read more on: This package | This alert | What are unpopular packages?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Unpopular packages may have less maintenance and contain other problems.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@twinkleplop/tsx@0.1.5. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn
Low priority
Low adoption: npm @twinkleplop/typescript

Location: Package overview

From: package.json → npm/@twinkleplop/typescript@0.1.5

ℹ Read more on: This package | This alert | What are unpopular packages?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Unpopular packages may have less maintenance and contain other problems.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@twinkleplop/typescript@0.1.5. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn

View full report

lxsmnsyc and others added 5 commits September 30, 2026 02:04
Replace shiki with twinkleplop. The highlighter runs synchronously, so a
stack frame's source appears with the panel instead of a moment later,
and the package no longer carries a WebAssembly grammar engine: the build
drops from 8.1 MB to 3.6 MB.

The error line and the word the frame points at are marked with the `hl`
and `err` directives, written as comments on their own lines above the
snippet. The code is never edited to carry a marker, and a line holding
only a marker is dropped from the output.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The code view cut the file down to the window it shows before highlighting
it. A window that starts inside a block comment or a template literal left
the highlighter reading an opening it never saw, and every line after that
read as comment.

The whole file is highlighted now, and the lines outside the window are
hidden through render overlays instead of cut away. The frame's line is
marked with the `focus` directive, so the lines around it can step back.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The view showed fifteen lines on each side of the frame, while its
scrollbar reaches about twenty-five, so the reader could scroll into
lines that were not there.

It now keeps far more of the file than the scrollbar can reach and opens
on the frame's line. The bound is only there to stop a very large file
from putting every one of its lines in the page.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The code view keeps a window that matches how far it scrolls, so the
reader never scrolls into lines that are missing and the panel never
holds a whole file.

The window is cut after highlighting, not before, so a block comment or
template literal above it still reads correctly. Lines outside it are
tagged through the renderer's line hook and dropped from the markup,
which the hide overlays did not do at the offsets they were given.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`.changeset/rc12-runtime-parity.md` described the rc.12 runtime, but rc.12
was never published; `package.json` pins and peers `^2.0.0-rc.13`, so the
changelog line now says rc.13.

Also carries the rebase fix-ups for #20: the `@twinkleplop/*` ranges move
to the patches the regenerated lockfile resolved and the suite was verified
against (`annotation`/`tsx`/`typescript` 0.1.5, `theme-github` 0.2.2).

Co-authored-by: Cursor <cursoragent@cursor.com>
@ryansolid

Copy link
Copy Markdown
Member

Rebased this onto main (841fc15) so it can ship in 1.0.0-next.5 — thank you for the highlighter work, @lxsmnsyc. The branch head moved from 5ddbecc to 3f47c8e.

Kept (your four commits, authorship preserved): the shiki → @twinkleplop/* swap, highlight.ts, marker.ts with its unit test (focus/err directive comments, ±25-line window cut after highlighting the whole file), the CodeView.tsx / styles.css changes, the e2e assertions, and .changeset/twinkleplop-highlighting.md.

Dropped: the chore: update dependencies to Solid 2.0.0-rc.9 commit and .changeset/solid-rc-9.md. #21 already moved main to rc.13 (@solidjs/compiler in rolldown.config.js and the fixture, vite-plugin next.46, the development condition via playwright.config.ts, the registry-test hook mock), so that half was superseded and its changeset would have printed a wrong "rc.9" changelog line. The only conflicts were package.json (took main's Solid pins, re-applied the twinkleplop additions and the shiki removal) and pnpm-lock.yaml (regenerated from main's lockfile).

One small commit on top carries the rebase fix-ups: the @twinkleplop/* ranges move to the patches the regenerated lockfile resolved (0.1.5 / theme-github 0.2.2, published Sep 25), and .changeset/rc12-runtime-parity.md now says rc.13, which is what package.json actually pins (rc.12 was never published).

Verification on the rebased branch

  • pnpm test: 109 passed (main: 96; +13 from marker.test.ts, which also exercises codeToHtml)
  • pnpm test:e2e: 8/8 — captures client errors asserts .twinkleplop, .l.focus, .tok.error, the window bounds and the dropped markers
  • pnpm typecheck, pnpm check (publint + attw), pnpm format:check: clean
  • pnpm build dist: 7.5 MB → 3.8 MB; error-viewer chunk 1.0 MB → 280 kB; onig.wasm asset gone; pnpm ls shiki empty

— Claude via Cursor

@ryansolid
ryansolid merged commit d086474 into main Sep 30, 2026
3 checks passed
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.

2 participants