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

kinesis-write-stream

Package Overview
Dependencies
Maintainers
5
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kinesis-write-stream - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

5

CHANGELOG.md

@@ -5,2 +5,7 @@ # Change Log

## [1.0.2] - 2017-03-25
### Fixed
- Pass record to getPartitionKey as stated in
documentation. Contribution by @indieisaconcept.
## [1.0.1] - 2015-11-04

@@ -7,0 +12,0 @@ ### Fixed

2

index.js

@@ -71,3 +71,3 @@ 'use strict';

Data: JSON.stringify(record),
PartitionKey: this.getPartitionKey()
PartitionKey: this.getPartitionKey(record)
};

@@ -74,0 +74,0 @@ };

{
"name": "kinesis-write-stream",
"version": "1.0.1",
"version": "1.0.2",
"description": "Kinesis writable stream that buffers up records",

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

@@ -67,2 +67,33 @@ 'use strict';

});
it('should be called with the current record being added', function(done) {
this.client.putRecords.yields(null, successResponseFixture);
this.sinon.stub(this.stream, 'getPartitionKey').returns('1234');
this.stream.on('finish', function() {
expect(this.stream.getPartitionKey).to.have.been.calledWith(recordsFixture[0]);
done();
}.bind(this));
streamArray([recordsFixture[0]])
.pipe(this.stream);
});
it('should use custom getPartitionKey if defined', function(done) {
this.client.putRecords.yields(null, successResponseFixture);
this.stream.getPartitionKey = function() {
return 'custom-partition';
};
this.sinon.spy(this.stream, 'getPartitionKey');
this.stream.on('finish', function() {
expect(this.stream.getPartitionKey).to.have.returned('custom-partition');
done();
}.bind(this));
streamArray(recordsFixture)
.pipe(this.stream);
});
});

@@ -69,0 +100,0 @@

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