Skip to content

Releases: gildas-lormeau/zip.js

v2.2.5

28 Jan 22:51
Compare
Choose a tag to compare
  • Fix issue with the onprogress callback where sometimes the first parameter was always returning 0
  • Replace Entry#moveTo() with FS#move(). Entry#moveTo can still be used but is deprecated.
  • Add missing ZipFileEntry#replaceData64URImethod
  • FS now implements ZipDirectoryEntry
  • Add ZipEntry#getRelativeName()
  • Add the option relativePath when calling ZipDirectoryEntry.export* methods

v2.2.4

27 Jan 23:03
Compare
Choose a tag to compare
  • Improve the method ZipDirectoryEntry#addFileSystemEntry added in v2.2.3: it will now return the ZipEntry like other ZipDirectoryEntry#add* functions

v2.2.3

27 Jan 18:33
Compare
Choose a tag to compare
  • add method ZipDirectoryEntry#addFileSystemEntry to import files or directories from the filesystem into a zip

v2.2.2

26 Jan 12:56
Compare
Choose a tag to compare
  • Fix type definitions for typescript

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