@likecoin/epubcheck-ts 0.3.4 → 0.3.5

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
@@ -6,13 +6,13 @@ A TypeScript port of [EPUBCheck](https://github.com/w3c/epubcheck) - the officia
6
6
  [![npm](https://img.shields.io/npm/v/%40likecoin%2Fepubcheck-ts)](https://www.npmjs.com/package/@likecoin/epubcheck-ts)
7
7
  [![License](https://img.shields.io/npm/l/%40likecoin%2Fepubcheck-ts)](./LICENSE)
8
8
 
9
- > **Note**: This library is primarily developed for internal use at [3ook.com](https://3ook.com/about) and is built with AI-assisted development. While it has comprehensive test coverage (607 tests) and ~75% feature parity with Java EPUBCheck, it may not be suitable for mission-critical production workloads. For production environments requiring full EPUB validation, consider using the official [Java EPUBCheck](https://github.com/w3c/epubcheck). Contributions and feedback are welcome!
9
+ > **Note**: This library is primarily developed for internal use at [3ook.com](https://3ook.com/about) and is built with AI-assisted development. While it has comprehensive test coverage (618 tests) and ~75% feature parity with Java EPUBCheck, it may not be suitable for mission-critical production workloads. For production environments requiring full EPUB validation, consider using the official [Java EPUBCheck](https://github.com/w3c/epubcheck). Contributions and feedback are welcome!
10
10
 
11
11
  ## Features
12
12
 
13
13
  - **CLI and programmatic API**: Use as a command-line tool or integrate into your application
14
14
  - **Cross-platform**: Works in Node.js (18+) and modern browsers
15
- - **Partial EPUB validation**: Currently ~70% of EPUBCheck feature parity
15
+ - **Partial EPUB validation**: Currently ~75% of EPUBCheck feature parity
16
16
  - **Zero native dependencies**: Pure JavaScript/WebAssembly, no compilation required
17
17
  - **TypeScript first**: Full type definitions included
18
18
  - **Tree-shakable**: ESM with proper exports for optimal bundling
@@ -70,7 +70,7 @@ epubcheck-ts book.epub --quiet --fail-on-warnings
70
70
  epubcheck-ts dictionary.epub --profile dict
71
71
  ```
72
72
 
73
- **Note:** This CLI provides ~70% coverage of Java EPUBCheck features. For complete EPUB 3 conformance testing, use the [official Java EPUBCheck](https://github.com/w3c/epubcheck).
73
+ **Note:** This CLI provides ~75% coverage of Java EPUBCheck features. For complete EPUB 3 conformance testing, use the [official Java EPUBCheck](https://github.com/w3c/epubcheck).
74
74
 
75
75
  ### ES Modules (recommended)
76
76
 
@@ -266,20 +266,20 @@ This library is a TypeScript port of the Java-based [EPUBCheck](https://github.c
266
266
 
267
267
  | Component | Status | Completeness | Notes |
268
268
  |-----------|--------|--------------|-------|
269
- | OCF Container | 🟡 Partial | ~70% | ZIP structure, mimetype (uncompressed check), container.xml |
270
- | Package Document (OPF) | 🟡 Partial | ~70% | Metadata, manifest, spine, collections, version/date validation |
271
- | Content Documents | 🟡 Partial | ~70% | XHTML structure, script/MathML/SVG detection, link validation |
272
- | Navigation Document | 🟡 Partial | ~40% | Nav structure, NCX validation, remote link validation |
269
+ | OCF Container | 🟡 Partial | ~90% | ZIP structure, mimetype, container.xml, encryption.xml obfuscation |
270
+ | Package Document (OPF) | 🟢 Complete | ~90% | Metadata, manifest, spine, collections, Schematron-equivalent checks |
271
+ | Content Documents | 🟡 Partial | ~80% | XHTML structure, CSS url(), @import, SVG, script detection |
272
+ | Navigation Document | 🟢 Complete | ~85% | Nav content model, landmarks, labels, reading order, hidden |
273
273
  | Schema Validation | 🟡 Partial | ~50% | RelaxNG for OPF/container; XHTML/SVG disabled (libxml2 limitation) |
274
- | CSS | 🟡 Partial | ~50% | @font-face, @import, media overlay classes, position warnings |
275
- | Cross-reference Validation | 🟡 Partial | ~75% | Reference tracking, fragment validation, undeclared resources |
274
+ | CSS | 🟡 Partial | ~70% | @font-face, @import, url() extraction, position, forbidden properties |
275
+ | Cross-reference Validation | 🟡 Partial | ~80% | Reference tracking, fragments, fallbacks, remote resources |
276
276
  | Accessibility Checks | 🟡 Partial | ~30% | Basic checks only (empty links, image alt, SVG titles) |
277
277
  | Media Overlays | ❌ Not Started | 0% | Planned |
278
278
  | Media Validation | ❌ Not Started | 0% | Planned |
279
279
 
280
280
  Legend: 🟢 Complete | 🟡 Partial | 🔴 Basic | ❌ Not Started
281
281
 
282
- **Overall Progress: ~70% of Java EPUBCheck features**
282
+ **Overall Progress: ~75% of Java EPUBCheck features**
283
283
 
284
284
  See [PROJECT_STATUS.md](./PROJECT_STATUS.md) for detailed comparison.
285
285
 
@@ -364,7 +364,7 @@ Legend: ✅ Implemented
364
364
  | Aspect | epubcheck-ts | EPUBCheck (Java) |
365
365
  |--------|--------------|------------------|
366
366
  | Runtime | Node.js / Browser | JVM |
367
- | Feature Parity | ~70% | 100% |
367
+ | Feature Parity | ~75% | 100% |
368
368
  | Bundle Size | ~450KB JS + ~1.6MB WASM | ~15MB |
369
369
  | Installation | `npm install` | Download JAR |
370
370
  | Integration | Native JS/TS | CLI or Java API |
package/bin/epubcheck.js CHANGED
@@ -3,7 +3,7 @@ import { readFile, writeFile } from "node:fs/promises";
3
3
  import { parseArgs } from "node:util";
4
4
  import { basename } from "node:path";
5
5
  const { EpubCheck, toJSONReport } = await import("../dist/index.js");
6
- const VERSION = "0.3.4";
6
+ const VERSION = "0.3.5";
7
7
  const { values, positionals } = parseArgs({
8
8
  options: {
9
9
  json: { type: "string", short: "j" },
package/bin/epubcheck.ts CHANGED
@@ -15,7 +15,7 @@ import type { EpubCheckOptions, EPUBProfile, ValidationMessage } from '../src/ty
15
15
  // Dynamic import to support both ESM and CJS builds
16
16
  const { EpubCheck, toJSONReport } = await import('../dist/index.js');
17
17
 
18
- const VERSION = '0.3.4';
18
+ const VERSION = '0.3.5';
19
19
 
20
20
  // Parse command line arguments
21
21
  const { values, positionals } = parseArgs({