@pond-ts/react 0.15.0 → 0.15.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.
Files changed (2) hide show
  1. package/CHANGELOG.md +71 -1
  2. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -7,10 +7,80 @@ 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.15.0...HEAD
10
+ [Unreleased]: https://github.com/pjm17971/pond-ts/compare/v0.15.1...HEAD
11
11
 
12
12
  ## [Unreleased]
13
13
 
14
+ ## [0.15.1] — 2026-05-05
15
+
16
+ Type-narrowing follow-up to v0.15.0. The fused partitioned-rolling
17
+ typing chain exposed a pre-existing pond limitation where
18
+ `partitionBy('host')` widened the partition-column type instead of
19
+ narrowing it to the literal `'host'`. The gRPC experiment's V8
20
+ migration ([pond-grpc-experiment#22](https://github.com/pjm17971/pond-grpc-experiment/pull/22))
21
+ worked around it as `partitionBy<'host'>('host')` — clobbering the
22
+ value-type parameter `K` to fill the column-name slot. v0.15.1
23
+ captures the column literal directly so the workaround can drop.
24
+
25
+ ### Fixed
26
+
27
+ - **`partitionBy` narrows the partition column literal.** The
28
+ `by` argument's literal type now flows into a new `ByCol`
29
+ generic on `LivePartitionedSeries<S, K, ByCol>` and
30
+ `LivePartitionedView<SBase, R, K, ByCol>`. Threaded through every
31
+ per-partition method (`fill`, `diff`, `rate`, `pctChange`,
32
+ `cumulative`, `apply`, the rolling overloads). The fused
33
+ partitioned-rolling overload's
34
+ `FusedPartitionedRollingSchema<S, ByCol, FM>` now resolves
35
+ correctly without the `<'host'>` workaround:
36
+
37
+ ```ts
38
+ // Before v0.15.1: needed the explicit type arg to narrow
39
+ // host through the fused-rolling schema chain.
40
+ live.partitionBy<'host'>('host').rolling({ ... }, { trigger });
41
+
42
+ // v0.15.1+: the literal 'host' is captured automatically.
43
+ live.partitionBy('host').rolling({ ... }, { trigger });
44
+ // Output schema includes `host` narrowed to its column kind;
45
+ // event.get('host') resolves correctly.
46
+ ```
47
+
48
+ Existing V8 callers using the `partitionBy<'host'>('host')`
49
+ workaround continue to narrow correctly. Type-parameter order
50
+ on `partitionBy` is `<ByCol, K>` (column name first, value type
51
+ second) so the explicit `<'host'>` binds the literal to `ByCol`
52
+ — exactly what the workaround intended pre-v0.15.1. The
53
+ workaround can now drop because automatic inference does the
54
+ same job, but it doesn't have to.
55
+
56
+ ### Type system
57
+
58
+ - `LivePartitionedSeries<S, K, ByCol>` — third generic added with
59
+ default `keyof EventDataForSchema<S> & string`. Backwards-
60
+ compatible: existing references to `LivePartitionedSeries<S, K>`
61
+ and `LivePartitionedSeries<S>` resolve to the upper-bound default.
62
+ - `LivePartitionedView<SBase, R, K, ByCol>` — same shape; `ByCol`
63
+ threaded through every chain hop so partition-column literals
64
+ survive `partitionBy('host').fill(...).rolling({...}, opts)`.
65
+
66
+ ### Test surface
67
+
68
+ `test-d/fused-rolling.test-d.ts` extended to pin the narrowing at
69
+ both the root and chained levels:
70
+
71
+ ```ts
72
+ const fC = live.partitionBy('host').rolling({ ... }, { trigger });
73
+ sampleEvent.get('host'); // narrows to string | undefined
74
+
75
+ const chained = live.partitionBy('host').fill({ cpu: 'hold' })
76
+ .rolling({ '1m': { cpu_avg: ... } }, { trigger });
77
+ chainedSample.get('host'); // narrows correctly through the chain
78
+ ```
79
+
80
+ All 1115 + 55 runtime tests still pass; type-d clean.
81
+
82
+ [0.15.1]: https://github.com/pjm17971/pond-ts/compare/v0.15.0...v0.15.1
83
+
14
84
  ## [0.15.0] — 2026-05-05
15
85
 
16
86
  The "fused multi-window rolling" release. Shipping the primitive
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pond-ts/react",
3
- "version": "0.15.0",
3
+ "version": "0.15.1",
4
4
  "description": "React hooks for pond-ts live time series",
5
5
  "license": "MIT",
6
6
  "repository": {