Comparing version 4.1.1 to 4.2.0
@@ -0,1 +1,6 @@ | ||
### 4.2.0 | ||
* use new AWS SDK API to avoid PassThrough stream workaround | ||
* update aws-sdk to 2.0.17 | ||
### 4.1.1 | ||
@@ -2,0 +7,0 @@ |
@@ -14,3 +14,2 @@ var AWS = require('aws-sdk'); | ||
var FdSlicer = require('fd-slicer'); | ||
var PassThrough = require('stream').PassThrough; | ||
var mime = require('mime'); | ||
@@ -448,9 +447,5 @@ | ||
var response = request.createReadStream(); | ||
var errorOccurred = false; | ||
var passThrough = new PassThrough(); // https://github.com/aws/aws-sdk-js/issues/330 | ||
var hashCheckPend = new Pend(); | ||
response.on('error', handleError); | ||
request.on('httpHeaders', function(statusCode, headers, resp) { | ||
@@ -471,3 +466,5 @@ if (statusCode >= 300) { | ||
var multipartETag = new MultipartETag({size: contentLength, count: eTagCount}); | ||
var httpStream = resp.httpResponse.createUnbufferedStream(); | ||
httpStream.on('error', handleError); | ||
outStream.on('error', handleError); | ||
@@ -497,10 +494,11 @@ | ||
passThrough.pipe(multipartETag); | ||
passThrough.pipe(outStream); | ||
httpStream.pipe(multipartETag); | ||
httpStream.pipe(outStream); | ||
multipartETag.resume(); | ||
}); | ||
response.pipe(passThrough); | ||
request.send(handleError); | ||
function handleError(err) { | ||
if (!err) return; | ||
if (errorOccurred) return; | ||
@@ -507,0 +505,0 @@ errorOccurred = true; |
{ | ||
"name": "s3", | ||
"version": "4.1.1", | ||
"version": "4.2.0", | ||
"description": "high level amazon s3 client. upload and download files and directories", | ||
@@ -37,3 +37,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"aws-sdk": "~2.0.12", | ||
"aws-sdk": "~2.0.17", | ||
"findit": "~2.0.0", | ||
@@ -40,0 +40,0 @@ "graceful-fs": "~3.0.2", |
@@ -49,4 +49,5 @@ # High Level Amazon S3 Client | ||
s3Client: awsS3Client, | ||
// more options available. See API docs below. | ||
}; | ||
var client = s3.fromAwsSdkS3(options); | ||
var client = s3.createClient(options); | ||
``` | ||
@@ -53,0 +54,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
62634
546
1248
Updatedaws-sdk@~2.0.17