jszip
Advanced tools
Comparing version 3.6.0 to 3.7.0
@@ -7,4 +7,9 @@ --- | ||
### v3.6.0 2020 2021-02-09 | ||
### v3.7.0 2021-07-23 | ||
- Fix: Use a null prototype object for this.files (see [#766](https://github.com/Stuk/jszip/pull/766)) | ||
+ This change might break existing code if it uses prototype methods on the `.files` property of a zip object, for example `zip.files.toString()`. This approach is taken to prevent files in the zip overriding object methods that would exist on a normal object. | ||
### v3.6.0 2021-02-09 | ||
- Fix: redirect main to dist on browsers (see [#742](https://github.com/Stuk/jszip/pull/742)) | ||
@@ -14,3 +19,3 @@ - Fix duplicate require DataLengthProbe, utils (see [#734](https://github.com/Stuk/jszip/pull/734)) | ||
### v3.5.0 2020 2020-05-31 | ||
### v3.5.0 2020-05-31 | ||
@@ -22,7 +27,7 @@ - Fix 'End of data reached' error when file extra field is invalid (see [#544](https://github.com/Stuk/jszip/pull/544)). | ||
### v3.4.0 2020 2020-04-19 | ||
### v3.4.0 2020-04-19 | ||
- Add Typescript type definitions (see [#601](https://github.com/Stuk/jszip/pull/601)). | ||
### v3.3.0 2020 2020-04-1 | ||
### v3.3.0 2020-04-1 | ||
@@ -29,0 +34,0 @@ - Change browser module resolution to support Angular packager (see [#614](https://github.com/Stuk/jszip/pull/614)). |
@@ -22,3 +22,6 @@ 'use strict'; | ||
// } | ||
this.files = {}; | ||
// NOTE: we use a null prototype because we do not | ||
// want filenames like "toString" coming from a zip file | ||
// to overwrite methods and attributes in a normal Object. | ||
this.files = Object.create(null); | ||
@@ -46,3 +49,3 @@ this.comment = null; | ||
// a require('package.json').version doesn't work with webpack, see #327 | ||
JSZip.version = "3.6.0"; | ||
JSZip.version = "3.7.0"; | ||
@@ -49,0 +52,0 @@ JSZip.loadAsync = function (content, options) { |
@@ -182,6 +182,5 @@ 'use strict'; | ||
var filename, relativePath, file; | ||
/* jshint ignore:start */ | ||
// ignore warning about unwanted properties because this.files is a null prototype object | ||
for (filename in this.files) { | ||
if (!this.files.hasOwnProperty(filename)) { | ||
continue; | ||
} | ||
file = this.files[filename]; | ||
@@ -193,2 +192,3 @@ relativePath = filename.slice(this.root.length, filename.length); | ||
} | ||
/* jshint ignore:end */ | ||
}, | ||
@@ -195,0 +195,0 @@ |
{ | ||
"name": "jszip", | ||
"version": "3.6.0", | ||
"version": "3.7.0", | ||
"author": "Stuart Knightley <stuart@stuartk.com>", | ||
@@ -62,3 +62,3 @@ "description": "Create, read and edit .zip files with JavaScript http://stuartk.com/jszip", | ||
}, | ||
"license": "(MIT OR GPL-3.0)" | ||
"license": "(MIT OR GPL-3.0-or-later)" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Copyleft License
License(Experimental) Copyleft license information was found
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found
Found 1 instance in 1 package
Copyleft License
License(Experimental) Copyleft license information was found
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found
Found 1 instance in 1 package
415617
4653