@likecoin/epubcheck-ts 0.2.2 → 0.2.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.
Files changed (66) hide show
  1. package/README.md +8 -8
  2. package/bin/epubcheck.js +4 -4
  3. package/bin/epubcheck.ts +4 -4
  4. package/dist/index.cjs +1057 -101
  5. package/dist/index.cjs.map +1 -1
  6. package/dist/index.d.cts +3 -0
  7. package/dist/index.d.ts +3 -0
  8. package/dist/index.js +1057 -101
  9. package/dist/index.js.map +1 -1
  10. package/package.json +4 -4
  11. package/schemas/applications.rng +0 -429
  12. package/schemas/aria.rng +0 -3355
  13. package/schemas/block.rng +0 -488
  14. package/schemas/common.rng +0 -1076
  15. package/schemas/container.rng +0 -24
  16. package/schemas/core-scripting.rng +0 -950
  17. package/schemas/data.rng +0 -161
  18. package/schemas/datatypes.rng +0 -401
  19. package/schemas/embed.rng +0 -980
  20. package/schemas/epub-mathml3-inc.rng +0 -161
  21. package/schemas/epub-nav-30.rnc +0 -44
  22. package/schemas/epub-nav-30.rng +0 -19985
  23. package/schemas/epub-nav-30.sch +0 -87
  24. package/schemas/epub-prefix-attr.rng +0 -17
  25. package/schemas/epub-shared-inc.rng +0 -29
  26. package/schemas/epub-ssml-attrs.rng +0 -17
  27. package/schemas/epub-svg-30.rnc +0 -17
  28. package/schemas/epub-svg-30.rng +0 -19903
  29. package/schemas/epub-svg-30.sch +0 -7
  30. package/schemas/epub-svg-forgiving-inc.rng +0 -315
  31. package/schemas/epub-switch.rng +0 -121
  32. package/schemas/epub-trigger.rng +0 -90
  33. package/schemas/epub-type-attr.rng +0 -12
  34. package/schemas/epub-xhtml-30.rnc +0 -6
  35. package/schemas/epub-xhtml-30.rng +0 -19882
  36. package/schemas/epub-xhtml-30.sch +0 -409
  37. package/schemas/epub-xhtml-inc.rng +0 -151
  38. package/schemas/epub-xhtml-integration.rng +0 -565
  39. package/schemas/epub-xhtml-svg-mathml.rng +0 -17
  40. package/schemas/form-datatypes.rng +0 -54
  41. package/schemas/mathml3-common.rng +0 -336
  42. package/schemas/mathml3-content.rng +0 -1552
  43. package/schemas/mathml3-inc.rng +0 -30
  44. package/schemas/mathml3-presentation.rng +0 -2341
  45. package/schemas/mathml3-strict-content.rng +0 -205
  46. package/schemas/media.rng +0 -374
  47. package/schemas/meta.rng +0 -754
  48. package/schemas/microdata.rng +0 -192
  49. package/schemas/ncx.rng +0 -308
  50. package/schemas/ocf-container-30.rnc +0 -37
  51. package/schemas/ocf-container-30.rng +0 -568
  52. package/schemas/opf.rng +0 -15
  53. package/schemas/opf20.rng +0 -513
  54. package/schemas/package-30.rnc +0 -133
  55. package/schemas/package-30.rng +0 -1153
  56. package/schemas/package-30.sch +0 -444
  57. package/schemas/phrase.rng +0 -746
  58. package/schemas/rdfa.rng +0 -552
  59. package/schemas/revision.rng +0 -106
  60. package/schemas/ruby.rng +0 -141
  61. package/schemas/sectional.rng +0 -278
  62. package/schemas/structural.rng +0 -298
  63. package/schemas/tables.rng +0 -420
  64. package/schemas/web-components.rng +0 -184
  65. package/schemas/web-forms.rng +0 -975
  66. package/schemas/web-forms2.rng +0 -1236
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 (208 tests) and ~65% 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 (467 tests) and ~70% 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 ~65% of EPUBCheck feature parity
15
+ - **Partial EPUB validation**: Currently ~70% 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 ~65% 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 ~70% 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
 
