@mimik/mongooser 1.8.6 → 2.0.1

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.
Files changed (2) hide show
  1. package/index.js +1 -4
  2. package/package.json +8 -8
package/index.js CHANGED
@@ -12,12 +12,9 @@ const { isProd, MASK } = require('@mimik/lib-filters');
12
12
  * const mongodb = require('@mimik/mongooser');
13
13
  */
14
14
 
15
- mongoose.Promise = Promise;
16
-
17
15
  const type = 'mongo';
18
16
  const correlationId = getCorrelationId(`${type}-database-start`);
19
17
 
20
- const VALIDATION_CHECK = 100; // in ms
21
18
  const DISCONNECTED = 0;
22
19
  const CONNECTED = 1;
23
20
  const CONNECTING = 2;
@@ -148,7 +145,7 @@ module.exports = (config) => {
148
145
  }
149
146
  }, mongoSettings.connectTimeout * 1000); // convert in seconds
150
147
 
151
- return Promise.delay(VALIDATION_CHECK).then(() => {
148
+ return Promise.delay(mongoSettings.validationCheck).then(() => {
152
149
  const state = mongoose.connection.readyState;
153
150
 
154
151
  if (state === DISCONNECTED || state === DISCONNECTING) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mimik/mongooser",
3
- "version": "1.8.6",
3
+ "version": "2.0.1",
4
4
  "description": "Helper for setting up mongodb using mongoose for mimik microservices",
5
5
  "main": "index.js",
6
6
  "engines": {
@@ -34,21 +34,21 @@
34
34
  "dependencies": {
35
35
  "@mimik/lib-filters": "^1.4.6",
36
36
  "@mimik/request-helper": "^1.7.8",
37
- "@mimik/sumologic-winston-logger": "^1.6.14",
37
+ "@mimik/sumologic-winston-logger": "^1.6.15",
38
38
  "bluebird": "3.7.2",
39
39
  "lodash": "4.17.21",
40
- "mongoose": "6.6.7"
40
+ "mongoose": "7.1.1"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@mimik/eslint-plugin-dependencies": "^2.4.5",
44
44
  "@mimik/eslint-plugin-document-env": "^1.0.5",
45
- "eslint": "8.30.0",
45
+ "eslint": "8.40.0",
46
46
  "eslint-config-airbnb": "19.0.4",
47
- "eslint-plugin-import": "2.26.0",
48
- "eslint-plugin-jsx-a11y": "6.6.1",
49
- "eslint-plugin-react": "7.31.11",
47
+ "eslint-plugin-import": "2.27.5",
48
+ "eslint-plugin-jsx-a11y": "6.7.1",
49
+ "eslint-plugin-react": "7.32.2",
50
50
  "eslint-plugin-react-hooks": "4.6.0",
51
- "husky": "8.0.2",
51
+ "husky": "8.0.3",
52
52
  "jsdoc-to-markdown": "8.0.0"
53
53
  }
54
54
  }