ttl-mem-cache
Advanced tools
Comparing version 4.0.2 to 4.1.0
@@ -5,3 +5,3 @@ 'use strict'; | ||
const stream = require('stream'); | ||
const stream = require('readable-stream'); | ||
const crypto = require('crypto'); | ||
@@ -47,3 +47,3 @@ const utils = require('./utils'); | ||
this.on('broadcast', (entry) => { | ||
if (this._readableState.flowing) { | ||
if (this.readableFlowing) { | ||
if (this._readableState.objectMode) { | ||
@@ -56,2 +56,12 @@ this.push(entry); | ||
}); | ||
// Avoid hitting the max listeners limit when multiple | ||
// streams is piped into the same stream. | ||
this.on('pipe', () => { | ||
this.setMaxListeners(this.getMaxListeners() + 1); | ||
}); | ||
this.on('unpipe', () => { | ||
this.setMaxListeners(this.getMaxListeners() - 1); | ||
}); | ||
} | ||
@@ -58,0 +68,0 @@ |
{ | ||
"name": "ttl-mem-cache", | ||
"version": "4.0.2", | ||
"version": "4.1.0", | ||
"description": "A in memory time to live cache with streaming support.", | ||
@@ -37,9 +37,12 @@ "main": "lib/cache.js", | ||
"devDependencies": { | ||
"eslint": "5.7.0", | ||
"eslint": "5.16.0", | ||
"eslint-config-airbnb-base": "13.1.0", | ||
"eslint-plugin-import": "2.14.0", | ||
"eslint-plugin-import": "2.16.0", | ||
"benchmark": "2.1.4", | ||
"lolex": "3.0.0", | ||
"tap": "12.0.1" | ||
"lolex": "3.1.0", | ||
"tap": "12.6.1" | ||
}, | ||
"dependencies": { | ||
"readable-stream": "^3.3.0" | ||
} | ||
} |
@@ -5,3 +5,6 @@ # ![ttl-mem-cache](logo.png) | ||
[![Dependencies](https://img.shields.io/david/trygve-lie/ttl-mem-cache.svg?style=flat-square)](https://david-dm.org/trygve-lie/ttl-mem-cache)[![Build Status](http://img.shields.io/travis/trygve-lie/ttl-mem-cache/master.svg?style=flat-square)](https://travis-ci.org/trygve-lie/ttl-mem-cache) [![Greenkeeper badge](https://badges.greenkeeper.io/trygve-lie/ttl-mem-cache.svg)](https://greenkeeper.io/) | ||
[![Dependencies](https://img.shields.io/david/trygve-lie/ttl-mem-cache.svg?style=flat-square)](https://david-dm.org/trygve-lie/ttl-mem-cache) | ||
[![Build Status](http://img.shields.io/travis/trygve-lie/ttl-mem-cache/master.svg?style=flat-square)](https://travis-ci.org/trygve-lie/ttl-mem-cache) | ||
[![Greenkeeper badge](https://badges.greenkeeper.io/trygve-lie/ttl-mem-cache.svg?style=flat-square)](https://greenkeeper.io/) | ||
[![Known Vulnerabilities](https://snyk.io/test/github/trygve-lie/ttl-mem-cache/badge.svg?targetFile=package.json&style=flat-square)](https://snyk.io/test/github/trygve-lie/ttl-mem-cache?targetFile=package.json) | ||
@@ -8,0 +11,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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
27238
329
514
0
1
+ Addedreadable-stream@^3.3.0
+ Addedinherits@2.0.4(transitive)
+ Addedreadable-stream@3.6.2(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedstring_decoder@1.3.0(transitive)
+ Addedutil-deprecate@1.0.2(transitive)