@takazudo/zfb-md-wasm 4.2.1 → 4.3.1

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 (4.2.1) | Exact runtime values | Exact exported types |
34
+ | Entry | gzip-9 wasm (4.3.1) | Exact runtime values | Exact exported types |
35
35
  | ------------- | -------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
36
- | `.` | 1,518,981 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,809 B | `init`, `highlightCode`, `version`, `__forceTrapForTests`, `__getTrapRecoveryStateForTests`, `ZfbMdWasmTrapError`, `ZfbMdWasmTrapRecoveryLimitError` | `HighlightRole`, `HighlightCodeOptions`, `HighlightCodeResult`, `HighlightDiagnostic`, `HighlightDiagnosticSource` |
38
- | `./render` | 1,093,973 B | `init`, `renderHtml`, `version`, `ZfbMdWasmTrapError`, `ZfbMdWasmTrapRecoveryLimitError`, `__forceTrapForTests`, `__getTrapRecoveryStateForTests` | `RenderHtmlResult`, `Diagnostic`, `DiagnosticSource`, `ZfbMdWasmOptions`, `ParseDialect`, `PipelineOptions`, `GfmOptions`, `CodeHighlightMode`, `CodeHighlightOptions`, `MarkdownFeaturesConfig`, `HighlightRole` |
39
- | `./parse` | 284,331 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,518,982 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,810 B | `init`, `highlightCode`, `version`, `__forceTrapForTests`, `__getTrapRecoveryStateForTests`, `ZfbMdWasmTrapError`, `ZfbMdWasmTrapRecoveryLimitError` | `HighlightRole`, `HighlightCodeOptions`, `HighlightCodeResult`, `HighlightDiagnostic`, `HighlightDiagnosticSource` |
38
+ | `./render` | 1,093,975 B | `init`, `renderHtml`, `version`, `ZfbMdWasmTrapError`, `ZfbMdWasmTrapRecoveryLimitError`, `__forceTrapForTests`, `__getTrapRecoveryStateForTests` | `RenderHtmlResult`, `Diagnostic`, `DiagnosticSource`, `ZfbMdWasmOptions`, `ParseDialect`, `PipelineOptions`, `GfmOptions`, `CodeHighlightMode`, `CodeHighlightOptions`, `MarkdownFeaturesConfig`, `HighlightRole` |
39
+ | `./parse` | 284,334 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
 
@@ -705,8 +705,8 @@ suite gates exact-match). Deliberate limitations of the browser build:
705
705
  - **Choose a focused artifact for non-compile calls.** The root remains the
706
706
  compatibility entry and carries the complete compiler graph. `./highlight`
707
707
  keeps its public API and resources while the post-#2449/#2450 graph is
708
- proven SWC-free — and its payload shows it: 817,809 B gzip-9 versus
709
- 1,518,981 B for root. `./render` and `./parse` are also SWC-free and omit
708
+ proven SWC-free — and its payload shows it: 817,810 B gzip-9 versus
709
+ 1,518,982 B for root. `./render` and `./parse` are also SWC-free and omit
710
710
  `zfb-render`; parse intentionally retains `zfb-content`/`syntect-fancy`, so
711
711
  it is not syntect-free. Use `./render` or `./parse` when a consumer does
712
712
  not need `compile`; root and highlight callers otherwise require no
@@ -743,23 +743,23 @@ three-step repair sequence:
743
743
  they are compressor output (CI prints a warning inside the band), while
744
744
  final wasm and glue remain byte-exact.
745
745
 
746
- These are the shipped **4.2.1** artifact rows — optimized final wasm after
746
+ These are the shipped **4.3.1** artifact rows — optimized final wasm after
747
747
  wasm-bindgen and wasm-opt, Node `gzipSync(..., { level: 9 })`, and glue
748
748
  bytes/gzip:
749
749
 
750
750
  | Entry/graph | final wasm | gzip-9 | glue | glue gzip-9 |
751
751
  | ----------- | ----------: | ----------: | -------: | ----------: |
752
- | root (full) | 3,390,113 B | 1,518,981 B | 14,998 B | 4,199 B |
753
- | highlight | 1,537,593 B | 817,809 B | 8,758 B | 2,637 B |
754
- | render | 2,197,301 B | 1,093,973 B | 8,772 B | 2,661 B |
755
- | parse | 700,375 B | 284,331 B | 11,159 B | 3,797 B |
752
+ | root (full) | 3,390,113 B | 1,518,982 B | 14,998 B | 4,199 B |
753
+ | highlight | 1,537,593 B | 817,810 B | 8,758 B | 2,637 B |
754
+ | render | 2,197,301 B | 1,093,975 B | 8,772 B | 2,661 B |
755
+ | parse | 700,375 B | 284,334 B | 11,159 B | 3,797 B |
756
756
 
