unstale

npm / @zip.js/zip.js

@zip.js/zip.js

What changed in @zip.js/zip.js 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-15.

102 breaking6 security5 deprecations102 new APIs and options9 performance18 behavior and defaults1 tooling142 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.3.1 on npm

@zip.js/zip.js 2385 changes

Breaking changes 102

  • The method is now typed on Uint8Array chunks on both sides and no longer takes a type parameter; its readable side is the zipped stream.

    2.25.0release notes

  • The method is now typed on Uint8Array chunks on both sides and no longer takes a type parameter.

    2.25.0release notes

  • Data descriptors are skipped when the local header can carry the CRC-32 and sizes, including specified cases involving passThrough, bufferedWrite, and dataDescriptor: false; explicit dataDescriptor: true and other listed cases retain them.

    2.24.0release notes

  • The WorkerConfiguration option is removed; configure() silently ignores it, but TypeScript reports it as unknown.

    2.22.0release notes

  • Validates each kept entry's local file header and bounds before writing; throws ERR_LOCAL_FILE_HEADER_NOT_FOUND or ERR_OVERLAPPING_ENTRY and leaves the current zip unchanged on failure.

    2.21.0release notes

  • Refuses to copy an entry with an unresolved Zip64 sentinel unless the filter excludes it, and throws before writing.

    2.21.0release notes

  • Rejects entries whose declared data extent ends past the central directory, at every strictness level.

    2.21.0release notes

  • An end of central directory record with a Zip64 sentinel but no preceding Zip64 locator is rejected at every strictness level.

    2.20.0release notes

  • EntryMetaData#executable is now false for directories; unixMode continues to hold the directory's execute bits.

    2.20.0release notes

  • When both timestamps are present, EntryMetaData#lastModDate now takes the NTFS extra field value over the extended timestamp value, preserving sub-second dates.

    2.20.0release notes

  • A central directory offset past the directory actually found now produces a warning, is rejected in strict mode, and can cause entries to be read from shifted positions when their local headers are found there.

    2.20.0release notes

  • When both New Unix and type 2 fields contain ids, the New Unix field now takes precedence for the ids reported, while extraFieldUnix.uid and extraFieldUnix.gid still report the type 2 values.

    2.19.0release notes

  • Validation now checks the final filename after a valid Unicode Path extra field replaces the decoded central directory name; unsafe names fail with ERR_UNSAFE_FILENAME at strict and balanced levels.

    2.19.0release notes

  • Entry streams are no longer transferred to web workers; the option remains accepted but is ignored and is deprecated in the type declarations.

    2.19.0release notes

  • Central directory Zip64 fields with missing required data or sentinel values without a Zip64 extra field now fail during entry listing, so invalid entries are not listed.

    2.18.0release notes

  • Disagreement between records is rejected under default strictness; tolerant handling and unsupported-encryption checks now use the central directory record.

    2.18.0release notes

  • A ZIP entry whose compressedSize extends beyond its deflate stream now fails on every codec instead of silently dropping the extra bytes.

    2.17.0release notes

  • Corrupted deflated entries now reject with this error regardless of the inflater, preserving the codec error as cause; errors from reading or decrypting data still reach the caller unchanged.

    2.17.0release notes

  • With checkCrc32 enabled, data shorter than the stored uncompressed size now fails with ERR_INVALID_CRC32 instead of ERR_INVALID_UNCOMPRESSED_SIZE.

    2.17.0release notes

  • The WebAssembly and pure-JS codecs now throw TypeError when constructed with an unknown format instead of treating it as deflate.

    2.17.0release notes

  • On hosts whose DecompressionStream lacks deflate-raw, corrupted entries now fail with ERR_INVALID_CRC32 even when CRC checking is disabled.

    2.16.0release notes

  • When disabled, a fallback codec constructor error now fails the entry instead of silently serving it through the native gzip codec.

    2.16.0release notes

  • Balanced validation rejects parent path components delimited by backslashes and names starting with a single backslash; strict validation also rejects names containing NUL.

    2.15.0release notes

  • Names without the UTF-8 flag are decoded as UTF-8 when their bytes are valid and no explicit encoding option is set; explicit options and valid Info-ZIP Unicode Path fields retain precedence.

    2.15.0release notes

  • The import methods declare an array of every ZipFileEntry and ZipDirectoryEntry created by the import, including directories created for path components, instead of a one-element tuple.

    2.14.0release notes

  • A stream cancelled or aborted while an entry is written or read rejects with the caller's reason, including undefined, instead of a TypeError.

    2.13.0release notes

  • Reports an entry failure with a falsy reason instead of returning a truncated archive without throwing.

    2.13.0release notes

  • When combined with passThrough: true, this option now verifies the password and stops after the first block instead of accepting every password and streaming the whole entry.

    2.12.0release notes

  • Values returned by ZipWriter#add() now report the language encoding flag actually written and agree with values read back from the archive.

    2.12.0release notes

  • HttpReader now throws ERR_HTTP_STATUS for every status outside 2xx instead of accepting statuses below 400.

    2.12.0release notes

  • The flag is now set only when an encoded filename or comment contains a byte outside printable ASCII; archives written by zip.js may differ byte for byte.

    2.12.0release notes

  • Now refuses the "compressed" passThrough value at the top level, preventing raw deflated bytes from being written into extracted files.

    2.12.0release notes

  • passThrough is typed as boolean rather than boolean | "compressed", matching the filesystem API's runtime behavior.

    2.12.0release notes

  • Writing a split zip file into a USDZ file now throws ERR_UNSUPPORTED_SPLIT_USDZ rather than silently breaking the required 64-byte alignment.

    2.11.3release notes

  • Throws ERR_INVALID_READER when the second argument is not a Reader, ReadableStream, or object exposing a readable property, instead of silently writing an empty entry.

    2.11.3release notes

  • Now holds the distinct value "Invalid authentication code" instead of aliasing ERR_INVALID_SIGNATURE, so code can identify AES authentication failures.

    2.11.0release notes

  • Now holds the distinct value "Invalid CRC32" instead of aliasing ERR_INVALID_SIGNATURE, so code can identify CRC-32 check failures.

    2.11.0release notes

  • Removed; code comparing an error message to this constant must compare to the constant naming the check that failed.

    2.11.0release notes

  • Removed from entry properties and writer options; use externalFileAttributes instead.

    2.11.0release notes

  • Removed from entry properties and writer options; use internalFileAttributes instead.

    2.11.0release notes

  • Names passed to filesystem add methods are split into path components, creating implicit directories rather than storing slashes in an entry name.

    2.10.0release notes

  • A new error identifies an import refused because of a duplicate entry, replacing ERR_ENTRY_EXISTS for that case.

    2.10.0release notes

  • Size prediction now reads each entry's keepOrder option; when the size is undetermined, the export throws ERR_UNDETERMINED_SIZE.

    2.8.61release notes

  • Preserves leading and trailing whitespace in entry names instead of silently trimming it; Windows filesystems cannot represent a trailing space or dot in a name.

    2.8.59release notes

  • Waits for pending add() and appendZip() calls and throws the first unreported error, with all errors on entryErrors. After catching an error, calling close() again finalizes the zip without failed entries.

    2.8.58release notes

  • Read entries derive directory status from a trailing slash in the filename alone, even when the entry declares an uncompressed size.

    2.8.58release notes

  • Forwards dataDescriptor and rawLastModDate when exporting ZipCrypto pass-through entries, and throws ERR_ZIP_CRYPTO_LAST_MOD_DATE if the date is overridden.

    2.8.58release notes

  • Dates before 1980 are clamped to the MS-DOS epoch instead of underflowing the date field.

    2.8.58release notes

  • Entries stored without compression or encryption now use field value 10 instead of 20.

    2.8.58release notes

  • Copies entries from an existing zip into the current zip at any position, including between add() calls and repeatedly; the copied central directory is rebuilt and entries are relocated.

    2.8.58release notes

  • Aborts its writable when an entry fails so the readable errors instead of hanging.

    2.8.58release notes

  • Reading an archive that declares a 64-bit value above Number.MAX_SAFE_INTEGER now throws ERR_UNSUPPORTED_UINT64 instead of silently rounding it.

    2.8.57release notes

  • Folders and empty stored entries are written without a data descriptor by default; descriptors remain when dataDescriptor is explicitly set or for encrypted entries.

    2.8.57release notes

  • The size prediction now throws ERR_UNDETERMINED_SIZE when zip64 size depends on entry write order, avoiding predictions that differ from the exported archive.

    2.8.56release notes

  • Writing an entry with this option now throws ERR_INVALID_EXTRAFIELD_DATA if alignment padding would make the extra field exceed 64KB.

    2.8.56release notes

  • The callback now receives only the encrypted central directory, excluding any digital signature record.

    2.8.55release notes

  • Adds an error constant thrown when writing an entry with passThrough without specifying compressionMethod.

    2.8.55release notes

  • Writing an entry with passThrough now requires compressionMethod, which declares the existing compression method written into the headers.

    2.8.55release notes

  • The level option is ignored for entries written with passThrough; it continues to apply to other entries in the archive.

    2.8.55release notes

  • Invalid non-positive or non-integer values now fall back to 65536; values below 64 are still raised to 64. Applies to global configuration and Reader#createReadable().

    2.8.54release notes

  • An entry comment must be a string; other types throw ERR_INVALID_ENTRY_COMMENT_TYPE.

    2.8.54release notes

  • Options that expect a function now throw ERR_INVALID_FUNCTION_OPTION for non-function values; falsy values still select the default.

    2.8.54release notes

  • Now counts as Unix metadata, selects the Unix platform and takes precedence over MS-DOS metadata options; it means mode 0o755.

    2.8.54release notes

  • Must be a Map with integer keys from 0 to 65535 and Uint8Array values; invalid maps, keys or values now throw specific errors.

    2.8.54release notes

  • Throws ERR_ENTRY_DATA_OUT_OF_BOUNDS when declared entry data extends past the zip file; reads past the source now end the stream instead of stalling.

    2.8.54release notes

  • Must be a Date instance; other values throw ERR_INVALID_DATE.

    2.8.54release notes

  • Must be a Date instance; other values, including milliseconds, throw ERR_INVALID_DATE.

    2.8.54release notes

  • configure() and setDefaultConfiguration() require an integer greater than 0 or throw ERR_INVALID_MAX_WORKERS, preventing ZipWriter#add() deadlocks.

    2.8.54release notes

  • An array now throws ERR_INVALID_MSDOS_DATA instead of being accepted as an object.

    2.8.54release notes

  • Non-integer values now throw ERR_INVALID_MSDOS_ATTRIBUTES; numeric strings are accepted.

    2.8.54release notes

  • Pass-through data values such as compressionMethod and uncompressedSize now take precedence over options passed when adding an entry.

    2.8.54release notes

  • Reader-side password values are now checked and non-string values throw ERR_INVALID_PASSWORD_TYPE.

    2.8.54release notes

  • Reader-side rawPassword values are now checked and invalid types throw ERR_INVALID_PASSWORD_TYPE.

    2.8.54release notes

  • For ZipDirectoryEntry export and size methods, readerOptions must be an object or throws ERR_INVALID_READER_OPTIONS.

    2.8.54release notes

  • Must expose addEventListener() and a boolean aborted property or throws ERR_INVALID_SIGNAL; duck-typed and cross-realm signals remain supported.

    2.8.54release notes

  • TextWriter now decodes CP437 through the shared decoder; new TextWriter("cp437") no longer falls back to UTF-8.

    2.8.54release notes

  • Removed as an undocumented internal method; use the typed data-adding methods instead.

    2.8.54release notes

  • Directories implied by imported entry names remain navigable but are no longer written back on export unless present in the source or created with addDirectory().

    2.8.54release notes

  • Filesystem entries without an explicit modification date are dated when added, making repeated exports of an unchanged tree stable; date-source precedence is also updated.

    2.8.54release notes

  • Removed; use ZipFS#move() instead.

    2.8.54release notes

  • Options passed when adding an entry are copied, so later mutation or reuse of the options object no longer changes previously added entries.

    2.8.54release notes

  • Removed as an undocumented internal method; the typed addText(), addBlob(), addUint8Array(), addData64URI(), addHttpContent(), addReadable(), addFile(), addFileSystemEntry() and addFileSystemHandle() methods cover its functionality.

    2.8.54release notes

  • An array of readers now denotes the disks of a split zip file, and SplitDataReader is accepted. Disks are read in order and entries relocated; concatenate byte ranges yourself if they belong to one archive.

    2.8.54release notes

  • An explicit value passed to getEntries() or getData() now takes precedence over inherited strictness; strictness still takes precedence when both are passed to the same call.

    2.8.53release notes

  • The default balanced setting now compares the local header’s general purpose bit flag, compression method, CRC-32 checksum, and sizes against the central directory when getData() reads the entry.

    2.8.53release notes

  • The platform byte is forced to Unix or MS-DOS according to the entry’s metadata; only the lower byte of the supplied value survives.

    2.8.53release notes

  • Throws ERR_INVALID_COMMENT_TYPE when the supplied comment is not a Uint8Array, rather than failing later inside the writer.

    2.8.53release notes

  • Filesystem API now ignores reader options that withhold entry content, so imported entries return data.

    2.8.52release notes

  • Added as an error constant and is thrown when pass-through data is written with a password, because copied data cannot be encrypted.

    2.8.52release notes

  • The entry property is now false for symbolic links.

    2.8.52release notes

  • Filesystem export options now override imported-entry metadata; source metadata comes first, followed by export options, copied-as-is descriptions, and entry options.

    2.8.52release notes

  • Filesystem exports now call onstart and onend once for the whole archive, with total entry size and bytes written; use onentryprogress for per-entry notifications.

    2.8.52release notes

  • Now honored only when the caller owns the writable through WritableWriter; ignored by other filesystem export methods so their exports can resolve.

    2.8.52release notes

  • Filesystem export methods now write entries in the same order regardless of bufferedWrite; exports with bufferedWrite set to false may have a different entry order than in previous versions.

    2.8.51release notes

  • Errors are now rethrown unmodified instead of being wrapped, and entryName identifies the handle or entry that failed.

    2.8.50release notes

  • Reading archives now rejects entry names containing a .. path component or starting with /, a drive letter, or \\. Set filenameValidation to tolerant to restore the previous behavior.

    2.8.50release notes

  • When importing an archive, empty and . path components are ignored, so names such as a//b.txt and ./cur.txt no longer create entries with empty or . names.

    2.8.50release notes

  • Invalid option values now throw instead of silently falling back; invalid level, password, rawPassword, strictness, filenameValidation, maxAppendedDataSize, encryptionStrength, uid, gid, and unixMode values are rejected.

    2.8.50release notes

  • When set to strict, the option now also rejects empty and . path components, such as a//b.txt and ./cur.txt.

    2.8.50release notes

  • When reading an entry fails, the writer's writable is now aborted with the error instead of being closed successfully.

    2.8.50release notes

  • For AES-encrypted entries returned by ZipWriter#add(), the deprecated signature property is now undefined rather than exposing the raw authentication code as a Uint8Array.

    2.8.44release notes

  • Entries protected with PKWARE strong encryption are now always rejected with ERR_UNSUPPORTED_ENCRYPTION, even when their compression method is also unsupported.

    2.8.41release notes

