@mimik/sumologic-winston-logger 2.0.0 → 2.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/eslint.config.js CHANGED
@@ -5,10 +5,11 @@ import stylistic from '@stylistic/eslint-plugin';
5
5
 
6
6
  const MAX_LENGTH_LINE = 180;
7
7
  const MAX_FUNCTION_PARAMETERS = 6;
8
- const MAX_LINES_IN_FILES = 400;
9
- const MAX_LINES_IN_FUNCTION = 100;
8
+ const MAX_LINES_IN_FILES = 600;
9
+ const MAX_LINES_IN_FUNCTION = 150;
10
10
  const MAX_STATEMENTS_IN_FUNCTION = 45;
11
11
  const MIN_KEYS_IN_OBJECT = 10;
12
+ const MAX_COMPLEXITY = 30;
12
13
 
13
14
  export default [
14
15
  {
@@ -36,6 +37,7 @@ export default [
36
37
  '@stylistic/line-comment-position': ['off'],
37
38
  '@stylistic/semi': ['error', 'always'],
38
39
  'capitalized-comments': ['off'],
40
+ 'complexity': ['error', MAX_COMPLEXITY],
39
41
  'curly': ['off'],
40
42
  'id-length': ['error', { exceptions: ['x', 'y', 'z', 'i', 'j', 'k'] }],
41
43
  'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
@@ -43,13 +45,14 @@ export default [
43
45
  'init-declarations': ['off'],
44
46
  'linebreak-style': ['off'],
45
47
  'max-len': ['warn', MAX_LENGTH_LINE, { ignoreComments: true }],
46
- 'max-lines': ['warn', MAX_LINES_IN_FILES],
47
- 'max-lines-per-function': ['warn', MAX_LINES_IN_FUNCTION],
48
+ 'max-lines': ['warn', { max: MAX_LINES_IN_FILES, skipComments: true }],
49
+ 'max-lines-per-function': ['warn', { max: MAX_LINES_IN_FUNCTION, skipComments: true }],
48
50
  'max-params': ['error', MAX_FUNCTION_PARAMETERS],
49
51
  'max-statements': ['warn', MAX_STATEMENTS_IN_FUNCTION],
50
52
  'no-confusing-arrow': ['off'], // arrow isnt confusing
51
53
  'no-inline-comments': ['off'],
52
54
  'no-process-env': ['error'],
55
+ 'no-ternary': ['off'],
53
56
  'no-undefined': ['off'],
54
57
  'one-var': ['error', 'never'],
55
58
  'processDoc/validate-document-env': ['error'],
@@ -19,7 +19,7 @@ import {
19
19
  setImmediate,
20
20
  setInterval,
21
21
  } from 'timers';
22
- import Buffer from 'buffer';
22
+ import { Buffer } from 'buffer';
23
23
  import Promise from 'bluebird';
24
24
  import Transport from 'winston-transport';
25
25
 
@@ -29,7 +29,6 @@ logger.info('this is a test', { user: complexObject }, '12345678');
29
29
  logger.info('this is a test', { user: complexObject }, '12345678');
30
30
  logger.error('this is an error message', { user: complexObject, error, correlationId: '123344' }, '34567');
31
31
  logger.error('this is an error message', { user: complexObject, error, correlationId: '123344' }, '34567');
32
- // console.log('----------')
33
32
  logger.error('this is an error message', { user: complexObject, error, correlationId: '123344' }, '34567');
34
33
  logger.error('this is an error message', { user: complexObject, error, correlationId: '123344' }, '34567');
35
34
  logger.info('this is a test', { user: complexObject }, '12345678');
@@ -39,5 +38,4 @@ logger.error('this is an error message', { user: complexObject, error, correlati
39
38
  logger.error('this is an error message', { user: complexObject, error, correlationId: '123344' }, '34567');
40
39
  logger.flushAndExit(ISSUE_EXIT);
41
40
  // setTimeout(() => console.log('done'), 4000);
42
- // console.log('----------')
43
41
  // logger.error(error, { user: complexObject }, '6795949');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mimik/sumologic-winston-logger",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "Log wrapper for sumo, s3, kinesis and winston",
5
5
  "main": "./index.js",
6
6
  "type": "module",
@@ -33,10 +33,10 @@
33
33
  "url": "https://bitbucket.org/mimiktech/sumologic-winston-logger"
34
34
  },
35
35
  "dependencies": {
36
- "@mimik/lib-filters": "^2.0.1",
37
- "@aws-sdk/client-s3": "3.758.0",
38
- "@aws-sdk/client-kinesis": "3.758.0",
39
- "axios": "1.8.1",
36
+ "@mimik/lib-filters": "^2.0.3",
37
+ "@aws-sdk/client-s3": "3.775.0",
38
+ "@aws-sdk/client-kinesis": "3.775.0",
39
+ "axios": "1.8.4",
40
40
  "bluebird": "3.7.2",
41
41
  "lodash.difference": "4.5.0",
42
42
  "lodash.foreach": "4.5.0",
@@ -52,14 +52,14 @@
52
52
  "winston-transport": "4.9.0"
53
53
  },
54
54
  "devDependencies": {
55
- "@eslint/js": "9.21.0",
56
- "@mimik/eslint-plugin-document-env": "^2.0.2",
57
- "@mimik/request-helper": "^2.0.0",
55
+ "@eslint/js": "9.23.0",
56
+ "@mimik/eslint-plugin-document-env": "^2.0.5",
57
+ "@mimik/request-helper": "^2.0.1",
58
58
  "@stylistic/eslint-plugin": "4.2.0",
59
59
  "body-parser": "1.20.3",
60
60
  "c8": "10.1.3",
61
61
  "chai": "5.2.0",
62
- "eslint": "9.21.0",
62
+ "eslint": "9.23.0",
63
63
  "eslint-plugin-import": "2.31.0",
64
64
  "express": "4.21.2",
65
65
  "husky": "9.1.7",
@@ -67,7 +67,7 @@
67
67
  "lodash.clone": "4.5.0",
68
68
  "mocha": "11.1.0",
69
69
  "mochawesome": "7.1.3",
70
- "sinon": "19.0.2",
71
- "supertest": "7.0.0"
70
+ "sinon": "20.0.0",
71
+ "supertest": "7.1.0"
72
72
  }
73
73
  }
@@ -55,7 +55,7 @@ describe('sumologic-winston-logger Unit Tests', function LoggerTests() {
55
55
  logger.flushAndExit(OK_EXIT);
56
56
  done();
57
57
  });
58
- before(done => setTimeout(done, FLUSH_TIMEOUT)); // adding a delay to make sure that the fush is done
58
+ before(done => setTimeout(done, FLUSH_TIMEOUT)); // adding a delay to make sure that the flush is done
59
59
  it('Cleanup', (done) => {
60
60
  process.exit.restore();
61
61
  done();
@@ -23,7 +23,7 @@ const user = {
23
23
  }],
24
24
  avatar: 'https://mts.mimik360.com/mTS/v1/thumbnails/9a86220f-9d76-48e4-98a3-1a51c22fc49a',
25
25
  createdAt: '2019-07-12T16:32:21.709Z',
26
- email: 'lauraawarr+mimik5@gmail.com',
26
+ email: 'test@test.com',
27
27
  externalIds: [
28
28
  '2584799985283928064',
29
29
  ],
@@ -82,7 +82,7 @@ describe('sumologic-winston-logger prod Unit Tests', function LoggerTests() {
82
82
  logger.flushAndExit(OK_EXIT);
83
83
  done();
84
84
  });
85
- before(done => setTimeout(done, FLUSH_TIMEOUT)); // adding a delay to make sure that the fush is done
85
+ before(done => setTimeout(done, FLUSH_TIMEOUT)); // adding a delay to make sure that the flush is done
86
86
  it('Cleanup', (done) => {
87
87
  process.exit.restore();
88
88
  done();