@bymax-one/nest-logger 1.3.0 → 1.3.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/CHANGELOG.md CHANGED
@@ -11,6 +11,34 @@ heading here.
11
11
 
12
12
  ## [Unreleased]
13
13
 
14
+ ## [1.3.1] - 2026-08-18
15
+
16
+ ### Documentation
17
+
18
+ - **`excludePaths` says what its defaults do not reach.** The defaults are
19
+ `[/^\/health$/, /^\/metrics$/]`, and `@bymax-one/nest-core` serves liveness and readiness at
20
+ `/health/live` and `/health/ready` with no bare `/health` at all — so the default excludes a
21
+ route that does not exist while logging both probes. A consumer running both measured **8272 of
22
+ 8274** HTTP entries as the liveness probe, at one container healthcheck every ten seconds; at
23
+ orchestrator volume it is the same shape with more zeros. There is no error and no warning, and
24
+ the config reads as though it were handled.
25
+
26
+ The defaults are **not** widened, and the reason is checkable rather than a preference: both
27
+ prefixes are configurable there (`DEFAULT_HEALTH_PATH`, `DEFAULT_METRICS_PATH`). A default
28
+ naming specific subpaths would be less wrong rather than correct, and a prefix pattern would
29
+ silently swallow a consumer's own `/health/*` route they did want logged. Excluding a path
30
+ decides which requests vanish from the record, so it stays explicit — the docblock now carries
31
+ the one-line fix for the stock layout, and it ships in the `.d.ts` where someone wiring the two
32
+ libraries reads it.
33
+
34
+ ### Internal
35
+
36
+ - **The last surviving mutant is gone, by deletion rather than annotation.** A `catch` in
37
+ `report-destination-failure` re-assigned `undefined` to a variable already `undefined` from its
38
+ declaration, so emptying the block changed no output for any input and no test could kill it. A
39
+ Stryker directive was tried first and was not honoured at that position. The project scores
40
+ **100.00** on a cold run: 1515 mutants, 841 killed, zero survivors, 145 documented equivalents.
41
+
14
42
  ## [1.3.0] - 2026-08-18
15
43
 
16
44
  ### Fixed
@@ -1794,7 +1822,8 @@ published `dist/` is identical — no runtime behaviour changes for consumers.
1794
1822
  - Professional CI suite: `ci.yml`, `bench.yml`, `codeql.yml`, `scorecard.yml`,
1795
1823
  `release.yml`, Dependabot, and issue templates
1796
1824
 
1797
- [Unreleased]: https://github.com/bymaxone/nest-logger/compare/v1.3.0...HEAD
1825
+ [Unreleased]: https://github.com/bymaxone/nest-logger/compare/v1.3.1...HEAD
1826
+ [1.3.1]: https://github.com/bymaxone/nest-logger/compare/v1.3.0...v1.3.1
1798
1827
  [1.3.0]: https://github.com/bymaxone/nest-logger/compare/v1.2.9...v1.3.0
1799
1828
  [1.2.9]: https://github.com/bymaxone/nest-logger/compare/v1.2.7...v1.2.9
1800
1829
 
@@ -1137,7 +1137,6 @@ function safeMinLevel(destination) {
1137
1137
  const read = destination.minLevel;
1138
1138
  resolved = isLogLevel(read) ? read : void 0;
1139
1139
  } catch {
1140
- resolved = void 0;
1141
1140
  }
1142
1141
  resolvedMinLevels.set(destination, resolved);
1143
1142
  return resolved;
@@ -260,6 +260,21 @@ interface HttpOptions {
260
260
  * Paths that bypass HTTP logging (health checks, metrics). Defaults:
261
261
  * `/health`, `/metrics`.
262
262
  *
263
+ * The defaults do NOT cover `@bymax-one/nest-core`, and that is the common case
264
+ * worth knowing before you rely on them. It serves liveness and readiness at
265
+ * `/health/live` and `/health/ready`, and no bare `/health` at all, so
266
+ * `/^\/health$/` excludes a route that does not exist while both probes are
267
+ * logged. Measured on one deployment: 8272 of 8274 HTTP entries were the
268
+ * liveness probe. Set `excludePaths` yourself when wiring the two together —
269
+ * `[/^\/health\/(live|ready)$/, /^\/metrics$/]` matches the stock layout.
270
+ *
271
+ * The defaults are not widened to include those subpaths because both prefixes
272
+ * are CONFIGURABLE there (`DEFAULT_HEALTH_PATH`, `DEFAULT_METRICS_PATH`): any
273
+ * default naming specific subpaths would be less wrong rather than correct, and
274
+ * a prefix pattern would silently swallow a consumer's own `/health/*` route
275
+ * that they did want logged. Excluding a path is a decision about which requests
276
+ * disappear from the record, so it stays explicit.
277
+ *
263
278
  * SECURITY: each pattern is `.test()`-ed against the (attacker-controllable)
264
279
  * request path on every request. Supply only anchored, linear-time regexes
265
280
  * (e.g. `/^\/health$/`); a pattern with catastrophic backtracking would turn a
@@ -260,6 +260,21 @@ interface HttpOptions {
260
260
  * Paths that bypass HTTP logging (health checks, metrics). Defaults:
261
261
  * `/health`, `/metrics`.
262
262
  *
263
+ * The defaults do NOT cover `@bymax-one/nest-core`, and that is the common case
264
+ * worth knowing before you rely on them. It serves liveness and readiness at
265
+ * `/health/live` and `/health/ready`, and no bare `/health` at all, so
266
+ * `/^\/health$/` excludes a route that does not exist while both probes are
267
+ * logged. Measured on one deployment: 8272 of 8274 HTTP entries were the
268
+ * liveness probe. Set `excludePaths` yourself when wiring the two together —
269
+ * `[/^\/health\/(live|ready)$/, /^\/metrics$/]` matches the stock layout.
270
+ *
271
+ * The defaults are not widened to include those subpaths because both prefixes
272
+ * are CONFIGURABLE there (`DEFAULT_HEALTH_PATH`, `DEFAULT_METRICS_PATH`): any
273
+ * default naming specific subpaths would be less wrong rather than correct, and
274
+ * a prefix pattern would silently swallow a consumer's own `/health/*` route
275
+ * that they did want logged. Excluding a path is a decision about which requests
276
+ * disappear from the record, so it stays explicit.
277
+ *
263
278
  * SECURITY: each pattern is `.test()`-ed against the (attacker-controllable)
264
279
  * request path on every request. Supply only anchored, linear-time regexes
265
280
  * (e.g. `/^\/health$/`); a pattern with catastrophic backtracking would turn a
@@ -1134,7 +1134,6 @@ function safeMinLevel(destination) {
1134
1134
  const read = destination.minLevel;
1135
1135
  resolved = isLogLevel(read) ? read : void 0;
1136
1136
  } catch {
1137
- resolved = void 0;
1138
1137
  }
1139
1138
  resolvedMinLevels.set(destination, resolved);
1140
1139
  return resolved;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bymax-one/nest-logger",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
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",