@@ -33,6 +33,7 @@ import { YukuImplementation } from './yuku.ts';
3333import { BiomeImplementation } from './biome.ts' ;
3434import { DprintImplementation } from './dprint.ts' ;
3535import { MalvaImplementation } from './malva.ts' ;
36+ import { MarkupImplementation } from './markup.ts' ;
3637import { PostcssImplementation } from './postcss.ts' ;
3738import { RsvelteImplementation } from './rsvelte.ts' ;
3839import { RsvelteParseImplementation } from './rsvelte_parse.ts' ;
@@ -126,6 +127,12 @@ export interface ImplementationSet {
126127 dprint : DprintImplementation | undefined ;
127128 /** malva (via WASM; dprint's CSS plugin) - format only; undefined if not available */
128129 malva : MalvaImplementation | undefined ;
130+ /**
131+ * markup_fmt (via WASM; dprint's Svelte plugin, composed with dprint's TS and CSS
132+ * plugins) - format only, Svelte; undefined if not available. Coverage-only: it
133+ * rejects valid real Svelte, so it is never timed (see `get_benchmark_tasks`).
134+ */
135+ markup : MarkupImplementation | undefined ;
129136 /** postcss - parse only, CSS; undefined if not available */
130137 postcss : PostcssImplementation | undefined ;
131138 /**
@@ -195,16 +202,17 @@ export interface InitOptions {
195202}
196203
197204// Deliberately NOT surface-scoped: every impl initializes on every run, including
198- // the format-only ones (biome, dprint, malva, rsvelte-fmt) on the parse-only
199- // conformance surface, where they back no row. Gating init on `OPERATIONS` is the
200- // obvious saving and it isn't worth taking — measured, the four cost ~233 ms total
201- // (biome 187, dprint 23, malva 9, rsvelte-fmt 14) against a multi-minute run, and
202- // two disclosures read the LIVE set rather than `complete`: `collect_binary_sizes`
203- // gates each artifact on `impls.<key>`, so a skipped impl silently drops its row
204- // from the published BINARY SIZES table (a catalog of what is on disk, which the
205- // surface's operation list has no business thinning), and `get_alternative_versions`
206- // feeds the report's `Versions:` line from the same set. The cost of the saving is a
207- // thinner published report; the cost of not taking it is a fifth of a second.
205+ // the format-only ones (biome, dprint, malva, markup_fmt, rsvelte-fmt) on the
206+ // parse-only conformance surface, where they back no row. Gating init on
207+ // `OPERATIONS` is the obvious saving and it isn't worth taking — measured, the five
208+ // cost under 300 ms total (biome 187, markup_fmt ~50, dprint 23, rsvelte-fmt 14,
209+ // malva 9) against a multi-minute run, and two disclosures read the LIVE set rather
210+ // than `complete`: `collect_binary_sizes` gates each artifact on `impls.<key>`, so
211+ // a skipped impl silently drops its row from the published BINARY SIZES table (a
212+ // catalog of what is on disk, which the surface's operation list has no business
213+ // thinning), and `get_alternative_versions` feeds the report's `Versions:` line
214+ // from the same set. The cost of the saving is a
215+ // thinner published report; the cost of not taking it is under a third of a second.
208216
209217/**
210218 * Initialize one REQUIRED implementation, rethrowing when it can't load.
@@ -364,6 +372,7 @@ export async function init_implementations(
364372 biome,
365373 dprint,
366374 malva,
375+ markup,
367376 rsvelte,
368377 rsvelte_parse,
369378 swc,
@@ -383,6 +392,12 @@ export async function init_implementations(
383392 const biome_impl = await optional ( biome , 'biome' , 'Biome (WASM)' , 'Biome' ) ;
384393 const dprint_impl = await optional ( dprint , 'dprint' , 'dprint (WASM)' , 'dprint' ) ;
385394 const malva_impl = await optional ( malva , 'malva' , 'malva (WASM, CSS)' , 'malva' ) ;
395+ const markup_impl = await optional (
396+ markup ,
397+ 'markup' ,
398+ 'markup_fmt (WASM, Svelte, coverage-only)' ,
399+ 'markup_fmt'
400+ ) ;
386401 const rsvelte_impl = await optional (
387402 rsvelte ,
388403 'rsvelte' ,
@@ -428,6 +443,7 @@ export async function init_implementations(
428443 biome : biome_impl ,
429444 dprint : dprint_impl ,
430445 malva : malva_impl ,
446+ markup : markup_impl ,
431447 postcss : postcss_impl ,
432448 rsvelte : rsvelte_impl ,
433449 rsvelte_parse : rsvelte_parse_impl ,
@@ -462,6 +478,7 @@ function construct_implementations(versions: AllVersions): ConstructedImplementa
462478 biome : new BiomeImplementation ( versions . biome ) ,
463479 dprint : new DprintImplementation ( versions . dprint ) ,
464480 malva : new MalvaImplementation ( versions . malva ) ,
481+ markup : new MarkupImplementation ( versions . markup ) ,
465482 postcss : new PostcssImplementation ( versions . postcss ) ,
466483 rsvelte : new RsvelteImplementation ( versions . rsvelte ) ,
467484 // A different package from rsvelte-fmt above — the N-API addon, which unlike
@@ -547,9 +564,13 @@ export interface BenchmarkTask {
547564 /** Whether this benchmark runs async */
548565 is_async : boolean ;
549566 /**
550- * Measure this impl's pre-flight coverage but never TIME it. Set for an impl
551- * with no in-process API, where a timed row would be dominated by process
552- * spawn rather than format work (`rsvelte-fmt` — see `lib/rsvelte.ts`).
567+ * Measure this impl's pre-flight coverage but never TIME it. Set where a timed
568+ * row would mislead: an impl with no in-process API, whose timed row would be
569+ * dominated by process spawn rather than format work (`rsvelte-fmt` — see
570+ * `lib/rsvelte.ts`), and an impl that rejects valid real code, whose timed row
571+ * would remove every file it rejects from every row's timed set
572+ * (`markup-fmt-wasm` — see `lib/markup.ts`). Each one's reason is published
573+ * beside its accept rate (`report.ts` `COVERAGE_ONLY_REASONS`).
553574 *
554575 * The bench honors this in four places, and all four are load-bearing: the
555576 * pre-flight (`bench_preflight.ts`) plans no timed row for the task, keeps it
@@ -877,7 +898,8 @@ export function get_benchmark_tasks(
877898 // No native peer exists to add here: none of the Rust CSS tools considered
878899 // exposes a parse call to JS (lightningcss hands a tree to its `visitor` only
879900 // mid-transform, biome's js-api exposes no parse, malva is a formatter, oxc has
880- // no CSS parse binding). See lib/postcss.ts.
901+ // no CSS parse binding, `@swc/css` exposes only minify/transform). See
902+ // lib/postcss.ts.
881903 add (
882904 'postcss' ,
883905 impls . postcss ?. supports_parse_language ( language ) ,
@@ -949,6 +971,24 @@ export function get_benchmark_tasks(
949971 impls . malva ! . format ( source , language )
950972 ) ;
951973
974+ // markup_fmt (Svelte only) — dprint's Svelte plugin, composed with the
975+ // dprint and malva plugins for the embedded code (see lib/markup.ts) —
976+ // COVERAGE-ONLY. It rejects valid Svelte the real corpus holds (markup inside
977+ // a template literal in an attribute expression, `{…}` inside a quoted
978+ // `style`), a large share of the perf corpus's Svelte bytes. A timed row would
979+ // need a `PERF_OMITS` entry per file, and each would leave EVERY row's timed
980+ // set, so adding it would reshape every published Svelte number. Measured for
981+ // what it accepts instead; time it once upstream accepts the corpus. See
982+ // docs/benchmarks.md §Coverage-only rows.
983+ add (
984+ 'markup' ,
985+ impls . markup ?. supports_format_language ( language ) ,
986+ 'markup-fmt-wasm' ,
987+ 'markup' ,
988+ ( source ) => impls . markup ! . format ( source , language ) ,
989+ { coverage_only : true }
990+ ) ;
991+
952992 // rsvelte-fmt (Svelte only) — COVERAGE-ONLY. It ships no in-process format
953993 // API in any package (the sibling N-API addon is the compiler), so this task
954994 // spawns a process per file: measured on ~5 KB of Svelte the spawn floor
@@ -1012,6 +1052,8 @@ export function get_defined_rows(
10121052/** One cell this surface defines: a row in one language. */
10131053export interface DefinedCell extends DefinedRow {
10141054 language : Language ;
1055+ /** `BenchmarkTask.coverage_only` — measured for coverage, never timed. */
1056+ coverage_only : boolean ;
10151057}
10161058
10171059/**
@@ -1028,7 +1070,8 @@ export function get_defined_cells(
10281070 get_benchmark_tasks ( impls . complete , operation , language , options ) . map ( ( task ) => ( {
10291071 name : task . name ,
10301072 impl : task . impl ,
1031- language
1073+ language,
1074+ coverage_only : task . coverage_only === true
10321075 } ) )
10331076 ) ;
10341077}
@@ -1085,6 +1128,8 @@ export function get_alternative_versions(
10851128 dprint : impls . dprint ?. versions . typescript ,
10861129 // Same reasoning as dprint: the CSS plugin, not the shared host.
10871130 malva : impls . malva ?. versions . malva ,
1131+ // The markup plugin; its embedded TS and CSS are the dprint and malva versions above.
1132+ markup : impls . markup ?. versions . markup ,
10881133 postcss : impls . postcss ?. versions . postcss ,
10891134 rsvelte_fmt : impls . rsvelte ?. versions . fmt ,
10901135 // Two facts, both reported: the addon's own version, and the upstream Svelte
0 commit comments