|
1 | 1 | # @stackables/bridge-compiler |
2 | 2 |
|
| 3 | +## 2.1.0 |
| 4 | + |
| 5 | +### Minor Changes |
| 6 | + |
| 7 | +- [#82](https://github.com/stackables/bridge/pull/82) [`cf5cd2e`](https://github.com/stackables/bridge/commit/cf5cd2e40e6339fb3e896e05dbdbe66b0b5d77a9) Thanks [@aarne](https://github.com/aarne)! - Add `requestedFields` option to `executeBridge()` for sparse fieldset filtering. |
| 8 | + |
| 9 | + When provided, only the listed output fields (and their transitive tool dependencies) are resolved. |
| 10 | + Tools that feed exclusively into unrequested fields are never called, reducing latency and upstream |
| 11 | + bandwidth. |
| 12 | + |
| 13 | + Supports dot-separated paths and a trailing wildcard (`["id", "price", "legs.*"]`). |
| 14 | + |
| 15 | +### Patch Changes |
| 16 | + |
| 17 | +- [`badbb78`](https://github.com/stackables/bridge/commit/badbb7859e270ea6c82ca8c4a5132f254fca9978) Thanks [@aarne](https://github.com/aarne)! - Fix three code generation bugs that caused `SyntaxError: await is only valid in async functions` when array mappings combined `catch` fallbacks or element-scoped tools with control flow. |
| 18 | + |
| 19 | + - **Bug 1 – catch inside array `.map()`:** `needsAsync` only checked for element-scoped tool calls. Wires with `catch` fallbacks or `catch` control flow that fall back to an async IIFE now also trigger the async `for...of` loop path. |
| 20 | + |
| 21 | + - **Bug 2 – element-scoped tool inside `.flatMap()`:** When a `?? continue` (or similar) control flow was detected first, the compiler unconditionally emitted `.flatMap()`. If the same loop also contained an element-scoped tool (`alias tool:iter`), the `await __call(...)` was placed inside a synchronous `.flatMap()` callback. `needsAsync` is now evaluated before the control-flow check, and when true, a `for...of` loop with a native `continue` statement is emitted instead. |
| 22 | + |
| 23 | + - **Bug 3 – nested sub-array async blindspot:** The inner sub-array handler in `buildElementBody` never calculated `needsAsync`, always falling back to a synchronous `.map()`. It now uses the same async `for...of` IIFE pattern when inner wires contain element-scoped tools or catch expressions. |
| 24 | + |
| 25 | +- [#84](https://github.com/stackables/bridge/pull/84) [`837ec1c`](https://github.com/stackables/bridge/commit/837ec1cc74c0a76e205d818b94c33b4c28e3628d) Thanks [@aarne](https://github.com/aarne)! - Fix several AOT compiler/runtime parity bugs discovered via fuzzing: |
| 26 | + |
| 27 | + - Fix `condAnd` and `condOr` code generation to match runtime boolean semantics. |
| 28 | + - Fix nullish fallback chaining so `??` handling matches runtime overdefinition boundaries. |
| 29 | + - Fix overdefinition precedence so the first constant wire remains terminal, matching runtime behavior. |
| 30 | + - Fix `serializeBridge` quoting for empty-string and slash-only string constants so parse/serialize/parse round-trips remain valid. |
| 31 | + - Add deterministic regression coverage for these parity cases to prevent regressions. |
| 32 | + |
| 33 | +- Updated dependencies [[`cf5cd2e`](https://github.com/stackables/bridge/commit/cf5cd2e40e6339fb3e896e05dbdbe66b0b5d77a9)]: |
| 34 | + - @stackables/bridge-core@1.2.0 |
| 35 | + |
3 | 36 | ## 2.0.0 |
4 | 37 |
|
5 | 38 | ### Major Changes |
|
0 commit comments