nestjs-pino 4.2.0 → 4.3.0-alpha.80912d

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/LoggerModule.js CHANGED
@@ -22,6 +22,11 @@ const Logger_1 = require("./Logger");
22
22
  const params_1 = require("./params");
23
23
  const PinoLogger_1 = require("./PinoLogger");
24
24
  const storage_1 = require("./storage");
25
+ /**
26
+ * As NestJS@11 still supports express@4 `*`-style routing by itself let's keep
27
+ * it for the backward compatibility. On the next major NestJS release `*` we
28
+ * can replace it with `/{*splat}`, and drop the support for NestJS@9 and below.
29
+ */
25
30
  const DEFAULT_ROUTES = [{ path: '*', method: common_1.RequestMethod.ALL }];
26
31
  let LoggerModule = LoggerModule_1 = class LoggerModule {
27
32
  static forRoot(params) {
package/PinoLogger.js CHANGED
@@ -16,7 +16,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.PinoLogger = void 0;
17
17
  exports.__resetOutOfContextForTests = __resetOutOfContextForTests;
18
18
  /* eslint-disable @typescript-eslint/no-explicit-any */
19
- /* eslint-disable @typescript-eslint/ban-types */
20
19
  const common_1 = require("@nestjs/common");
21
20
  const pino_1 = require("pino");
22
21
  const params_1 = require("./params");
@@ -57,9 +56,8 @@ let PinoLogger = PinoLogger_1 = class PinoLogger {
57
56
  this.contextName = renameContext || 'context';
58
57
  }
59
58
  get logger() {
60
- var _a;
61
59
  // outOfContext is always set in runtime before starts using
62
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
60
+ var _a;
63
61
  return ((_a = storage_1.storage.getStore()) === null || _a === void 0 ? void 0 : _a.logger) || outOfContext;
64
62
  }
65
63
  trace(...args) {
package/README.md CHANGED
@@ -1,13 +1,14 @@
1
1
  <p align="center">
2
- <img alt="War in Ukraine" src="https://raw.githubusercontent.com/iamolegga/nestjs-pino/master/war.jpg"/>
3
- <br/>
4
- Children wait in a bomb shelter in Mariupol, Ukraine. AP
5
- <br/>
6
- Help save their lives by donating:
2
+ <img alt="Bombed Vovchansk, Ukraine" src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/32/Vovchansk_%282024-06-02%29_1513.jpg/640px-Vovchansk_%282024-06-02%29_1513.jpg"/>
3
+ <br />
4
+ <small>"Vovchansk (2024-06-02) 1513" by National Police of Ukraine (Liut Brigade) is licensed under CC BY 4.0.</small>
5
+ </p>
6
+ <p align="center">
7
+ This is Vovchansk, Ukraine, the city where the father of this library’s author was born. This is how it looks now, after the Russian invasion. If you find this library useful and would like to thank the author, please consider donating any amount via one of the following links:
7
8
  <br/>
8
- ・<a href="https://war.ukraine.ua/donate/">Armed Forces of Ukraine</a>・<a href="https://www.comebackalive.in.ua/">Ukrainian volunteers</a>・
9
+ ・<a href="https://war.ukraine.ua/donate/">Armed Forces of Ukraine</a>・<a href="https://savelife.in.ua/en/">"The Come Back Alive" foundation</a>・
9
10
  <br/>
10
- Thanks for your support!
11
+ Thanks for your support! 🇺🇦
11
12
  </p>
12
13
 
13
14
  <h1 align="center">NestJS-Pino</h1>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nestjs-pino",
3
- "version": "4.2.0",
3
+ "version": "4.3.0-alpha.80912d",
4
4
  "description": "Pino logger for NestJS",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -41,38 +41,42 @@
41
41
  },
42
42
  "homepage": "https://github.com/iamolegga/nestjs-pino#readme",
43
43
  "devDependencies": {
44
- "@nestjs/common": "^10.2.0",
45
- "@nestjs/core": "^10.2.0",
46
- "@nestjs/platform-express": "^10.2.0",
47
- "@nestjs/platform-fastify": "^10.2.0",
48
- "@nestjs/testing": "^10.2.0",
44
+ "@eslint/compat": "^1.2.5",
45
+ "@eslint/eslintrc": "^3.2.0",
46
+ "@eslint/js": "^9.18.0",
47
+ "@nestjs/common": "^11.0.3",
48
+ "@nestjs/core": "^11.0.3",
49
+ "@nestjs/platform-express": "^11.0.3",
50
+ "@nestjs/platform-fastify": "^11.0.3",
51
+ "@nestjs/testing": "^11.0.3",
49
52
  "@types/express": "^5.0.0",
50
- "@types/jest": "^29.5.3",
51
- "@types/memorystream": "^0.3.1",
52
- "@types/node": "^22.0.0",
53
+ "@types/jest": "^29.5.14",
54
+ "@types/memorystream": "^0.3.4",
55
+ "@types/node": "^22.10.7",
53
56
  "@types/supertest": "^6.0.2",
54
- "@typescript-eslint/eslint-plugin": "^7.0.0",
55
- "@typescript-eslint/parser": "^6.4.0",
56
- "eslint": "^8.47.0",
57
- "eslint-config-prettier": "^9.0.0",
58
- "eslint-plugin-import": "^2.28.1",
59
- "eslint-plugin-prettier": "^5.0.0",
57
+ "@typescript-eslint/eslint-plugin": "^8.21.0",
58
+ "@typescript-eslint/parser": "^8.21.0",
59
+ "eslint": "^9.18.0",
60
+ "eslint-config-prettier": "^10.0.1",
61
+ "eslint-plugin-import": "^2.31.0",
62
+ "eslint-plugin-prettier": "^5.2.3",
63
+ "globals": "^15.14.0",
60
64
  "jest": "29.7.0",
61
65
  "memorystream": "^0.3.1",
62
- "pino": "^9.1.0",
63
- "pino-http": "^10.1.0",
64
- "prettier": "^3.0.2",
65
- "reflect-metadata": "^0.1.13",
66
- "rimraf": "^6.0.0",
66
+ "pino": "^9.6.0",
67
+ "pino-http": "^10.4.0",
68
+ "prettier": "^3.4.2",
69
+ "reflect-metadata": "^0.1.14",
70
+ "rimraf": "^6.0.1",
67
71
  "rxjs": "^7.8.1",
68
72
  "supertest": "^7.0.0",
69
- "ts-jest": "^29.1.1",
70
- "ts-loader": "^9.4.4",
71
- "ts-node": "^10.9.1",
72
- "typescript": "^5.1.6"
73
+ "ts-jest": "^29.2.5",
74
+ "ts-loader": "^9.5.2",
75
+ "ts-node": "^10.9.2",
76
+ "typescript": "^5.7.3"
73
77
  },
74
78
  "peerDependencies": {
75
- "@nestjs/common": "^8.0.0 || ^9.0.0 || ^10.0.0",
79
+ "@nestjs/common": "^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0",
76
80
  "pino-http": "^6.4.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0"
77
81
  }
78
82
  }
package/postinstall.js CHANGED
@@ -9,10 +9,10 @@ console.log(`
9
9
  \t\tbombed cities (including schools, hospitals, etc), hundreds of killed children, millions of refugees.
10
10
  \t\tSo if you enjoy this library you can thank the author by donating to one of this funds:
11
11
  \t\t• https://war.ukraine.ua/donate/ – Armed Forces of Ukraine
12
- \t\t• https://www.comebackalive.in.ua/ – Ukrainian volunteers
12
+ \t\t• https://savelife.in.ua/en/ – "The Come Back Alive" foundation
13
13
 
14
14
  \t\tThanks for your support! 🇺🇦
15
15
 
16
16
  `);
17
17
 
18
- new Promise(r => setTimeout(r, 5000));
18
+ new Promise((r) => setTimeout(r, 5000));