Skip to content

v2.0.0

Latest

Choose a tag to compare

@nilskruthoff nilskruthoff released this 30 Oct 21:05
c0245dc

Highlights

This release fixes five security advisories in the zip dependency and removes third-party error types from the public API, so future dependency upgrades no longer require a new major version.

Security

Upgraded zip from 8.6.0 to 9.0.5, which fixes the following advisories:

pptx-to-md only reads archives and never extracts them, so the practical risk was low. Upgrading still removes the advisory alerts for every project that depends on this crate.

Breaking changes

  • Error::Zip now wraps the new opaque pptx_to_md::ZipError instead of zip::result::ZipError. Error no longer implements From<zip::result::ZipError>.
  • The source field of Error::Xml is now the new opaque pptx_to_md::XmlError instead of quick_xml::Error.

Both errors still provide their message through Display, and the underlying error remains available through std::error::Error::source.

Migration

Most users do not need to change anything. Code that matched on the concrete zip or quick-xml error types should use the error message or source() instead:

match error {
    pptx_to_md::Error::Zip(zip_error) => eprintln!("Could not read the package: {zip_error}"),
    pptx_to_md::Error::Xml { part, source } => eprintln!("Invalid XML in {part}: {source}"),
    other => eprintln!("{other}"),
}

Other changes

  • zip now only enables deflate compression, which is the only compression method used by PPTX and ODP files. This drops the dependencies for AES, bzip2, LZMA, PPMd, Zstandard, and Deflate64.
  • Fixed broken intra-doc links and malformed code blocks in the API documentation, including the PptxContainer::load_slide example.

Thanks

Thanks to @SommerEngineering for reporting the advisories and contributing the zip upgrade in #49.

Full changelog: 1.0.0...2.0.0