Skip to content

Bump ssh2-sftp-client from 9.1.0 to 12.1.1 - #2693

Open
dependabot[bot] wants to merge 2 commits into
mainfrom
dependabot/npm_and_yarn/ssh2-sftp-client-12.1.1
Open

dependabot[bot] wants to merge 2 commits into
mainfrom
dependabot/npm_and_yarn/ssh2-sftp-client-12.1.1

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 23, 2026

Copy link
Copy Markdown
Contributor

Bumps ssh2-sftp-client from 9.1.0 to 12.1.1.

Release notes

Sourced from ssh2-sftp-client's releases.

Minor Bugfix

Fix a bug in error handlers which failed to invalidate the sftp connection when an unexpected ECONNRESET event was received. These events can occur when the remote server closes the connection unexpectedly. Failing to invalidate the internal sftp object could result in either delayed timeout errors or a hanging promise which doesn't get fulfilled or rejected when the client tries to use the connection again after the event has triggered.

MS SFTP Server Fix

This release addresses an issue which arises when connecting to an MS sftp server whereby an exception would be raised whenever the remote MS server closed the connection, even when that closure was legitimate. Thanks to @​rhyswilliamsza for the fix.

Minor Bug Fix

Changed the error handlers on read/write streams to be 'on' rather than 'once' handlers. When definmed as 'once' handlers, multi8ple errors could result in the second error bubbling up to the top level and causing the node process to exit with an unhandled error event.

Also fixed a typo in an error code specification which could result in an undefined symbol error.

Fixed some documentation typos.

Major Version Change - Remove retry support

The main change in this version is the removal of the connectiuon retry support. There are 2 main reasons this support has been removed -

  • It provided little benefit over the added connection logic complexity. In 90% of cases, a connection which fails on the first attempt fails all subsequent retries. Very rarely does a connection which fails on the first attempt succeed with one of the retry attempts. This approach did have some benefit in the past when networks were slower and often more congested, but advances in technology, network speeds and infrastructure quality mean the sorts of problems we use to encounter and less prevelent.
  • The inclusion of retry support significantly complicates the event handling logic and creates some rare, but not unknown, corner cases where events don't get correctly handled and can result in the connection promise handing indefinitely, being neither resolved or rejected. The retry support also had a performance hit which could actually cause connection problems, especially on a slower network using a slower key excahgne or cipher.

The other reason to remove this support is that should someone want to have such support, it can easily be added in their own use case via one of the retry promise packages available and can be tailored to their specific needs. Maintaining a flexible and general implementation which did not have any negative impact is much harder and adds an additional maintenance burdon which is only beneficial for a small number of use cases.

The other change in this version is that we are no longer testing against v18.x of node. Highly recommended that at least version v20.x is used.

New event handling strategy

This release introduces a new event handling strategy.

  • Global event listeners no longer raise errors. Only log events and invalidate connection object.
  • Constructor allows passing in custom global event listeners whi8chn can do whatever is appropriate for the client
  • All temporary local event listeners wil now call the associated promise rejedct method. Previously reject was only called for error events, but this caused problems for some badly behaving sftp servers which ended connections without signalling any error condition. This would cause promises to be stuck in an unfulfilled state.

While the above changes do not change the existing API, the change in global listener behaviour may result in changes for client code behaviour, so this update is marked as a whole new version. However, most clients should not experience any change an in fact, things should be more stable with less liklihood of uncaught errors killing top level processes. It is expected that few clients will need to supply custom global event listeners as the defaults should work fror the vast majority of clients 'out of the box'. Chances are very high you will be able to update to this vwersion from 10.0.3 with no impact or nee3d for code change.

Documentation fix Mk2

Restore missing README.md file

Typo fix in packagte.json

Just a stupid fat finger error fix!

Minor documentation update

Minor update to documentation to add links to allow supporters to donate to the project to help with on-going maintenance and support.

Bug fix and security update

  • Bump to depend on ssh2 1.15.0, which has the fix for CVE-2023-48795
  • Add new promiseLimit setting to limit the number of concurrent promises used by downloadDir/uploadDir. Default is set to 10. Testing indicated for most situations, increasing much above 10 had little benefit and eventually, once number was large enough, actually degraded performance as node would spend more time context switching than data transferring.
  • Some minor code clenup and added quite a few new tests
  • Changed minimum supported node version. While testing with v16.20.2 still appears to work, it is HIGHLY recommended that at least node 18.18.2 is used. Bottom line, if you log an issue, you need to be on node >= v18.
Commits
  • c690045 Preparing 12.1.1 bugfix release
  • 2c93943 Update error handler to invalidate sftp object after ECONNRESET
  • e29f0fc Cleanup pre 12.1.0 release
  • 992aa37 Update readme and package.json for release 12.1.0
  • c38db85 Merge pull request #590 from rhyswilliamsza/fix/rst-on-end-handling
  • 737dfc6 Bump dotenv version
  • 12ed4a8 Merge pull request #587 from ermik/patch-1
  • 2f53f9e Minor code cleanup and update version id
  • 801a520 tweak stream example
  • d2ca542 update npm ignore list
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [ssh2-sftp-client](https://github.com/theophilusx/ssh2-sftp-client) from 9.1.0 to 12.1.1.
- [Release notes](https://github.com/theophilusx/ssh2-sftp-client/releases)
- [Changelog](https://github.com/theophilusx/ssh2-sftp-client/blob/master/CHANGELOG.org)
- [Commits](theophilusx/ssh2-sftp-client@v9.1.0...v12.1.1)

---
updated-dependencies:
- dependency-name: ssh2-sftp-client
  dependency-version: 12.1.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Nov 23, 2026
@sonarqubecloud

Copy link
Copy Markdown

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants