cache-manager 3.6.0 → 3.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/History.md CHANGED
@@ -1,3 +1,12 @@
1
+ - 3.6.3 2022-05-20
2
+ - Remove import from the code in order to be able to bundle and minify the module (#191) - @ricardomozartlino
3
+
4
+ - 3.6.2 2022-05-19
5
+ - Use lodash.cloneDeep npm instead of full lodash. (#190). - @ricardomozartlino
6
+
7
+ - 3.6.1 2022-04-07
8
+ - Fix for potential prototype polution exploit in async < 3.2.2 (#186). - @tmbobbins
9
+
1
10
  - 3.6.0 2021-11-12
2
11
  - Added keyCount() method to memory store (#173). - @css-master
3
12
 
package/README.md CHANGED
@@ -49,6 +49,8 @@ See the [Express.js cache-manager example app](https://github.com/BryanDonovan/n
49
49
 
50
50
  * [node-cache-manager-memory-store](https://github.com/theogravity/node-cache-manager-memory-store)
51
51
 
52
+ * [node-cache-manager-couchbase](https://github.com/davidepellegatta/node-cache-manager-couchbase)
53
+
52
54
  ## Overview
53
55
 
54
56
  **First**, it includes a `wrap` function that lets you wrap any function in cache.
package/lib/caching.js CHANGED
@@ -2,8 +2,12 @@
2
2
  /*jshint maxcomplexity:16*/
3
3
  var CallbackFiller = require('./callback_filler');
4
4
  var utils = require('./utils');
5
+ var memory = require('./stores/memory.js');
6
+ var none = require('./stores/none.js');
5
7
  var parseWrapArguments = utils.parseWrapArguments;
6
8
 
9
+ var bundledStores = {memory, none};
10
+
7
11
  /**
8
12
  * Generic caching interface that wraps any caching library with a compatible interface.
9
13
  *
@@ -25,7 +29,7 @@ var caching = function(args) {
25
29
  }
26
30
  } else {
27
31
  var storeName = args.store || 'memory';
28
- self.store = require('./stores/' + storeName + '.js').create(args);
32
+ self.store = bundledStores[storeName].create(args);
29
33
  }
30
34
 
31
35
  // do we handle a cache error the same as a cache miss?
@@ -1,6 +1,6 @@
1
1
  /*eslint no-unused-vars:0*/
2
2
  var Lru = require("lru-cache");
3
- var cloneDeep = require('lodash/cloneDeep');
3
+ var cloneDeep = require('lodash.clonedeep');
4
4
  var utils = require('../utils');
5
5
  var isObject = utils.isObject;
6
6
 
@@ -192,7 +192,7 @@ var memoryStore = function(args) {
192
192
  self.keyCount = function() {
193
193
  return lruCache.length;
194
194
  };
195
-
195
+
196
196
  /**
197
197
  * This method is not available in the caching modules.
198
198
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cache-manager",
3
- "version": "3.6.0",
3
+ "version": "3.6.3",
4
4
  "description": "Cache module for Node.js",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -25,8 +25,8 @@
25
25
  "author": "Bryan Donovan",
26
26
  "license": "MIT",
27
27
  "dependencies": {
28
- "async": "3.2.0",
29
- "lodash": "^4.17.21",
28
+ "async": "3.2.3",
29
+ "lodash.clonedeep": "^4.5.0",
30
30
  "lru-cache": "6.0.0"
31
31
  },
32
32
  "devDependencies": {
@@ -39,4 +39,4 @@
39
39
  "optimist": "0.6.1",
40
40
  "sinon": "9.0.3"
41
41
  }
42
- }
42
+ }