Skip to content

Commit

Permalink
Updates for 3.9.0
Browse files Browse the repository at this point in the history
Stuk committed Apr 5, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 983c4d5 commit ae0b127
Showing 4 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -4,6 +4,12 @@ layout: default
section: main
---

### v3.9.0 2022-04-04

- Update types JSZip#loadAsync to accept a promise for data, and remove arguments from `new JSZip()` (see [#752](https://github.com/Stuk/jszip/pull/752))
- Update types for `compressionOptions` to JSZipFileOptions and JSZipGeneratorOptions (see [#722](https://github.com/Stuk/jszip/pull/722))
- Add types for `generateInternalStream` (see [#774](https://github.com/Stuk/jszip/pull/774))

### v3.8.0 2022-03-30

- Santize filenames when files are loaded with `loadAsync`, to avoid ["zip slip" attacks](https://snyk.io/research/zip-slip-vulnerability). The original filename is available on each zip entry as `unsafeOriginalName`. See the [documentation](https://stuk.github.io/jszip/documentation/api_jszip/load_async.html). Many thanks to McCaulay Hudson for reporting.
4 changes: 2 additions & 2 deletions dist/jszip.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
JSZip v3.8.0 - A JavaScript class for generating and reading zip files
JSZip v3.9.0 - A JavaScript class for generating and reading zip files
<http://stuartk.com/jszip>
(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
@@ -1059,7 +1059,7 @@ JSZip.defaults = require('./defaults');

// TODO find a better way to handle this version,
// a require('package.json').version doesn't work with webpack, see #327
JSZip.version = "3.8.0";
JSZip.version = "3.9.0";

JSZip.loadAsync = function (content, options) {
return new JSZip().loadAsync(content, options);
4 changes: 2 additions & 2 deletions dist/jszip.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ JSZip.defaults = require('./defaults');

// TODO find a better way to handle this version,
// a require('package.json').version doesn't work with webpack, see #327
JSZip.version = "3.8.0";
JSZip.version = "3.9.0";

JSZip.loadAsync = function (content, options) {
return new JSZip().loadAsync(content, options);

0 comments on commit ae0b127

Please sign in to comment.