exframe-cache-manager 2.1.0 → 2.1.2

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.
@@ -0,0 +1,8 @@
1
+ import exzeoBaseConfig from 'eslint-config-exzeo/base';
2
+ import exzeoMochaConfig from 'eslint-config-exzeo/mocha';
3
+
4
+ export default [
5
+ exzeoBaseConfig,
6
+ exzeoMochaConfig,
7
+ { ignores: ['**/dist', 'debug.js'] }
8
+ ];
package/index.js CHANGED
@@ -210,7 +210,7 @@ function cachemanager(options) {
210
210
 
211
211
  controller.abort();
212
212
  return { status: 200, message: 'OK' };
213
- } catch (ex) {
213
+ } catch (ex) { // eslint-disable-line no-unused-vars
214
214
  return { status: 503, message: 'Error connecting to Redis' };
215
215
  }
216
216
  }, { promotionTimeout: 60000 });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exframe-cache-manager",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "Managing the cache",
5
5
  "main": "index.js",
6
6
  "config": {
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "scripts": {
13
13
  "pretest": "npm-install-peers && npm run lint",
14
- "lint": "eslint ./",
14
+ "lint": "eslint .",
15
15
  "peers": "npm-install-peers",
16
16
  "test": "docker-compose -f docker-compose.yml up --build --abort-on-container-exit --exit-code-from exframe-cache-manager",
17
17
  "unit-test": "./node_modules/.bin/nyc -r lcov --report-dir ./documentation/coverage -t ./documentation/coverage mocha --exit --reporter $npm_package_config_reporter \"./test/**/*.test.js\""
@@ -31,7 +31,7 @@
31
31
  "exframe-utilities": "^1.1.0"
32
32
  },
33
33
  "devDependencies": {
34
- "chai": "*",
34
+ "chai": "^4",
35
35
  "eslint": "*",
36
36
  "eslint-config-exzeo": "*",
37
37
  "eslint-plugin-import": "*",
@@ -46,5 +46,5 @@
46
46
  "url": "https://bitbucket.org/exzeo-usa/exframe",
47
47
  "directory": "packages/exframe-cache-manager"
48
48
  },
49
- "gitHead": "717928dc42e073c76c1df1edcff6801ba09e8fd3"
49
+ "gitHead": "8e1447625c9410c013a91372178dd8d0501776a1"
50
50
  }
@@ -90,11 +90,11 @@ context('Test User Profile Middleware', () => {
90
90
  });
91
91
 
92
92
  it('validate the getItem function, including optional context and timeout delay value', async () => {
93
- const fake = async function (key) {
94
- await waitTimeout(5000)
93
+ const fake = async function () {
94
+ await waitTimeout(5000);
95
95
  return 'finished';
96
- }
97
- const stub = sinon.stub(app.redisCache, "get").callsFake(fake)
96
+ };
97
+ const stub = sinon.stub(app.redisCache, 'get').callsFake(fake);
98
98
 
99
99
  await app.setItem(cacheKey, 'someValue');
100
100
  const context = { log: { info: (info) => { console.log(info); } } };
package/.eslintignore DELETED
@@ -1,5 +0,0 @@
1
- node_modules
2
- test
3
- documentation
4
- dist
5
- debug.js
package/.eslintrc.json DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "extends": "exzeo/base"
3
- }
@@ -1,3 +0,0 @@
1
- {
2
- "extends": "exzeo/mocha"
3
- }