@zerotal/monitor 1.3.0 → 1.5.0

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
@@ -4,10 +4,48 @@ All notable changes to this package are documented here. The format is
4
4
  based on [Keep a Changelog](https://keepachangelog.com/); this package
5
5
  follows the Zerotal monorepo's unified versioning.
6
6
 
7
- **Maturity: `experimental`**
7
+ **Maturity: `stable`**
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## [1.5.0] — 2026-08-15
12
+
13
+ ### Added
14
+
15
+ - **Tests for the three riskiest untested modules**, chosen by consequence rather
16
+ than by coverage percentage:
17
+
18
+ - **`MonitorAuthMiddleware`** — the only thing between the public internet and a
19
+ page showing recent requests, their users, their IPs and the SQL the app ran.
20
+ Pinned against the two ways a gate fails open without anyone noticing: a
21
+ forgotten `await` on an async predicate (a promise is always truthy, so a
22
+ denying predicate would admit everyone) and a predicate that throws. Also pins
23
+ that the _default_ predicate survives config merging as a callable — `deepMerge`
24
+ cannot carry a function through, and the reattach only fires when the caller
25
+ supplied one.
26
+ - **`RingBuffer` / `TimeWindow` / `percentile`** — the bounded structures that
27
+ keep monitoring memory from growing without limit. A buffer that quietly stops
28
+ evicting is a memory leak in the observability layer, and an off-by-one
29
+ percentile misreports latency in the direction nobody checks.
30
+ - **`renderPrometheus`** — the one output a machine parses rather than a person
31
+ reads, where a scraper rejects a malformed response without telling the
32
+ application. Covers label escaping for route paths carrying a quote, a
33
+ backslash or a newline, and metric-name sanitisation for display-string gauge
34
+ labels — all of which come from application data, so none are hypothetical.
35
+
36
+ Monitor's suite goes from 49 tests to 81.
37
+
38
+ ### Changed
39
+
40
+ - **Maturity is now `stable`** — the public API follows SemVer strictly for the rest
41
+ of the 1.x line. Both gates are closed: `@zerotal/flow` and `@zerotal/flow-ui` (which
42
+ the panel renders through) are themselves stable now, and the coverage gap is closed
43
+ where it mattered.
44
+
45
+ Worth stating plainly, since the surface looks larger than it is: of 685 lines of
46
+ public API, 65 entries are type definitions describing the snapshot shape and only
47
+ 11 are callable entry points — every one of which is documented.
48
+
11
49
  ## [1.1.0] — 2026-08-08
12
50
 
13
51
  ### Fixed
package/README.md CHANGED
@@ -170,5 +170,7 @@ src/
170
170
 
171
171
  ## Status
172
172
 
173
- `maturity: experimental`. The live adapters degrade gracefully when an optional
174
- peer (`queue`, `scheduler`, `telemetry`) isn't installed.
173
+ `maturity: stable` the public API follows SemVer strictly for the rest of the 1.x
174
+ line, and its shape is snapshotted in `api-surface.md`, which CI diffs on every change.
175
+ The live adapters degrade gracefully when an optional peer (`queue`, `scheduler`,
176
+ `telemetry`) isn't installed.
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@zerotal/monitor",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "license": "MIT",
5
- "maturity": "experimental",
5
+ "maturity": "stable",
6
6
  "private": false,
7
7
  "type": "module",
8
8
  "main": "./src/index.ts",
@@ -29,14 +29,14 @@
29
29
  "typecheck": "tsc --noEmit"
30
30
  },
31
31
  "dependencies": {
32
- "@zerotal/core": "1.3.0",
33
- "@zerotal/flow-ui": "1.3.0",
34
- "@zerotal/flow": "1.3.0"
32
+ "@zerotal/core": "1.5.0",
33
+ "@zerotal/flow-ui": "1.5.0",
34
+ "@zerotal/flow": "1.5.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@zerotal/queue": "1.3.0",
38
- "@zerotal/scheduler": "1.3.0",
39
- "@zerotal/telemetry": "1.3.0"
37
+ "@zerotal/queue": "1.5.0",
38
+ "@zerotal/scheduler": "1.5.0",
39
+ "@zerotal/telemetry": "1.5.0"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@zerotal/queue": "^1.0.0",
@@ -18,7 +18,7 @@ import type {
18
18
  CommandRan,
19
19
  } from "@zerotal/core";
20
20
  import type { MonitorStore } from "../MonitorStore.ts";
21
- import { collectRequestState, markRecorded } from "./ctxBuffers.ts";
21
+ import { markRecorded } from "./ctxBuffers.ts";
22
22
 
23
23
  // Framework/asset noise the panel shouldn't chart as application traffic.
24
24
  const IGNORE_PREFIXES = [