@pond-ts/react 0.14.1 → 0.14.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 +52 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,10 +7,61 @@ 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.14.
|
|
10
|
+
[Unreleased]: https://github.com/pjm17971/pond-ts/compare/v0.14.2...HEAD
|
|
11
11
|
|
|
12
12
|
## [Unreleased]
|
|
13
13
|
|
|
14
|
+
## [0.14.2] — 2026-05-03
|
|
15
|
+
|
|
16
|
+
Hotfix over v0.14.1 — closes a type-narrowing gap on the new
|
|
17
|
+
`'samples'` reducer that the v0.14.1 Layer 2 review caught
|
|
18
|
+
post-merge. The runtime worked, but TypeScript didn't know about
|
|
19
|
+
`'samples'`: passing it through `series.aggregate({ col: 'samples' })`
|
|
20
|
+
or `live.rolling(window, { col: 'samples' })` produced
|
|
21
|
+
`Type '"samples"' is not assignable to type 'AggregateReducer'`,
|
|
22
|
+
and `series.reduce({ col: 'samples' }).col` fell through to
|
|
23
|
+
`ColumnValue | undefined` instead of the narrowed array type.
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- **`'samples'` is now in the type system everywhere.** Added to
|
|
28
|
+
`AggregateFunction` union, both branches of
|
|
29
|
+
`AggregateFunctionsForKind` (numeric and array/string/boolean),
|
|
30
|
+
`AggregateKindForColumn` (so output columns get
|
|
31
|
+
`kind: 'array'`), `ArrayAggregateKind`, and the array branch of
|
|
32
|
+
`ReduceResult` in `types-reduce.ts`.
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
// Pre-v0.14.2: TS error, but ran correctly.
|
|
36
|
+
// Post-v0.14.2: typechecks and narrows the same way `unique` and
|
|
37
|
+
// `top${N}` do — `ReadonlyArray<T>` for source kind T.
|
|
38
|
+
series.reduce({ vals: 'samples' }).vals; // ReadonlyArray<number> | undefined
|
|
39
|
+
|
|
40
|
+
series.aggregate(Sequence.every('5s'), { vals: 'samples' });
|
|
41
|
+
// Output column: { name: 'vals', kind: 'array' }
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
- **`reducer-reference.mdx`** updated: "14 built-in reducers" → 15.
|
|
45
|
+
|
|
46
|
+
### Added
|
|
47
|
+
|
|
48
|
+
- `test-d/types.test-d.ts` block pinning `'samples'` narrowing
|
|
49
|
+
parity with `'unique'` / `'top${N}'`. Closes the regression hole
|
|
50
|
+
the v0.14.1 review surfaced.
|
|
51
|
+
|
|
52
|
+
### Known follow-up
|
|
53
|
+
|
|
54
|
+
The v0.14.1 review also flagged that `npm run verify`'s
|
|
55
|
+
`test:type` step uses `tsconfig.types.json` (covers `src` +
|
|
56
|
+
`test-d/`), not `tsconfig.vitest.json` (covers `test/`) — that's
|
|
57
|
+
why the missing `'samples'` narrowing didn't fail CI even though
|
|
58
|
+
`packages/core/test/samples-reducer.test.ts` had ~30 type errors.
|
|
59
|
+
Captured in DOCPLAN.md / PLAN.md as a future safety-net widening;
|
|
60
|
+
not in scope for v0.14.2 because pre-existing test files have
|
|
61
|
+
their own type drift that would need cleanup first.
|
|
62
|
+
|
|
63
|
+
[0.14.2]: https://github.com/pjm17971/pond-ts/compare/v0.14.1...v0.14.2
|
|
64
|
+
|
|
14
65
|
## [0.14.1] — 2026-05-03
|
|
15
66
|
|
|
16
67
|
The "samples reducer + lifted custom-fn guard" release. Surfaced by
|