@takazudo/zfb-md-wasm 2.15.1 → 2.17.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
|
@@ -33,10 +33,10 @@ migration. `./highlight` is also backward-compatible. New `./render` and
|
|
|
33
33
|
|
|
34
34
|
| Entry | gzip-9 wasm (2.15.0) | Exact runtime values | Exact exported types |
|
|
35
35
|
| ------------- | -------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
36
|
-
| `.` | 1,
|
|
37
|
-
| `./highlight` | 817,
|
|
38
|
-
| `./render` | 1,
|
|
39
|
-
| `./parse` |
|
|
36
|
+
| `.` | 1,516,626 B | `init`, `compile`, `renderHtml`, `parseToAst`, `highlightCode`, `version`, `__forceTrapForTests`, `__getTrapRecoveryStateForTests`, `toMdastRoot`, `ZfbMdWasmTrapError`, `ZfbMdWasmTrapRecoveryLimitError`, `MdastAdapterError` | Full current compile/render/parse/raw-mdast/highlight surface |
|
|
37
|
+
| `./highlight` | 817,835 B | `init`, `highlightCode`, `version`, `__forceTrapForTests`, `__getTrapRecoveryStateForTests`, `ZfbMdWasmTrapError`, `ZfbMdWasmTrapRecoveryLimitError` | `HighlightRole`, `HighlightCodeOptions`, `HighlightCodeResult`, `HighlightDiagnostic`, `HighlightDiagnosticSource` |
|
|
38
|
+
| `./render` | 1,091,615 B | `init`, `renderHtml`, `version`, `ZfbMdWasmTrapError`, `ZfbMdWasmTrapRecoveryLimitError`, `__forceTrapForTests`, `__getTrapRecoveryStateForTests` | `RenderHtmlResult`, `Diagnostic`, `DiagnosticSource`, `ZfbMdWasmOptions`, `ParseDialect`, `PipelineOptions`, `GfmOptions`, `CodeHighlightMode`, `CodeHighlightOptions`, `MarkdownFeaturesConfig`, `JsxRuntime`, `HighlightRole` |
|
|
39
|
+
| `./parse` | 284,265 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: 817,
|
|
687
|
-
1,
|
|
686
|
+
proven SWC-free — and its payload shows it: 817,835 B gzip-9 versus
|
|
687
|
+
1,516,626 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
|
|
@@ -727,21 +727,30 @@ bytes/gzip:
|
|
|
727
727
|
|
|
728
728
|
| Entry/graph | final wasm | gzip-9 | glue | glue gzip-9 |
|
|
729
729
|
| ----------- | ----------: | ----------: | -------: | ----------: |
|
|
730
|
-
| root (full) | 3,
|
|
731
|
-
| highlight | 1,
|
|
732
|
-
| render | 2,
|
|
733
|
-
| parse |
|
|
730
|
+
| root (full) | 3,400,172 B | 1,516,626 B | 14,998 B | 4,199 B |
|
|
731
|
+
| highlight | 1,538,664 B | 817,835 B | 8,758 B | 2,637 B |
|
|
732
|
+
| render | 2,196,673 B | 1,091,615 B | 8,772 B | 2,661 B |
|
|
733
|
+
| parse | 701,306 B | 284,265 B | 11,159 B | 3,797 B |
|
|
734
734
|
|
|
735
735
|
The #2447 decision snapshot measured the split package at 3,638,607 B versus
|
|
736
736
|
2,314,818 B for the root-plus-highlight package. Locked gzip-9 ceilings are
|
|
737
737
|
root 1,600,000 B, highlight 880,000 B, render 1,100,000 B, and parse
|
|
738
738
|
325,000 B; the complete packed tarball ceiling is 3,900,000 B. All four ship
|
|
739
|
-
inside their ceilings, with
|
|
740
|
-
(render), and
|
|
739
|
+
inside their ceilings, with 83,374 B (root), 62,165 B (highlight), 8,385 B
|
|
740
|
+
(render), and 40,735 B (parse) of headroom. These are 2.15.0 measurements, not
|
|
741
741
|
permanent promises — re-measure against the version you actually install.
|
|
742
742
|
The clean four-step production ceiling is 210 seconds; the selected #2447
|
|
743
743
|
median was 155.015 s [153.496, 165.977].
|
|
744
744
|
|
|
745
|
+
**Sizes are guarded; content digests are not.** The byte sizes above are held by
|
|
746
|
+
`shipped-sizes.json` and asserted in CI, so they move only on a deliberate
|
|
747
|
+
artifact change. SHA-256 digests are a different matter: every release stamps
|
|
748
|
+
its own version string into each `.wasm` — the value `version()` returns — so
|
|
749
|
+
all four digests change on **every** release, including a documentation-only
|
|
750
|
+
patch whose compiled code is identical and whose byte sizes do not move at all.
|
|
751
|
+
If you verify these artifacts by content digest rather than by semver, re-pin on
|
|
752
|
+
every upgrade; never read "sizes unchanged" as "nothing to re-verify".
|
|
753
|
+
|
|
745
754
|
Gating `swc_core` out of the highlight graph (#2449/#2450) was a
|
|
746
755
|
**provability win, not a size win**. The #2447 SWC-retaining baseline was
|
|
747
756
|
1,484,705 B raw and 767,009 B gzip-9; the #2450 result was 7,965 B smaller
|
|
@@ -749,7 +758,7 @@ raw and 8,765 B smaller gzip-9 (758,244 B) — wasm-opt was already
|
|
|
749
758
|
dead-stripping the unreachable `swc_core`, and #2450's exact-parity and
|
|
750
759
|
no-`swc_core` assertions turned that emergent property into a guaranteed one.
|
|
751
760
|
The delta that matters to a highlight-only consumer is root versus
|
|
752
|
-
highlight: the highlight artifact is 1,
|
|
761
|
+
highlight: the highlight artifact is 1,861,508 B smaller raw and 698,791 B
|
|
753
762
|
smaller gzip-9, landing at about 45% of root's raw bytes and 54% of its
|
|
754
763
|
gzipped bytes.
|
|
755
764
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@takazudo/zfb-md-wasm",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.17.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).",
|