Security 6

  • Each entry now owns copies of rawFilename, rawExtraField, and rawComment, so retaining an Entry no longer pins the whole central directory or exposes the reader's buffer through those fields.

    2.15.0release notes

  • Output allocation is clamped to the maximum data the compressed content can decode to, preventing oversized allocation based on an untrusted declared uncompressed size.

    2.8.54release notes

  • New option in ZipReader and getEntries() that rejects entry names that do not map safely to a file path. It accepts strict, balanced, and tolerant, and defaults to strictness.

    2.8.50release notes

  • ZipReader exposes the directory length to help locate signed data and verify it.

    2.8.47release notes

  • ZipReader exposes the directory offset to help locate signed data and verify it.

    2.8.47release notes

  • Adds an option controlling verification of authentication codes for AES-encrypted entries; it is enabled by default.

    2.8.44release notes

Deprecations 5

  • Remains available as a deprecated alias.

    2.8.58release notes

  • The TypeScript FS type is deprecated and retained as an alias of ZipFS.

    2.8.54release notes

  • The namespace is deprecated in favor of top-level exports; it continues to work without a runtime warning.

    2.8.54release notes

  • This option is deprecated and replaced by CompressionStreamFallback.

    2.8.46release notes

  • This option is deprecated and replaced by DecompressionStreamFallback.

    2.8.46release notes

