Closed ralphtheninja closed 6 years ago
I didn't bother to update devDependencies
since it doesn't affect dependents. Also, it would be really nice if you could consider using ~
or ^
for version ranges. At least consider using ~
.
Tests break but I get the same errors on latest master.
@ralphtheninja yes, deps should use better ranges. when upgrading archiver did you check to make sure there were no API changes that affect this project's usage of it?
@jlipps I didn't. But allow me to spend some time on it and get back to you!
@jlipps Some digging below.
From archivers
CHANGELOG.md
:
2.0.0 — July 5th, 2017 — Diff
finalize
. (#248)symlink
method for programmatically creating symlinks within an archive.warning
instead of error
when stat fails and the process can still continue.bulk
functionality. (#249)_entries
property in favor of progress
event. (#247)Looking at the code it's only used in commands.uploadFile()
in lib/commands.js
:
commands.uploadFile = function(filepath) {
var cb = findCallback(arguments);
var _this = this;
var archiver = require('archiver');
var archive = archiver('zip');
var dataList = [];
archive
.on('error', function(err) {
cb(err);
})
.on('data', function(data) {
dataList.push(data);
})
.on('end', function() {
_this._jsonWireCall({
method: 'POST'
, relPath: '/file'
, data: { file: Buffer.concat(dataList).toString('base64') },
cb: callbackWithData(cb, _this)
});
});
archive
.append(
fs.createReadStream(filepath),
{ name: path.basename(filepath) }
);
archive.finalize(function(err) {
if (err) {
cb(err);
}
});
};
And .append()
and .finalize()
doesn't seem to be affected of the new major version.
great, thanks!
Fixes the following: