Skip to content

Releases: sergi/jsftp

Fix queuing for parallel requests

21 Aug 12:13
Compare
Choose a tag to compare

This release fixes bug #54, which would cause concurrent code such as:

ftp.ls(path1, function showFile(err, res) {
  if (err) return console.log(err);
  console.log(res[0].name);
});

ftp.ls(path2, function showFile(err, res) {
  if (err) return console.log(err);
  console.log(res[0].name);
});

Would always show the same result, because items in the queue haven't been shifted.

Progress events

13 Jul 09:07
Compare
Choose a tag to compare

Whenever you use get or put now the Ftp object will emit a progress event telling you how much of the current file has been transferred, along with some other info.

Example of usage:

ftp.on('progress', function(data) {
  console.log('Transferred ' + data.transferred + 'bytes of ' + data.total);
  // There is also a data.filename and data.action properties, 
  // to know the name of the file currently being transferred 
  // and whether it is a 'get' or 'put' action.
});

ftp.put('test.txt', '/remote/folder', function(err, res) {
  if (!err) console.log('Transfer complete!');
});

Thanks to Sergio Lopez for suggesting to implement this!

Also, unit test code has been made more robust in this release.

Better, faster streams and APIs

05 Jul 14:48
Compare
Choose a tag to compare

This release accomplishes the following:

  • Uses node streams instead of the stream module, improving a lot memory usage and speed.
  • Better and easier to use APIs
  • Get rid of buggy synchronous APIs
  • Gets rid of 200+ lines in the main jsftp module, keeping functionality
  • Gets rid of 7000+ lines in total by modularizing and refactoring
  • Added and improved unit tests
  • Many small bugfixes

BIG Warning: This version of jsftp breaks API compatibility with previous versions, it is NOT a drop-in replacement. Please be careful when upgrading. The API changes are not drastic at all and it is all documented below. If you do not want to upgrade yet you should stay with version 0.6.0, the last one before the upgrade. The API docs are updated for 1.0

Better, faster streams and APIs

03 Jul 20:45
Compare
Choose a tag to compare
Pre-release

This release accomplishes the following:

  • Uses node streams instead of the stream module, improving a lot memory usage and speed.
  • Better and easier to use APIs
  • Get rid of buggy synchronous APIs
  • Gets rid of 200+ lines in the main jsftp module, keeping functionality
  • Gets rid of 7000+ lines in total by modularizing and refactoring
  • Added and improved unit tests
  • Many small bugfixes

BIG Warning: This version of jsftp breaks API compatibility with previous versions, it is NOT a drop-in replacement. Please be careful when upgrading. The API changes are not drastic at all and it is all documented below. If you do not want to upgrade yet you should stay with version 0.6.0, the last one before the upgrade. The API docs are updated for 1.0