Releases: theophilusx/ssh2-sftp-client
Update to ssh2 1.3.0
Update to ssh2 1.3.0, which includes the patch for handshake timeout issues seen on some platforms.
Cleaned up some error reporting messages to improve consistency.
Added entry to FAQ on dealing with issues uploading larger files due to TCP packet fragmentation and some firewalls.
Improved test coverage, which is now over 94%.
Updated ssh2 and some additional path checks
This version depends on the most recent ssh2 v1.2.0 release.
A number of additional path checks have been added, mainly to provide more informative error messages when interacting with an sftp server on Windows platforms. The default global error handler has also been changed. It now just reports there was an unexpected error rather than re-throw the error. Throwing the error was not terribly useful as it is difficult for clients to catch such errors. Therefore, when an unexpected error is caught by the default global error listener, it will just report the error to the console and unset the client sftp property to prevent any further API calls until a new connection is established.
New SSH2 version dependency
Update to use new ssh2 version 1.1.0, which is a complete re-write of ssh2
Updated to use new retry code for retrying connection creation
Update get/put methods to use different resolution strategy and allow setting of options on streams and pipe() operation.
Minor bug fix
Fix an issue with connect retries not releasing 'ready' listeners. This could result in a memory leak warning if the same ssh2-sftp-client object was used for multiple connections where more than 10 connections were made/attempted.
This version also includes updated tests and improved test coverage as well as a small reduction in download size.
Major Version Update
- Refactored event listeners to ensure end and close event listeners are added. Some sftp servers can abruptly close a connection without raising an error event. This could result in scripts hanging because the promise doe snot get resolved. Have now added end and close listeners to reject a promise if these events are raised which shold prevent or reduce such hangs.
- Refactored the retry code for connections. Now using the promise-retry package instead of just the plain retry package. This change means number of attempts tried is no longer reported in error messages when all attempts are exhausted. However, you can get this information in the debug trace if required.
- Added a new argument to the delete() method which will stop delete() from being rejected if the target object does not exist. Sometimes, you don't care if the target object for delete does not exist and don't want to see an error. Defaults to false.
- Added a n optional filter argument to the uploadDir and downloadDir methods. The filter is a regular expression which is used to match the files and sub-directories to be considered in the upload/download process. Can be used to exclude files/directories you don't want to upload/download.
- Removed a lot of argument validation code. This code was used to provide more meaningful error messages (sometimes, remote servers just report 'Failure', and provide no details about what the failure was. However, this additional argument checking was having a performance hit, especially when files being transferred were small. Decided to remove this validation code in favour of better performance. Turning on debug will often provide additional information which can be used to track down errors when necessary. Note that this does mean the error message text has changed. If you match errors based on the text of the error, you will need to review your code to ensure it still works.
Note that this version still uses ssh 0.8.9, which is known to have issues with node v14.x. The issue is caused by changes in node v14 which were rolled back in node version 15.3.x. The ssh2 maintainer is currently doing a re-write of the ssh2 module to address this and some other design issues. Once that re-write is complete and a new version of ssh2 is released, we will release a new version of ssh2-sftp-client. In the meantime, avoid using node v14.x.
Minor bugfix release
Fix typos in README and local file error message in fastGet.
Bug Fix Release
Fix bug in handling local relative paths
Modify handling of streams in get() and put() methods. If user specifies autoClose: false as an option, make sure that we call destroy() before the promise is resolved. For some specialised streams, setting autoClose: false is necessary to prevent additional read error when attempt is made to read from a stream which ahs already been automatically closed (for exmaple, when using a stream to limit throughput load).
Fix support for win32 based servers
Fixes issue with win32 based servers raising additional ECONNRESET events after end() called.
Fix incorrect path handling for win32 based sftp servers.
Added documentation on platform differences and assumptions.
Minor bug fix
Fix bug in stat() method and error code 4
Minor dependency fix
During update to some dependency versions, some dependencies were accidentally moved from devDependencies to dependencies. This release fixes that error.