@pond-ts/react 0.13.0 → 0.13.2
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 +128 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,10 +7,137 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
7
7
|
file covers both packages. Pre-1.0: minor bumps may include new features and
|
|
8
8
|
type-level changes; patch bumps are strictly additive.
|
|
9
9
|
|
|
10
|
-
[Unreleased]: https://github.com/pjm17971/pond-ts/compare/v0.13.
|
|
10
|
+
[Unreleased]: https://github.com/pjm17971/pond-ts/compare/v0.13.2...HEAD
|
|
11
11
|
|
|
12
12
|
## [Unreleased]
|
|
13
13
|
|
|
14
|
+
## [0.13.2] — 2026-05-01
|
|
15
|
+
|
|
16
|
+
Strictly additive over v0.13.1. Adds `Trigger.count(n)` per the
|
|
17
|
+
second wave of Codex feedback after webapp-telemetry adoption. Use
|
|
18
|
+
case: "very hot metrics like row stale times or handler payload
|
|
19
|
+
sizes where event-time boundaries may lag during bursts, but
|
|
20
|
+
per-event is too noisy."
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- **`Trigger.count(n)`** — third trigger primitive alongside
|
|
25
|
+
`Trigger.event()` and `Trigger.clock(seq)` /
|
|
26
|
+
`Trigger.every(duration)`. Emits one rolling-window snapshot
|
|
27
|
+
every `n` source events, with the counter resetting on each fire
|
|
28
|
+
(so "events since the last emission," not "every Nth event modulo
|
|
29
|
+
the input"):
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
const rolling = timings.rolling(
|
|
33
|
+
'5m',
|
|
34
|
+
{ latency: 'p95' },
|
|
35
|
+
{ trigger: Trigger.count(1000) },
|
|
36
|
+
);
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
- **Data-driven** — counter only advances on event ingestion, no
|
|
40
|
+
`setTimeout` inside the library. The first emission fires on
|
|
41
|
+
the `n`th event, not the first.
|
|
42
|
+
- **Per-partition** — when applied via `partitionBy(...).rolling(...)`,
|
|
43
|
+
each partition counts independently. Count does not synchronise
|
|
44
|
+
emission across partitions; use `Trigger.clock` for that.
|
|
45
|
+
- **Rejects non-positive integers** — `Trigger.count(0)`,
|
|
46
|
+
`Trigger.count(-1)`, `Trigger.count(1.5)`, and `Trigger.count(NaN)`
|
|
47
|
+
throw at construction with a clear error.
|
|
48
|
+
|
|
49
|
+
### Changed
|
|
50
|
+
|
|
51
|
+
- **Trigger taxonomy expanded.** `Trigger` union is now
|
|
52
|
+
`EventTrigger | ClockTrigger | CountTrigger`. Per-partition
|
|
53
|
+
rolling overload widened to accept count triggers and route them
|
|
54
|
+
to the `LivePartitionedView` per-partition path (not the synced
|
|
55
|
+
rolling — count semantics across partitions are ambiguous and
|
|
56
|
+
there's no killer use case for either choice yet).
|
|
57
|
+
|
|
58
|
+
### Docs
|
|
59
|
+
|
|
60
|
+
- `live-transforms.mdx`: trigger section now lists all three
|
|
61
|
+
primitives up front with a dedicated subsection on count
|
|
62
|
+
semantics. JSDoc on `LiveRollingAggregation.trigger` updated to
|
|
63
|
+
mention count.
|
|
64
|
+
- PLAN.md: trigger-taxonomy expansion RFC sketch captured —
|
|
65
|
+
documents the shipped `count` plus deferred decisions on `idle`
|
|
66
|
+
(the wall-clock crossing, requires its own RFC), `any` (composite,
|
|
67
|
+
ships after singletons exist), and `threshold` / `manual`
|
|
68
|
+
(declined / deferred as misclassified or sugar over existing
|
|
69
|
+
primitives).
|
|
70
|
+
|
|
71
|
+
### Tests
|
|
72
|
+
|
|
73
|
+
- 7 new tests in `test/Triggers.test.ts`:
|
|
74
|
+
- `Trigger.count(n)` shape and freeze
|
|
75
|
+
- Non-positive integer rejection (zero, negative, fractional, NaN)
|
|
76
|
+
- Emission cadence: snapshots every Nth event with correct
|
|
77
|
+
rolling-window values
|
|
78
|
+
- `Trigger.count(1)` behavioural equivalence to `Trigger.event()`
|
|
79
|
+
- No emission during quiet periods (data-driven)
|
|
80
|
+
- `rolling.value()` independent of trigger
|
|
81
|
+
- Per-partition independent counting via
|
|
82
|
+
`partitionBy().rolling(..., { trigger: Trigger.count(2) })`
|
|
83
|
+
- Total core tests: 1070 (was 1063).
|
|
84
|
+
|
|
85
|
+
[0.13.2]: https://github.com/pjm17971/pond-ts/compare/v0.13.1...v0.13.2
|
|
86
|
+
|
|
87
|
+
## [0.13.1] — 2026-05-01
|
|
88
|
+
|
|
89
|
+
Strictly additive over v0.13.0. Adds a sugar factory on `Trigger`
|
|
90
|
+
following Codex feedback after adopting v0.12 triggers in the
|
|
91
|
+
production webapp telemetry app: the explicit form
|
|
92
|
+
(`Trigger.clock(Sequence.every('30s'))`) is "ceremony-heavy for the
|
|
93
|
+
common case."
|
|
94
|
+
|
|
95
|
+
### Added
|
|
96
|
+
|
|
97
|
+
- **`Trigger.every(duration, options?)`** — sugar for the common
|
|
98
|
+
`Trigger.clock(Sequence.every(duration, options))` pattern. Removes
|
|
99
|
+
the need to import `Sequence` for trigger-only use sites. Forwards
|
|
100
|
+
`{ anchor }` to `Sequence.every` and inherits the same fixed-step
|
|
101
|
+
validation:
|
|
102
|
+
|
|
103
|
+
```ts
|
|
104
|
+
// Before
|
|
105
|
+
live.rolling('1m', mapping, {
|
|
106
|
+
trigger: Trigger.clock(Sequence.every('30s')),
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
// After
|
|
110
|
+
live.rolling('1m', mapping, { trigger: Trigger.every('30s') });
|
|
111
|
+
|
|
112
|
+
// Anchored variant (passes through to Sequence.every):
|
|
113
|
+
Trigger.every('30s', { anchor: 5_000 });
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
The explicit `Trigger.clock(seq)` form remains for callers who
|
|
117
|
+
already hold a `Sequence` object (e.g. one shared across batch
|
|
118
|
+
`series.aggregate(seq, ...)` and live triggers) — `Trigger.every`
|
|
119
|
+
always builds a fresh `Sequence`.
|
|
120
|
+
|
|
121
|
+
### Docs
|
|
122
|
+
|
|
123
|
+
- Telemetry recipe and live-transforms doc updated to lead with
|
|
124
|
+
the sugar form. `Trigger.clock` documented as the explicit form
|
|
125
|
+
for "I already have a Sequence object" cases.
|
|
126
|
+
- JSDoc on `LiveRollingAggregation.trigger` and the partitioned
|
|
127
|
+
rolling clock-trigger example updated to show the sugar.
|
|
128
|
+
|
|
129
|
+
### Tests
|
|
130
|
+
|
|
131
|
+
- 3 new tests in `test/Triggers.test.ts` covering: sugar produces
|
|
132
|
+
`kind: 'clock'` with correct stepMs/anchor; anchor option
|
|
133
|
+
forwards correctly; behavioural equivalence between
|
|
134
|
+
`Trigger.every('30s')` and `Trigger.clock(Sequence.every('30s'))`
|
|
135
|
+
pinned by emission-time comparison through a real
|
|
136
|
+
`LiveRollingAggregation`.
|
|
137
|
+
- Total core tests: 1063 (was 1060).
|
|
138
|
+
|
|
139
|
+
[0.13.1]: https://github.com/pjm17971/pond-ts/compare/v0.13.0...v0.13.1
|
|
140
|
+
|
|
14
141
|
## [0.13.0] — 2026-05-01
|
|
15
142
|
|
|
16
143
|
The "AggregateOutputMap on live" release. Closes the feature-parity
|