Skip to content

Commit

Permalink
Merge pull request #4 from tilfin/feature/update-modules
Browse files Browse the repository at this point in the history
Update modules
  • Loading branch information
tilfin committed Nov 28, 2018
2 parents c9c0863 + 104136b commit 0b789ed
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 20 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
language: node_js
node_js:
- "4.3"
- "6.0"
- '6.10'
- '8.10'
- '10.10'
script: 'make test-cov'
after_success: 'make coveralls; make clean'
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "promised-lifestream",
"version": "0.6.1",
"version": "0.7.0",
"description": "Creating promisified stream pipeline",
"main": "lib/main.js",
"scripts": {
Expand All @@ -23,14 +23,14 @@
},
"homepage": "https://github.com/tilfin/promised-lifestream#readme",
"devDependencies": {
"chai": "^3.5.0",
"coveralls": "^2.11.13",
"event-stream": "=3.3.4",
"@tilfin/stream-utils": "^0.5.0",
"chai": "^4.2.0",
"coveralls": "^3.0.2",
"istanbul": "^0.4.5",
"mocha": "^3.0.2",
"mocha-lcov-reporter": "^1.2.0"
"mocha": "^5.2.0",
"mocha-lcov-reporter": "^1.3.0"
},
"engines": {
"node": ">=4.3.0"
"node": ">=6.10.0"
}
}
22 changes: 11 additions & 11 deletions test/main.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const stream = require('stream');
const es = require('event-stream');
const StreamUtils = require('@tilfin/stream-utils');
const chai = require('chai');
const assert = chai.assert;
const PromisedLifestream = require('../lib/main');
Expand All @@ -15,7 +15,7 @@ describe('PromisedLifestream', () => {
const data = [1, 'A', 2, 'B'];

return PromisedLifestream([
es.readArray(data)
StreamUtils.readArray(data)
], {
needResult: true
})
Expand All @@ -30,7 +30,7 @@ describe('PromisedLifestream', () => {
const data = [1, 'A', 2, 'B'];

return PromisedLifestream([
es.readArray(data)
StreamUtils.readArray(data)
], {
needResult: false
})
Expand All @@ -44,7 +44,7 @@ describe('PromisedLifestream', () => {
it('resolves', () => {
let cnt = 0;
return PromisedLifestream([
es.readArray([1, 2, 3, 4]),
StreamUtils.readArray([1, 2, 3, 4]),
new stream.Writable({
objectMode: true,
write: function (chunk, enc, cb) {
Expand All @@ -64,7 +64,7 @@ describe('PromisedLifestream', () => {
const data = [1, 'A', 2, 'B'];

return PromisedLifestream([
es.readArray(data),
StreamUtils.readArray(data),
new stream.PassThrough({ objectMode: true })
])
.then(result => {
Expand All @@ -78,7 +78,7 @@ describe('PromisedLifestream', () => {
const data = [1, 'A', 2, 'B'];

return PromisedLifestream([
es.readArray(data),
StreamUtils.readArray(data),
new stream.PassThrough({ objectMode: true })
], {
needResult: true
Expand All @@ -94,7 +94,7 @@ describe('PromisedLifestream', () => {
const data = [1, 'A', 2, 'B'];

return PromisedLifestream([
es.readArray(data),
StreamUtils.readArray(data),
new stream.PassThrough({ objectMode: true })
], {
needResult: false
Expand All @@ -109,7 +109,7 @@ describe('PromisedLifestream', () => {
it('resolves', () => {
let cnt = 0;
return PromisedLifestream([
es.readArray([1, 2, 3]),
StreamUtils.readArray([1, 2, 3]),
new stream.PassThrough({ objectMode: true }),
new stream.Writable({
objectMode: true,
Expand Down Expand Up @@ -150,8 +150,8 @@ describe('PromisedLifestream', () => {
const ERR_MSG = 'Error occurred at Transform';

return PromisedLifestream([
es.readArray(['A', 'B']),
es.map(function (data, callback) {
StreamUtils.readArray(['A', 'B']),
StreamUtils.map(function (data, callback) {
callback(new Error(ERR_MSG));
})
])
Expand All @@ -166,7 +166,7 @@ describe('PromisedLifestream', () => {
const ERR_MSG = 'Error occurred at Writer';

return PromisedLifestream([
es.readArray(['A', 'B']),
StreamUtils.readArray(['A', 'B']),
new stream.Writable({
objectMode: true,
write: function (chunk, enc, cb) {
Expand Down

0 comments on commit 0b789ed

Please sign in to comment.