@mimik/mongooser 4.0.0 → 4.0.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mimik/mongooser",
3
- "version": "4.0.0",
3
+ "version": "4.0.2",
4
4
  "description": "Helper for setting up mongodb using mongoose for mimik microservices",
5
5
  "main": "./index.js",
6
6
  "type": "module",
@@ -11,8 +11,8 @@
11
11
  "scripts": {
12
12
  "lint": "eslint . --no-error-on-unmatched-pattern",
13
13
  "docs": "jsdoc2md index.js > README.md",
14
- "test": "echo \"Error: no test specified\" && exit 0",
15
- "test-ci": "c8 --reporter=lcov --reporter=text npm test",
14
+ "test": "mocha",
15
+ "test-ci": "c8 npm test",
16
16
  "prepublishOnly": "npm run docs && npm run lint && npm run test-ci",
17
17
  "commit-ready": "npm run docs && npm run lint && npm run test-ci"
18
18
  },
@@ -27,20 +27,25 @@
27
27
  "url": "https://bitbucket.org/mimiktech/mongooser"
28
28
  },
29
29
  "dependencies": {
30
- "@mimik/lib-filters": "^2.0.7",
31
- "@mimik/request-helper": "^2.0.5",
32
- "@mimik/sumologic-winston-logger": "^2.1.14",
33
- "mongoose": "9.2.2"
30
+ "@mimik/lib-filters": "^2.0.8",
31
+ "@mimik/request-helper": "^2.0.6",
32
+ "@mimik/sumologic-winston-logger": "^2.2.2",
33
+ "mongoose": "9.3.1"
34
34
  },
35
35
  "devDependencies": {
36
- "@eslint/js": "9.39.3",
37
- "@mimik/eslint-plugin-document-env": "^2.0.8",
38
- "@stylistic/eslint-plugin": "5.9.0",
36
+ "@eslint/js": "10.0.1",
37
+ "@mimik/eslint-plugin-document-env": "^2.0.9",
38
+ "@mimik/eslint-plugin-logger": "^1.0.3",
39
+ "@stylistic/eslint-plugin": "5.10.0",
39
40
  "c8": "11.0.0",
40
- "eslint": "9.39.3",
41
- "eslint-plugin-import": "2.32.0",
42
- "globals": "17.3.0",
41
+ "chai": "6.2.2",
42
+ "eslint": "10.1.0",
43
+ "eslint-plugin-import-x": "4.16.2",
44
+ "esmock": "2.7.3",
45
+ "globals": "17.4.0",
43
46
  "husky": "9.1.7",
44
- "jsdoc-to-markdown": "9.1.3"
47
+ "jsdoc-to-markdown": "9.1.3",
48
+ "mocha": "11.7.5",
49
+ "mochawesome": "7.1.4"
45
50
  }
46
51
  }
@@ -1,9 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Bash(npx eslint index.js --no-error-on-unmatched-pattern)",
5
- "Bash(npx eslint index.js)",
6
- "Bash(node -e \"const p = JSON.parse\\(require\\(''fs''\\).readFileSync\\(''node_modules/globals/package.json'',''utf8''\\)\\); console.log\\(p.version\\)\")"
7
- ]
8
- }
9
- }
package/.husky/pre-commit DELETED
@@ -1,2 +0,0 @@
1
- #!/bin/sh
2
- npm run commit-ready
package/.husky/pre-push DELETED
@@ -1,2 +0,0 @@
1
- #!/bin/sh
2
- npm run test
package/eslint.config.js DELETED
@@ -1,70 +0,0 @@
1
- import globals from 'globals';
2
- import importPlugin from 'eslint-plugin-import';
3
- import js from '@eslint/js';
4
- import processDoc from '@mimik/eslint-plugin-document-env';
5
- import stylistic from '@stylistic/eslint-plugin';
6
-
7
- const MAX_LENGTH_LINE = 180;
8
- const MAX_FUNCTION_PARAMETERS = 6;
9
- const MAX_LINES_IN_FILES = 600;
10
- const MAX_LINES_IN_FUNCTION = 150;
11
- const MAX_STATEMENTS_IN_FUNCTION = 45;
12
- const MIN_KEYS_IN_OBJECT = 10;
13
- const MAX_COMPLEXITY = 30;
14
- const ECMA_VERSION = 'latest';
15
- const MAX_DEPTH = 6;
16
- const ALLOWED_CONSTANTS = [0, 1, -1];
17
-
18
- export default [
19
- {
20
- ignores: ['mochawesome-report/**', 'node_modules/**', 'dist/**'],
21
- },
22
- importPlugin.flatConfigs.recommended,
23
- stylistic.configs.recommended,
24
- js.configs.all,
25
- {
26
- plugins: {
27
- processDoc,
28
- },
29
- languageOptions: {
30
- ecmaVersion: ECMA_VERSION,
31
- globals: {
32
- ...globals.mocha,
33
- ...globals.nodeBuiltin,
34
- },
35
- sourceType: 'module',
36
- },
37
- rules: {
38
- '@stylistic/brace-style': ['warn', 'stroustrup', { allowSingleLine: true }],
39
- '@stylistic/line-comment-position': ['off'],
40
- '@stylistic/max-len': ['warn', MAX_LENGTH_LINE, { ignoreComments: true, ignoreStrings: true, ignoreRegExpLiterals: true }],
41
- '@stylistic/quotes': ['warn', 'single'],
42
- '@stylistic/semi': ['error', 'always'],
43
- 'capitalized-comments': ['off'],
44
- 'complexity': ['error', MAX_COMPLEXITY],
45
- 'curly': ['off'],
46
- 'id-length': ['error', { exceptions: ['x', 'y', 'z', 'i', 'j', 'k'] }],
47
- 'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
48
- 'import/no-unresolved': ['error', { amd: true, caseSensitiveStrict: true, commonjs: true }],
49
- 'init-declarations': ['off'],
50
- 'linebreak-style': ['off'],
51
- 'max-depth': ['error', MAX_DEPTH],
52
- 'max-len': ['off'],
53
- 'max-lines': ['warn', { max: MAX_LINES_IN_FILES, skipComments: true, skipBlankLines: true }],
54
- 'max-lines-per-function': ['warn', { max: MAX_LINES_IN_FUNCTION, skipComments: true, skipBlankLines: true }],
55
- 'max-params': ['error', MAX_FUNCTION_PARAMETERS],
56
- 'max-statements': ['warn', MAX_STATEMENTS_IN_FUNCTION],
57
- 'no-confusing-arrow': ['off'],
58
- 'no-inline-comments': ['off'],
59
- 'no-magic-numbers': ['error', { ignore: ALLOWED_CONSTANTS, enforceConst: true, detectObjects: true }],
60
- 'no-process-env': ['error'],
61
- 'no-ternary': ['off'],
62
- 'no-undefined': ['off'],
63
- 'one-var': ['error', 'never'],
64
- 'processDoc/validate-document-env': ['error'],
65
- 'quotes': ['off'],
66
- 'sort-imports': ['error', { allowSeparatedGroups: true }],
67
- 'sort-keys': ['error', 'asc', { caseSensitive: true, minKeys: MIN_KEYS_IN_OBJECT, natural: false, allowLineSeparatedGroups: true }],
68
- },
69
- },
70
- ];