Skip to content

v2.8.45

Latest

Choose a tag to compare

@gildas-lormeau gildas-lormeau released this 13 Aug 01:07

What's Changed in v2.8.45

New features

  • New localExtraField option in ZipWriter#add() to write extra field records only in the local file header, complementing the extraField option which writes them in both the local file header and the central directory. This helps reproducing entries whose records appear only in the local file header, as written by some tools
  • The Info-ZIP Unix type 1 extra field (0x5855), written notably by macOS Archive Utility and ditto, and the PKWARE Unix extra field (0x000d) are now read. They are exposed via the new extraFieldUnixType1 and extraFieldPkwareUnix properties of entries, and populate the lastModDate, lastAccessDate, uid and gid properties. The extended timestamp and NTFS extra fields still take precedence for the dates when present

Bug fixes

  • AES-encrypted entries added with passThrough set to true and a provided crc32 value are now marked as AE-1 and store the CRC-32 in the entry headers, instead of being written as AE-2 entries with zeroed CRC-32 fields. Copying an AE-1 entry read with the passThrough option no longer loses the stored CRC-32. Without the crc32 option, entries are still written as AE-2
  • The export methods of the filesystem API, e.g. FS#exportBlob(), now forward the internal file attributes, the uid/gid values (written as an Info-ZIP Unix extra field, or as configured with unixExtraFieldType), and the custom extra field records of imported entries instead of dropping them
  • The rawLastAccessDate and extraFieldUSDZ properties are now copied to the entries returned by ZipReader#getEntries(); they were parsed but missing from the entry objects

Other changes

  • The MIME type table is now generated at build time from a compact string encoding, reducing the builds embedding it by approximately 8.5KB when minified, e.g. index.min.js, without changing the results of getMimeType()
  • The JSR package now only contains the files needed at runtime, shrinking it from 7.8MB (404 files) to 0.7MB (76 files), and all its entry points are now associated with the type declarations
  • The browser test suites now run headlessly on Chrome, Firefox and WebKit with playwright. The WebKit suite adds Safari-engine coverage that did not exist before

Full Changelog: v2.8.44...v2.8.45