PackageTrack

npm · #4577 most downloaded on npm

@zip.js/zip.js

2.8.60gildas-lormeau/zip.js

A JavaScript library to zip and unzip files in the browser, Deno and Node.js

Release timeline

353 releases since 2021
202120222023202420252026

Releases

  1. 2.7.711 Aug 2025
    Release notes
    • Improved security in ZipReader by:
      • adding the checkOverlappingEntry and checkOverlappingEntryOnly options (false by default) to detect potential non-recursive zip-bombs (e.g. "A better zip bomb"), more info here: https://github.com/gildas-lormeau/zip.js/discussions/587#discussioncomment-13911457
      • making sure that the output size of the decompressed entry data matches the expected size exactly
    • Fixed URLString type in the type definition file
    • Updated dev dependencies
    Open source →
  2. 2.7.7029 Jul 2025
    Release notes
    • Fixed bug in Data64URIWriter when writing small succeeding amounts of data (see https://github.com/gildas-lormeau/zip.js/issues/588)
    • Improved security when uncompressing ZIP files. ZipReader will trigger an error as soon as the output size of an entry exceeds the expected "uncompressed size" defined in the central directory (see https://github.com/gildas-lormeau/zip.js/discussions/587)
    Open source →
  3. 2.7.6926 Jul 2025
    Release notes
    • Ensure the compressed size, the uncompressed size, and the CRC2 checksum are written in the local header if the data descriptor is not used (see #585)
    Open source →
  4. 2.7.6823 Jul 2025
    Release notes

    Fixed regression introduced in version 2.7.65 when using HttpRangeReader with ZipWriter#add() (see #586)

    Open source →
  5. 2.7.6723 Jul 2025
    Release notes
    • Fixed ZipWriter#prependZip()
    • Fixed the "level" value of the "general purpose bit flag" when creating zip files with encrypted data or not deflated data
    • Added action to publish zip.js automatically on NPM with provenance
    Open source →
  6. 2.7.6621 Jul 2025
    Release notes
    • Fixed value of compression level in the "general purpose bit flag" when compressing files (fix previous version)
    Open source →
  7. 2.7.6521 Jul 2025
    Release notes
    • Fixed regression introduced in version v2.7.50 related to the encoding of the "general purpose bit flag" and the compression level when creating zip files (see #583)
    • Added FileEntry#arrayBuffer and ZipFileEntry#getArrayBuffer methods to extract data as ArrayBuffer instances (see example)
    Open source →
  8. 2.7.6417 Jul 2025
    Release notes
    • added the ability in the ZipWriter#add() method to include the "ZIP64 extended information extra field" in the local headers when the zip64 option is enabled. This makes the ZIP file more robust when trying to recover data from a damaged ZIP file (see https://github.com/gildas-lormeau/zip.js/issues/579).
    • added the ZipWriter#remove() method to remove entries from the central directory
    • added the ZipWriter#prependZip() method to allow appending/removing entries to/from an existing ZIP file (see example, example). This can also be useful to create a (large) ZIP file in multiple passes.
    • circumvented a Node.js bug when using a Buffer instance (as a Uint8Array instance) with a Uint8ArrayReader reader (see https://github.com/gildas-lormeau/zip.js/issues/580)
    • fixed a ZipCrypto (legacy ZIP encryption) bug in ZipWriter when setting the dataDescriptor option to false explicitly (the option is true by default, it will also be automatically set to true in that case)
    • updated dev dependencies
    Open source →
  9. 2.7.634 Jul 2025
    Release notes

    What's Changed

    • feat: discriminate Entry to DirectoryEntry and FileEntry by @tpoisseau in https://github.com/gildas-lormeau/zip.js/pull/576

    New Contributors

    • @tpoisseau made their first contribution in https://github.com/gildas-lormeau/zip.js/pull/576

    Full Changelog: https://github.com/gildas-lormeau/zip.js/compare/v2.7.62...v2.7.63

    Open source →
  10. 2.7.6219 May 2025
    Release notes

    What's Changed

    • fix types of Uint8Array methods by @xollaborator in https://github.com/gildas-lormeau/zip.js/pull/571
    • Fix UNIX permissions by @lephilousophe in https://github.com/gildas-lormeau/zip.js/pull/569

    New Contributors

    • @xollaborator made their first contribution in https://github.com/gildas-lormeau/zip.js/pull/571
    • @lephilousophe made their first contribution in https://github.com/gildas-lormeau/zip.js/pull/569

    Full Changelog: https://github.com/gildas-lormeau/zip.js/compare/v2.7.61...v2.7.62

    Open source →
  11. 2.7.6112 May 2025
    Release notes

    Fixed missing executable permission for directories on UNIX-like filesystem (see #567)

    Open source →
  12. 2.7.6031 Mar 2025
    Release notes
    • Reverted changes related to TypeScript 5.7+ introduced in versions 2.7.58 and 2.7.59, see issues #563 and #549 for more info
    • Fixed all JSR score warnings, see https://jsr.io/@zip-js/zip-js/score
    Open source →
  13. 2.7.5929 Mar 2025
    Release notes
    • Added legacy-5.6 entry point in the package.json file in order to support TypeScript < 5.7 (see #563 and #549)
    • Fixed score on JSR (see #562)
    • Fixed ESLint and Deno lint warnings
    • Updated dev dependencies
    Open source →
  14. 2.7.5828 Mar 2025
    Release notes
    • Added ArrayBuffer type parameter to Uint8Array by @UnsungHero97 in the type definition file (see #549)
    • Added exception "Writer not initialized" when using Writer classes implementing Writer#writeUint8Array if Writer#init() has not been previously called (see #560)
    • Fixed infinite loop when using readable.getReader() from Reader classes (see #559)
    • Added more info about encryptionStrengthin the documentation (see #558)
    • Updated development dependencies
    • Added JSR integration via an Action
    Open source →
  15. 2.7.5731 Jan 2025
    Release notes
    • Changed the external file attributes format to UNIX (more info here part 4.4.2). As a consequence, the msDosCompatible option is now set to false by default.
    • Added the executable option to indicate an entry is a UNIX executable file when creating zip files
    Open source →
  16. 2.7.5630 Jan 2025
    Release notes
    Open source →
  17. 2.7.5530 Jan 2025

    Nothing published for this version

  18. 2.7.545 Dec 2024
    Release notes
    • Setting compressionMethod to 0 will create valid (uncompressed) entries when using ZipWriter
    • Removed some useless async function calls
    • Updated dev dependencies
    Open source →
  19. 2.7.5328 Oct 2024
    Release notes
    • Fixed type of Entry#extraField by @xc2 in https://github.com/gildas-lormeau/zip.js/pull/535
    • Updated dev dependencies

    New Contributors

    • @xc2 made their first contribution in https://github.com/gildas-lormeau/zip.js/pull/535
    Open source →
  20. 2.7.5227 Aug 2024
    Release notes
    • Added option compressionMethod in ZipWriter for handling custom compression methods (e.g. zstd) when setting the option passThrough to true
    • Fixed issue with Uint8Array size in ZipReader when setting passThrough to true and using a Uint8Writer class to get the uncompressed data
    • Fixed optional checkPasswordOnly property in the type definitions (index.d.ts)
    Open source →
  21. 2.7.5121 Aug 2024
    Release notes
    • Fixed issue when passing passThrough: true option in the import* methods of the FS API with AES-encrypted files where the encryption strength is not set to the default value (i.e. 3)
    Open source →
  22. 2.7.5021 Aug 2024
    Release notes
    • Added the new option passThrough in ZipReader, ZipWriter, and ZipDirectoryEntry#import methods. This allows reading/writing directly the raw data of zip entries without processing it (i.e. compressing or/and encrypting data)
    • Added the new option offset in ZipWriter. This allows setting the offset of the first entry in the file to a value > 0. This can be useful when creating zip files with prepended data
    • Completed the implementation of the bitFlag property in ZipWriter. It will now take into account the level of compression and update the bit flag value accordingly.
    • Updated dev dependencies
    Open source →
  23. 2.7.4921 Aug 2024

    Nothing published for this version

  24. 2.7.4831 Jul 2024
    Release notes

    What's Changed

    • Support ignoring Language Encoding flag with the new option useUnicodeFileNames by @eliandoran in https://github.com/gildas-lormeau/zip.js/pull/521

    New Contributors

    • @eliandoran made their first contribution in https://github.com/gildas-lormeau/zip.js/pull/521

    Full Changelog: https://github.com/gildas-lormeau/zip.js/compare/v2.7.47...v2.7.48

    Open source →
  25. 2.7.4718 Jul 2024
    Release notes

    Fixed regression introduced in the previous version (see #520)

    Open source →
  26. 2.7.4617 Jul 2024
    Release notes

    Added the export ./data-uri in order to support Web Workers loaded with a data URI instead of a Blob URI (see #519)

    Open source →
  27. 2.7.4528 May 2024
    Release notes

    Fix rare issue where files would not be compressed if the compression codec included in zip.js was not used

    Open source →
  28. 2.7.446 May 2024
    Release notes

    What's Changed

    • fixed ZipReaderStream example in the documentation by @jespertheend in https://github.com/gildas-lormeau/zip.js/pull/510
    • fixed typo by @AbdullahSohail-SE in https://github.com/gildas-lormeau/zip.js/pull/511
    • fixed a minor issue when creating a zip file that led to the use of the zip64 format when it wasn't necessary, in the particular case where zip specification limits were reached (e.g. 65335 files in the archive) but not exceeded.
    • the default value of Entry#filename and Entry#comment will be used if encodeText/decodeText functions return undefined values (see #507)

    New Contributors

    • @jespertheend made their first contribution in https://github.com/gildas-lormeau/zip.js/pull/510
    • @AbdullahSohail-SE made their first contribution in https://github.com/gildas-lormeau/zip.js/pull/511

    Full Changelog: https://github.com/gildas-lormeau/zip.js/compare/v2.7.43...v2.7.44

    Open source →
  29. 2.7.4324 Apr 2024
    Release notes
    • Fixed an issue with zip files incorrectly detected as using zip64 under particular circumstances (e.g. when they contain exactly 65536 entries) when trying to read them
    Open source →
  30. 2.7.4223 Apr 2024
    Release notes
    • Added decodeText and encodeText options to handle text encoding of filenames and comments when reading and writing a zip file respectively (see #507).
    • Fixed issue where creating a zip file without Deflate implementation could lead to a corrupted zip file (see #508).
    Open source →
  31. 2.7.412 Apr 2024
    Release notes

    Added combineSizeEocd option in HttpReader (see https://gildas-lormeau.github.io/zip.js/api/interfaces/HttpOptions.html)

    What's Changed

    • Add explicit preventHeadRequest false check. by @bwbroersma in https://github.com/gildas-lormeau/zip.js/pull/499
    • Add combineSizeEocd option to combine range size with eocd by @bwbroersma in https://github.com/gildas-lormeau/zip.js/pull/500
    • Add preventHeadRequest=false and combineSizeEocd Typescript definitions. by @bwbroersma in https://github.com/gildas-lormeau/zip.js/pull/501
    • Bump follow-redirects from 1.15.5 to 1.15.6 by @dependabot in https://github.com/gildas-lormeau/zip.js/pull/496

    Full Changelog: https://github.com/gildas-lormeau/zip.js/compare/v2.7.40...v2.7.41

    Open source →
  32. 2.7.407 Mar 2024
    Release notes

    Fix regression introduced in version v2.7.38 leading to some streams being not closes internally

    Open source →
  33. 2.7.397 Mar 2024

    Nothing published for this version

  34. 2.7.387 Mar 2024
    Release notes
    • Fixed missing documentation
    • Fixed ignored exceptions when closing WritableStream instances used internally
    Open source →
  35. 2.7.374 Mar 2024
    Release notes

    Fixed potential uncaught exception (see #493)

    Open source →
  36. 2.7.3629 Feb 2024
    Release notes

    Fixed missing exported interfaces in the index.d.ts file.

    Open source →
  37. 2.7.3524 Feb 2024
    Release notes

    What's Changed

    New Contributors

    • @BlackAsLight made their first contribution in https://github.com/gildas-lormeau/zip.js/pull/488

    Full Changelog: https://github.com/gildas-lormeau/zip.js/compare/v2.7.34...v2.7.35

    Open source →
  38. 2.7.3429 Jan 2024
    Release notes
    • Added option rawPassword to provide passwords not encoded in UTF-8 (see https://github.com/gildas-lormeau/zip.js/discussions/477)
    Open source →
  39. 2.7.3327 Jan 2024
    Release notes
    • terminateWorkers() can be called asynchronously in order to wait for the termination of all workers
    • Fixed detection of the Worker API (see #480)
    • Fixed support of chunkSize option
    • Fixed other minor issues
    Open source →
  40. 2.7.324 Dec 2023
    Release notes

    Fixed potential data corruption in Deno when using Web Workers (Thanks to @vi117, see #466)

    Open source →
  41. 2.7.3116 Nov 2023
    Release notes

    ZipReader: added support of invalid zip files with truncated preprended data (e.g. self-extracting files where the program part has been truncated without fixing the zip payload)

    Open source →
  42. 2.7.3014 Oct 2023
    Release notes
    • Fixed bug when creating empty encrypted entries
    • Fixed error when calling ZipDirectoryEntry#addFileSystemHandle() with undefined handles
    Open source →
  43. 2.7.295 Sept 2023
    Release notes

    FS API: the option bufferedWrite is now set to true by default when calling export* methods (e.g. exportBlob()) in order to use multiple web workers by default

    Open source →
  44. 2.7.283 Sept 2023
    Release notes
    • Added missing FS#addUint8Array method
    • Fixed potential issue leading to larger files than expected (max. 64 bytes) when creating split zip files in usdz format
    Open source →
  45. 2.7.2727 Aug 2023
    Release notes
    • Added model/vnd.usdz+zip in getMimeType
    • Added support of the USDZ extra field in ZipReader
    Open source →
  46. 2.7.2627 Aug 2023
    Release notes

    Added support of split zip files for USDZ files

    Open source →
  47. 2.7.2527 Aug 2023
    Release notes
    • Added support of USDZ file format:
      • New option usdz when creating ZipWriter instances, see https://gildas-lormeau.github.io/zip.js/api/interfaces/ZipWriterConstructorOptions.html#usdz
      • Test: https://github.com/gildas-lormeau/zip.js/blob/562443d8da420a2df045d611fb076bee18ae1404/tests/all/test-usdz.js
    • Added LICENSE file in the repository
    Open source →
  48. 2.7.2410 Aug 2023
    Release notes

    FS API:

    • Keep last access and creation date of entries when importing a zip file
    Open source →
  49. 2.7.239 Aug 2023
    Release notes
    • Fixed support of "Extended Timestamp" extra field used to store the creation and last access date of entries, see "Extended Timestamp Extra Field" here for more information about the spec
    • Fixed duplicate filename extensions in the implementation of getMimeType()
    Open source →
  50. 2.7.228 Aug 2023
    Release notes
    • Updated MIME types table in getMimeType() (see #440)
    • Added index.min.js (minified ES6 module) in the root folder of the project (see #441)
    Open source →
  51. 2.7.217 Aug 2023
    Release notes

    Fixed error in z-worker-core.js when catching potential and intermittent undefined errors (see #439)

    Open source →
  52. 2.7.2011 Jul 2023
    Release notes

    Circumvented a bug specific to Clouflare Workers environment when creating zip files (see #434)

    Open source →
  53. 2.7.1911 Jul 2023
    Release notes

    Fixed zip64 bug when creating zip files containing entries weighting more than 4GB (uncompressed), using the Readable API to read the uncompresssed data, and not setting explicitly the zip64 option to true.

    Open source →
  54. 2.7.1810 Jul 2023
    Release notes

    Fixed potential uncaught error when reading split zip files

    Open source →
  55. 2.7.1723 Jun 2023
    Release notes

    Added workaround for Thunderbird where calling Blob#slice() and Blob#arrayBuffer() does not work as expected (the array buffer is not sliced) (see #430)

    Open source →
  56. 2.7.1614 Jun 2023
    Release notes

    Fixed compatibility issue with older Chromium browsers (i.e. v78) (see https://github.com/gildas-lormeau/zip.js/issues/426)

    Open source →
  57. 2.7.157 Jun 2023
    Release notes
    • Fixed scripts used to build the library with babel (i.e rollup-es5.config.dev.js and rollup-es5.config.js)
    • FS API: Set ZipFileEntry#uncompressedSize when entries are added in the filesystem
    Open source →
  58. 2.7.1416 May 2023
    Release notes

    Fixed error when using HttpReader with useXHR set to true and the connection is lost (see #414)

    Open source →
  59. 2.7.1313 May 2023
    Release notes

    Added support of zip files with invalid central directory length

    Open source →
  60. 2.7.1212 May 2023
    Release notes

    Fixed support for UTF-8 extra fields when reading zip files

    Open source →