Skip to content

Releases: gildas-lormeau/zip.js

v2.2.0

25 Jan 14:41
Compare
Choose a tag to compare
  • This version embeds the web worker code in the library itself.
    The setting workerScriptsPath is now totally obsolete and you don't need to copy z-worker.js anymore in your library folder to use web workers.
    You can still copy and import z-worker.js with the setting workerScripts if necessary (e.g. if the CSP of the page does not allow a Blob URI as a web worker URL).

v2.1.1

24 Jan 21:56
Compare
Choose a tag to compare
  • zip: Fix typo in constant name zip.ERR_INVALID_PASSWORD (was previously named zip.ERR_INVALID_PASSORD)
  • zip: Add properties Entry#filenameUT8 and Entry#commentUT8 which help to determine if respectively the filename and the comment are encoded in UTF-8 in the zip file
  • zip: Fix support of UTF8 comments stored in extra fields
  • zip.fs: Fix support of options parameter when importing/exporting data

v2.1.0

23 Jan 22:38
Compare
Choose a tag to compare
  • Breaking change

The path of the scripts after the first one in workerScripts will be be resolved against the URL of the first script instead
of the base URI of the page. For example with the version 2.0.x, if you had in your code something similar to this:

zip.configure({
  workerScripts: {
    inflate: ["./lib/z-worker-pako.js", "./lib/pako_inflate.min.js"]
  }
});

You must replace it with:

zip.configure({
  workerScripts: {
    inflate: ["./lib/z-worker-pako.js", "./pako_inflate.min.js"] // pako_inflate.min.js is in the same folder than z-worker-pako.js
  }
});

  • Fix a regression introduced in the version 2.0.13 when decoding UTF-8 filenames/comments found in the corresponding Extra Field
  • Add ZipFileEntry#replaceBlob and ZipFileEntry#replaceText methods in the FileSystem API
  • ZipWriter#add returns a Promise with an Entry object as resolved value instead of undefined

v2.0.13

23 Jan 01:28
Compare
Choose a tag to compare

Update compiled code

v2.0.12

22 Jan 17:46
Compare
Choose a tag to compare
  • Include deflate.js and inflate.js as modules in zip.js and z-worker.js. You don't need to include deflate.js and inflate.js anymore in your page and your /lib folder. They have also been removed from the /dist folder.
  • Minor code improvements

v2.0.11

22 Jan 05:36
Compare
Choose a tag to compare
  • Fix potential race condition bug when calling multiple times ZipWriter.add in parallel with the same instance of options object (fix wasn't ok in v2.0.9)
  • Add options parameter to ZipReader.getEntries in order to use a user-provided encoding for filenames and comments

v2.0.9

22 Jan 01:30
Compare
Choose a tag to compare
  • Fix potential race condition bug when calling ZipWriter.add in parallel with the same instance of options object
  • Add validation of the last modification date given as an option when calling ZipWriter.add

v2.0.8

22 Jan 00:29
Compare
Choose a tag to compare
  • Add useWebWorkers option when calling ZipReader, ZipWriter constructors and ZipReader#getData, ZipWriter#add to force enabling/disabling the usage of web workers
  • Fix handling of the option version
  • Remove usage of unescape and encodeURIComponent in the code (replaced with TextEncoder)
  • Add FS API in the types declaration file
  • Various improvements in the code

v2.0.7

21 Jan 12:28
Compare
Choose a tag to compare
  • Fix parsing of filenames and comments encoded in CP437
  • Fix handling of UTF8 filenames and comments stored as extra fields

v2.0.6

21 Jan 03:35
Compare
Choose a tag to compare
  • Fix issue when writing UTF-8 filenames/comments
  • Data copy (i.e. unzipping a non-compressed content without checking the signature) is done in the main thread instead of web workers to improve performances