Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ssh2-sftp-client

Package Overview
Dependencies
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ssh2-sftp-client - npm Package Compare versions

Comparing version 2.2.1 to 3.0.0

example/get.js

2

package.json
{
"name": "ssh2-sftp-client",
"version": "2.2.1",
"version": "3.0.0",
"description": "ssh2 sftp client for node",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -57,4 +57,6 @@ ## SSH2 SFTP Client

#### Get
get a new readable stream for path. The encoding is passed to Node Stream (https://nodejs.org/api/stream.html) and it controls how the content is encoded. For example, when downloading binary data, 'null' should be passed (check node stream documentation). Default to 'utf8'.
Get a Chunk from remotePath. The encoding is passed to Node Stream (https://nodejs.org/api/stream.html) and it controls how the content is encoded. For example, when downloading binary data, 'null' should be passed (check node stream documentation). Default to 'utf8'.
> Before V3.0.0, `get` method will return new readable stream from remotePath.
```javascript

@@ -147,2 +149,5 @@ sftp.get(remoteFilePath, [useCompression], [encoding], [addtionalOptions]);

### Log
#### V3.0.0
- change: `sftp.get` will return chunk not stream anymore
- fix: get readable not emitting data events in node 10.0.0

@@ -149,0 +154,0 @@ #### V2.1.1

@@ -76,4 +76,9 @@ /**

});
// after V10.0.0, 'readable' takes precedence in controlling the flow,
// i.e. 'data' will be emitted only when stream.read() is called
stream.on('readable', () => {
resolve(stream);
let chunk;
while((chunk = stream.read()) !== null) {
resolve(chunk)
}
});

@@ -80,0 +85,0 @@ } catch(err) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc