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

cache-manager

Package Overview
Dependencies
Maintainers
1
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cache-manager - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

3

History.md

@@ -0,1 +1,4 @@

- 1.2.2 2015-10-19
- Bugfix: Fixing domain error issues when error is thrown inside 'work' function (#28).
- 1.2.1 2015-10-17

@@ -2,0 +5,0 @@ - Bugfix: multi-caching: using underlying store's isCacheableValue function when it exists (#34).

@@ -166,3 +166,7 @@ /** @module cacheManager/multiCaching */

.on('error', function(err) {
callbackFiller.fill(key, err);
if (callbackFiller.has(key)) {
callbackFiller.fill(key, err);
} else {
cb(err);
}
})

@@ -169,0 +173,0 @@ .bind(work)(function(err, data) {

2

package.json
{
"name": "cache-manager",
"version": "1.2.1",
"version": "1.2.2",
"description": "Cache module for Node.js",

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

@@ -391,2 +391,3 @@ var assert = require('assert');

sinon.assert.calledWith(memoryCache3.store.set, key, {name: name}, {ttl: defaultTtl});
done();

@@ -870,2 +871,27 @@ });

context("when an error is thrown in the work function's callback", function() {
var fakeError;
beforeEach(function() {
fakeError = new Error(support.random.string());
});
it("bubbles up that error", function(done) {
multiCache.wrap(key, function(next) {
next();
}, ttl, function() {
// This test as-is doesn't prove a fix for #28 (https://github.com/BryanDonovan/node-cache-manager/issues/28)
// but if you remove the try/catch, it shows that the undefined `waiting` array issue
// is no longer present (the domain doesn't try to process the error in the callbackFiller).
try {
throw new Error('foo');
} catch (e) {
assert.equal(e.message, 'foo');
}
done();
});
});
});
context("when store.get() calls back with an error", function() {

@@ -872,0 +898,0 @@ it("bubbles up that error", function(done) {

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