@pond-ts/react 0.19.0 → 0.21.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.
Files changed (2) hide show
  1. package/CHANGELOG.md +72 -1
  2. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -7,12 +7,83 @@ 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.19.0...HEAD
10
+ [Unreleased]: https://github.com/pjm17971/pond-ts/compare/v0.21.0...HEAD
11
+ [0.21.0]: https://github.com/pjm17971/pond-ts/compare/v0.20.0...v0.21.0
12
+ [0.20.0]: https://github.com/pjm17971/pond-ts/compare/v0.19.0...v0.20.0
11
13
  [0.19.0]: https://github.com/pjm17971/pond-ts/compare/v0.18.0...v0.19.0
12
14
  [0.18.0]: https://github.com/pjm17971/pond-ts/compare/v0.17.1...v0.18.0
13
15
 
14
16
  ## [Unreleased]
15
17
 
18
+ ## [0.21.0] — 2026-06-11
19
+
20
+ ### Added
21
+
22
+ - **`TimeSeries.mapColumns({ col: (value) => newValue })`** — a per-cell column
23
+ value transform. The column-scoped counterpart of the event-based `map()`:
24
+ where `map(schema, event => newEvent)` rebuilds whole rows through an
25
+ arbitrary closure (and can change the schema/key), `mapColumns` transforms
26
+ individual columns' values in place, reading the columns directly (no
27
+ per-row `Event`) so it stays on the fast columnar path. Same kind in/out
28
+ (number→number, string→string, …), so the schema is unchanged; missing cells
29
+ carry (the mapper isn't called on `undefined`). ~5–6× faster than the
30
+ `map()` workaround on a build → transform → read pipeline.
31
+
32
+ ### Changed
33
+
34
+ - **`select` / `rename` / `slice` / `cumulative` / `diff` / `rate` /
35
+ `pctChange` / `fill` / `shift` / `collapse` are now column-native.** They
36
+ reshape the columnar store directly instead of materializing events, so the
37
+ columnar construction win is preserved through these transforms — build →
38
+ transform → read pipelines run several× faster (~7–10× for `select` /
39
+ `rename` / `slice`; ~5–7× for the `cumulative` / `diff` / `rate` / `fill` /
40
+ `shift` / `collapse` folds). No API change for type-correct callers (one
41
+ narrow `fill` behavior change is noted under Fixed). `cumulative` / `diff` /
42
+ `rate` / `pctChange` / `fill` / `shift` / `collapse` are also the first
43
+ operators extracted into `batch/operators/` (internal refactor); `fill`
44
+ rebuilds only the columns it actually changes; `slice` normalizes
45
+ `Array.prototype.slice` semantics onto a zero-copy `withRowRange` reshape;
46
+ `collapse` reads only the keyed columns and passes the kept columns through
47
+ by reference.
48
+
49
+ ### Fixed
50
+
51
+ - **`rename` now rejects target-name collisions** (e.g. renaming `a` → `b`
52
+ when `b` already exists) with a clear error, instead of silently producing a
53
+ duplicate-named schema. Also fixes a prototype-chain bug where a column named
54
+ `toString` (or another `Object.prototype` member) could be corrupted during
55
+ a rename.
56
+ - **`fill` now throws on a kind-mismatched literal** (e.g.
57
+ `fill({ value: 'banana' })` where `value` is numeric — type-allowed because
58
+ mapping values are the broad `FillStrategy | ScalarValue`) with a clear
59
+ `RangeError` naming the column, instead of silently producing an
60
+ internally-inconsistent series (the old events path returned the literal
61
+ from `.get()` while the numeric column read `NaN`). The throw is
62
+ gap-dependent — it only fires when the literal would actually be placed.
63
+
64
+ ## [0.20.0] — 2026-06-04
65
+
66
+ Two internal performance improvements driven by the dashboard experiment at
67
+ 256-host stress. **No public API changes** — both are behavior-preserving.
68
+
69
+ ### Changed
70
+
71
+ - **Column-native partition routing.** `partitionBy(...)` over a strict
72
+ time-keyed source now routes its source chunks into per-partition
73
+ **chunked** sub-series via a coalescing staging tier, replacing the
74
+ per-partition `Event[]` retention. A large drop in retained memory and
75
+ object count at high partition counts (gRPC bench at 256 partitions: 60×
76
+ fewer columnar stores, −99.4% `Event` retention, +24% sustained throughput)
77
+ ([#175](https://github.com/pjm17971/pond-ts/pull/175)). Behavior-preserving;
78
+ internal only — no public surface added.
79
+ - **`LiveView.toTimeSeries()` snapshot caching.** The built `TimeSeries` is
80
+ memoized against an internal mutation counter, so back-to-back
81
+ identical-state calls (multiple subscribers, framework commit batching,
82
+ StrictMode double-invoke) return the cached instance by reference instead of
83
+ rebuilding the whole snapshot — ~44 ms → ~0 at a 262k-event window. A
84
+ fresh-state call still builds; safe because `TimeSeries` is immutable
85
+ ([#180](https://github.com/pjm17971/pond-ts/pull/180)).
86
+
16
87
  ## [0.19.0] — 2026-06-02
17
88
 
18
89
  Adds an **experimental column-read surface to the live side** — read typed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pond-ts/react",
3
- "version": "0.19.0",
3
+ "version": "0.21.0",
4
4
  "description": "React hooks for pond-ts live time series",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -32,7 +32,7 @@
32
32
  "test:runtime": "vitest run"
33
33
  },
34
34
  "peerDependencies": {
35
- "pond-ts": "^0.19.0",
35
+ "pond-ts": "^0.21.0",
36
36
  "react": "^18.0.0 || ^19.0.0"
37
37
  },
38
38
  "devDependencies": {