cache-manager 3.6.2 → 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,6 @@
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
+
1
4
  - 3.6.2 2022-05-19
2
5
  - Use lodash.cloneDeep npm instead of full lodash. (#190). - @ricardomozartlino
3
6
 
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?
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cache-manager",
3
- "version": "3.6.2",
3
+ "version": "3.6.3",
4
4
  "description": "Cache module for Node.js",
5
5
  "main": "index.js",
6
6
  "files": [