archiver
Advanced tools
Comparing version 5.1.0 to 5.2.0
## Changelog | ||
**5.2.0** - <small>_January 6, 2021_</small> — [Diff](https://github.com/archiverjs/node-archiver/compare/5.1.0...5.2.0) | ||
## Features | ||
- Finalize should always return a promise (#480) | ||
## Maintenance | ||
- Fix finalize method jsdoc return type (#482) | ||
- Bump actions/setup-node from v2.1.2 to v2.1.3 (#479) | ||
- Update README.md (#478) | ||
**5.1.0** - <small>_November 19, 2020_</small> — [Diff](https://github.com/archiverjs/node-archiver/compare/5.0.2...5.1.0) | ||
@@ -4,0 +16,0 @@ |
@@ -768,13 +768,15 @@ /** | ||
* | ||
* @return {this} | ||
* @return {Promise} | ||
*/ | ||
Archiver.prototype.finalize = function() { | ||
if (this._state.aborted) { | ||
this.emit('error', new ArchiverError('ABORTED')); | ||
return this; | ||
var abortedError = new ArchiverError('ABORTED'); | ||
this.emit('error', abortedError); | ||
return Promise.reject(abortedError); | ||
} | ||
if (this._state.finalize) { | ||
this.emit('error', new ArchiverError('FINALIZING')); | ||
return this; | ||
var finalizingError = new ArchiverError('FINALIZING'); | ||
this.emit('error', finalizingError); | ||
return Promise.reject(finalizingError); | ||
} | ||
@@ -781,0 +783,0 @@ |
{ | ||
"name": "archiver", | ||
"version": "5.1.0", | ||
"version": "5.2.0", | ||
"description": "a streaming interface for archive generation", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/archiverjs/node-archiver", |
@@ -79,3 +79,3 @@ # Archiver | ||
// append files from a glob pattern | ||
archive.glob('subdir/*.txt'); | ||
archive.glob('file*.txt', {cwd:__dirname}); | ||
@@ -82,0 +82,0 @@ // finalize the archive (ie we are done appending files but streams have to finish yet) |
51039
1275