New APIs and options 102

  • addFileSystemEntry() accepts a filter that receives each discovered handle and its path, allowing directories or files to be excluded without walking them.

    2.23.0release notes

  • addFileSystemHandle() accepts a filter that receives each discovered handle and its path, allowing directories or files to be excluded without walking them.

    2.23.0release notes

  • Export methods accept a filter to exclude entries and directory subtrees; excluded entries are not read or counted by progress callbacks.

    2.23.0release notes

  • exportFileSystemHandle() accepts a filter with the same semantics as zip exports.

    2.23.0release notes

  • getExportedSize() accepts a filter to exclude ZipEntry objects from the exported-size calculation.

    2.23.0release notes

  • Import methods on ZipFS and ZipDirectoryEntry accept a filter that can inspect entry data and exclude entries before the duplicates policy.

    2.23.0release notes

  • Adds reader options for the source zip, allowing filenames to be validated, decoded, or read with a password when copying entries.

    2.22.0release notes

  • This error is now exported by the core builds when appendZip receives a value that is neither an object nor unset for readerOptions.

    2.22.0release notes

  • The callback receives the existing entry with the same filename as a second argument, enabling duplicate filename policies.

    2.22.0release notes

  • ZipWriter#appendZip() accepts a filter called once per appended entry; kept entries are copied without decompressing their data, enabling edits that replace or add entries.

    2.20.0release notes

  • Adds a zip64 property indicating whether a data descriptor read with checkOverlappingEntry stores sizes as 8-byte values.

    2.18.1release notes

  • A new exported constant identifies codec allocation failures when reading or writing entries; code matching the former allocation failed message should catch this constant instead.

    2.17.0release notes

  • Export errors caused by unreadable entry data now carry the entry name relative to the exported directory.

    2.16.1release notes

  • Accepts candidate passwords for imported entries; candidates are tried in order, including passwords that already decrypted another entry in the archive.

    2.16.1release notes

  • Requests a password when candidates are exhausted or absent; the function may return a promise, and returning undefined or null makes the entry fail.

    2.16.1release notes

  • When enabled, entry data in the fetched final 64 KB is served from that response, avoiding extra range requests for entries in the cached tail.

    2.16.0release notes

  • Fallback codec classes can declare that construction must wait until a worker or other required module is ready; the library falls back to the native codec if the module fails to load.

    2.16.0release notes

  • Fallback codec classes can declare supported formats through this static flag, which the library reads instead of probing by constructing the class.

    2.16.0release notes

  • Selects whether the local-header filename is compared independently of whether a difference throws, allowing mismatches to be reported as warnings.

    2.12.0release notes

  • Codec errors expose the number of bytes that reached the writer before failure, allowing callers to salvage an archive using the correct output position.

    2.12.0release notes

  • The new value "compressed" passes through the compression stage while still running encryption: reading decrypts without inflating, and writing encrypts without deflating.

    2.12.0release notes

  • Accepts a ZipWriter instance, adds entries to it, and leaves the archive open so callers can add entries, export more trees, and close it themselves.

    2.12.0release notes

  • The new entry option takes an entry read from another archive and derives the values needed to copy it, avoiding corruption from forwarding an incomplete subset of metadata.

    2.12.0release notes

  • A new error is available for invalid duplicates option values.

    2.10.0release notes

  • Filesystem import methods accept a duplicates option with throw, keep-first, or keep-last policies; the default remains throw.

    2.10.0release notes

  • A new type describes filesystem directory-entry import options.

    2.10.0release notes

  • Adds a warning distinguishing concatenated archives, where the data before the archive holds its own central directory, from a self-extracting stub.

    2.9.0release notes

  • Registered compression codecs receive the known source size, allowing codecs to use it as a pledged source size and include content size in the compressed frame.

    2.8.60release notes

  • Returns snapshots of registered codec definitions that cannot alter the registry.

    2.8.60release notes

  • Reports compression methods supported in the current environment and configuration, including separate compression and decompression support.

    2.8.60release notes

  • A constant exposes the library version at runtime and matches the version declared in package.json.

    2.8.60release notes

  • Checks whether data looks like a zip file by locating the archive structure without parsing entries; strictness and maxAppendedDataSize control tolerated appended data.

    2.8.59release notes

  • The entry-level property is set by getData() and collects local file header observations.

    2.8.59release notes

  • Reports deduplicated non-fatal archive-level anomalies noticed while reading; the property is replaced on each getEntries() call.

    2.8.59release notes

  • Adds an option to write an extra field only in the central directory record.

    2.8.59release notes

  • Adds an error constant for the ZipCrypto last-modification-date failure case.

    2.8.58release notes

  • Exposes the byte offset of entry data, usable with Reader#createReadable to serve ranged requests into an uncompressed entry.

    2.8.58release notes

  • Sets an entry's raw MS-DOS date and time directly, which is needed when passThrough copies ZipCrypto entries.

    2.8.58release notes

  • Adds an error constant for unsupported 64-bit values.

    2.8.57release notes

  • Exported interface types the second argument of codec stream constructors and documents which members apply to each class.

    2.8.54release notes

  • Now declared; resolves relative workerURI, wasmURI and codecURI values and defaults to the URL of the zip.js module.

    2.8.54release notes

  • Now declared and updated as bytes are written, allowing custom writers to track their current output size.

    2.8.54release notes

  • Now available as a top-level runtime export.

    2.8.54release notes

  • Exported as a top-level runtime value, so entry instanceof zip.ZipEntry works.

    2.8.54release notes

  • Adds a filesystem-entry options property, paired with setOptions().

    2.8.54release notes

  • Adds filesystem-entry options after creation; options are merged, undefined values remove options, and applicable options take effect when the archive is exported.

    2.8.54release notes

  • Now available as a top-level runtime export; use zip.ZipFileEntry instead of zip.fs.ZipFileEntry.

    2.8.54release notes

  • Exported at the top level; replace new zip.fs.FS() with new zip.ZipFS().

    2.8.54release notes

  • Adds a reader option to compare an entry’s local file header with its central directory record when getData() is called, independently of strictness.

    2.8.53release notes

  • Adds compressionMethod, the entry’s real compression method, alongside originalCompressionMethod.

    2.8.53release notes

  • Adds version, filename, and comment members to the typed Unicode extra field record.

    2.8.53release notes

  • Adds an error constant for invalid comment types.

    2.8.53release notes

  • Adds an interface describing the data descriptor record, including its checksum, sizes, and optional-signature flag.

    2.8.53release notes

  • Exposes the data descriptor record after entry content when checkOverlappingEntry or checkOverlappingEntryOnly is set.

    2.8.53release notes

  • Exposes the filename stored in the local file header; it is defined when strictness is "strict" or checkLocalDirectory is true.

    2.8.53release notes

  • Accepts arrays of Reader, ReadableReader, or ReadableStream instances; stream-only elements are buffered when the reader is initialized.

    2.8.53release notes

  • Added as an error constant.

    2.8.52release notes

  • Added as an error constant for cases where an export's size cannot be determined before writing.

    2.8.52release notes

  • Now accepts readerOptions; set its password to export entries from an encrypted zip file, since the export password encrypts written entries instead.

    2.8.52release notes

  • Added to ZipDirectoryEntry and FS instances to return the exact size an export would write without writing it; throws ERR_UNDETERMINED_SIZE when the size cannot be predicted.

    2.8.52release notes

  • Added to filesystem export methods to set the zip file comment; the comment option continues to set each entry's comment.

    2.8.52release notes

  • Now accepts a ZipReader instance as well as zip data, allowing callers to retain the reader and access its populated archive metadata after import.

    2.8.52release notes

  • Added to filesystem export methods to report each written entry, complementing onprogress, which reports bytes.

    2.8.52release notes

  • Filesystem export readerOptions now accepts passThrough, writing imported zip entries as-is while entries added to the filesystem are compressed as usual.

    2.8.52release notes

  • Now declared in filesystem API export options, matching the option already forwarded to ZipWriter.

    2.8.52release notes

  • Added to entries and is true for symbolic links. The link target is entry content and is not validated, so it must be checked before use.

    2.8.52release notes

  • Adds a constant exposing the message of the DOMException thrown when an export is aborted on browsers that discard the abort reason.

    2.8.51release notes

  • Adds a method on ZipDirectoryEntry and FS instances that returns a snapshot array of a directory's children, optionally including all descendants.

    2.8.51release notes

  • The hook now receives the text type, filename or comment, as its last argument; hooks declaring fewer parameters keep working.

    2.8.50release notes

  • New EntryError property listing additional failures from concurrent exports; failures raised deeper in the tree are flattened into the list.

    2.8.50release notes

  • New EntryError property identifying the name of the entry that failed during export, relative to the exported entry.

    2.8.50release notes

  • New error constant for invalid filenameValidation values.

    2.8.50release notes

  • New error constant for invalid level values.

    2.8.50release notes

  • New error constant for invalid maxAppendedDataSize values.

    2.8.50release notes

  • New error constant for password values of an invalid type.

    2.8.50release notes

  • New error constant for invalid strictness values.

    2.8.50release notes

  • New EntryError property listing files completely written before an export failure, distinguishing them from files that are missing or empty.

    2.8.50release notes

  • New option in ZipReader and getEntries() that can replace each decoded entry name before validation; the filesystem API inherits it from ZipReaderConstructorOptions.

    2.8.50release notes

  • ZipReader accepts a function to decrypt encrypted central directory records; without it, reading such files throws ERR_ENCRYPTED_CENTRAL_DIRECTORY. zip.js does not implement decryption.

    2.8.47release notes

  • ZipReader exposes the digital signature record written between the central directory and the end of central directory record.

    2.8.47release notes

  • The decryptCentralDirectory function receives encryption metadata in a DirectoryEncryptionInfo object.

    2.8.47release notes

  • ZipWriter#close() accepts a function that receives raw central directory records and returns a digital signature record; zip.js stores the signature but does not compute it.

    2.8.47release notes

  • User-facing error message constants are exported so applications can compare error.message with constants instead of hardcoding messages.

    2.8.47release notes

  • Adds the fallback implementation option used when useCompressionStream is false or the Compression Streams API is unavailable.

    2.8.46release notes

  • Adds a worker factory that takes precedence over workerURI and supports bundler-detectable worker construction.

    2.8.46release notes

  • Exposes a function for custom worker scripts to register alternative compression implementations and an initialization hook.

    2.8.46release notes

  • Adds an entry point with the full API but without embedded web worker code or a deflate implementation.

    2.8.46release notes

  • Adds an entry point exposing initWorker() for writing custom worker scripts.

    2.8.46release notes

  • Entries expose the PKWARE Unix extra field, and Unix extra fields populate date and ownership properties.

    2.8.45release notes

  • Entries expose the Info-ZIP Unix type 1 extra field, and Unix extra fields populate date and ownership properties.

    2.8.45release notes

  • ZipWriter#add() can write extra field records only in the local file header, helping reproduce entries written that way by some tools.

    2.8.45release notes

  • Adds CRC-32 verification in ZipReader and getData(), replacing deprecated checkSignature; also verifies CRC-32 for AES-encrypted entries using AE-1.

    2.8.44release notes

  • Adds the crc32 option for adding entries with passThrough set to true, replacing the deprecated signature option.

    2.8.44release notes

  • Adds the crc32 property on entries, replacing the deprecated signature property; it is undefined when the zip file does not store the CRC-32 value.

    2.8.44release notes

  • Adds an error constant for authentication-code verification failures, replacing the deprecated ERR_INVALID_SIGNATURE constant; the constants share a string value for backward compatibility until the next minor version.

    2.8.44release notes

  • Adds an error constant for CRC-32 verification failures, replacing the deprecated ERR_INVALID_SIGNATURE constant; the constants share a string value for backward compatibility until the next minor version.

    2.8.44release notes

  • New entry point uses external worker and WebAssembly files instead of embedding them, reducing main-bundle payloads and avoiding blob: restrictions under strict Content Security Policies.

    2.8.42release notes

  • New smaller external composition excludes the filesystem API as well as the MIME type table.

    2.8.42release notes

  • New smaller external composition excludes the MIME type table.

    2.8.42release notes

  • New entry point exposes getMimeType() with the full MIME type table for use from any build.

    2.8.42release notes

  • Compression codecs registered with registerCodec now receive the entry's compressionMethod value.

    2.8.41release notes

  • Decompression codecs registered with registerCodec now receive the entry's compressionMethod, rawBitFlag, and uncompressedSize, enabling codecs that cannot be decoded from the stream alone.

    2.8.41release notes

