Comparing version 2.0.0 to 2.0.1
## Changelog | ||
**2.0.1** — <small>_July 5th, 2017_</small> — [Diff](https://github.com/archiverjs/node-archiver/compare/2.0.0...2.0.1) | ||
- bugfix: add const to entryData in glob callback (#261) | ||
- other: coding style fixes (#263) | ||
**2.0.0** — <small>_July 5th, 2017_</small> — [Diff](https://github.com/archiverjs/node-archiver/compare/1.3.0...2.0.0) | ||
@@ -12,3 +17,3 @@ | ||
- change: removal of internal `_entries` property in favor of `progress` event. (#247) | ||
- change: support for node v0.4+ only. node v0.10 and v0.12 support has been dropped. (#241) | ||
- change: support for node v4.0+ only. node v0.10 and v0.12 support has been dropped. (#241) | ||
@@ -15,0 +20,0 @@ **1.3.0** — <small>_December 13, 2016_</small> — [Diff](https://github.com/archiverjs/node-archiver/compare/1.2.0...1.3.0) |
@@ -361,2 +361,6 @@ /** | ||
Archiver.prototype._onModuleError = function(err) { | ||
/** | ||
* @event Archiver#error | ||
* @type {ErrorData} | ||
*/ | ||
this.emit('error', err); | ||
@@ -423,2 +427,7 @@ }; | ||
this._entriesCount--; | ||
/** | ||
* @event Archiver#warning | ||
* @type {ErrorData} | ||
*/ | ||
this.emit('warning', err); | ||
@@ -715,3 +724,3 @@ setImmediate(callback); | ||
function onGlobMatch(match){ | ||
entryData = _.extend({}, data); | ||
const entryData = _.extend({}, data); | ||
@@ -927,2 +936,9 @@ if (options.cwd) { | ||
/** | ||
* @typedef {Object} ErrorData | ||
* @property {String} message The message of the error. | ||
* @property {String} code The error code assigned to this error. | ||
* @property {String} data Additional data provided for reporting or debugging (where available). | ||
*/ | ||
/** | ||
* @typedef {Object} ProgressData | ||
@@ -929,0 +945,0 @@ * @property {Object} entries |
@@ -12,26 +12,26 @@ /** | ||
const ERROR_CODES = { | ||
"ABORTED": "archive was aborted", | ||
"DIRECTORYDIRPATHREQUIRED": "diretory dirpath argument must be a non-empty string value", | ||
"DIRECTORYFUNCTIONINVALIDDATA": "invalid data returned by directory custom data function", | ||
"ENTRYNAMEREQUIRED": "entry name must be a non-empty string value", | ||
"FILEFILEPATHREQUIRED": "file filepath argument must be a non-empty string value", | ||
"FINALIZING": "archive already finalizing", | ||
"QUEUECLOSED": "queue closed", | ||
"NOENDMETHOD": "no suitable finalize/end method defined by module", | ||
"DIRECTORYNOTSUPPORTED": "support for directory entries not defined by module", | ||
"FORMATSET": "archive format already set", | ||
"INPUTSTEAMBUFFERREQUIRED": "input source must be valid Stream or Buffer instance", | ||
"MODULESET": "module already set", | ||
"SYMLINKNOTSUPPORTED": "support for symlink entries not defined by module", | ||
"SYMLINKFILEPATHREQUIRED": "symlink filepath argument must be a non-empty string value", | ||
"SYMLINKTARGETREQUIRED": "symlink target argument must be a non-empty string value", | ||
"ENTRYNOTSUPPORTED": "entry not supported" | ||
'ABORTED': 'archive was aborted', | ||
'DIRECTORYDIRPATHREQUIRED': 'diretory dirpath argument must be a non-empty string value', | ||
'DIRECTORYFUNCTIONINVALIDDATA': 'invalid data returned by directory custom data function', | ||
'ENTRYNAMEREQUIRED': 'entry name must be a non-empty string value', | ||
'FILEFILEPATHREQUIRED': 'file filepath argument must be a non-empty string value', | ||
'FINALIZING': 'archive already finalizing', | ||
'QUEUECLOSED': 'queue closed', | ||
'NOENDMETHOD': 'no suitable finalize/end method defined by module', | ||
'DIRECTORYNOTSUPPORTED': 'support for directory entries not defined by module', | ||
'FORMATSET': 'archive format already set', | ||
'INPUTSTEAMBUFFERREQUIRED': 'input source must be valid Stream or Buffer instance', | ||
'MODULESET': 'module already set', | ||
'SYMLINKNOTSUPPORTED': 'support for symlink entries not defined by module', | ||
'SYMLINKFILEPATHREQUIRED': 'symlink filepath argument must be a non-empty string value', | ||
'SYMLINKTARGETREQUIRED': 'symlink target argument must be a non-empty string value', | ||
'ENTRYNOTSUPPORTED': 'entry not supported' | ||
}; | ||
function ArchiverError(code, data) { | ||
Error.captureStackTrace(this, this.constructor); | ||
//this.name = this.constructor.name; | ||
this.message = ERROR_CODES[code] || code; | ||
this.code = code; | ||
this.data = data; | ||
Error.captureStackTrace(this, this.constructor); | ||
//this.name = this.constructor.name; | ||
this.message = ERROR_CODES[code] || code; | ||
this.code = code; | ||
this.data = data; | ||
} | ||
@@ -38,0 +38,0 @@ |
{ | ||
"name": "archiver", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "a streaming interface for archive generation", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/archiverjs/node-archiver", |
@@ -1,2 +0,2 @@ | ||
# Archiver v2.0.0 | ||
# Archiver v2.0.1 | ||
@@ -3,0 +3,0 @@ [![Build Status](https://travis-ci.org/archiverjs/node-archiver.svg?branch=master)](https://travis-ci.org/archiverjs/node-archiver) [![Build status](https://ci.appveyor.com/api/projects/status/38kqu3yp159nodxe/branch/master?svg=true)](https://ci.appveyor.com/project/ctalkington/node-archiver/branch/master) |
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
46203
1240