Releases: gildas-lormeau/zip.js
Releases · gildas-lormeau/zip.js
v2.2.3
- add method
ZipDirectoryEntry#addFileSystemEntry
to import files or directories from the filesystem into a zip
v2.2.2
- Fix type definitions for typescript
v2.2.0
- This version embeds the web worker code in the library itself.
The settingworkerScriptsPath
is now totally obsolete and you don't need to copyz-worker.js
anymore in your library folder to use web workers.
You can still copy and importz-worker.js
with the settingworkerScripts
if necessary (e.g. if the CSP of the page does not allow a Blob URI as a web worker URL).
v2.1.1
zip
: Fix typo in constant namezip.ERR_INVALID_PASSWORD
(was previously namedzip.ERR_INVALID_PASSORD
)zip
: Add propertiesEntry#filenameUT8
andEntry#commentUT8
which help to determine if respectively the filename and the comment are encoded in UTF-8 in the zip filezip
: Fix support of UTF8 comments stored in extra fieldszip.fs
: Fix support ofoptions
parameter when importing/exporting data
v2.1.0
- 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
andZipFileEntry#replaceText
methods in the FileSystem API ZipWriter#add
returns a Promise with anEntry
object as resolved value instead ofundefined
v2.0.13
Update compiled code
v2.0.12
- Include
deflate.js
andinflate.js
as modules inzip.js
andz-worker.js
. You don't need to includedeflate.js
andinflate.js
anymore in your page and your/lib
folder. They have also been removed from the/dist
folder. - Minor code improvements
v2.0.11
- 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
- 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
- Add
useWebWorkers
option when callingZipReader
,ZipWriter
constructors andZipReader#getData
,ZipWriter#add
to force enabling/disabling the usage of web workers - Fix handling of the option
version
- Remove usage of
unescape
andencodeURIComponent
in the code (replaced withTextEncoder
) - Add
FS
API in the types declaration file - Various improvements in the code