757
757
  The #2447 decision snapshot measured the split package at 3,638,607 B versus
758
758
  2,314,818 B for the root-plus-highlight package. Locked gzip-9 ceilings are
759
759
  root 1,600,000 B, highlight 880,000 B, render 1,100,000 B, and parse
760
760
  325,000 B; the complete packed tarball ceiling is 3,900,000 B. All four ship
761
- inside their ceilings, with 81,019 B (root), 62,191 B (highlight), 6,027 B
762
- (render), and 40,669 B (parse) of headroom. These are 4.2.1 measurements, not
761
+ inside their ceilings, with 81,018 B (root), 62,190 B (highlight), 6,025 B
762
+ (render), and 40,666 B (parse) of headroom. These are 4.3.1 measurements, not
763
763
  permanent promises — re-measure against the version you actually install.
764
764
  The clean four-step production ceiling is 210 seconds; the selected #2447
765
765
  median was 155.015 s [153.496, 165.977].
@@ -773,6 +773,13 @@ patch whose compiled code is identical and whose byte sizes do not move at all.
773
773
  If you verify these artifacts by content digest rather than by semver, re-pin on
774
774
  every upgrade; never read "sizes unchanged" as "nothing to re-verify".
775
775
 
776
+ The package exports `@takazudo/zfb-md-wasm/shipped-artifacts.json` (the
777
+ `./shipped-artifacts.json` subpath). Its `schemaVersion`, `name`, and `version`
778
+ identify the manifest, and its ordered `artifacts` array records each `entry`,
779
+ package-relative `path`, `bytes`, and `sha256`. The build generates it
780
+ from the final `.wasm` files in `dist`; release CI checks it against both `dist`
781
+ and the packed tarball. Reading the JSON does not initialize WebAssembly.
782
+
776
783
  Gating `swc_core` out of the highlight graph (#2449/#2450) was a
777
784
  **provability win, not a size win**. The #2447 SWC-retaining baseline was
778
785
  1,484,705 B raw and 767,009 B gzip-9; the #2450 result was 7,965 B smaller
@@ -0,0 +1,31 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "name": "@takazudo/zfb-md-wasm",
4
+ "version": "4.3.1",
5
+ "artifacts": [
6
+ {
7
+ "entry": ".",
8
+ "path": "dist/wasm/zfb_md_wasm_bg.wasm",
9
+ "bytes": 3390113,
10
+ "sha256": "80cb151e47926ef553ade40b1e6f4b466b6f1b14a73ea8144610c42f9948159c"
11
+ },
12
+ {
13
+ "entry": "./highlight",
14
+ "path": "dist/wasm-highlight/zfb_md_wasm_highlight_bg.wasm",
15
+ "bytes": 1537593,
16
+ "sha256": "47b7619a5e860896cebbbec3ef7969b7590b0fc32d4ead86b5e6c899d4feaf0e"
17
+ },
18
+ {
19
+ "entry": "./render",
20
+ "path": "dist/wasm-render/zfb_md_wasm_render_bg.wasm",
21
+ "bytes": 2197301,
22
+ "sha256": "78ccf16f881fbc81339ae328f1e7dcc18928a984449467a09f5514ae4116e467"
23
+ },
24
+ {
25
+ "entry": "./parse",
26
+ "path": "dist/wasm-parse/zfb_md_wasm_parse_bg.wasm",
27
+ "bytes": 700375,
28
+ "sha256": "6a08f4d8883dad9cf985639401dfa1639b6fd1b56cc3503cedaf1777227b92e7"
29
+ }
30
+ ]
31
+ }
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takazudo/zfb-md-wasm",
3
- "version": "4.2.1",
3
+ "version": "4.3.1",
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).",
@@ -49,7 +49,8 @@
49
49
  "workerd": "./dist/parse-workerd.js",
50
50
  "browser": "./dist/parse-browser.js",
51
51
  "default": "./dist/parse.js"
52
- }
52
+ },
53
+ "./shipped-artifacts.json": "./dist/shipped-artifacts.json"
53
54
  },
54
55
  "files": [
55
56
  "dist",