Skip to content

v0.8.0

Choose a tag to compare

@github-actions github-actions released this 26 Jul 15:01

A minor bump rather than a patch: the library API changed. See Breaking
below — embedders need ..Options::default() in a Options literal, and
opf::check now takes &Options. The CLI and the WASM bindings are
source-compatible; nothing an existing invocation or JS call does changes
meaning.

Added

  • -v / --epub-version <2|2.0|3|3.0>: validate against a version the book
    doesn't declare
    (#61), the same flag epubcheck spells -v. On a
    disagreement PKG-001 reports it and the requested version wins — as
    epubcheck does, so a ported invocation means the same thing here. Expect a
    long report when the two disagree: a 3.0 book checked as 2.0 breaks a great
    many EPUB 2 rules, all of them really one finding. Exposed to embedders as
    Options::epub_version and as validate()'s fourth argument in the WASM
    bindings.
  • Coverage is now 190 of 197 live epubcheck checks (~96%).

Breaking

  • Options gained a field, so a struct literal that lists every field no
    longer compiles — add ..Options::default() (which is now what this crate's
    own helpers do).
  • opf::check takes &Options in place of its separate profile and
    advisory parameters. This is the second time that signature had to change
    for a new option, and each change breaks embedders over something they don't
    care about; passing the struct means the next option costs them nothing.

Fixed

  • PKG-023 now keys on the version being validated against, not the one the
    package document declares — so forcing an EPUB 3 book to EPUB 2 with -v
    correctly reports that its profile does not apply. (It landed in 0.7.14
    keyed on the declared version, which was right until -v existed.)

Full notes: CHANGELOG.md. Also on crates.io.