What's Changed in v2.8.45
New features
- New
localExtraFieldoption inZipWriter#add()to write extra field records only in the local file header, complementing theextraFieldoption 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 newextraFieldUnixType1andextraFieldPkwareUnixproperties of entries, and populate thelastModDate,lastAccessDate,uidandgidproperties. The extended timestamp and NTFS extra fields still take precedence for the dates when present
Bug fixes
- AES-encrypted entries added with
passThroughset totrueand a providedcrc32value 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 thepassThroughoption no longer loses the stored CRC-32. Without thecrc32option, entries are still written as AE-2 - The export methods of the filesystem API, e.g.
FS#exportBlob(), now forward the internal file attributes, theuid/gidvalues (written as an Info-ZIP Unix extra field, or as configured withunixExtraFieldType), and the custom extra field records of imported entries instead of dropping them - The
rawLastAccessDateandextraFieldUSDZproperties are now copied to the entries returned byZipReader#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 ofgetMimeType() - 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