Releases: gildas-lormeau/zip.js
Releases · gildas-lormeau/zip.js
v2.2.5
- Fix issue with the
onprogress
callback where sometimes the first parameter was always returning0
- Replace
Entry#moveTo()
withFS#move()
.Entry#moveTo
can still be used but is deprecated. - Add missing
ZipFileEntry#replaceData64URI
method FS
now implementsZipDirectoryEntry
- Add
ZipEntry#getRelativeName()
- Add the option
relativePath
when callingZipDirectoryEntry.export*
methods
v2.2.4
- Improve the method
ZipDirectoryEntry#addFileSystemEntry
added in v2.2.3: it will now return theZipEntry
like otherZipDirectoryEntry#add*
functions
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