effect-app 4.0.0-beta.256 → 4.0.0-beta.257

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
@@ -1,5 +1,18 @@
1
1
  # @effect-app/prelude
2
2
 
3
+ ## 4.0.0-beta.257
4
+
5
+ ### Minor Changes
6
+
7
+ - e71eb78: Tighten typing of query DSL builders so field/path parameters are constrained to actual field paths instead of bare `string`:
8
+
9
+ - `relation(path)` now infers the relation's element type and constrains `distinctCount`/`sum`/`collect`/`collectDistinct`/`collectFields`/`collectDistinctFields` and the `unit` of `sumExprBy`/`sumExprNormalized` to `FieldPath<Element>`.
10
+ - `relation(path).expr` exposes a scope-bound math-expression builder so `expr.field(...)` inside `sumExpr`/`sumExprBy`/`sumExprNormalized` is typed against the relation element.
11
+ - Top-level `expr.field` accepts an optional generic for opt-in tightening (`expr.field<E>("x")`).
12
+ - `aggregate(schema, build)` accepts a builder callback whose `agg` argument is bound to the source row inferred from the pipe — paths are checked without any explicit generic: `make<Row>().pipe(aggregate(schema, ($) => ({ city: $.field("address.city") })))`. Plain `AggregateMap` form still accepted.
13
+ - `projectComputed(schema, build, mode?)` accepts a builder callback whose `{ relation }` argument is bound to the source row inferred from the pipe: `make<Row>().pipe(projectComputed(out, ({ relation }) => ({ total: relation("items").sum("qty") })))`. Plain `ComputedProjectionMap` form still accepted.
14
+ - `agg<Row>()` factory remains as an escape hatch when the builder is built outside a pipe.
15
+
3
16
  ## 4.0.0-beta.256
4
17
 
5
18
  ### Patch Changes