yauzl-clone
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -13,5 +13,14 @@ # Changelog | ||
# Next | ||
## 1.0.2 | ||
* Fix: `.clone()` with `subclassZipFile` option breaks `lazyEntries: false` (closes #1) | ||
* Remove unnecessary instanceof checks in patchers | ||
## 1.0.3 | ||
* `.clone()` with `subclassZipFile` option forward all events to subclass instance | ||
* Fix: Changelog | ||
* Fix: README typo | ||
* README formatting | ||
## Next |
@@ -198,13 +198,4 @@ /* -------------------- | ||
// Remove event interceptors from internal ZipFile | ||
// so `close` + `error` events fire on exposed zipFile instance | ||
// NB `._interceptors` already copied to subclass instance above | ||
if (zipFile._interceptors) zipFileInternal._interceptors = {}; | ||
// Do not inherit event handlers from superclass | ||
if (zipFile._events == zipFileInternal._events) zipFile._events = {}; | ||
// Forward events from internal ZipFile to exposed one | ||
zipFileInternal.on('close', () => zipFile.emit('close')); | ||
zipFileInternal.on('error', err => zipFile.emit('error', err)); | ||
zipFileInternal.emit = zipFile.emit.bind(zipFile); | ||
@@ -211,0 +202,0 @@ // If lazyEntries option was modified, restore to previous setting |
{ | ||
"name": "yauzl-clone", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Clone yauzl for patching", | ||
@@ -5,0 +5,0 @@ "main": "./lib/", |
@@ -18,3 +18,3 @@ # yauzl-clone.js | ||
[yauzl-promise](https://www.npmjs.com/package/yauzl-promise) and [yauzl-crc](https://www.npmjs.com/package/yauzl-crc), for example, uses this module internally. | ||
[yauzl-promise](https://www.npmjs.com/package/yauzl-promise) and [yauzl-crc](https://www.npmjs.com/package/yauzl-crc), for example, use this module internally. | ||
@@ -33,6 +33,6 @@ When monkey-patching a module, it is good practice to clone the original module first so as not to alter the result of calling `require('yauzl')` somewhere else in your application (perhaps inside a dependency). | ||
{ | ||
clone: true, | ||
subclassZipFile: false, | ||
subclassEntry: false, | ||
eventsIntercept: false | ||
clone: true, | ||
subclassZipFile: false, | ||
subclassEntry: false, | ||
eventsIntercept: false | ||
} | ||
@@ -39,0 +39,0 @@ ``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15712
210