Skip to content

Commit cd9881a

Browse files
chore: update versions
1 parent 837ec1c commit cd9881a

13 files changed

Lines changed: 81 additions & 40 deletions

File tree

.changeset/async-array-mapping-fixes.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

.changeset/seven-files-rest.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

.changeset/sparse-fieldsets.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

packages/bridge-compiler/CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,38 @@
11
# @stackables/bridge-compiler
22

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+
336
## 2.0.0
437

538
### Major Changes

packages/bridge-compiler/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@stackables/bridge-compiler",
3-
"version": "2.0.0",
3+
"version": "2.1.0",
44
"description": "Compiles a BridgeDocument into highly optimized JavaScript code",
55
"main": "./build/index.js",
66
"type": "module",

packages/bridge-core/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# @stackables/bridge-core
22

3+
## 1.2.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+
315
## 1.1.1
416

517
### Patch Changes

packages/bridge-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@stackables/bridge-core",
3-
"version": "1.1.1",
3+
"version": "1.2.0",
44
"description": "Bridge runtime engine — execute pre-compiled bridge instructions",
55
"main": "./build/index.js",
66
"type": "module",

packages/bridge-graphql/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @stackables/bridge-graphql
22

3+
## 1.1.2
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`cf5cd2e`](https://github.com/stackables/bridge/commit/cf5cd2e40e6339fb3e896e05dbdbe66b0b5d77a9)]:
8+
- @stackables/bridge-core@1.2.0
9+
310
## 1.1.1
411

512
### Patch Changes

packages/bridge-graphql/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@stackables/bridge-graphql",
3-
"version": "1.1.1",
3+
"version": "1.1.2",
44
"description": "Bridge GraphQL adapter — wire bridges into a GraphQL schema",
55
"main": "./build/index.js",
66
"type": "module",

packages/bridge-parser/CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# @stackables/bridge-parser
22

3+
## 1.1.1
4+
5+
### Patch Changes
6+
7+
- [#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:
8+
9+
- Fix `condAnd` and `condOr` code generation to match runtime boolean semantics.
10+
- Fix nullish fallback chaining so `??` handling matches runtime overdefinition boundaries.
11+
- Fix overdefinition precedence so the first constant wire remains terminal, matching runtime behavior.
12+
- Fix `serializeBridge` quoting for empty-string and slash-only string constants so parse/serialize/parse round-trips remain valid.
13+
- Add deterministic regression coverage for these parity cases to prevent regressions.
14+
15+
- Updated dependencies [[`cf5cd2e`](https://github.com/stackables/bridge/commit/cf5cd2e40e6339fb3e896e05dbdbe66b0b5d77a9)]:
16+
- @stackables/bridge-core@1.2.0
17+
318
## 1.1.0
419

520
### Minor Changes

0 commit comments

Comments
 (0)