Skip to content

refactor(highlight): isolate highlighter language grammars - #352

Merged
farnabaz merged 4 commits into
mainfrom
refactor/highlighter-language-entries
Aug 13, 2026
Merged

farnabaz merged 4 commits into
mainfrom
refactor/highlighter-language-entries

Conversation

@atinux

@atinux atinux commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • move the Comark Shiki and rangi grammars from shared utilities into highlighter-owned language entries
  • expose standalone comark/plugins/shiki/language and comark/plugins/rangi/language imports without cross-highlighter dependencies
  • re-export the grammar definitions from the main plugins and document the new entry points
  • add bundle coverage that verifies Shiki and rangi stay isolated

Motivation

Consumers using rangi for Comark highlighting should not pull in Shiki language modules, and each highlighter should own its grammar implementation.

Verification

  • vitest run --maxWorkers=1 (50 files, 1,403 tests passed; 2 todo)
  • TypeScript package check
  • oxlint on changed TypeScript files
  • oxfmt check on changed files
  • package build and public subpath import checks

Written by an AI agent on behalf of @atinux; not yet human-reviewed.
@atinux
atinux requested a review from farnabaz as a code owner August 12, 2026 13:31
@vercel

vercel Bot commented Aug 12, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
comark Ready Ready Preview Aug 12, 2026 4:39pm
comark-json-render Ready Ready Preview Aug 12, 2026 4:39pm
comark-nextjs Ready Ready Preview Aug 12, 2026 4:39pm
comark-nuxt Ready Ready Preview Aug 12, 2026 4:39pm
comark-svelte Ready Ready Preview Aug 12, 2026 4:39pm
comark-sveltekit Ready Ready Preview Aug 12, 2026 4:39pm
comark-twoslash Ready Ready Preview Aug 12, 2026 4:39pm
comark-vue Ready Ready Preview Aug 12, 2026 4:39pm

@pkg-pr-new

pkg-pr-new Bot commented Aug 12, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

comark

npm i https://pkg.pr.new/comark@352

@comark/angular

npm i https://pkg.pr.new/@comark/angular@352

@comark/ansi

npm i https://pkg.pr.new/@comark/ansi@352

@comark/html

npm i https://pkg.pr.new/@comark/html@352

@comark/nuxt

npm i https://pkg.pr.new/@comark/nuxt@352

@comark/react

npm i https://pkg.pr.new/@comark/react@352

@comark/svelte

npm i https://pkg.pr.new/@comark/svelte@352

@comark/vue

npm i https://pkg.pr.new/@comark/vue@352

commit: 4e7c602

@github-actions

github-actions Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

✅ Bundle snapshot updated

Committed the new snapshot as 4e7c602, verified by re-running the bundle check against it.

GitHub suppresses the events a workflow commit would normally raise, so the ci check above may
still show the earlier failure. Re-run it to refresh the status — the snapshot itself is confirmed green.

Produced by this run.

@farnabaz
farnabaz merged commit 9ac7700 into main Aug 13, 2026
13 checks passed
@farnabaz
farnabaz deleted the refactor/highlighter-language-entries branch August 13, 2026 08:33

This branch was successfully deployed

8 active deployments
Preview – comark — 4e7c6022 Deployed Aug 12, 2026 by vercel[bot]
Preview – comark-nuxt — 4e7c6022 Deployed Aug 12, 2026 by vercel[bot]
Preview – comark-sveltekit — 4e7c6022 Deployed Aug 12, 2026 by vercel[bot]
Preview – comark-nextjs — 4e7c6022 Deployed Aug 12, 2026 by vercel[bot]
Preview – comark-vue — 4e7c6022 Deployed Aug 12, 2026 by vercel[bot]
Preview – comark-json-render — 4e7c6022 Deployed Aug 12, 2026 by vercel[bot]
Preview – comark-twoslash — 4e7c6022 Deployed Aug 12, 2026 by vercel[bot]
Preview – comark-svelte — 4e7c6022 Deployed Aug 12, 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.

2 participants