Performance 9

  • With CRC checking enabled, the WebAssembly codec and native DecompressionStream verify CRC-32 while inflating, removing the separate JavaScript-thread pass for those codecs.

    2.16.0release notes

  • The WebAssembly deflate codec reads CRC-32 from the gzip trailer, avoiding a separate JavaScript-thread pass; the native gzip-wrapping route reuses its trailer CRC-32 instead of making a second pass.

    2.15.0release notes

  • The overlap check compares an entry with its two neighbours by offset instead of every earlier entry, avoiding quadratic work when reading archives with the check enabled.

    2.14.1release notes

  • The overlap-only check no longer opens entry data, avoiding unnecessary range requests for whole compressed payloads on HttpRangeReader.

    2.14.1release notes

  • The wrapper copies each produced chunk directly out of module memory rather than through a 64 KB staging buffer allocated per stream.

    2.14.1release notes

  • AES encryption and decryption run faster on every build, with the JavaScript engine unrolling AES rounds and SHA-1 steps and the WebAssembly builds receiving the same kernel treatment.

    2.14.0release notesrelease notes

  • Built from Chromium's fork of zlib, reading 20% faster and writing 6 to 8% faster with unchanged compressed output.

    2.11.0release notes

  • Reads the source archive once instead of buffering readers with readUint8Array() into a Blob for a second read.

    2.8.54release notes

  • Filesystem exports now keep a running total rather than summing progress across every entry on each tick, removing quadratic progress-tracking cost.

    2.8.52release notes

