@bymax-one/nest-logger 1.4.3 → 1.4.5

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 (3) hide show
  1. package/CHANGELOG.md +30 -1
  2. package/README.md +12 -13
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -11,6 +11,33 @@ heading here.
11
11
 
12
12
  ## [Unreleased]
13
13
 
14
+ ## [1.4.5] - 2026-11-01
15
+
16
+ ### Documentation
17
+
18
+ - The README's testing section and command list now state the mutation gate as 100, to match
19
+ `stryker.config.json`. The live contributor docs that named 95, or called 97.42 % the
20
+ theoretical maximum, say 100 and describe the in-source suppressions.
21
+
22
+ ### Tooling
23
+
24
+ - Stryker's `thresholds.break` is 100, so `pnpm mutation` and the cold run fail below a score of 100. `high` and `low` are 100 too.
25
+
26
+ ## [1.4.4] - 2026-11-01
27
+
28
+ ### Documentation
29
+
30
+ - The Quick Start's "Output (JSON, production)" sample is now exactly what the flow prints:
31
+ it gains `deployment`, `userId` and `event.name`, and its version matches the snippet. The
32
+ request and trace fields (`requestId`, `tenantId`, `traceId`, `spanId`) are no longer in it, since
33
+ they are absent outside an HTTP request and an active span; a sentence says when they appear.
34
+
35
+ ### Tests
36
+
37
+ - A unit test executes the README Quick Start (sections 2 and 4) as written and asserts the JSON
38
+ lines it logs. `check:published` only type-checks the snippets; this one runs them. It also
39
+ requires the README's "Output (JSON, production)" sample to have the same keys as the real line.
40
+
14
41
  ## [1.4.3] - 2026-10-31
15
42
 
16
43
  ### Added
@@ -2192,7 +2219,9 @@ published `dist/` is identical — no runtime behaviour changes for consumers.
2192
2219
  - Professional CI suite: `ci.yml`, `bench.yml`, `codeql.yml`, `scorecard.yml`,
2193
2220
  `release.yml`, Dependabot, and issue templates
2194
2221
 
2195
- [Unreleased]: https://github.com/bymaxone/nest-logger/compare/v1.4.3...HEAD
2222
+ [Unreleased]: https://github.com/bymaxone/nest-logger/compare/v1.4.5...HEAD
2223
+ [1.4.5]: https://github.com/bymaxone/nest-logger/compare/v1.4.4...v1.4.5
2224
+ [1.4.4]: https://github.com/bymaxone/nest-logger/compare/v1.4.3...v1.4.4
2196
2225
  [1.4.3]: https://github.com/bymaxone/nest-logger/compare/v1.4.2...v1.4.3
2197
2226
  [1.4.2]: https://github.com/bymaxone/nest-logger/compare/v1.4.1...v1.4.2
2198
2227
  [1.4.1]: https://github.com/bymaxone/nest-logger/compare/v1.4.0...v1.4.1
package/README.md CHANGED
@@ -325,31 +325,30 @@ export class PaymentsService {
325
325
  }
326
326
  ```
327
327
 
328
- Output (JSON, production):
328
+ Output (JSON, production) for the `PAYMENT_REFUND_SUCCESS` call above, with the options from step 2:
329
329
 
330
330
  ```json
331
331
  {
332
332
  "level": "info",
333
333
  "time": "2026-05-28T10:12:44.512Z",
334
- "service": { "name": "my-app", "version": "abc123" },
335
- "logKey": "PAYMENT_REFUND_SUCCESS",
336
- "msg": "Refund processed",
334
+ "service": { "name": "my-app", "version": "1.0.0" },
335
+ "deployment": { "environment": { "name": "production" } },
337
336
  "context": "PaymentsService",
338
- "requestId": "r_7f3a9b",
339
- "tenantId": "t_acme",
340
- "traceId": "4bf92f3577b34da6a3ce929d0e0e4736",
341
- "spanId": "00f067aa0ba902b7",
342
337
  "paymentId": "pi_xyz",
343
- "stripeRefundId": "re_abc"
338
+ "stripeRefundId": "re_abc",
339
+ "logKey": "PAYMENT_REFUND_SUCCESS",
340
+ "userId": "u_42",
341
+ "event.name": "payment.refund.success",
342
+ "msg": "Refund processed"
344
343
  }
345
344
  ```
346
345
 
346
+ `requestId` and `tenantId` are added when the call runs inside an HTTP request that passed through the request-ID middleware (`tenantId` only when the request carries the tenant header), and `traceId` and `spanId` when an OpenTelemetry span is active (see [OpenTelemetry correlation](#6-opentelemetry-correlation)). Outside a request, as in the flow above, they are absent.
347
+
347
348
  Output (pretty-print, development):
348
349
 
349
350
  ```
350
351
  [10:12:44.512] INFO (my-app): PAYMENT_REFUND_SUCCESS
351
- requestId: "r_7f3a9b"
352
- tenantId: "t_acme"
353
352
  paymentId: "pi_xyz"
354
353
  stripeRefundId: "re_abc"
355
354
  ```
@@ -1340,7 +1339,7 @@ A logger runs on every request of every service that installs it, so the suite i
1340
1339
 
1341
1340
  - ✅ **100% line coverage** — statements, branches, functions, and lines, enforced as a release gate across unit + e2e
1342
1341
  - ✅ **100% mutation score** — verified with [Stryker](https://stryker-mutator.io/) on a cold run
1343
- against a `break` threshold of 95, with **zero** surviving mutants. The handful that no test can
1342
+ against a `break` threshold of 100, with **zero** surviving mutants. The handful that no test can
1344
1343
  kill are suppressed on the line they apply to and each carries its reason; a rule against those
1345
1344
  comments was retired once their cost was measured at **+0.10 kB brotli**, roughly a tenth of
1346
1345
  what it had been assumed to be (see the [report](./docs/mutation_testing_results.md))
@@ -1352,7 +1351,7 @@ pnpm test # unit tests (Jest)
1352
1351
  pnpm test:cov # coverage report
1353
1352
  pnpm test:e2e # end-to-end tests (supertest)
1354
1353
  pnpm test:cov:all # full coverage gate (100% statements/branches/functions/lines)
1355
- pnpm mutation # Stryker mutation testing (95% break gate)
1354
+ pnpm mutation # Stryker mutation testing (100% break gate)
1356
1355
  pnpm typecheck # tsc strict check (all tsconfig variants)
1357
1356
  pnpm lint # ESLint
1358
1357
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bymax-one/nest-logger",
3
- "version": "1.4.3",
3
+ "version": "1.4.5",
4
4
  "description": "Structured JSON logging for NestJS based on Pino 10, with optional OpenTelemetry correlation.",
5
5
  "author": "Bymax One <support@bymax.one>",
6
6
  "license": "MIT",