@veripublica/epubveri-wasm 0.13.3 → 0.13.4

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
@@ -69,6 +69,7 @@ function validate(
69
69
  bytes: Uint8Array,
70
70
  profile?: string | null,
71
71
  advisory?: boolean | null,
72
+ epubVersion?: string | null,
72
73
  ): Report;
73
74
  function version(): string;
74
75
  ```
@@ -88,13 +89,23 @@ epubcheck has no verdict on, in two families, both at `usage` severity:
88
89
  yet, so it becomes an ordinary error the day it catches up (today: the EPUB 3.4 rules).
89
90
  - **`ADV-*`** — no specification says anything, but the book is still probably wrong
90
91
  (unknown CSS property and descriptor names, a type selector naming no known element, an
91
- EPUB 2 package written in EPUB 3, two navigation entries landing on one document).
92
+ EPUB 2 package written in EPUB 3, two navigation entries landing on one document, an
93
+ EPUB 2 manifest resource nothing draws, applies or loads).
92
94
 
93
95
  It is **off by default**: leaving the argument out, or passing `false`/`undefined`,
94
96
  produces a byte-identical report, so existing two-argument callers are unaffected. Neither
95
97
  family ever affects `status` — a book that passes epubcheck passes epubveri, with or
96
98
  without the flag.
97
99
 
100
+ ### Forcing a version
101
+
102
+ `epubVersion` mirrors the CLI `-v` flag — pass `"2"`, `"2.0"`, `"3"` or `"3.0"` to validate
103
+ against that version whatever the book declares, or `undefined`/`null` to judge it as what
104
+ it declares. On a disagreement `PKG-001` reports it and the **requested** version wins, so
105
+ forcing a 3.0 book to 2.0 produces a long report. That is epubcheck's own behaviour, so a
106
+ ported invocation means the same thing in both tools. Unrecognized values behave like
107
+ `undefined`, as an unknown `profile` name does.
108
+
98
109
  ### Two differences from the CLI
99
110
 
100
111
  **`PKG-016` is not reported here.** That check is about the `.epub` **file extension**
package/epubveri_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@veripublica/epubveri-wasm",
3
3
  "type": "module",
4
4
  "description": "WebAssembly bindings for epubveri — a pure-Rust, JVM-free EPUB validator that runs in the browser.",
5
- "version": "0.13.3",
5
+ "version": "0.13.4",
6
6
  "license": "AGPL-3.0-only OR LicenseRef-veripublica-Commercial",
7
7
  "repository": {
8
8
  "type": "git",