Behavior and default changes 18

  • For a ReadableStream or reader without a size, uncompressedSize specifies the expected size and affects entry layout; written sizes remain measured, and invalid values throw ERR_INVALID_UNCOMPRESSED_SIZE_OPTION.

    2.24.0release notes

  • The default chunk size increases from 64 KiB to 256 KiB, reducing pipeline messages at the cost of more memory per entry in progress; applications can retain the previous value with configure().

    2.19.0release notes

  • When a file claims a node holding a directory, "keep-last" replaces the directory and drops entries below it, while "keep-first" keeps them and ignores the file.

    2.14.0release notes

  • The builds run the AES engine as a linked kernel and fall back to the JavaScript engine when the module cannot load, including under a Content Security Policy without 'wasm-unsafe-eval'.

    2.14.0release notes

  • Rename splits names into path components and moves the entry accordingly.

    2.10.0release notes

  • An interrupted copy sets hasCorruptedEntries on the writer and keeps offsets of entries written afterward consistent.

    2.8.58release notes

  • Configuration is read when used, so configure() calls made after constructing a reader or writer but before its first operation are now honored.

    2.8.54release notes

  • Accepts a reader that only provides a ReadableStream by buffering the stream once before reading and piping the archive.

    2.8.53release notes

  • Now cancels the constructor's ReadableStream if nothing has been read; it leaves the stream alone after entries are read and does not affect caller-owned Reader instances.

    2.8.52release notes

  • The backend is now in a separate self-registering module; custom builds that do not import it omit web worker plumbing and run codecs inline. Standard entry points remain unaffected.

    2.8.50release notes

  • The embedded JavaScript deflate engine targets ES2019, allowing WebAssembly and native builds to work on Chromium 76 instead of requiring Chromium 80.

    2.8.49release notes

  • Codecs registered with registerCodec() now run inline when a worker cannot import the codec module, so disabling useWebWorkers is no longer needed on affected browsers.

    2.8.49release notes

  • Filesystem API export methods now forward internal file attributes, uid/gid values, and custom extra field records of imported entries.

    2.8.45release notes

  • Entries returned by getEntries() now include the parsed rawLastAccessDate and extraFieldUSDZ properties.

    2.8.45release notes

  • Entries are stored uncompressed instead of failing when zip.js cannot compress data, such as when the Compression Streams API is unavailable and the WebAssembly module cannot load.

    2.8.43release notes

  • The gzip fallback can read AES-encrypted entries and computes the trailer from decompressed data, allowing archives with a corrupted CRC-32 to be read when checkSignature is not set.

    2.8.43release notes

  • The minimum requirements for core builds are lowered to Chrome 80, Node.js 18, and Deno 1.19.

    2.8.42release notes

  • When deflate-raw and the WebAssembly module are unavailable, zip.js wraps raw deflate data in gzip and uses CompressionStream("gzip") and DecompressionStream("gzip"); AES-encrypted and Deflate64 entries are unsupported with this fallback.

    2.8.42release notes

