@takazudo/zfb-md-wasm 2.13.0 → 2.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -31,12 +31,12 @@ migration. `./highlight` is also backward-compatible. New `./render` and
31
31
  `zfb-render` but intentionally retain `zfb-content` and `syntect-fancy`.
32
32
  `./parse` is not syntect-free.
33
33
 
34
- | Entry | gzip-9 wasm (2.13.0) | Exact runtime values | Exact exported types |
34
+ | Entry | gzip-9 wasm (2.14.0) | Exact runtime values | Exact exported types |
35
35
  | --- | ---: | --- | --- |
36
- | `.` | 1,457,796 B | `init`, `compile`, `renderHtml`, `parseToAst`, `highlightCode`, `version`, `__forceTrapForTests`, `__getTrapRecoveryStateForTests`, `toMdastRoot`, `ZfbMdWasmTrapError`, `ZfbMdWasmTrapRecoveryLimitError`, `MdastAdapterError` | Full current compile/render/parse/raw-mdast/highlight surface |
37
- | `./highlight` | 758,250 B | `init`, `highlightCode`, `version`, `__forceTrapForTests`, `__getTrapRecoveryStateForTests`, `ZfbMdWasmTrapError`, `ZfbMdWasmTrapRecoveryLimitError` | `HighlightRole`, `HighlightCodeOptions`, `HighlightCodeResult`, `HighlightDiagnostic`, `HighlightDiagnosticSource` |
38
- | `./render` | 1,010,801 B | `init`, `renderHtml`, `version`, `ZfbMdWasmTrapError`, `ZfbMdWasmTrapRecoveryLimitError`, `__forceTrapForTests`, `__getTrapRecoveryStateForTests` | `RenderHtmlResult`, `Diagnostic`, `DiagnosticSource`, `ZfbMdWasmOptions`, `ParseDialect`, `PipelineOptions`, `GfmOptions`, `CodeHighlightMode`, `CodeHighlightOptions`, `MarkdownFeaturesConfig`, `JsxRuntime`, `HighlightRole` |
39
- | `./parse` | 276,433 B | `init`, `parseToAst`, `toMdastRoot`, `MdastAdapterError`, `version`, `ZfbMdWasmTrapError`, `ZfbMdWasmTrapRecoveryLimitError`, `__forceTrapForTests`, `__getTrapRecoveryStateForTests` | `ParseToAstResult`, `ParseToAstOptions`, `ParseDialect`, `FrontmatterPolicy`, `ParsePipelineOptions`, `Diagnostic`, `DiagnosticSource`, `AstPoint`, `AstPosition`, `RawMdastData`, `MarkdownRsStop`, `MdastNode`, `MdastRoot`, `UnknownMdastNode`, `Root`, `Paragraph`, `Heading`, `ThematicBreak`, `Blockquote`, `List`, `ListItem`, `Html`, `Code`, `Definition`, `Text`, `DirectiveNodeBase`, `ContainerDirective`, `LeafDirective`, `TextDirective`, `Emphasis`, `Strong`, `InlineCode`, `Break`, `Link`, `Image`, `ReferenceKind`, `LinkReference`, `ImageReference`, `FootnoteDefinition`, `FootnoteReference`, `TableAlign`, `Table`, `TableRow`, `TableCell`, `Delete`, `Yaml`, `MdxFlowExpression`, `MdxTextExpression`, `MdxJsxFlowElement`, `MdxJsxTextElement`, `MdxJsxAttributeContent`, `MdxJsxAttribute`, `MdxJsxAttributeValueExpression`, `MdxJsxExpressionAttribute` |
36
+ | `.` | 1,443,041 B | `init`, `compile`, `renderHtml`, `parseToAst`, `highlightCode`, `version`, `__forceTrapForTests`, `__getTrapRecoveryStateForTests`, `toMdastRoot`, `ZfbMdWasmTrapError`, `ZfbMdWasmTrapRecoveryLimitError`, `MdastAdapterError` | Full current compile/render/parse/raw-mdast/highlight surface |
37
+ | `./highlight` | 758,247 B | `init`, `highlightCode`, `version`, `__forceTrapForTests`, `__getTrapRecoveryStateForTests`, `ZfbMdWasmTrapError`, `ZfbMdWasmTrapRecoveryLimitError` | `HighlightRole`, `HighlightCodeOptions`, `HighlightCodeResult`, `HighlightDiagnostic`, `HighlightDiagnosticSource` |
38
+ | `./render` | 1,010,796 B | `init`, `renderHtml`, `version`, `ZfbMdWasmTrapError`, `ZfbMdWasmTrapRecoveryLimitError`, `__forceTrapForTests`, `__getTrapRecoveryStateForTests` | `RenderHtmlResult`, `Diagnostic`, `DiagnosticSource`, `ZfbMdWasmOptions`, `ParseDialect`, `PipelineOptions`, `GfmOptions`, `CodeHighlightMode`, `CodeHighlightOptions`, `MarkdownFeaturesConfig`, `JsxRuntime`, `HighlightRole` |
39
+ | `./parse` | 261,099 B | `init`, `parseToAst`, `toMdastRoot`, `MdastAdapterError`, `version`, `ZfbMdWasmTrapError`, `ZfbMdWasmTrapRecoveryLimitError`, `__forceTrapForTests`, `__getTrapRecoveryStateForTests` | `ParseToAstResult`, `ParseToAstOptions`, `ParseDialect`, `FrontmatterPolicy`, `ParsePipelineOptions`, `Diagnostic`, `DiagnosticSource`, `AstPoint`, `AstPosition`, `RawMdastData`, `MarkdownRsStop`, `MdastNode`, `MdastRoot`, `UnknownMdastNode`, `Root`, `Paragraph`, `Heading`, `ThematicBreak`, `Blockquote`, `List`, `ListItem`, `Html`, `Code`, `Definition`, `Text`, `DirectiveNodeBase`, `ContainerDirective`, `LeafDirective`, `TextDirective`, `Emphasis`, `Strong`, `InlineCode`, `Break`, `Link`, `Image`, `ReferenceKind`, `LinkReference`, `ImageReference`, `FootnoteDefinition`, `FootnoteReference`, `TableAlign`, `Table`, `TableRow`, `TableCell`, `Delete`, `Yaml`, `MdxFlowExpression`, `MdxTextExpression`, `MdxJsxFlowElement`, `MdxJsxTextElement`, `MdxJsxAttributeContent`, `MdxJsxAttribute`, `MdxJsxAttributeValueExpression`, `MdxJsxExpressionAttribute` |
40
40
 
