ntlogger 2.9.0 → 2.9.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ntlogger",
3
- "version": "2.9.0",
3
+ "version": "2.9.1",
4
4
  "description": "A Custom Ready-To-Go Logging Wrapper Built on Winston",
5
5
  "keywords": [
6
6
  "custom logger",
@@ -42,14 +42,14 @@
42
42
  "test": "jest"
43
43
  },
44
44
  "dependencies": {
45
- "@sentry/node": "^10.25.0",
46
- "mysql2": "^3.15.3",
47
- "pg": "^8.16.3",
48
- "winston": "^3.18.3",
45
+ "@sentry/node": "^10.34.0",
46
+ "mysql2": "^3.16.1",
47
+ "pg": "^8.17.1",
48
+ "winston": "^3.19.0",
49
49
  "winston-transport": "^4.9.0"
50
50
  },
51
51
  "optionalDependencies": {
52
- "pino-abstract-transport": "^2.0.0"
52
+ "split2": "^4.2.0"
53
53
  },
54
54
  "peerDependencies": {
55
55
  "pino": ">=8.0.0"
@@ -60,9 +60,9 @@
60
60
  }
61
61
  },
62
62
  "devDependencies": {
63
- "@sentry/profiling-node": "^10.25.0",
64
- "dotenv": "^17.2.3",
65
- "jest": "^30.2.0"
63
+ "@sentry/profiling-node": "^10.38.0",
64
+ "dotenv": "^17.2.4",
65
+ "jest": "^30.3.0"
66
66
  },
67
67
  "overrides": {
68
68
  "glob": "^11.1.0"
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const build = require('pino-abstract-transport');
3
+ const split = require('split2');
4
4
  const colors = require('../lib/colors');
5
5
 
6
6
  const levelColors = colors.console;
@@ -153,13 +153,16 @@ function formatLine(obj, opts = {}) {
153
153
  * @param {Object} opts - Transport options
154
154
  */
155
155
  module.exports = function (opts = {}) {
156
- return build(async function (source) {
157
- for await (const obj of source) {
158
- const line = formatLine(obj, opts);
156
+ return split(function (line) {
157
+ let obj;
158
+ try {
159
+ obj = JSON.parse(line);
160
+ } catch {
159
161
  process.stdout.write(line + '\n');
162
+ return;
160
163
  }
161
- }, {
162
- parse: 'lines',
164
+ const formatted = formatLine(obj, opts);
165
+ process.stdout.write(formatted + '\n');
163
166
  });
164
167
  };
165
168