Tooling 1

  • The dynamic import used to load codecs registered with codecURI is excluded from webpack and Vite static analysis, fixing a bundling warning.

    2.8.41release notes

Fixes and other changes 142

  • Reader and writer methods and init() methods now declare synchronous returns where applicable; use await rather than .then() for methods that may return synchronously.

    2.25.0release notes

  • Rejects when reading a nested directory fails, so the returned promise settles instead of leaving an unhandled rejection.

    2.25.0release notes

  • When reading an entry fails before its data is written, the destination file stream is aborted and unlocked.

    2.25.0release notes

  • Accepts a bare WritableStream as declared; an object exposing a writable property continues to work.

    2.25.0release notes

  • Concurrent calls now share the same finalization and all resolve to the zip file; a call that throws can still be retried.

    2.25.0release notes

  • The reader checks following central directory records to determine the offset shift, allowing entries to be read when the first record cannot settle the question.

    2.22.1release notes

  • An entry before the start of the zip file after an offset shift is no longer reported with this warning.

    2.22.1release notes

  • The source zip is closed if the filter callback throws.

    2.22.0release notes

  • Entries passed to the filter callback are no longer modified after the callback returns.

    2.22.0release notes

  • The type declaration now accepts the EntryMetaData returned by add().

    2.22.0release notes

  • Passing null options uses the default options instead of causing a TypeError when entries are read.

    2.22.0release notes

  • Copies each kept entry only through the exact end of its data or data descriptor, dropping bytes outside kept entries, including stubs, removed-entry data, and padding.

    2.21.0release notes

  • Preserves the copied entry's general purpose bit flag in the rebuilt central directory, including bits zip.js does not set itself.

    2.21.0release notes

  • Completes every filter call before copying any data.

    2.21.0release notes

  • Reconciles an offset past the file with the directory found before the end record, reporting WARNING_MISMATCHED_CENTRAL_DIRECTORY_OFFSET; strict mode still rejects the archive. Zip64 end records are also searched near the locator and within its allowed range.

    2.21.0release notes

  • Checks the first entry's local file header before shifting entries, preventing a damaged offset from moving entries away from their headers and diagnosing prepended data correctly.

    2.21.0release notes

  • When checkOverlappingEntry is set, compares data descriptor CRC-32 and sizes with the central directory record; checkLocalDirectory determines whether mismatches are errors or warnings. Zeroed local-header fields without the descriptor flag are tolerated.

    2.21.0release notes

  • Does not treat entry data containing the archive extra data signature as an encrypted central directory; the record is only searched for at the start of the central directory.

    2.21.0release notes

  • Keeps the central directory value when present; otherwise the local file header remains the source instead of overwriting a central value after reading entry data.

    2.21.0release notes

  • Empty archives behind prepended data now receive WARNING_PREPENDED_DATA, and their prefix is extracted as for non-empty archives.

    2.21.0release notes

  • Options passed to getEntries reach entries and are applied by entry.getData() after its own options but before ZipReader constructor options.

    2.21.0release notes

  • Options passed to getEntriesGenerator reach entries and are applied by entry.getData() after its own options but before ZipReader constructor options.

    2.21.0release notes

  • A copy failure after bytes have been written marks the ZipWriter as having corrupted entries and marks the error with corruptedEntry; a failure before writing leaves the writer clean.

    2.21.0release notes

  • Parses a central directory record through its end before reporting a missing Zip64 extra field, preserving its other fields; an unresolved local-header offset sentinel no longer causes a false prepended-data report.

    2.21.0release notes

  • The reader now opens archives with a digital signature record when data is prepended, such as a self-extracting stub.

    2.20.0release notes

  • At balanced and tolerant levels, entries with unresolved Zip64 size or offset fields remain listed, while reading their data throws ERR_EXTRAFIELD_ZIP64_NOT_FOUND; other entries stay readable.

    2.20.0release notes

  • The callback now receives the final filename after a valid Unicode Path extra field replaces the decoded central directory name, allowing it to repair that name.

    2.19.0release notes

  • With the unix setting, the type 2 extra field stores uid and gid in the local file header and writes a zero-size tag in the central directory; readers see the ids after reading entry data.

    2.19.0release notes

  • Exports continue to re-emit imported ids in a New Unix extra field unless unixExtraFieldType is set on the export.

    2.19.0release notes

  • add() no longer accesses a reader's readable getter when the reader implements readUint8Array(), avoiding a discarded stream pull and wasted remote range request.

    2.19.0release notes

  • With checkOverlappingEntry set, the reported data descriptor layout is now chosen by matching its sizes to the central directory, using CRC-32 to break ties when available.

    2.18.2release notes

  • With this option set, data descriptors are read using a layout that agrees with the central directory, fixing reads of entries past 4 GB with 4-byte descriptor sizes.

    2.18.1release notes

  • Stray or too-short AES extra fields are ignored and reported as malformed warnings; unencrypted entries use their declared compression method, while encrypted-record conflicts remain errors.

    2.18.0release notes

  • Errors raised in workers preserve the cause's code property across structured cloning.

    2.18.0release notes

  • The encrypted flag now follows the central directory record; tolerant readers decrypt entries even when the local header clears the bit and report the mismatch.

    2.18.0release notes

  • Malformed Zip64 extra fields in local file headers are reported as warnings and entries are read using sizes from the central directory; local-size mismatches still follow strictness rules.

    2.18.0release notes

  • The gzip trailer is now written after the inflater returns, avoiding intermittent ERR_INVALID_CRC32 failures for valid AES entries on older hosts using the fallback route.

    2.17.0release notes

  • When password candidates are exhausted or requestPassword gives up, this error carries the last candidate's error as cause; failures unrelated to a wrong password now reach the caller unchanged.

    2.17.0release notes

  • Aborting a signal during getData() or add() now rejects the operation with the signal reason even if input consumption has finished but output is still in progress.

    2.17.0release notes

  • Export errors now preserve their own cause, such as the codec error behind ERR_INVALID_COMPRESSED_DATA, instead of replacing it with an object holding the entry.

    2.16.1release notes

  • Export errors caused by unreadable entry data now carry the entry as entry.

    2.16.1release notes

  • An empty Uint8Array now means no raw password, like an empty password string, avoiding a read that waits forever or writing an entry that cannot be read back.

    2.16.1release notes

  • Aborted codec reads and writes now release WebAssembly buffers and zlib state in browsers, preventing heap exhaustion and later allocation failures.

    2.16.1release notes

  • Custom Readers whose readUint8Array returns a Node.js Buffer can read archives again; the end-of-central-directory record is no longer read from the wrong bytes.

    2.15.0release notes

  • Queued requests run in-process when all worker slots are busy, and terminateWorkers() resolves only after those requests finish.

    2.15.0release notes

  • Every call made while a codec runs is resolved when the codec ends; a later call no longer replaces an earlier call's resolver and leaves its promise unsettled.

    2.14.1release notes

  • HttpReader and HttpRangeReader fetch the whole tail needed for the end-of-central-directory scan with the size request, allowing archives with comments to list entries in one request; mismatched response ranges are no longer treated as requested ranges.

    2.14.0release notes

  • For two directory records claiming the same node, "keep-last" replaces the held record and keeps entries already imported below it; a record for an implicitly created node is not a collision.

    2.14.0release notes

  • Now waits for codecs running without a web worker, preventing WebAssembly builds from resetting the module while a codec is running.

    2.14.0release notes

  • Folders and empty entries no longer carry a data descriptor, making pass-through re-exports byte-identical to their source.

    2.14.0release notes

  • With a codec running in a worker, bytes written by a failed entry are counted after the aborted pipe settles, so following entries are recorded at the correct offsets and the archive is not malformed.

    2.13.1release notes

  • The caller's abort or cancellation reason now reaches the caller unchanged with or without a worker; custom error classes and attached properties are preserved, and the reason is annotated with outputSize when possible.

    2.13.1release notes

  • Rejection reasons crossing a codec worker retain their class and value; DOMException remains a DOMException, and non-object reasons return unchanged.

    2.13.0release notes

  • Entries added after a mid-write failure are recorded at the right offsets regardless of the failure reason, avoiding archives that strict readers reject.

    2.13.0release notes

  • Reasons that cannot carry an outputSize annotation no longer fail during annotation, allowing the promise to reject and preventing terminateWorkers() from hanging.

    2.13.0release notes

  • Failures on the main thread during worker-protocol codec tasks now carry outputSize, so the writer advances by the bytes that actually reached it.

    2.12.0release notes

  • No longer causes FileEntry#arrayBuffer() and ZipReaderStream to hang forever.

    2.12.0release notes

  • readerOptions.passThrough is typed as boolean rather than boolean | "compressed", matching the filesystem API's runtime behavior.

    2.12.0release notes

  • Copies made with entry now preserve the source entry's deflate level bits, language encoding flag, and Unix extra field type.

    2.12.0release notes

  • BlobReader now falls back to slice() and arrayBuffer() when its Blob-like source does not expose stream().

    2.11.4release notes

  • A signal already aborted when getData() is called now rejects the call with signal.reason, or an AbortError with message ERR_ABORTED when no reason exists.

    2.11.4release notes

  • Chunks now expose EntryMetaData#warnings and EntryMetaData#localDirectory deposited on their entry while its data is read.

    2.11.4release notes

  • A signal already aborted when add() is called now rejects the call with signal.reason, or an AbortError with message ERR_ABORTED when no reason exists; rejection happens before a buffered entry’s temporary stream is created.

    2.11.4release notes

  • The entry returned by ZipWriter#add() now reports the date the archive actually stores, including extended or NTFS timestamps.

    2.11.3release notes

  • The central directory drops ZIP64 layout when entry sizes fit in 32 bits, and archives retaining ZIP64 layout end with a ZIP64 end of central directory record, fixing compatibility with macOS extractors.

    2.11.3release notes

  • Size prediction no longer fails for filesystems with implicit directories; explicit directory entries with children still throw ERR_UNDETERMINED_SIZE.

    2.11.3release notes

  • Concurrent add() calls compress concurrently again: the first entry is written directly to the file and the others are buffered.

    2.11.2release notes

  • A Reader that declares its size no longer causes add() to read forever when it returns the requested number of bytes.

    2.11.2release notes

  • The stream advances by the number of bytes actually returned, so short chunks in the middle of data no longer cause the rest of a chunk to be skipped.

    2.11.2release notes

  • The compress direction checks the codec status before using the produced-byte count, preventing failed deflate operations from silently dropping the rest of an entry.

    2.11.1release notes

  • Failures inside the WebAssembly codec are reported as the underlying error instead of surfacing as RangeError: offset is out of bounds.

    2.11.1release notes

  • No longer refused when a match at least as long as the WebAssembly codec's 64KB output buffer starts on its boundary, preventing dropped chunk data and decode failures.

    2.11.0release notes

  • No longer corrupts data when a match wraps around the end of the sliding window and ends inside it, preventing incorrect decompressed bytes.

    2.11.0release notes

  • A failed import rolls back entries created before the error and restores the ZipFS content that existed before the import.

    2.10.0release notes

  • ZipFS#find no longer throws a TypeError when a path component is a file entry rather than a directory.

    2.10.0release notes

  • Renaming an entry to its existing name is no longer rejected as a collision with itself.

    2.10.0release notes

  • Replace methods update entry size, and replaceReadable reports an undetermined size instead of an unsupported prediction.

    2.10.0release notes

  • Replace methods clear an imported entry's pass-through state because the bytes copied verbatim are no longer present.

    2.10.0release notes

  • Fixes decoding names of entries not marked as UTF-8 when the build is parsed as a non-UTF-8 charset.

    2.9.0release notes

  • Size prediction now accounts for the write order and alignment padding when a flat tree mixes files and directories exported with the usdz option.

    2.8.61release notes

  • Size prediction no longer throws ERR_UNDETERMINED_SIZE for an empty archive or one containing a single entry when write order is not guaranteed.

    2.8.61release notes

  • The option now keeps entries in the physical order of their add() calls, including when readers initialize at different speeds.

    2.8.61release notes

  • The build now exports the full core API, including configure(), registerCodec(), reader and writer classes, and constants.

    2.8.60release notes

  • Unclaimed bytes between the last central directory record and the end record are detected; strictness rejects them at the strict level and lower levels report a warning.

    2.8.59release notes

  • Reading archives with a multiple of 65,536 entries and no zip64 record now returns all entries by detecting count wrap and walking central directory records, except when strictness checks reject ambiguous archives.

    2.8.58release notes

  • Duplicate filenames are detected before an entry waits for a worker slot, preventing concurrent add() calls with the same name from both being accepted when the worker pool is saturated.

    2.8.58release notes

  • ZipCrypto entries copied with passThrough can be read back with their password; the raw date is preserved and dataDescriptor is not forced for pass-through ZipCrypto data.

    2.8.58release notes

  • The spanning signature for split zip files is written while holding the writer lock, avoiding failures or misplaced signatures with buffered or interleaved writes.

    2.8.58release notes

  • End-of-central-directory records now declare the number of entries stored on the last disk rather than the total; the count is 0 when the record starts on a fresh disk.

    2.8.58release notes

  • These extra fields are applied only when their version is 1, as required by the zip specification.

    2.8.58release notes

  • The zip64 decision for a split-archive record now accounts for actual record and comment length when predicting disk rollover near 65,535 disks.

    2.8.58release notes

  • When only uid or gid is set, the missing id is now stored as 0 rather than declared with a zero-length field.

    2.8.57release notes

  • Rebuilt central directory records now preserve source entries’ zip64 layout, avoiding duplicate zip64 fields and matching direct-write output.

    2.8.57release notes

  • The writer now closes a split-archive disk before writing the signature record, keeping the record within a single segment.

    2.8.56release notes

  • ZipReader now finds the digital signature when a split archive's central directory starts on an earlier disk than its end of central directory record.

    2.8.56release notes

  • The size prediction now accounts for the offset option when determining zip64 fields, avoiding underestimates for offsets at or above 4GB.

    2.8.56release notes

  • The central directory now accounts for the writer's initial offset when pointing to prepended entries, allowing those entries to be read back.

    2.8.56release notes

  • The compression method is no longer truncated to one byte, so encrypted entries using registered methods above 255 announce the correct method and readers select the correct codec.

    2.8.56release notes

  • Reading encrypted central directories now trusts the declared offset when the encryption header declares the directory size or the bytes at the offset look encrypted.

    2.8.55release notes

  • Reading entries with local file headers masked by PKWARE strong encryption no longer throws ERR_AMBIGUOUS_ARCHIVE.

    2.8.55release notes

  • Published bundles no longer set the level bits on entries written with the default compression level, matching archives written from the sources.

    2.8.55release notes

  • The extensible data sector is now included in the record length, correcting the computed central directory end and derived offsets.

    2.8.55release notes

  • The digital signature is now defined for archives whose central directory is encrypted.

    2.8.55release notes

  • Split zip file signatures PK\x07\x08 and PK00 are no longer reported as prepended data, preventing false ambiguity errors in strictness and checkAmbiguity modes.

    2.8.54release notes

  • No longer copies the prepended archive's central directory as dead bytes; only the data region is copied before entries are rewritten.

    2.8.54release notes

  • An empty Info-ZIP Unix type 2 extra field no longer prevents IDs from being read from a neighboring Info-ZIP New Unix extra field.

    2.8.53release notes

  • Validates that the globalComment option is a Uint8Array, using the same check as ZipWriter#close().

    2.8.53release notes

  • Unix group IDs stored only in the local file header are populated when entry data is read and are available on localDirectory.

    2.8.53release notes

  • EntryMetaData now populates rawCreationDate from the NTFS extra field.

    2.8.53release notes

  • EntryMetaData now populates rawLastAccessDate from the NTFS extra field.

    2.8.53release notes

  • Unix user IDs stored only in the local file header are populated when entry data is read and are available on localDirectory.

    2.8.53release notes

  • The entry returned by ZipWriter#add() now reports the upper half of the written externalFileAttributes, including the selected Unix mode and file type.

    2.8.53release notes

  • A worker that fails to load now falls back to the main scope, including when its error arrives before the pool sends its first message.

    2.8.53release notes

  • Returned entries now include rawBitFlag, filenameLength, extraFieldLength, and unixExternalUpper, which were previously dropped.

    2.8.53release notes

  • Returned entries now define the same members as ZipReader#getEntries() entries, including boolean properties and deprecated attribute aliases.

    2.8.53release notes

  • Now applies entry options to directories it creates as well as to files.

    2.8.52release notes

  • Now stores text size in bytes rather than UTF-16 code units, correcting getExportedSize for non-ASCII text.

    2.8.52release notes

  • Filesystem reader options now map this setting to checkOverlappingEntry, so the overlap check runs while content is still read.

    2.8.52release notes

  • Now counts bytes written, fixing progress that previously used compressed entry sizes against the archive's uncompressed size and omitted non-imported entries.

    2.8.52release notes

  • The deprecated option works again as an alias for externalFileAttributes.

    2.8.52release notes

  • Now honors the requested MIME type, including when a filesystem entry contains a Blob.

    2.8.52release notes

  • Dates are now read as signed timestamps, correcting dates before 1970 that were previously interpreted as dates in 2106.

    2.8.52release notes

  • The deprecated option works again as an alias for internalFileAttributes.

    2.8.52release notes

  • Progress is now reported for filesystem entries not imported from a zip file.

    2.8.52release notes

  • Now ignored for entries with no content, allowing a ZipWriter configured for pass-through to write directories.

    2.8.52release notes

  • Reading a data range no longer emits empty chunks, including the extra read previously issued for entries of unknown size.

    2.8.52release notes

  • Writing an entry with unixMode now stamps the file type in external file attributes unless the mode already carries a type.

    2.8.52release notes

  • Writing names ending with a slash no longer combines the file type with the type already in unixMode, which could corrupt directory or symbolic-link types.

    2.8.52release notes

  • When concurrent export fails on browsers that discard abort reasons, the original failure is reported instead of the sibling-entry cancellation.

    2.8.51release notes

  • Aborting through the signal option on browsers that discard abort reasons now rejects with a DOMException named AbortError instead of undefined or a plain Error.

    2.8.51release notes

  • With concurrent set to true, the export now collects every failure instead of reporting only the first one.

    2.8.50release notes

  • When a module worker cannot start, zip.js now retries an external worker script as a classic worker instead of silently falling back to inline workers.

    2.8.49release notes

  • Temporary file name generation now works when crypto.randomUUID is unavailable.

    2.8.48release notes

  • Reading and writing data now works with polyfilled global stream classes, including when the environment lacks TransformStream.

    2.8.48release notes

  • AES-encrypted entries with passThrough and a provided crc32 are written as AE-1 with CRC-32 in the headers; copying a read AE-1 entry no longer loses its CRC-32.

    2.8.45release notes

  • The last modification date is truncated to whole seconds before odd seconds are rounded up, so sub-second fractions no longer round the DOS date up.

    2.8.44release notes

  • Dates outside the NTFS extra field's representable range are clamped to its bounds instead of silently overflowing to an arbitrary value.

    2.8.44release notes

  • The gzip fallback now rejects archives with an invalid uncompressed size in the central directory using ERR_INVALID_UNCOMPRESSED_SIZE, rather than a misleading error.

    2.8.43release notes

  • A WebAssembly module load failure now reports an explicit "WASM module not loaded" error with the original error as cause, rather than a later codec TypeError.

    2.8.42release notes

  • A failed WebAssembly module load is retried on the next use instead of being cached for the whole session.

    2.8.42release notes

  • Streams passed to zip.js are normalized across Streams API implementations, fixing TypeError exceptions and hangs when global stream classes are overridden by a polyfill.

    2.8.41release notes

  • Reading these files no longer depends on Array.prototype.at, avoiding the higher minimum browser versions previously required.

    2.8.39release notes