41
41
  The focused entries own private resource pairs:
42
42
 
@@ -683,8 +683,8 @@ suite gates exact-match). Deliberate limitations of the browser build:
683
683
  - **Choose a focused artifact for non-compile calls.** The root remains the
684
684
  compatibility entry and carries the complete compiler graph. `./highlight`
685
685
  keeps its public API and resources while the post-#2449/#2450 graph is
686
- proven SWC-free — and its payload shows it: 758,250 B gzip-9 versus
687
- 1,457,796 B for root. `./render` and `./parse` are also SWC-free and omit
686
+ proven SWC-free — and its payload shows it: 758,247 B gzip-9 versus
687
+ 1,443,041 B for root. `./render` and `./parse` are also SWC-free and omit
688
688
  `zfb-render`; parse intentionally retains `zfb-content`/`syntect-fancy`, so
689
689
  it is not syntect-free. Use `./render` or `./parse` when a consumer does
690
690
  not need `compile`; root and highlight callers otherwise require no
@@ -718,36 +718,36 @@ three-step repair sequence:
718
718
  2. Run `node scripts/assert-zfb-md-wasm-budgets.mjs --build-log "$BUILD_LOG" --dist crates/zfb-md-wasm/npm/dist --update-manifest`.
719
719
  3. Run `node scripts/assert-md-wasm-size-docs.mjs --fix`, then `pnpm format:mdx`.
720
720
 
721
- These are the shipped **2.13.0** artifact rows — optimized final wasm after
721
+ These are the shipped **2.14.0** artifact rows — optimized final wasm after
722
722
  wasm-bindgen and wasm-opt, Node `gzipSync(..., { level: 9 })`, and glue
