Repository navigation
Conversation
comarkdown/comark#529 replaces js-yaml with tinyaml.
Drop async and await the port added to tests that never wait, a one-caller GitLab wrapper, Twilio's structuredClone (walkAst returns a copy), and a chat test that re-tested the plain nested-list path after the HTML branch went away. Rename tests that only check serialization, and keep the benchmark script out of knip. Signed-off-by: onmax <maximogarciamtnez@gmail.com>
Comark now ships linkify as a default plugin, and chat turns default plugins off, so it registers linkify() itself. Its defaults leave bare domains like hackmd.io unlinked, as remark-gfm does.
…lose chat turns off Comark's default plugins, but importing the root comark entry still bundled them. comark/core and comark/auto-close leave them out.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
chatparses every message with unified/remark, which pulls 71 packages into its production dependencies and needs 333 lines of input guards to stay fast on hostile messages. this is a spike to measure what goes away with Comark. it isn't meant to merge.this swaps remark for Comark in
chatand every adapter, installed from the pkg.pr.new build of comarkdown/comark#529, which reads frontmatter with tinyaml instead of js-yaml.chatdrops to 10 production dependencies.chatparses withcomark/core, which leaves out Comark's default plugins, and links text with tinylinkify'slinkifyGfmin place of Comark's linkify-it. linkify-it 6 doesn't linkwww.example.com, which remark-gfm did; tinylinkify/gfm links what remark-gfm links, sowww.addresses keep working and bare domains likehackmd.io/xstay plain text. it's installed from the pkg.pr.new build of tiny v0.1.2 until that's on npm.parsing and rendering get 5.5 to 17 times faster. median of 5 rounds per call, Apple M4, Node 26.13. medium is a 652-character LLM-style reply. these timings are from the earlier Comark build and haven't been rerun on this one.
bundles still grow, by 5% to 13% gzip. the duplicate
entitiestable that made up most of it is gone upstream (serkodev/markdown-exit#40, comarkdown/comark#549). what's left is Comark's own layer on top of markdown-exit, linkify-it, and tinyaml (2.5 KiB gzip, which Comark's stringifier imports for YAML props). esbuild 0.28, minified ESM, KiB minified / gzip.Test plan
pnpm knip,pnpm check, andturbo typecheck testpass for every package (89 tasks), integration tests included.node scripts/bench-markdown.mjs <repo-root> <label>reproduces the timings.Checklist
git commit -s)pnpm validatepassesReviewed with sol-loop: 1 round with gpt-6.1-sol on xhigh. Sol verdict: approved