@@ -268,16 +268,16 @@ This library is a TypeScript port of the Java-based [EPUBCheck](https://github.c
268
268
  | Package Document (OPF) | 🟡 Partial | ~70% | Metadata, manifest, spine, collections, version/date validation |
269
269
  | Content Documents | 🟡 Partial | ~70% | XHTML structure, script/MathML/SVG detection, link validation |
270
270
  | Navigation Document | 🟡 Partial | ~40% | Nav structure, NCX validation, remote link validation |
271
- | Schema Validation | 🟡 Partial | ~70% | RelaxNG, XSD, Schematron working |
271
+ | Schema Validation | 🟡 Partial | ~50% | RelaxNG for OPF/container; XHTML/SVG disabled (libxml2 limitation) |
272
272
  | CSS | 🟡 Partial | ~50% | @font-face, @import, media overlay classes, position warnings |
273
273
  | Cross-reference Validation | 🟡 Partial | ~75% | Reference tracking, fragment validation, undeclared resources |
274
- | Accessibility Checks | 🟡 Partial | ~75% | Empty links, image alt, SVG titles, MathML alttext |
274
+ | Accessibility Checks | 🟡 Partial | ~30% | Basic checks only (empty links, image alt, SVG titles) |
275
275
  | Media Overlays | ❌ Not Started | 0% | Planned |
276
276
  | Media Validation | ❌ Not Started | 0% | Planned |
277
277
 
278
278
  Legend: 🟢 Complete | 🟡 Partial | 🔴 Basic | ❌ Not Started
279
279
 
280
- **Overall Progress: ~65% of Java EPUBCheck features**
280
+ **Overall Progress: ~70% of Java EPUBCheck features**
281
281
 
282
282
  See [PROJECT_STATUS.md](./PROJECT_STATUS.md) for detailed comparison.
283
283
 
@@ -357,8 +357,8 @@ Legend: ✅ Implemented
357
357
  | Aspect | epubcheck-ts | EPUBCheck (Java) |
358
358
  |--------|--------------|------------------|
359
359
  | Runtime | Node.js / Browser | JVM |
360
- | Feature Parity | ~65% | 100% |
361
- | Bundle Size | ~55KB JS + ~1.5MB WASM | ~15MB |
360
+ | Feature Parity | ~70% | 100% |
361
+ | Bundle Size | ~450KB JS + ~1.6MB WASM | ~15MB |
362
362
  | Installation | `npm install` | Download JAR |
363
363
  | Integration | Native JS/TS | CLI or Java API |
364
364
  | Performance | Comparable | Baseline |
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.2.2";
6
+ const VERSION = "0.2.4";
7
7
  const { values, positionals } = parseArgs({
8
8
  options: {
9
9
  json: { type: "string", short: "j" },
@@ -21,7 +21,7 @@ if (values.version) {
21
21
  console.log(`EPUBCheck-TS v${VERSION}`);
22
22
  console.log("TypeScript EPUB validator for Node.js and browsers");
23
23
  console.log();
24
- console.log("Note: This is ~65% feature-complete compared to Java EPUBCheck.");
24
+ console.log("Note: This is ~70% feature-complete compared to Java EPUBCheck.");
25
25
  console.log("For production validation: https://github.com/w3c/epubcheck");
26
26
  process.exit(0);
27
27
  }
@@ -53,7 +53,7 @@ Exit Codes:
53
53
  1 Validation errors found (or warnings with --fail-on-warnings)
54
54
  2 Runtime error (file not found, invalid arguments, etc.)
55
55
 
56
- Note: This tool provides ~65% coverage of Java EPUBCheck features.
56
+ Note: This tool provides ~70% coverage of Java EPUBCheck features.
57
57
  Missing features: Media Overlays, advanced ARIA checks, encryption/signatures.
58
58
  For complete EPUB 3 conformance testing, use: https://github.com/w3c/epubcheck
59
59
 
@@ -153,7 +153,7 @@ async function main() {
153
153
  console.log();
154
154
  if (result.errorCount === 0 && result.fatalCount === 0) {
155
155
  console.log(
156
- "\x1B[90mNote: This validator provides ~65% coverage of Java EPUBCheck.\x1B[0m"
156
+ "\x1B[90mNote: This validator provides ~70% coverage of Java EPUBCheck.\x1B[0m"
157
157
  );
158
158
  console.log("\x1B[90mFor complete validation: https://github.com/w3c/epubcheck\x1B[0m");
159
159
  console.log();
package/bin/epubcheck.ts CHANGED
@@ -14,7 +14,7 @@ import { basename } from 'node:path';
14
14
  // Dynamic import to support both ESM and CJS builds
15
15
  const { EpubCheck, toJSONReport } = await import('../dist/index.js');
16
16
 
17
- const VERSION = '0.2.2';
17
+ const VERSION = '0.2.4';
18
18
 
19
19
  // Parse command line arguments
20
20
  const { values, positionals } = parseArgs({
@@ -36,7 +36,7 @@ if (values.version) {
36
36
  console.log(`EPUBCheck-TS v${VERSION}`);
37
37
  console.log('TypeScript EPUB validator for Node.js and browsers');
38
38
  console.log();
39
- console.log('Note: This is ~65% feature-complete compared to Java EPUBCheck.');
39
+ console.log('Note: This is ~70% feature-complete compared to Java EPUBCheck.');
40
40
  console.log('For production validation: https://github.com/w3c/epubcheck');
41
41
  process.exit(0);
42
42
  }
@@ -70,7 +70,7 @@ Exit Codes:
70
70
  1 Validation errors found (or warnings with --fail-on-warnings)
71
71
  2 Runtime error (file not found, invalid arguments, etc.)
72
72
 
73
- Note: This tool provides ~65% coverage of Java EPUBCheck features.
73
+ Note: This tool provides ~70% coverage of Java EPUBCheck features.
74
74
  Missing features: Media Overlays, advanced ARIA checks, encryption/signatures.
75
75
  For complete EPUB 3 conformance testing, use: https://github.com/w3c/epubcheck
76
76
 
@@ -204,7 +204,7 @@ async function main(): Promise<void> {
204
204
  // Show limitation notice if there were no major errors
205
205
  if (result.errorCount === 0 && result.fatalCount === 0) {
206
206
  console.log(
207
- '\x1b[90mNote: This validator provides ~65% coverage of Java EPUBCheck.\x1b[0m',
207
+ '\x1b[90mNote: This validator provides ~70% coverage of Java EPUBCheck.\x1b[0m',
208
208
  );
209
209
  console.log('\x1b[90mFor complete validation: https://github.com/w3c/epubcheck\x1b[0m');
210
210
  console.log();