723
723
  bytes/gzip:
724
724
 
725
725
  | Entry/graph | final wasm | gzip-9 | glue | glue gzip-9 |
726
726
  | --- | ---: | ---: | ---: | ---: |
727
- | root (full) | 3,273,252 B | 1,457,796 B | 14,998 B | 4,199 B |
728
- | highlight | 1,476,740 B | 758,250 B | 8,758 B | 2,637 B |
729
- | render | 2,082,385 B | 1,010,801 B | 8,772 B | 2,661 B |
730
- | parse | 624,976 B | 276,433 B | 11,159 B | 3,797 B |
727
+ | root (full) | 3,294,286 B | 1,443,041 B | 14,998 B | 4,199 B |
728
+ | highlight | 1,476,740 B | 758,247 B | 8,758 B | 2,637 B |
729
+ | render | 2,082,385 B | 1,010,796 B | 8,772 B | 2,661 B |
730
+ | parse | 646,115 B | 261,099 B | 11,159 B | 3,797 B |
731
731
 
732
732
  The #2447 decision snapshot measured the split package at 3,638,607 B versus
733
733
  2,314,818 B for the root-plus-highlight package. Locked gzip-9 ceilings are
734
734
  root 1,600,000 B, highlight 820,000 B, render 1,100,000 B, and parse
735
735
  325,000 B; the complete packed tarball ceiling is 3,900,000 B. All four ship
736
- inside their ceilings, with 142,204 B (root), 61,750 B (highlight), 89,199 B
737
- (render), and 48,567 B (parse) of headroom. These are 2.13.0 measurements, not
736
+ inside their ceilings, with 156,959 B (root), 61,753 B (highlight), 89,204 B
737
+ (render), and 63,901 B (parse) of headroom. These are 2.14.0 measurements, not
738
738
  permanent promises — re-measure against the version you actually install.
739
739
  The clean four-step production ceiling is 210 seconds; the selected #2447
740
740
  median was 155.015 s [153.496, 165.977].
741
741
 
742
742
  Gating `swc_core` out of the highlight graph (#2449/#2450) was a
743
- **provability win, not a size win**. The shipped highlight artifact is only
744
- 7,965 B smaller than #2447's SWC-retaining baseline (1,484,705 B
745
- 1,476,740 B; gzip-9 767,009 B → 758,244 B, −8,765 B) — wasm-opt was already
743
+ **provability win, not a size win**. The #2447 SWC-retaining baseline was
744
+ 1,484,705 B raw and 767,009 B gzip-9; the #2450 result was 7,965 B smaller
745
+ raw and 8,765 B smaller gzip-9 (758,244 B) — wasm-opt was already
746
746
  dead-stripping the unreachable `swc_core`, and #2450's exact-parity and
747
747
  no-`swc_core` assertions turned that emergent property into a guaranteed one.
748
748
  The delta that matters to a highlight-only consumer is root versus
749
- highlight: the highlight artifact is 1,796,512 B smaller raw and 699,546 B
750
- smaller gzip-9, landing at about 45% of root's raw bytes and 52% of its
749
+ highlight: the highlight artifact is 1,817,546 B smaller raw and 684,794 B
750
+ smaller gzip-9, landing at about 45% of root's raw bytes and 53% of its
751
751
  gzipped bytes.
752
752
 
753
753
  Every shipped final wasm came in under its #2447 candidate measurement: root
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takazudo/zfb-md-wasm",
3
- "version": "2.13.0",
3
+ "version": "2.14.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "zfb's md/mdx -> JS/HTML conversion pipeline compiled to WebAssembly, for browser-side dynamic conversion (CMS live preview with parity to zfb's production output).",
@@ -82,6 +82,7 @@
82
82
  },
83
83
  "scripts": {
84
84
  "build": "node scripts/build.mjs",
85
+ "pretest": "node scripts/assert-consumer-artifacts.mjs",
85
86
  "test": "pnpm typecheck:consumer && vitest run",
86
87
  "test:watch": "vitest",
87
88
  "typecheck": "tsc --noEmit",