cache-manager 3.4.0 → 3.4.4

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,15 @@
1
+ - 3.4.4 2021-06-11
2
+ - vulnerability fix in package-lock.json.
3
+
4
+ - 3.4.3 2021-03-30
5
+ - Bump y18n in package-lock.json (vulnerability fix).
6
+
7
+ - 3.4.2 2021-03-29
8
+ - Catch uncaught exception to pass it to callback (#154) - @lchenay
9
+
10
+ - 3.4.1 2021-03-05
11
+ - Update lodash to fix vulnerability (#152).
12
+
1
13
  - 3.4.0 2020-04-30
2
14
  - Update dependencies (#145). - @orgads
3
15
 
package/README.md CHANGED
@@ -39,8 +39,6 @@ See the [Express.js cache-manager example app](https://github.com/BryanDonovan/n
39
39
 
40
40
  * [node-cache-manager-mongoose](https://github.com/disjunction/node-cache-manager-mongoose)
41
41
 
42
- * [node-cache-manager-fs](https://github.com/hotelde/node-cache-manager-fs)
43
-
44
42
  * [node-cache-manager-fs-binary](https://github.com/sheershoff/node-cache-manager-fs-binary)
45
43
 
46
44
  * [node-cache-manager-fs-hash](https://github.com/rolandstarke/node-cache-manager-fs-hash)
@@ -217,7 +215,7 @@ memoryCache.wrap(key1, key2, function (cb) {
217
215
  #### Example setting/getting several keys with mset() and mget()
218
216
 
219
217
  ```js
220
- memoryCache.mset('foo', 'bar', 'foo2', 'bar2' {ttl: ttl}, function(err) {
218
+ memoryCache.mset('foo', 'bar', 'foo2', 'bar2', {ttl: ttl}, function(err) {
221
219
  if (err) { throw err; }
222
220
 
223
221
  memoryCache.mget('foo', 'foo2', function(err, result) {
@@ -150,7 +150,11 @@ var multiCaching = function(caches, options) {
150
150
  _args.push(callback);
151
151
  cache.store.mget.apply(cache.store, _args);
152
152
  } else {
153
- cache.store.get(args[0], options, callback);
153
+ try {
154
+ cache.store.get(args[0], options, callback);
155
+ } catch (err) {
156
+ callback(err);
157
+ }
154
158
  }
155
159
  }, function(err, result) {
156
160
  return cb(err, result);
package/package.json CHANGED
@@ -1,8 +1,13 @@
1
1
  {
2
2
  "name": "cache-manager",
3
- "version": "3.4.0",
3
+ "version": "3.4.4",
4
4
  "description": "Cache module for Node.js",
5
5
  "main": "index.js",
6
+ "files": [
7
+ "index.js",
8
+ "/examples",
9
+ "/lib"
10
+ ],
6
11
  "scripts": {
7
12
  "test": "make"
8
13
  },
@@ -20,8 +25,8 @@
20
25
  "author": "Bryan Donovan",
21
26
  "license": "MIT",
22
27
  "dependencies": {
23
- "async": "^3.2.0",
24
- "lodash": "^4.17.20",
28
+ "async": "3.2.0",
29
+ "lodash": "^4.17.21",
25
30
  "lru-cache": "6.0.0"
26
31
  },
27
32
  "devDependencies": {
@@ -34,4 +39,4 @@
34
39
  "optimist": "0.6.1",
35
40
  "sinon": "9.0.3"
36
41
  }
37
- }
42
+ }
package/.coveralls.yml DELETED
@@ -1 +0,0 @@
1
- service_name: travis-ci
package/.eslintrc DELETED
@@ -1,61 +0,0 @@
1
- {
2
- "env": {
3
- "es6": true,
4
- "browser": false,
5
- "node": true,
6
- "mocha": true
7
- },
8
-
9
- "parserOptions": {
10
- "ecmaVersion": 2017
11
- },
12
-
13
- "rules": {
14
- "array-bracket-spacing": ["error", "never"],
15
- "indent": ["error", 4, {"SwitchCase": 1}],
16
- "comma-dangle": ["error", "never"],
17
- "no-dupe-keys": "error",
18
- "no-mixed-requires": [0, false],
19
- "no-empty": "error",
20
- "no-unreachable": "error",
21
- "no-extra-bind": "error",
22
- "no-multi-spaces": "error",
23
- "no-redeclare": "error",
24
- "no-undef": "error",
25
- "no-unused-vars": "error",
26
- "no-multiple-empty-lines": ["error", {"max": 1, "maxEOF": 0, "maxBOF": 0}],
27
- "one-var": ["error", "never"],
28
- "brace-style": ["error", "1tbs", {"allowSingleLine": true}],
29
- "object-curly-spacing": ["error", "never"],
30
- "space-before-function-paren": ["error", {
31
- "anonymous": "never",
32
- "named": "never",
33
- "asyncArrow": "always"
34
- }],
35
- "space-before-blocks": "error",
36
- "keyword-spacing": "error",
37
- "arrow-parens": ["error", "as-needed"],
38
- "space-in-parens": ["error", "never"],
39
- "space-infix-ops": ["error", {"int32Hint": false}],
40
- "block-spacing": "error",
41
- "comma-spacing": ["error", {"before": false, "after": true}],
42
- "key-spacing": ["error", {"beforeColon": false, "afterColon": true}],
43
- "no-trailing-spaces": "error",
44
- "operator-linebreak": ["error", "after"],
45
- "no-unneeded-ternary": "error",
46
- "strict": [0, "global"],
47
- "semi": [2, "always"],
48
- "no-extra-semi": "error",
49
- "curly": "error",
50
- "no-bitwise": 1,
51
- "max-len": ["error", 140, 4],
52
- "vars-on-top": 0,
53
- "guard-for-in": 1
54
- },
55
-
56
- "globals": {
57
- "main": "true",
58
- "require": "true",
59
- "module": "true"
60
- }
61
- }
package/.nycrc.json DELETED
@@ -1,20 +0,0 @@
1
- {
2
- "check-coverage": true,
3
- "lines": 95,
4
- "statements": 95,
5
- "functions": 95,
6
- "branches": 75,
7
- "include": [
8
- "lib/**/*.js"
9
- ],
10
- "exclude": [
11
- "**/datamigration/**",
12
- "**/new-schema-migration/**"
13
- ],
14
- "reporter": [
15
- "lcov",
16
- "text"
17
- ],
18
- "cache": true,
19
- "all": true
20
- }
package/.travis.yml DELETED
@@ -1,10 +0,0 @@
1
- language: node_js
2
- node_js:
3
- - '6.10.3'
4
- - '10'
5
- - '12'
6
- script: 'make test-travis'
7
- branches:
8
- only:
9
- - feature/fix-npm-vulnerabilities
10
- - master
package/Makefile DELETED
@@ -1,32 +0,0 @@
1
- BASE = .
2
-
3
- NYC = ./node_modules/.bin/nyc
4
- COVERAGE_OPTS = --lines 99 --statements 95 --branches 90 --functions 95
5
-
6
- main: lint test docs
7
-
8
- cover:
9
- $(NYC) test/run.js
10
-
11
- check-coverage:
12
- $(NYC) check-coverage $(COVERAGE_OPTS)
13
-
14
- test: cover check-coverage
15
-
16
-
17
- test-cov: cover check-coverage
18
- open coverage/lcov-report/index.html
19
-
20
- test-travis: lint
21
- ./node_modules/.bin/nyc test/run.js --report lcovonly \
22
- -- -T unit,functional -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage
23
- lint:
24
- ./node_modules/.bin/eslint ./lib && \
25
- ./node_modules/.bin/eslint ./test && \
26
- ./node_modules/.bin/eslint ./examples
27
-
28
- docs:
29
- ./node_modules/.bin/jsdoc lib --recurse --readme README.md --package package.json
30
- echo docs available in ./out/index.html
31
-
32
- .PHONY: test